NPC view of "player-unknown" role

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
phkb
Commodore
Commodore
Posts: 2371
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

NPC view of "player-unknown" role

Post by phkb » Wed Aug 02, 2017 4:57 am

I debated whether this was a suggestion, a bug-fix or a potential expansion pack, but in the end I thought it was more of a suggestion than anything else. Anyway...

So I decided to try starting in an Adder. After I launch from Lave's main station, for the first time mind, I see my alert status go red. I know Lave isn't the safest of systems, but this was immediately after launch, I'd barely even cleared the launch corridor. My experience told me this could probably only be one thing: a Hognose who accuses me of eating his brother or something like that, and he decides to start painting my ship with his laser. However, I could see GalCop vipers nearby, and therefore thought that they'd deal with the issue. Which they did - by shooting at me! My start in an Adder ended very quickly.

This experience immediately made me question why the police decided I was the guilty party when we both were 'clean'. And I suspect the answer is that police don't "like" the "player-unknown" role (the starting roles given to the player), according to "role-categories.plist". They don't dislike it, but they don't like it either. And because a Hognose is created as a trader (which police do like), I'm always going to come out worse off (at least until I've managed to change all my "roleWeights" to something the police like.

Now, part of this experience is because of the OXP's I have installed (if I didn't have the Hognose installed, I wouldn't get this particular issue), but I've also seen it play out without Hognose involvement, where I suddenly have police gunning for me even when I've done nothing wrong.

So, I'm wondering about the impact of creating a new role, say "player-new", fill the player's roleWeights with this only when starting a new game (and only then), and add it to "oolite-police-like" group (and the "oolite-pirate-victims" group, of course). No other changes to core code, so any switch to "player-unknown" would stay the same, and be then legitimately viewed with suspicion. My initial test of this solution is promising, but there are undoubtedly pitfalls I haven't considered. Thoughts, anyone?

User avatar
phkb
Commodore
Commodore
Posts: 2371
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: NPC view of "player-unknown" role

Post by phkb » Wed Aug 02, 2017 5:05 am

On reflection, while the above solution might solve issues for new players, the same issues with police viewing "player-unknown" as suspicion remains, so in all likelihood, after a while, players may end up being shot at by police for no apparent reason. So maybe it would be better and easier to just include "player-unknown" into the "oolite-police-like" group.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: NPC view of "player-unknown" role

Post by Diziet Sma » Sun Oct 22, 2017 11:26 am

Hang on.. so it's really possible to have the cops take a dislike to you despite you having done nothing wrong? To my mind, that definitely counts as a bug.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13614
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: NPC view of "player-unknown" role

Post by Cody » Sun Oct 22, 2017 11:29 am

Diziet Sma wrote:
Sun Oct 22, 2017 11:26 am
.. so it's really possible to have the cops take a dislike to you despite you having done nothing wrong?
Sounds about right - even here on Terra!

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: NPC view of "player-unknown" role

Post by Diziet Sma » Sun Oct 22, 2017 11:40 am

Cody wrote:
Sun Oct 22, 2017 11:29 am
Sounds about right - even especially here on Terra!
Fixed that for you.. :wink:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 1998
Joined: Mon May 31, 2010 11:11 pm

Re: NPC view of "player-unknown" role

Post by Switeck » Fri Nov 17, 2017 12:01 am

The rules for shooting a clean ship are simple: don't let the police see you doing it, or they'll likely attack you!

However if the player wasn't shooting, it could be a case of variables not reset/initialized properly on game restart or even 1st start.

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

Re: NPC view of "player-unknown" role

Post by cim » Sat Nov 18, 2017 6:18 pm

The underlying problem is that the police ship sees a Hognose attacking the player, but doesn't know if that's because the player attacked the Hognose first when the police were out of scanner range - so they intervene on the side of the one they like more. In this particular case, theoretically, it could tell - but that requires way more sophistication and memory than the AI has

I think the main bug here is therefore with the Hognose: the role weighting works because NPC ships with a particular NPC role generally have particular behaviours in the main game - if a player on their first launch is fighting with a trader, that should be because the player started it, and therefore the police come to the trader's aid. Probably the Hognose needs a script which updates its primary role after it's added to trader-smuggler or similar.

Post Reply