Clean-attacking System Vessels

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Clean-attacking System Vessels

Post by Lestradae »

Since 1.72.1, I started encountering system vessels that suddenly started to blink red-violet and then proceeded to attack me.

As this happened with a lot of diverse vessels, I assume it's not an oxp thing. They fire at me even if I'm clean, and if I return fire I go fugitive immediately.

Has someone else encountered this? Is it a known bug?

Also, when I shot down one of the system vessel attackers (an RS Imperial Courier-Corvette) it released a "Pitau something" from Simon's ship oxps as escape pod.

There is no reason why an RS Imperial Courier system vessel should go on a rampage, and why does it have a Simon ship as escape pod?

</report>

L
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6630
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I have never experienced this. Next time it happens, please target the vessel that attacks you, press Shift+H, then post the log here. We may be able to figure out something.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Gotcha

Post by Lestradae »

So, got it a second time, a Dragon Assault Craft this time, did the Shift-H thing and here we go:
[dumpState]: State for <ShipEntity 0xd51c7a0>{"Dragon Assault Craft" ID: 494 position: (3995.71, -4485.78, 398781) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT}:
[dumpState.entity]: Universal ID: 494
[dumpState.entity]: Scan class: CLASS_POLICE
[dumpState.entity]: Status: STATUS_IN_FLIGHT
[dumpState.entity]: Position: (3995.71, -4485.78, 398781)
[dumpState.entity]: Orientation: (-0.842917 - 0.124508i - 0.0277074j + 0.522705k)
[dumpState.entity]: Distance travelled: 16423.3
[dumpState.entity]: Energy: 512 of 512
[dumpState.entity]: Mass: 118222
[dumpState.entity]: Owner: <ShipEntity 0xd51c7a0>{"Dragon Assault Craft" ID: 494 position: (3995.71, -4485.78, 398781) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT}
[dumpState.entity]: Flags: isShip, hasMoved, hasRotated, collisionTestFilter
[dumpState.shipEntity]: Name: Dragon Assault Craft
[dumpState.shipEntity]: Display Name: Dragon Assault Craft
[dumpState.shipEntity]: Roles: <OORoleSet 0x1054a308>{interceptor military police wingman}
[dumpState.shipEntity]: Primary role: military
[dumpState.shipEntity]: Script: <OOJSScript 0x10551a40>{"oolite-default-ship-script" version 1.72.1}
[dumpState.shipEntity]: Subentity count: 4
[dumpState.shipEntity]: Behaviour: BEHAVIOUR_RUNNING_DEFENSE
[dumpState.shipEntity]: Target: <PlayerEntity 0x13067578>{"Tiger Mk I" ID: 100 position: (4461.78, -4794.86, 396492) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT}
[dumpState.shipEntity]: Destination: (8338.25, -4865.04, 383842)
[dumpState.shipEntity]: Other destination: (0, 0, 0)
[dumpState.shipEntity]: Waypoint count: 0
[dumpState.shipEntity]: Desired speed: 370
[dumpState.shipEntity]: Fuel: 50
[dumpState.shipEntity]: Fuel accumulator: 1
[dumpState.shipEntity]: Missile count: 6
[dumpState.shipEntity.ai]: AI:
[dumpState.ai]: State machine name: dragonpirateAI.plist
[dumpState.ai]: Current state: ATTACK_SHIP
[dumpState.ai]: Next think time: 217.235
[dumpState.ai]: Next think interval: 0.125
[dumpState.shipEntity]: Frustration: 0.018
[dumpState.shipEntity]: Success factor: 0.994291
[dumpState.shipEntity]: Shots fired: 0
[dumpState.shipEntity]: Time since shot: 17.9736
[dumpState.shipEntity]: Spawn time: 29.769 (187.359 seconds ago)
[dumpState.shipEntity]: Hull temperature: 60
[dumpState.shipEntity]: Heat insulation: 1
[dumpState.shipEntity]: Flags: escortsAreSetUp, isFrangible, canFragment
[dumpState]: State for <ShipEntity 0xd51c7a0>{"Dragon Assault Craft" ID: 494 position: (3578.9, -4059.37, 401062) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT}:
[dumpState.entity]: Universal ID: 494
[dumpState.entity]: Scan class: CLASS_POLICE
[dumpState.entity]: Status: STATUS_IN_FLIGHT
[dumpState.entity]: Position: (3578.9, -4059.37, 401062)
[dumpState.entity]: Orientation: (-0.0775084 - 0.0960194i + 0.083965j + 0.988799k)
[dumpState.entity]: Distance travelled: 18779.6
[dumpState.entity]: Energy: 512 of 512
[dumpState.entity]: Mass: 118222
[dumpState.entity]: Owner: <ShipEntity 0xd51c7a0>{"Dragon Assault Craft" ID: 494 position: (3578.9, -4059.37, 401062) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT}
[dumpState.entity]: Flags: isShip, hasMoved, hasRotated, collisionTestFilter
[dumpState.shipEntity]: Name: Dragon Assault Craft
[dumpState.shipEntity]: Display Name: Dragon Assault Craft
[dumpState.shipEntity]: Roles: <OORoleSet 0x1054a308>{interceptor military police wingman}
[dumpState.shipEntity]: Primary role: military
[dumpState.shipEntity]: Script: <OOJSScript 0x10551a40>{"oolite-default-ship-script" version 1.72.1}
[dumpState.shipEntity]: Subentity count: 4
[dumpState.shipEntity]: Behaviour: BEHAVIOUR_RUNNING_DEFENSE
[dumpState.shipEntity]: Target: <PlayerEntity 0x13067578>{"Tiger Mk I" ID: 100 position: (3740.89, -4327.12, 399558) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT}
[dumpState.shipEntity]: Destination: (8338.25, -4865.04, 383842)
[dumpState.shipEntity]: Other destination: (0, 0, 0)
[dumpState.shipEntity]: Waypoint count: 0
[dumpState.shipEntity]: Desired speed: 370
[dumpState.shipEntity]: Fuel: 50
[dumpState.shipEntity]: Fuel accumulator: 1
[dumpState.shipEntity]: Missile count: 6
[dumpState.shipEntity.ai]: AI:
[dumpState.ai]: State machine name: dragonpirateAI.plist
[dumpState.ai]: Current state: ATTACK_SHIP
[dumpState.ai]: Next think time: 223.55
[dumpState.ai]: Next think interval: 0.125
[dumpState.shipEntity]: Frustration: 0.018
[dumpState.shipEntity]: Success factor: 0.994291
[dumpState.shipEntity]: Shots fired: 0
[dumpState.shipEntity]: Time since shot: 24.3426
[dumpState.shipEntity]: Spawn time: 29.769 (193.727 seconds ago)
[dumpState.shipEntity]: Hull temperature: 60
[dumpState.shipEntity]: Heat insulation: 1
[dumpState.shipEntity]: Flags: escortsAreSetUp, isFrangible, canFragment
[dumpState]: State for <ShipEntity 0xd51c7a0>{"Dragon Assault Craft" ID: 494 position: (3057.38, -3525.86, 403916) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT}:
[dumpState.entity]: Universal ID: 494
[dumpState.entity]: Scan class: CLASS_POLICE
[dumpState.entity]: Status: STATUS_IN_FLIGHT
[dumpState.entity]: Position: (3057.38, -3525.86, 403916)
[dumpState.entity]: Orientation: (-0.15586 - 0.10239i + 0.0760671j + 0.979509k)
[dumpState.entity]: Distance travelled: 21728
[dumpState.entity]: Energy: 512 of 512
[dumpState.entity]: Mass: 118222
[dumpState.entity]: Owner: <ShipEntity 0xd51c7a0>{"Dragon Assault Craft" ID: 494 position: (3057.38, -3525.86, 403916) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT}
[dumpState.entity]: Flags: isShip, hasMoved, collisionTestFilter
[dumpState.shipEntity]: Name: Dragon Assault Craft
[dumpState.shipEntity]: Display Name: Dragon Assault Craft
[dumpState.shipEntity]: Roles: <OORoleSet 0x1054a308>{interceptor military police wingman}
[dumpState.shipEntity]: Primary role: military
[dumpState.shipEntity]: Script: <OOJSScript 0x10551a40>{"oolite-default-ship-script" version 1.72.1}
[dumpState.shipEntity]: Subentity count: 4
[dumpState.shipEntity]: Behaviour: BEHAVIOUR_RUNNING_DEFENSE
[dumpState.shipEntity]: Target: <PlayerEntity 0x13067578>{"Tiger Mk I" ID: 100 position: (2968.28, -3561.61, 403366) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT}
[dumpState.shipEntity]: Destination: (8338.25, -4865.04, 383842)
[dumpState.shipEntity]: Other destination: (0, 0, 0)
[dumpState.shipEntity]: Waypoint count: 0
[dumpState.shipEntity]: Desired speed: 370
[dumpState.shipEntity]: Fuel: 50
[dumpState.shipEntity]: Fuel accumulator: 1
[dumpState.shipEntity]: Missile count: 6
[dumpState.shipEntity.ai]: AI:
[dumpState.ai]: State machine name: dragonpirateAI.plist
[dumpState.ai]: Current state: ATTACK_SHIP
[dumpState.ai]: Next think time: 231.456
[dumpState.ai]: Next think interval: 0.125
[dumpState.shipEntity]: Frustration: 0.018
[dumpState.shipEntity]: Success factor: 0.994291
[dumpState.shipEntity]: Shots fired: 0
[dumpState.shipEntity]: Time since shot: 1.104
[dumpState.shipEntity]: Spawn time: 29.769 (201.699 seconds ago)
[dumpState.shipEntity]: Hull temperature: 60
[dumpState.shipEntity]: Heat insulation: 1
[dumpState.shipEntity]: Flags: escortsAreSetUp, isFrangible, canFragment
[gameController.exitApp]: .GNUstepDefaults synchronized.

Closing log at 2008-12-29 12:48:57 +0100.
Hope you are reading something useful out of this.

</report>

L
Last edited by Lestradae on Mon Dec 29, 2008 11:59 am, edited 2 times in total.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

What do you expect with a pirate (dragonpirate) AI? Smells like a oxp mistake...
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

edit

Post by Lestradae »

Wait a moment. I think I have it. It says "State machine name: dragonpirateAI.plist". I went & had a look.

The Imperial Courier Corvette and the Dragon Assault Craft are both police that have been like_ship'ped from something that has a pirateAI.

I assumed that if the game chooses something with the role of police, wingman or interceptor that had the scan class police it would automatically use the usual policeAI ... am I mistaken? Then there would be a whole class of new problem, which I never experienced before?!

Did something change in 1.72.1 concerning the AI's chosen or did no one including me notice this bug-possibility in RS yet?
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: edit

Post by Svengali »

Lestradae wrote:
I assumed that if the game chooses something with the role of police, wingman or interceptor that had the scan class police it would automatically use the usual policeAI ... am I mistaken? Then there would be a whole class of new problem, which I never experienced before?!
Automatism has always weak points and I don't understand why scripters don't assign roles, AIs or shipScripts for every entity. This is probably the only way to get rid of unwanted behaviour.

EDIT: I think like_ship is a very complex thing, so we better should declare the important keys directly and not via like_ship.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Lestradae wrote:
I assumed that if the game chooses something with the role of police, wingman or interceptor that had the scan class police it would automatically use the usual policeAI ... am I mistaken? Then there would be a whole class of new problem, which I never experienced before?!
Oolite does this automatic, but this ship is not a police, it has a primary role of military:

Code: Select all

[dumpState.shipEntity]: Primary role: military 
[dumpState.shipEntity]: Behaviour: BEHAVIOUR_RUNNING_DEFENSE 
[dumpState.shipEntity]: Target: <PlayerEntity> 
[dumpState.ai]: State machine name: dragonpirateAI.plist 
[dumpState.ai]: Current state: ATTACK_SHIP 
And military is not a role supported by oolite, but only by oxp.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: edit

Post by Lestradae »

Hi Svengali!
Svengali wrote:
Lestradae wrote:
I assumed that if the game chooses something with the role of police, wingman or interceptor that had the scan class police it would automatically use the usual policeAI ... am I mistaken? Then there would be a whole class of new problem, which I never experienced before?!
Automatism has always weak points and I don't understand why scripters don't assign roles, AIs or shipScripts for every entity. This is probably the only way to get rid of unwanted behaviour.
Because I'm juggling an armada of ships here and was relying on this working as I supposed it would - give it the role police/wm/ic and the scan class police, it gets assigned the AI for police.

If I'm mistaken and it doesn't work like that, I have to change it, but then it's strange that to the best of my knowledge this didn't happen before 1.72.1.

For OSE, I'm nearly doing as you suggest - some ships get role-specific AI scripts, especially the future police and navy ships - but for example, future pirates, miners, traders or scavengers should better take their AI from the game, aren't they supposed to do that?!

Please note that this is not about blaming anybody, I just want to know how it works and if I made a mistake in my assumptions about that or if this is a core game bug, because which it is has a massive impact on fixing this.

Svengali wrote:
I think like_ship is a very complex thing, so we better should declare the important keys directly and not via like_ship.
Which would completely defeat the entire purpose of is_template and like_ship, the which I'm going to use extensively for OSE :wink:

Hope one of the Devs can help clarify this AI-choice topic for me,

L

EDIT: Mystery solved, as usual, I overlooked something :oops:
Last edited by Lestradae on Mon Dec 29, 2008 12:46 pm, edited 1 time in total.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

That's it

Post by Lestradae »

Hi Eric Walch,

Thanks very much, that's it! Due to your hint with the military role I know now what the problem is, and also why it started to appear just recently!

The good news is, this is not going to happen in anyone's game but only my OSE beta, and is easy to be weeded out!

The even better news is, that it does work fine for normal police etc. then.

This is happening because I am creating a role for the military, which are called by a navypatrols script and placed into systems. The already newly integrated ships with this new role have a MilitaryAI of their own LittleBear nicely offered to me, but the old RS ships that I have not yet given a work-over, some of them have the role "military" also and so are getting spawned too, but they have no fitting AI (yet) and so the game takes their primary AI stated in their shipdata instead, and if that primary AI is a pirate one, that leads to erratic behaviour!

Thanks, guys, that was great help and I'm off to squash another, new, shiny bug :)

Cheers

L
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: edit

Post by Eric Walch »

Lestradae wrote:
Svengali wrote:
I think like_ship is a very complex thing, so we better should declare the important keys directly and not via like_ship.
Which would completely defeat the entire purpose of is_template and like_ship, the which I'm going to use extensively for OSE :wink:
like_ship in versions until 1.72 always made the change on the master definition and not an intermediate like_ship. When you keep that in mind like_ship works well.

In 1.72 this should have been corrected and you can also make chances on an other like_ship. This is better behaviour but when your OSE code it also used on older oolite versions you better stick to only redefining the original definition. Otherwise like_ship on like_ship will behave different with older oolites.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: edit

Post by Lestradae »

Eric Walch wrote:
like_ship in versions until 1.72 always made the change on the master definition and not an intermediate like_ship. When you keep that in mind like_ship works well.

In 1.72 this should have been corrected and you can also make chances on an other like_ship. This is better behaviour but when your OSE code it also used on older oolite versions you better stick to only redefining the original definition. Otherwise like_ship on like_ship will behave different with older oolites.
Because of exactly those issues and also because the new is_template command only works properly from 1.72.1 onwards, the future OSE's will require Oolite version 1.72.1 or higher to be playable. I already inserted a requires.plist into the beta to be sure for that reason.

I really need the new options of is_template and multiple like_ship'ing for where I'm taking the RS successor, and don't see the need to keep it compatible for older Oolite versions. One of these days we'll have the MNSR anyways :wink:

Thanks for reminding me and clarifying that multiple like_ship'ings only work from 1.72 onwards - I already knew about the is_template command, but not this one. One more reason to go 1.72.1.

Cheers

L
Post Reply