Question: <key>roles</key> functions

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

@Ahruman

Post by Lestradae »

@Ahruman: Specifically! Please, please, please explain *drags hair around* *foams from the mouth* *makes uneligible gargling noises*

Total confusion now ... :? :shock: :lol: :cry: :shock: :roll: :P :( :x :lol: :?

PLEASE, again for dummies (me!), slowly for writing down. :oops:
As I stated yesterday in this very thread, scanForNearestShipWithRole: will not see such NPCs as the player, because it only searches by primary role. NPC ships would have “player” in their role set, but never as the primary role, so this problem does not exist. In older versions of Oolite, only the primary role was stored, except in some exceptional (buggy) cases, so this shouldn’t be a problem there either. Whether it’s a useful thing to do is another matter.
Does this mean that ...

Code: Select all

<key>roles</key> 
<string>player hunter trader pirate</string>
... will work as intended and WITHOUT breaking other OXPs in the process or not???

And does it mean that this like_ship thingy mentioned here ...
Commander McLane wrote:
If you examine the original shipdata.plist (the one inside your Oolite.app (you're on a Mac, aren't you?)), you will see that it doesn't even use the like_ship-key.
Ahruman wrote:
I think this is mostly a historical curiosity.
... is no longer nescessary or not?

As I need the information and everyone is telling me something diverging now and I have no idea, please respond, I should be so lucky. (No, no Kylie Minogue advertisements here)

Nervewrecked :roll:

L
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Okay, again: No, it would not break anything. But it wouldn't do anything useful as well.

As I explained in my above post, player-ships and non-player-ships are two different pair of shoes from the game's point of view. For instance they need two different sets of keys in their shipdata (yes, there is a big ("Schnittmenge" - what is that in English? -; but there is also a class of keys which are a must for NPCs, but not needed for player-ships; and another class of keys which is a must for player-ships, but is not needed for NPCs). So why mix them up?

And, as I explained as well, your real task in transforming NPCs into player-ships, is giving them the shipdata-keys that are a "must" for player-ships.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Opps miss read it! Got you.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Release ... that`s it then

Post by Lestradae »

Hi,

thanks all for your feedback.

As I don`t completely understand the roles thing and its potential complexities bug-wise and as I already have roles defined that work I have postponed the roles-rework for a future version.

Otherwise, I`d go even further crazy as usual and we don`t want that, do we.

*goes publish* 8)

L
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

So you already go publish?

Have you given all potential player ships view_position_foo in their shipdata? And tested the resulting views?
Post Reply