You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

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

Moderators: winston, another_commander

Post Reply
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by dybal »

That has happened to me quite a lot: I'm Torusing, Space Crowds creates a group of ships ahead of me, I'm decanted and see a melle, with at least one fugitive, and several clean ships: a clear hunter vs pirate scenario...

So, I take a shot at the fugitive, and everyone of them attacks me, pirates and hunters alike!

As I have been tracking those (and others) attacks inconsistent with the in-universe story, I have quite a few traces telling me what is happening on the piorityAI when the player is involved, so I was able to track this one down: the fugitive I attacked sent a message to its group peers asking for help when I hit it, and, surprise, the hunters where part of the group!

There were not two groups, one pirate group and one hunter group, there was just a hunter group, and the fugitive was part of it...

It boils down to ships defined in shipdata.plist with bounty > 0 and both hunter and pirate roles... when a hunter group is spawned, if that ship is chosen to be part of it in the random process, its group peers, having a bounty-hunter AI, will attack it, since it has a bounty, leading to free-for-all melle when the help requesting messages start flying around... _very_ story-inconsitent, and a trap for the näive player when he comes around :lol:

So, if you are creating a ship in you OXP, please don't mix hunter and pirate roles in the same datakey if you are defining explicitly a bounty for the ship!
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by stranger »

It seems unintentional, but realistic scenario, amigo!
Sometimes criminals exploits similar trick in real reality :wink:
Last edited by stranger on Wed Dec 09, 2020 1:55 am, edited 1 time in total.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by dybal »

I think it probably is unintentional too, and there are quite a few scams in the real world, so this one could be realistic, but it's too common: it happens to me each two to three game sessions.

At least one can fight back, if no cop is around, without turning fugitive...
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by another_commander »

I think this is OXP induced.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by dybal »

another_commander wrote: Wed Dec 09, 2020 5:50 am
I think this is OXP induced.
Indeed... the cases I found are, but that could happen with any ship whose shipdata definition defines a bounty and role hunter for the ship.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by another_commander »

If it is indeed a common occurrence as you mentioned above, you can try removing all OXPs and playing for a couple of days expansion-clean. It will surface sooner or later if it is a core problem.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by dybal »

another_commander wrote: Wed Dec 09, 2020 1:15 pm
If it is indeed a common occurrence as you mentioned above, you can try removing all OXPs and playing for a couple of days expansion-clean. It will surface sooner or later if it is a core problem.
I think I have the scenario pretty well defined as an OXP problem: I put traces in all the relevant auxiliary functions for conditions and behaviours in priorityAI, and traces in the core game for when the player becomes someone's defence target, and the change to red alert condition in a NPC (you can see my traces in my Oolite github repo dybal/oolite, branch investigate-gratuitous-police-attacks); the last two times this happened, I started running, paused the game to look at Latest.log, found the place where I hit the fugitive, saw the traces from the fugitive priorityAI asking for help, saw the traces from the hunters priorityAI receiving the help call and the traces from the core game when they added me to their defence targets. That left the question of why the hunters received the fugitive's message asking for help, so I used DebugConsole to look at the fugitive, it had a ship.group defined and the hunters were part of it. The first time it happened, when I got to this point I looked for the log of the fugitive spawning and it was done by Space Crowds, so I added log messages describing the groups it spawned and so this second time I could verify that the role for system.addGroup was hunter and that was the primaryRole of all ships involved, so there was no bug in the core game when those ships got the fugitive's message asking for help.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: You help some hunters agains a pirate and the whole group, pirates and hunters, turn on you?

Post by dybal »

another_commander wrote: Wed Dec 09, 2020 1:15 pm
If it is indeed a common occurrence as you mentioned above, you can try removing all OXPs and playing for a couple of days expansion-clean. It will surface sooner or later if it is a core problem.
One thing that perhaps could be done is to change the AIs so group peers don't attack each other... how to do that, if desirable, is open to debate, but I would suggest changing PriorityAIController.prototype.conditionScannerContainsFugitive, PriorityAIController.prototype.conditionScannerContainsHuntableOffender and PriorityAIController.prototype.conditionScannerContainsSeriousOffender to exclude the ship's group peers, if any, from the results.

That would allow in-universe-stories in which hunter groups might contain a hunter that got an offender status by some minor offense, or fugitive when he defended himself from an attack from a bad cop... his buddies know him and might accept his temporary status (I've had commanders that where there...)
Post Reply