Pirate Cove bug when using oolite trunk ?
Moderators: winston, another_commander
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
Pirate Cove bug when using oolite trunk ?
I suspect that this may be an oolite bug, rather than pirate coves.
Each time I see a Pirate Cove, (Pirate_coves 1.1b.oxp) it launches one (Offender) defense-ship with me as its target. The launched ship sits outside the docking slot and does nothing until attacked.
The pirate cove rewards 10Cr bounty when destroyed, which is funny, I think it should be 100 from memory, and by inspecting the plist?
A couple of questions: does anyone else get this behavior?
Does anyone know of existing issues which could be to blame?
Each time I see a Pirate Cove, (Pirate_coves 1.1b.oxp) it launches one (Offender) defense-ship with me as its target. The launched ship sits outside the docking slot and does nothing until attacked.
The pirate cove rewards 10Cr bounty when destroyed, which is funny, I think it should be 100 from memory, and by inspecting the plist?
A couple of questions: does anyone else get this behavior?
Does anyone know of existing issues which could be to blame?
Re: Pirate Cove bug when using oolite trunk ?
I also get the 10Cr reward, but then the cove has no defenses...and it's even possible to do some highly rewarding trading with them before shooting them downCmdr James wrote:I suspect that this may be an oolite bug, rather than pirate coves.
Each time I see a Pirate Cove, (Pirate_coves 1.1b.oxp) it launches one (Offender) defense-ship with me as its target. The launched ship sits outside the docking slot and does nothing until attacked.
The pirate cove rewards 10Cr bounty when destroyed, which is funny, I think it should be 100 from memory, and by inspecting the plist?
I don't have the inactive ships until I use the cloak and switch it off again - then the defenders behave like you said, sometimes they begin to dock again and won't even return fire. Without cloak usage, they do attack me...but I believe that I need to be closer than within the range in which they are launched.
Screet
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Pirate Cove bug when using oolite trunk ?
Its in playerEntity that anything with scanclass rock (and cargo or buoys) gives a reward of 10% of the bounty. :Cmdr James wrote:The pirate cove rewards 10Cr bounty when destroyed, which is funny, I think it should be 100 from memory, and by inspecting the plist?
Code: Select all
if ((killIsCargo) || (killClass == CLASS_BUOY) || (killClass == CLASS_ROCK))
{
if (![other hasRole:@"tharglet"]) // okay, we'll count tharglets as proper kills
{
score /= 10; // reduce bounty awarded
killAward = NO; // don't award a kill
}
}
That launching ships don't attack you could be a trunk error. They leave with a pirate AI. So they don't use the given target itself but should behave like any other pirate and search for a new target. are you sure you weren't cloaked? In that case the start a docking procedure and will stop scanning. They enter the dockingAI that almost all docking ships use.
Edit: It is also this code line that makes that when a pilot of a hostile ship with 80 cr bounty escapes, you only get 8.0 credits for killing the abandoned ship. In the past I found this a bug but now I see it more as a feature.
It is not the ship that is hostile, but its pilot is to blame for everything. When looking in the code I even see that the legal status of the ship is transferred to the escaping pilot. Pilot, not capsule, so you have to scoop the pod to collect your bounty. Shooting the ship gives you just a 10% bonus in this case.
Last edited by Eric Walch on Sat Mar 14, 2009 10:15 pm, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Pirate Cove bug when using oolite trunk ?
Looking for awarding bounty in the code I found something else I never knew. When you attack a pirate that is busy attacking an innocent trader or police, you do get a reward for helping.
Or better formulated: When the pirate switches his attention to you and the other ship sends you a "thank you" message, the bounty of the hostile ship is raised by a random value. This bounty is collected when you shoot it down, so you still have to work for your money. I just never noticed this during play as a normal player has no real clue about the targets bounty. (except when using Frame's bounty scanner of course)
Or better formulated: When the pirate switches his attention to you and the other ship sends you a "thank you" message, the bounty of the hostile ship is raised by a random value. This bounty is collected when you shoot it down, so you still have to work for your money. I just never noticed this during play as a normal player has no real clue about the targets bounty. (except when using Frame's bounty scanner of course)
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Pirate Cove bug when using oolite trunk ?
That's nice! I did notice that ships attacking police had an increased reward, but I thought that would have been because of their attack on the police, not because of me fighting them.Eric Walch wrote:Looking for awarding bounty in the code I found something else I never knew. When you attack a pirate that is busy attacking an innocent trader or police, you do get a reward for helping.
This thing can especially be seen by fighting thargoids which attack a station or bar - their reward is noticeably higher! Maybe the mechanism with thargoids is a bit different though, as I often saw the same levels of bounty, as could not be expected by pure random increases.
Screet
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Pirate Cove bug when using oolite trunk ?
Killing ships attacking police even gives better awards. Besides above reward, ever hit on a police increases the ships legal status. You can see it very good when installing the bounty scanner.Screet wrote:That's nice! I did notice that ships attacking police had an increased reward, but I thought that would have been because of their attack on the police, not because of me fighting them.
I once kept watching a pirate shooting a police. On every hit its bounty rose. So I decided not to help but wait until the bounty became interesting. Then, after a few minutes I killed the pirate and collected the big award (over 200 credits when I remember well). In this case the police even thanked me, while I let the pirate do its attacks for several minutes.
When I was that police I would have killed that player for starting to help so late.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
On my system, the bounty scanner does not show the bounty for pirate coves. Im pretty sure it does in 1.72, doesnt it?
Edit: and if I use the javascript console to check the bounty, it appears to be 0 (consistent with the bounty scanner)
But, interestingly, shooting a pirate cove inside the station aegis does not result in legal changes, so I suspect that the bounty is set internally, but is not correctly exposed to javascript.
It seems that the reason the launched pirates just sit there doing nothing is that they are escorting the pirate cove. That is to say they are in a group containing several ships -- apparently up to 6, the leader of which is the pirate cove. All the members of the group, except for the launched ship and the pirate cove have an ID of 0. I think this means that they are the unlaunched defense-ships.
So, my analysis so far is that there is something funky in the escort code. Which is embarrasing, as I think it might have been me that broke it I think there is also something odd happening with bounty handling, which used to be ok.
Edit: and if I use the javascript console to check the bounty, it appears to be 0 (consistent with the bounty scanner)
Code: Select all
> player.ship.target.roles
pirate-cove,rockhermit,station
> player.ship.target.bounty
0
It seems that the reason the launched pirates just sit there doing nothing is that they are escorting the pirate cove. That is to say they are in a group containing several ships -- apparently up to 6, the leader of which is the pirate cove. All the members of the group, except for the launched ship and the pirate cove have an ID of 0. I think this means that they are the unlaunched defense-ships.
So, my analysis so far is that there is something funky in the escort code. Which is embarrasing, as I think it might have been me that broke it I think there is also something odd happening with bounty handling, which used to be ok.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Has always been wrong: javascript exposes the legal status as bounty. In the code it are different things. Specially for scanclass thargoid and scanclass rock. Legal status for rock is always zero while it can have a bounty.Cmdr James wrote:On my system, the bounty scanner does not show the bounty for pirate coves. Im pretty sure it does in 1.72, doesnt it?...... does not result in legal changes, so I suspect that the bounty is set internally, but is not correctly exposed to javascript.
Sounds buggy as mothers are supposed to only accept ships with the same scan class as itself as escort. This I definitely never saw in the normal 1.72 release.It seems that the reason the launched pirates just sit there doing nothing is that they are escorting the pirate cove. That is to say they are in a group containing several ships -- apparently up to 6, the leader of which is the pirate cove. .... So, my analysis so far is that there is something funky in the escort code.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
As far as I know that check for same scanclass for escorting has always been in the code. When remembering right it is part of the AI command "scanForFormationLeader". I would look more in why the launched pirates have the wrong AI. They should launch with a plain pirateAI. That AI will never perform an escort.Cmdr James wrote:OK, I have an easy fix for incorrect scan classes escorting each other. But If I commit that change, then what is to stop the pirates from attacking their own pirate-cove? Dont they need to be in the same group to stay friendly?
And pirates only attack traders and a station is never on their list. (only the random hits bar is on the pirate target list but LB explicit put the bar on that list.)
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Group ID for launching defenders was already set with Oolite 1.65 and never gave this result.Cmdr James wrote:Its not the AI thats adding it to the group. I think this is caused by the station setting the group id for the ships it launches.
It must be the AI. To get a ship in performEscort behaviour, it needs an explicit command to do that. The only AI that contains this command is the escortAI. And even when the station would somehow pult launching ships in that behaviour, the pirateAI should almost immediately change that to a flyToRangeFromDestination behaviour. The code that launches pirates is almost identical to the code that launches defense ships from the main station. Is that also acting strange?
UPS-Courier & DeepSpacePirates & others at the box and some older versions
I'm not sure if this is related, but it sounds to me like this could be part of the problem. I'm running 1.72.2 and have the OSE WIP installed.
I just encountered a pirate cove that did launch several pirates to intercept me, but those did stay doing nothing until I began shooting at them...and their friends did just watch.
I then decided to take out the pirate cove, which did cause it to launch another defender. Strangely, this was a constitution (OSE bug) as a military system vessel!!!
Screet
I just encountered a pirate cove that did launch several pirates to intercept me, but those did stay doing nothing until I began shooting at them...and their friends did just watch.
I then decided to take out the pirate cove, which did cause it to launch another defender. Strangely, this was a constitution (OSE bug) as a military system vessel!!!
Screet
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
BTW. With 1.73 all stations will have a event handler for launching ships. My intention was always to do a new upload of Pirate Cove when 1.73 is released. With 1.73 and this handler it becomes possible to attach a custom AI to the launching pirates. The general pirateAI has a few disadvantages as station defenders. And with a customised AI I also can switch to a customised docking AI. Currently you can only give a custom role to predefined defence ships not to a general role as "pirate".
I already prepared the code but will have to wait until the 1.73 release to start testing it.
Screet: Pirate Coves should never launch police as defence ships. Rock hermits do however. Maybe there is a mixup? Actually rockhermits also don't launch police but defenders. When no defenders are defined as with hermits, the system defaults to police. I think this default for hermits is changed for 1.73.
I already prepared the code but will have to wait until the 1.73 release to start testing it.
Screet: Pirate Coves should never launch police as defence ships. Rock hermits do however. Maybe there is a mixup? Actually rockhermits also don't launch police but defenders. When no defenders are defined as with hermits, the system defaults to police. I think this default for hermits is changed for 1.73.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Pirate Cove bug when using oolite trunk ?
I just had some experience which might be due to this. I had another black monk ship hunt a strange looking BCC...and I am very sure that both ships were clean. The black monk ship did some hits on the BCC and I decided that I don't like credit sharks, even when they are clean. Thus I did open fire on the black monk ship...and there was a thanks from the BCC and the black monk ship was an offender.Eric Walch wrote:Looking for awarding bounty in the code I found something else I never knew. When you attack a pirate that is busy attacking an innocent trader or police, you do get a reward for helping.
The code you did report about would explain this, as there was no police around.
Maybe that's a bug, but in this case, I believe it's a nice feature: if two clean ships agree on a third clean ship being the attacker, it does get an offender flag
Screet