Two buggy Purple Haze on many occasions...

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

Moderators: winston, another_commander, Getafix

Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Two buggy Purple Haze on many occasions...

Post by Screet »

Hi,

I don't know where it comes from, but I do very often encounter two Purple Haze, always appearing at the same distance to each other (might be me not being able to see distances well enough, though)...and they do NOTHING.

They appear as (offender) in common large pirate groups or as (clean) in Deep Space pirate groups. Both times the same missing thing: they're practically dead in space.

Firing at them only can cause them to release an escape capsule, but they do NEVER move or act in some other way.

Yesterday I found the hint to use shift-h on strange ships and tried it with my most recent encounter, here is what the log says:

[dumpState]: State for <ShipEntity 0xd1004a0>{"Shield-tail" ID: 667 position: (10408.9, -53.4932, 238591) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT}:
[dumpState.entity]: Universal ID: 667
[dumpState.entity]: Scan class: CLASS_NEUTRAL
[dumpState.entity]: Status: STATUS_IN_FLIGHT
[dumpState.entity]: Position: (10408.9, -53.4932, 238591)
[dumpState.entity]: Orientation: (1 - 0i - 0j - 0k)
[dumpState.entity]: Distance travelled: 0
[dumpState.entity]: Energy: 576 of 576
[dumpState.entity]: Mass: 223824
[dumpState.entity]: Owner: <ShipEntity 0xd0f6288>{"Purple Haze" ID: 665 position: (13691, 10177.1, 235064) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT}
[dumpState.entity]: Flags: isShip, isSunlit
[dumpState.shipEntity]: Name: Shield-tail
[dumpState.shipEntity]: Display Name: Shield-tail
[dumpState.shipEntity]: Roles: <OORoleSet 0x15c52cd0>{escort hunter pirate scavenger shtail}
[dumpState.shipEntity]: Primary role: escort
[dumpState.shipEntity]: Script: <OOJSScript 0xa8e5910>{"oolite-default-ship-script" version 1.72.1}
[dumpState.shipEntity]: Subentity count: 6
[dumpState.shipEntity]: Behaviour: BEHAVIOUR_IDLE
[dumpState.shipEntity]: Destination: (0, 0, 0)
[dumpState.shipEntity]: Other destination: (0, 0, 0)
[dumpState.shipEntity]: Waypoint count: 0
[dumpState.shipEntity]: Desired speed: 0
[dumpState.shipEntity]: Fuel: 90
[dumpState.shipEntity]: Fuel accumulator: 1
[dumpState.shipEntity]: Missile count: 2
[dumpState.shipEntity.ai]: AI:
[dumpState.ai]: State machine name: hunterAI.plist
[dumpState.ai]: Current state: GLOBAL
[dumpState.ai]: Next think time: 6.28616e+010
[dumpState.ai]: Next think interval: 0.125
[dumpState.shipEntity]: Frustration: 0
[dumpState.shipEntity]: Success factor: 0
[dumpState.shipEntity]: Shots fired: 0
[dumpState.shipEntity]: Time since shot: 100138
[dumpState.shipEntity]: Spawn time: 637.092 (137.562 seconds ago)
[dumpState.shipEntity]: Hull temperature: 60
[dumpState.shipEntity]: Heat insulation: 1
[dumpState.shipEntity]: Flags: escortsAreSetUp, isFrangible, canFragment


Any ideas what's wrong with them?

Screet
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Two buggy Purple Haze on many occasions...

Post by Svengali »

Screet wrote:
Any ideas what's wrong with them?
I would bet the AI doesn't exist. If it's the RS version there is no hunterAI.plist so Oolite gives them a nullAI (or dumbAI) with a big thinktime. Do you have any other thing in your logfile?
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Two buggy Purple Haze on many occasions...

Post by Screet »

Svengali wrote:
I would bet the AI doesn't exist. If it's the RS version there is no hunterAI.plist so Oolite gives them a nullAI (or dumbAI) with a big thinktime. Do you have any other thing in your logfile?
When I ran into those ships, there was nothing interesting before that shift-h created entry in the log...and I had to fight some other ships which led me too far away to find them again, thus I could not shoot them down and see if that creates additional info in the log.

Concerning RS, yes, I've got it installed...so if there is a part missing concerning those ships setup, maybe I should delay that info to it's creator? I just did not know where this "playing dead" did come from. Until now, I've only encountered it with this specific shiptype.

Screet
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: Two buggy Purple Haze on many occasions...

Post by Eric Walch »

Svengali wrote:
Screet wrote:
Any ideas what's wrong with them?
I would bet the AI doesn't exist. If it's the RS version there is no hunterAI.plist so Oolite gives them a nullAI (or dumbAI) with a big thinktime. Do you have any other thing in your logfile?
Escorts are always added with an escortAI.plist unless autoAI is set to NO in shipData. And this is probably the case as you ship has a hunterAI. But that AI is stuck in the GLOBAL state. That can mean that the whole hunterAI is missing in your oxp, or more likely, that it has a syntax error. With a syntax error it also does nothing.

When you have (ds) ships with escorts, the escort ships will get a new AI from DSP as soon as the escort has signed on to a mother. But to sign on it needs the original script to work. Therefor they don't work with DSP and don't get the (dse) and they also don't work in normal live.

Just remove its auto_ai from shipdata or set it to yes so it will get the default AI from oolite itself.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Two buggy Purple Haze on many occasions...

Post by Screet »

Eric Walch wrote:
Escorts are always added with an escortAI.plist unless autoAI is set to NO in shipData. And this is probably the case as you ship has a hunterAI. But that AI is stuck in the GLOBAL state. That can mean that the whole hunterAI is missing in your oxp, or more likely, that it has a syntax error. With a syntax error it also does nothing.
Interestingly many ships do have hunter included, but I never saw ships of those types with this bug. Luck?

Screet
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Two buggy Purple Haze on many occasions...

Post by Screet »

Eric Walch wrote:
Escorts are always added with an escortAI.plist unless autoAI is set to NO in shipData. And this is probably the case as you ship has a hunterAI. But that AI is stuck in the GLOBAL state. That can mean that the whole hunterAI is missing in your oxp, or more likely, that it has a syntax error. With a syntax error it also does nothing.
If the AI folder of that oxp should have hunterAI, then this would explain things, theres a dragonhunterAI, though.

I've copied that file, so there's no an additional hunterAI...however it'll be difficult to test, as I can only look for the absence of ships doing nothing. I did not have an extensive look into that other AI, but I guess that this is the missing script. I'll have a closer look into that file when I'm less sleepy (only three hours last night and one hour during the day).

Screet
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: Two buggy Purple Haze on many occasions...

Post by Lestradae »

Eric Walch wrote:
Svengali wrote:
Screet wrote:
Any ideas what's wrong with them?
I would bet the AI doesn't exist. If it's the RS version there is no hunterAI.plist so Oolite gives them a nullAI (or dumbAI) with a big thinktime. Do you have any other thing in your logfile?
Escorts are always added with an escortAI.plist unless autoAI is set to NO in shipData. And this is probably the case as you ship has a hunterAI. But that AI is stuck in the GLOBAL state. That can mean that the whole hunterAI is missing in your oxp, or more likely, that it has a syntax error. With a syntax error it also does nothing.
I'm a bit puzzled.

If that Purple Haze is from RS, it has this AI defined:

<key>ai_type</key>
<string>pirateAI.plist</string>

... but also the following roles:

<key>roles</key>
<string>hunter pirate escort scavenger phaze drnil</string>

... the whole thing originally copied & pasted from the shieldtail.oxp.

Shouldn't this ship, if chosen by the game as a hunter, automatically get a hunterAI assigned? And the pirateAI only used if a role not standard to the core game gets called?

Or am I mistaken there?

:?

L
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Take a look at the name

Code: Select all

[dumpState.shipEntity]: Name: Shield-tail 
Looks like the shtail in RS and original Shield-Tail. And there you can find

Code: Select all

<key>ai_type</key>
<string>hunterAI.plist</string>
But the AI is missing. You could ask Dr.Nil what he thinks about it and if he has a plan to implement something.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Svengali wrote:
Take a look at the name

Code: Select all

[dumpState.shipEntity]: Name: Shield-tail 
Looks like the shtail in RS and original Shield-Tail. And there you can find

Code: Select all

<key>ai_type</key>
<string>hunterAI.plist</string>
But the AI is missing. You could ask Dr.Nil what he thinks about it and if he has a plan to implement something.
Maybe I got something wrong when I wrote ph...I had reported such behaviour of shield tails during ds-testing before in a pm, but never understood what was going on...I'm really quite tired, being sleepy without the ability to sleep can get one quite down...and then, maybe, it was really ph as they are very closely related and there's the like shtail in it...anyway, that bug's coming up when engaging big groups and I haven't seen any other of the ships using hunter do such a thing, probably because they never used hunter but something else instead.

Screet
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Two buggy Purple Haze on many occasions...

Post by Svengali »

Eric Walch wrote:
Escorts are always added with an escortAI.plist unless autoAI is set to NO in shipData.

Just remove its auto_ai from shipdata or set it to yes so it will get the default AI from oolite itself.
The auto_ai-key is not declared at all (neither in RS nor in Shield-Tail), but possibly the default setting has changed to false, or if a customAI is set auto_ai is ignored.

Screet can you check this (maybe tomorrow)?
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Two buggy Purple Haze on many occasions...

Post by Screet »

Svengali wrote:
Eric Walch wrote:
Escorts are always added with an escortAI.plist unless autoAI is set to NO in shipData.

Just remove its auto_ai from shipdata or set it to yes so it will get the default AI from oolite itself.
The auto_ai-key is not declared at all (neither in RS nor in Shield-Tail), but possibly the default setting has changed to false, or if a customAI is set auto_ai is ignored.

Screet can you check this (maybe tomorrow)?
Even though I'm only 200 hits from elite, I'm not too familiar with the file's internals yet, but I'm definitely going to have a closer look into the details...I like this game and especially how it surpasses the original so far very much and as a programmer, bug-hunting, looking for possibly overlooked stuff and such is a natural thing for me ;)

I won't promise results for tomorrow, though, as then there's a big psytrance party in town and I haven't been out for far too long. If I can manage before, I'll report instantly, but it may take until I've slept enough after the party.

Screet
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: Two buggy Purple Haze on many occasions...

Post by Lestradae »

Svengali wrote:
The auto_ai-key is not declared at all (neither in RS nor in Shield-Tail), but possibly the default setting has changed to false, or if a customAI is set auto_ai is ignored.
Noted to be repaired at least for the future-RS version.
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 »

I just looked at DrNils shield-tail. The original one is working perfectly. But the original has as roleset of only: pirate hunter shtail

RS is changing some original oxp's, resulting in behaviour of ships never wanted by the author. So never complain about behaviour at the original author when you have RS installed.

It is correct that the hunterAI is already missing in the original oxp, but that does not matter: It will only be added in its role as pirate or hunter and than the populater will give it the correct role. What now probably goes wrong is quite early in the addition process of the ship resulting that addition is halted before the AI is set to escortAI. And this probably also happens with addition in its other roles.

When you install Shield-tail.oxp of Dr Nil itself there will be no bug! At least it behaved perfectly on my computer and attacked me!
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Eric Walch wrote:
When you install Shield-tail.oxp of Dr Nil itself there will be no bug! At least it behaved perfectly on my computer and attacked me!
The funny thing is, that those ships are not always buggy - they do fly around and look like all other ships, shooting and so on. It's just sometimes in larger groups of other ships, that there are TWO not responding. It's always been two, never one, never three. That's the weirdest part of it.

Screet
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 »

Screet wrote:
It's just sometimes in larger groups of other ships, that there are TWO not responding. It's always been two, never one, never three. That's the weirdest part of it.
When it are always exactly two when it bugs, than it is most likely because it is added as an escort of an other ship that was designed to have two of those as escort. Its primary role of escort also suggests they are added as escort.

I just created a python with two original shtails as escort. (I used Dr Nil's orginal oxp and left the hunterAI in and didn't add an escort role). When added as escort-ship = shtail it worked fine as escort, but when added as escort-role = shtail it defaults to its original, non-existing, AI of hunterAI.

But using a escort-role has never worked right. Until 1.71 it even kept its role it was added in, resulting in not working as escort. You had to add special code (like I did with the Leviathan) to make escort-role work in pre-1.71 oolite. This role is fixed in 1.71 by Kaks. But when the AI is read in for auto AI it looks for a default role for a shtail because this is the role asked for. And that is not defined and it stick to the non-existing hunterAI.

Anyhow, it is clearly a case of creating ships in RS without testing if it indeed does work. And when RS uses more ships with escort-role they may also be buggy because part of them will not have an escortAI defined.
Post Reply