Military Fiasco bug with ships

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

Moderators: winston, another_commander, Getafix

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: ....

Post by Eric Walch »

Lestradae wrote:
Is there a way to let a ship be called by a standard role and still use an alternate AI than the standard AI? I thought it was not possible, perhaps I'm mistaken.
You can do this with a startup script or with launch_actions. However it does not work reliable for traders. These roles are sometimes called as launching ships.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Could you not just use the shipdata.plist key auto_ai = false to turn off the automatic change of AI for that ship, and then set the correct AI in there too as normal? Or am I missing something here?

It's how I do it with the big ships in Aquatics, they have standard roles (albeit low probability) and their own bigship (non-docking) AIs.
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 »

Thargoid wrote:
Could you not just use the shipdata.plist key auto_ai = false to turn off the automatic change of AI for that ship, and then set the correct AI in there too as normal? Or am I missing something here?
Yes, the auto_ai only works for script added traders and the like. When the populator adds traders it is again overriding this with his AI's. But you are right, in my opinion the final code that lets the populator set the AI should be removed. Let the auto_ai do its work and don't override it again.
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 »

Eric Walch wrote:
Thargoid wrote:
Could you not just use the shipdata.plist key auto_ai = false to turn off the automatic change of AI for that ship, and then set the correct AI in there too as normal? Or am I missing something here?
Yes, the auto_ai only works for script added traders and the like. When the populator adds traders it is again overriding this with his AI's. But you are right, in my opinion the final code that lets the populator set the AI should be removed. Let the auto_ai do its work and don't override it again.
I'm a bit confused. Eric, you're saying what Thargoid suggested works for all populator standard roles with the only exception of traders, yes?

Because if it works like this, I am going to use this as a solution for all big OSE ships, and suggest that this was also made practicable for the trader role.

Oh, and the pirate bounties should work again, too. The set ones.
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: ...

Post by Eric Walch »

Lestradae wrote:
I'm a bit confused. Eric, you're saying what Thargoid suggested works for all populator standard roles with the only exception of traders, yes?
When you read well I wrote just the opposite: The populator overrides these auto_ai settings!
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

The way I am now going for my bigtraders.oxp is a little different (the OXP ist practically ready). Whenever the player has jumped into a new system or launches, a script searches for all ships which are too big to fit into a docking bay, but have the ordinary route1patrolAI (so ships like in aquatics, where the OXP author already gave them a custom AI, are out of the equation). The criteria to determine whether a ship fits into a docking bay or not is its mass. (It can't be 100% correct, because docking ability also depends on the ship's shape, but I've found a limit that works at least with all big traders in the OXPs I have currently installed: mass > 2000000.)

So all traders with mass > 2000000 and route1traderAI are getting their AI switched to the new route1bigTraderAI, which triggers a different behaviour close to the main station. You will see it.

By doing it with my script, after the traders are spawned, there is no need to change any existing OXP. Especially no need to switch to the new AI through launch_actions in shipdata. It therefore works with all existing ships with role 'trader'. I also don't give it another role. The OXP just overlays a new behaviour to an existing role (analogous to what total_patrol.oxp does to police ships).
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 »

Commander McLane, would this also work with other roles than trader?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Currently not, but I could make it so. What do you have in mind?

I just don't want to change AIs of ships that are not traders, so I need some criteria.
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 »

Commander McLane wrote:
Currently not, but I could make it so. What do you have in mind?

I just don't want to change AIs of ships that are not traders, so I need some criteria.
For the OSE oxp, I want to find a possibility to give the (there are four ship types with variants which fall into this category) really big ships an AI of its own, so that they don't attempt to dock, while still retaining their standard roles as pirates, police, wingmen, interceptors, traders, hunters, scavengers or miners in that sense as that they are called by the populator under that role.

I.e., that a Deep Space Dredger can be called by the populator as a trader, but has a ReallyBigTraderAI or somesuch instead of the usual one which will lead to an enormous crash at the main station.

So if your variant could do that for other roles but trader also, I would be most interested in the how-to.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: .

Post by Commander McLane »

Lestradae wrote:
...while still retaining their standard roles as
Let's see.
pirates,
Pirates (= ships with pirateAI) will only ever attempt to dock with their mother station, which is the station that launched them in the first place. So they can't be too big to dock or launch in the first place. The only other case is a pirate whose hold is full, and then switches to a trader AI which finally lets him dock. I guess the player usually won't stay long enough in a system to witness this. If you're thinking pirate carriers, they have to have a custom AI anyway, which has to take care of what happens instead of docking.
police,
Police are launched from stations, therefore there cannot be a police ship that is too big to dock/launch. If there should be a police ship too big to launch/dock, see above: It needs its own custom AI that takes care that it never docks, and it mustn't have role 'police' to make sure that it never gets launched. Anything else is a bug.
wingmen,
Wingman is only the name of escorts for police ships. If the police ship that is the mother of the wingman gets launched and docks, the same as above applies. Its wingman has to be able to launch and dock as well. If not, it doesn't qualify as wingman.
interceptors,
Interceptor is a very special case of a role. I would suggest just ignoring it altogether.
traders,
Are covered by bigtrader.oxp. No problem.
hunters,
Hunters use route1patrolAI, which lets them patrol between station and witchpoint. They never attempt to dock, so there is no problem.
scavengers or miners
Both scavengers and miners are launched from a station in order to clean its surroundings, and then return to the station. Obviously this involves both launching and docking, therefore a ship too big to launch/dock doesn't qualify. If there is one, it's a bug.
I.e., that a Deep Space Dredger can be called by the populator as a trader, but has a ReallyBigTraderAI or somesuch instead of the usual one which will lead to an enormous crash at the main station.
As long as its called as trader, bigtrader.oxp will handle it. As you see from the list above, there is no other generic role that has to be covered. Ships that are only called by script with a custom role have probably their custom AI as well that should take care of the docking business. I could cover them as well, however, if I skip the test for trader and only test for the ship's size and route1traderAI. In that case every ship too big to dock would get an AI that makes sure it doesn't. Other cases don't exist, or—if they do—they are bugs.
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 »

Pirates (= ships with pirateAI) will only ever attempt to dock with their mother station, which is the station that launched them in the first place. So they can't be too big to dock or launch in the first place. The only other case is a pirate whose hold is full, and then switches to a trader AI which finally lets him dock. I guess the player usually won't stay long enough in a system to witness this. If you're thinking pirate carriers, they have to have a custom AI anyway, which has to take care of what happens instead of docking.
There is more to pirates. The AI command launchPirate launched pirates from stations. Currently it is only used by the pirate-cove from LazuGun. And pirates docking should happen more often than you now see. Because of a difficult timing bug in the AI they never execute the code to become a normal trader. But this bug is now solved and on my computer with fixed AI I see more often docking pirates. For a better check of hold status, 1.73 will have a new AI message and than the improved AI can be in place resulting in more pirates trying to dock in future.
Interceptor is a very special case of a role. I would suggest just ignoring it altogether.
Not realy a special case, in high-tech systems the populater prefers interceptors and in low-tech police. (Below 7 always police, above 13 always interceptors and in between a mix) You just don't see them as interceptor on a search as the polulator does change their role to police after adding.

This makes interceptors to high-tech police ships. One should never give both roles at the same time to keep this differentiating in technical quality. I will update this to the wiki. When I wrote that polulator part I never came further than: For law/bounty-hunter vessels the populator selects ships with role police, interceptor or hunter. I should better differentiate that on the wiki for better choice in roles by scripters.

wingman is a special class. It is the police equivalent of escort.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Eric Walch wrote:
Interceptor is a very special case of a role. I would suggest just ignoring it altogether.
Not realy a special case, in high-tech systems the populater prefers interceptors and in low-tech police. (Below 7 always police, above 13 always interceptors and in between a mix) You just don't see them as interceptor on a search as the polulator does change their role to police after adding.
In bigtrader.oxp I do the test and role-changing on shipExitedWitchspace and shipLaunchedFromStation. In both cases the populator already has switched interceptors to role police. So for the purpose of my test there would be no difference between them.

According to what you wrote I will have to spend some more thoughts about trader-turned pirates. Probably an addition to the default ship script? Or to pirateAI? However, I don't really like to change the generic AIs, simply because another OXP could do the same thing and neutralize the changes. :idea: I could of course search for big pirates in the first place and give them an AI that is the same as the normal pirate AI, but lets them switch to bigTraderAI if they become traders. That would work.

There is however something I didn't mention: What I can't do is prevent big ships to be launched from stations with generic roles 'trader' or even 'pirate'. This will always look silly, but I don't know how to prevent it.
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 »

In both cases the populator already has switched interceptors to role police. So for the purpose of my test there would be no difference between them.
Yes, scripters can completely ignore the existence of interceptors as they all become police for the script. The difference is only important for ship designers to define in what type of system their ships will be added.
What I can't do is prevent big ships to be launched from stations with generic roles 'trader' or even 'pirate'. This will always look silly, but I don't know how to prevent it.
It can't be prevented. In my opinion giving big traders a trader role is a bug in the first place. When introducing an oxp to correct this bug only encourages people to keep using ship oxp's with wrong definitions. Better correct the oxp itself and warn people to stay away from the buggy version. A trader or pirate is mend to be able to dock and launch.
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 »

Eric Walch wrote:
In my opinion giving big traders a trader role is a bug in the first place. When introducing an oxp to correct this bug only encourages people to keep using ship oxp's with wrong definitions. Better correct the oxp itself and warn people to stay away from the buggy version. A trader or pirate is mend to be able to dock and launch.
Eric, no offense meant, but I think this is rather more a dogmatic approach to the problem in question than a pragmatic one.

Personally, I'd take a practical solution above a "it-should-be-such-and-such" one anytime. I think Commander McLane is close to a workable solution to believeable in-game behaviour for too-big-to-dock ships which can still be called by the system populator.

So why not?

Of course it's just my 0.2 Cr,

L
Post Reply