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

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

Post by Screet »

Svengali wrote:
Eric Walch wrote:
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.
As L. wrote, the auto_ai is not there (for all RS ships?!?).

It appears, that the idea to copy the dragonhunterAI should work. I did not find anything ship specific in it and from what I've read things do appear to make some sense fore me, except that the ship is using different speeds for flying towards a planet and towards a station.

An explanation that it's only shtail/phaze sitting still: These are together with the reaper the only RS ones which use "hunterAI.plist", even though other ships do specify the hunter role. Other ships use "pirateAI.plist" which might explain why they can switch to something else even though they have hunter as first role entry.

Still I do not understand why it's always two of them together sitting still...as some additional script does mix into the problem.

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

Post by Screet »

Eric Walch wrote:
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.
Seem's that we have been writing at the same time ;) OK, then together with the specific "hunterAI.plist" entry, things do clear up.
Eric Walch wrote:
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.
I guess it's somewhat difficult to test and it's still called beta, which says, it's in the stage to be tested, not to be expected bug-freeness of a release version? ;)

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

Post by another_commander »

Beta or not, the debug console is always available and, if used, it is not difficult to test this kind of AI behaviours.
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:
OK, then together with the specific "hunterAI.plist" entry, things do clear up.
In this specific case the problem will be solved by replacing the hunterAI.plist by escortAI.plist. In all other roles the populater will set the correct role and when added as escort you get it with the right escort AI.
Better would be to find its mother's definition and there replace escort-role with escort-ship

(I just added a warning in the wiki under escort-role that the AI stays as defined in shipdata and is not auto switched to escortAI)
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

...

Post by Lestradae »

Hi Eric,

the whole topic with ships having the right AI for their roles etc. is something I'm tackling right now, I am reworking the whole shipdata.plist which is going to take some considerable time to do ...

But I always assumed, that roles basic to the game, such as pirate, trader, hunter, interceptor, police etc. get their AI assigned automatically by the game if called, irrelevant if by script or by the game itself?

And that the AI designated in the shipdata only becomes active if the ship is called by a role that doesn't have a game-designated AI?

If something is wrong with those assumptions, please tell me so. For future distribution of police for example I am specifically designating route1patrolAI. But not for every pirate, trader, scavenger etc.

Hope for feedback,

L
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:
In this specific case the problem will be solved by replacing the hunterAI.plist by escortAI.plist. In all other roles the populater will set the correct role and when added as escort you get it with the right escort AI.
Better would be to find its mother's definition and there replace escort-role with escort-ship

(I just added a warning in the wiki under escort-role that the AI stays as defined in shipdata and is not auto switched to escortAI)
Hmmmm. RS does not deliver "escortAI.plist", but oolite does - is the oolite one then being loaded, or does RS need to have a copy, too?

Furthermore, I've seen pretty many ships with the role hunter - and I could not find a hunterAI.plist in oolite. Is the program able to manage this, or is such a role just ignored?

Guess I really have to download the code very soon in order to explore myself a little bit better, what is going on...

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 »

Lestradae wrote:
Hi Eric,
But I always assumed, that roles basic to the game, such as pirate, trader, hunter, interceptor, police etc. get their AI assigned automatically by the game if called, irrelevant if by script or by the game itself?
Yes, it should. It seems this is the only exception. Kaks fixed this partly for the 1.71 release, (In 1.70 or older the escort-role never worked) but forgot make this consistent. You can best fix this in your RS to use escort-ship instead of escort-role when you aiming for a unique ship like this one for escort. This one works as it should.
Screet wrote:
Hmmmm. RS does not deliver "escortAI.plist", but oolite does - is the oolite one then being loaded, or does RS need to have a copy, too?
No this is one of the internal roles. It would be even wrong to add any of those to an oxp because it would overwrite any future improvement in oolite escortAI.
Screet wrote:
Furthermore, I've seen pretty many ships with the role hunter - and I could not find a hunterAI.plist in oolite. Is the program able to manage this, or is such a role just ignored?
For hunters oolite uses the same AI as for police ships. So hunters act almost the same as police. (It misses only a few privileges police get because of their scanclass).

A lot of oxp writers did not know what hunter mend and saw hunters as a kind of pirates and have assigned hunter roles to ships that were clearly mend for piracy. These are bugs but not easy recognised by a player.

Just see hunters as bounty hunters. Pirates go for cargo and hunters for bounty points. When you are in an anarchy the populator adds hunters instead of police. In non-anarchic systems, hunters are rarely added. Hunters are best recognised when they fly to the witchpoint like police ships. Normal traders never do.
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

..

Post by Lestradae »

Hey Eric,

thanks for the explanation. So I did get the relationship between role, AI, scanclass etc. correct.

But, the way you explain it, there is an inconsistency in the way AIs are designated by the core game, yes?

This inconsistency leads to the roles hunter and escort not getting an automatic AI assigned under all circumstances, as seems to be the case with traders, pirates, police (if also correct scanclass, that is), interceptors, miners etc., is this correct?

Before I suggest a fix to the core game after the same pattern with which Kaks fixed the other role -> AI attributions in the game's code I want to be sure what I'm talking about.

And obviously, as I am writing a successor to RS, I want to fix the things I can fix in the oxp myself, and as sooner as I know what exactly to fix, the less unnescessary workload is created.

Is the above correct, or not, or what of it?

Thanks for your time explaining 8)

L
Post Reply