KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
697 stars 230 forks source link

Nametags can't be set on a part not belonging to core's own ship #1222

Open ozin370 opened 9 years ago

ozin370 commented 9 years ago

So I managed to compile and run the current devbuild and I noticed that my script gave me an error when trying to set a nametag on another ship's dockingport (to reserve it so no other ships attempt to dock to the same port).

I get that a core shouldn't be able to control another vessel, but in my (admittedly biast) opinion, limiting nametags is a bit strict. It is basically one of the only ways of inter-ship communication available in kOS at this time, and I am guessing that I'm not the only one that has made use of it.

Would you consider removing the limit on setting nametags?

ozin370 commented 9 years ago

related: https://github.com/KSP-KOS/KOS/pull/1182

Dunbaratu commented 9 years ago

You should still be able to READ another ship's nametag but not SET it. Therefore there is still a way to piggyback communication on top of name tags, but the receiving ship has to look at name tags on the sending ship's vessel to see the signal. That's thematically more correct.

The problem is allowing one vessel to "hack" another by taking action beyond just sending it data that it can choose to ignore if it likes. Put two vessels in a competition against each other and if one of them can clear the nametags of the other, it can essentially break the other one's software's assumptions.

ozin370 commented 9 years ago

But highly inefficient (and convoluted) in implementation when several vessels are around, compared to just setting the part tag. Until some more streamlined communication tools are implemented, I personally see it as an acceptable placeholder.

As for the target vessel having "no say" in what gets set, this is true. But it's up to the user to design his scripts to avoid problems, such as only changing a part tag if it already has a specific tag for example. I've had no issues with it so far at least.

Dunbaratu commented 9 years ago

As for the target vessel having no say, it's false to assume all kOS scripts are owned and designed by the same player. My desire to see it not work comes from wanting to host AI contests between opponents.

ozin370 commented 9 years ago

Hmm, I had not considered that, very good point. I suppose I'll have to settle for commenting out the responsible line for now :)

Dunbaratu commented 8 years ago

Closing as not relevant given that we are going to to inter-vessel comms, and for the reasons mentioned above.