Split: Assassins

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Split: Assassins

Post by cim »

player.roleWeights

Here's an example

Code: Select all

["trader", "trader", "player-unknown", "hunter", "trader", "trader", "player-unknown", "trader-courier+"]
There's not a universal assumed role - each ship picks its own at random from the list when it's spawned (or copies its group leader's, if possible).
Neelix wrote:
I'm curious what it takes to change the assumed role?
Very broadly, actions in accordance with a role will (sometimes) replace one of the entries in the role list. (This will sometimes replace an entry with itself, of course) Travelling to systems you haven't recently visited is likely to set one of the entries back to "player-unknown".

So firing on an asteroid - with a mining laser - will set one of those values to "miner". Keep doing it enough, and other NPCs will start treating you as a miner.

OXPs can both define their own roles (and should usually add them to some of the categories in role-categories.plist if they do) and declare OXP-related actions to be consistent with either their own role or a core role.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Split: Assassins

Post by spara »

cim wrote:
player.roleWeights

Here's an example

Code: Select all

["trader", "trader", "player-unknown", "hunter", "trader", "trader", "player-unknown", "trader-courier+"]
There's not a universal assumed role - each ship picks its own at random from the list when it's spawned (or copies its group leader's, if possible).
Cool. Is it possible to set the role from a script?
Neelix
---- E L I T E ----
---- E L I T E ----
Posts: 288
Joined: Sat May 31, 2014 9:02 pm
Location: Melbourne, Australia

Re: Split: Assassins

Post by Neelix »

cim wrote:
There's not a universal assumed role - each ship picks its own at random from the list when it's spawned (or copies its group leader's, if possible).
So is there any mechanism for an NPC to change it's view of your assumed role as it interacts with or observes the player?

- Neelix
Talaxian Enterprises: [wiki]Vacuum Pump[/wiki] [wiki]Waypoint Here[/wiki]
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Split: Assassins

Post by cim »

player.setPlayerRole to set.
Neelix wrote:
So is there any mechanism for an NPC to change it's view of your assumed role as it interacts with or observes the player?
It's stored in the "playerRole" property of the JS AI controller, which is public and writable.

I've not needed to yet - there are other mechanisms for the NPC to handle the player unexpectedly opening fire on it - but it might be useful for more subtle actions.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Split: Assassins

Post by spara »

cim wrote:
Sorry for being a bit slow here. I thought this sets an entry in the array of player roles, not the assumed role of the player. Have I misunderstood something?
cim wrote:
Neelix wrote:
So is there any mechanism for an NPC to change it's view of your assumed role as it interacts with or observes the player?
It's stored in the "playerRole" property of the JS AI controller, which is public and writable.
This sounds interesting. Have to dig deeper.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Split: Assassins

Post by Switeck »

Not everyone that has an opinion on the subject posts on the right thread, but I feel this is noteworthy to add to the discussion:
https://bb.oolite.space/viewtopic.php?f= ... 50#p225555
Post Reply