[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4280: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression'
Oolite Bulletins • NPC view of "player-unknown" role
Page 1 of 1

NPC view of "player-unknown" role

Posted: Wed Aug 02, 2017 4:57 am
by phkb
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?

Re: NPC view of "player-unknown" role

Posted: Wed Aug 02, 2017 5:05 am
by phkb
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.

Re: NPC view of "player-unknown" role

Posted: Sun Oct 22, 2017 11:26 am
by Diziet Sma
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.

Re: NPC view of "player-unknown" role

Posted: Sun Oct 22, 2017 11:29 am
by Cody
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!

Re: NPC view of "player-unknown" role

Posted: Sun Oct 22, 2017 11:40 am
by Diziet Sma
Cody wrote:
Sun Oct 22, 2017 11:29 am
Sounds about right - even especially here on Terra!
Fixed that for you.. :wink:

Re: NPC view of "player-unknown" role

Posted: Fri Nov 17, 2017 12:01 am
by Switeck
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.

Re: NPC view of "player-unknown" role

Posted: Sat Nov 18, 2017 6:18 pm
by cim
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.