Auto-survey & spawned ship modding

Have run in to a few hiccups trying to mod the starting ships...

If the surveyship has both a starscanner and weapons then auto-survey can become auto-attack if two surveyships go for the same anomaly. This can be a pain when they also have reasonable engines (click, click, click...). Is it possible to change this behavior?

I also started swapping the three initially spawned ships around - trying to change their configuration to a flagship (with weapons), a scout (with starscanner), and a colonyship. Experimentation has left me with some queries:

Changing the displayname tag doesn't work properly for the starting ships, does the game get the name from another xml file somewhere or is it hardcoded?

The starting ships appear to be scripted to carry out their predefined roles (ie. miner goes straight for the nearest asteroid whether it actually has a mining module or not). Is there a way to mod this?

Didn't have any luck with the last list request, but here's another one... is there a list of ships that the game calls, via spawns or AI ship design, regardless of what is in GC2Ships.xml?
6,627 views 10 replies
Reply #1 Top
does the game get the name from another xml file somewhere or is it hardcoded?


Probably coded, at least for the flagship.

The starting ships appear to be scripted to carry out their predefined roles (ie. miner goes straight for the nearest asteroid whether it actually has a mining module or not). Is there a way to mod this?


If they are behaving in that way regardless of modules or lack thereof, it'd be an AI thing. So, not moddable.

is there a list of ships that the game calls, via spawns or AI ship design


No list that I'm aware of offhand, but I do believe that the loadouts of super dominator covettes and event-spawned ships are hardcoded.
Reply #2 Top
Probably coded, at least for the flagship.


The starting ships appear to be scripted to carry out their predefined roles (ie. miner goes straight for the nearest asteroid whether it actually has a mining module or not). Is there a way to mod this?


If they are behaving in that way regardless of modules or lack thereof, it'd be an AI thing. So, not moddable.


Don't know about how modding affects it, but I update the Space Miner to an explorer (with no mining module) on the 1st turn habitually.

My Miner doesn't automatically do ANYTHING, even if it is still a Miner, unless I give it a destination, or click on the 'Automate' button in the ship manager pop-up.

After I convert it to an explorer type, with no mining module, the 'Automate' button disappears.

drrider
Reply #3 Top
Thanks Drrider but I was referring to the starting ships of the AI - of course your own ships don't automatically start doing things when the game starts.

Thanks for the response Kryo. With regards to the 'ships that the games calls' question, as well as event spawned ships I was also asking about AI designed ships. Despite what is entered in GC2Ships.xml, the AI appears to call designs with particular names. If the name isn't in GC2Ships.xml, then the AI wont make that type of ship. Scouts are the most annoying example of this phenomenon... hence why a list would be extraordinarily helpful. The game has evolved a lot (Dark Avatar for starters) since the 6th of February 2006, a modguide update anyone? All the trial and error I am forced to do to put together anything approaching a total conversion is driving me nutty!
Reply #4 Top
AI appears to call designs with particular names. If the name isn't in GC2Ships.xml, then the AI wont make that type of ship. Scouts are the most annoying example of this phenomenon


So you're saying that if you remove/rename the scout entry in GC2Ships, the AI never builds any scouts at all? It should only need the proper templates, and be able to build them regardless of what's in GC2Ships... Are you sure they're not just turning out invisible?
Reply #5 Top
Yes and yes. What is the AI's decision making process for making ships? Does it build them from templates or raw hulls or shipcfg files? Are there triggers? If it is more a script than a decision algorithm, what are the names of the ships it builds and at what times?
Reply #6 Top
Ok so I'm not the only one going nuts with this---I thought I was doing something wrong as well until I saw that Kryo mentioned loadouts of super dominator covettes are hard coded---I was going crazy trying to find the ship config for the super dominator corvettes---I'm with rav 8 with a a modguide update---I've been going nuts myself through trial and error---but it would probably be a good idea to wait until 1.7 is released  
Reply #7 Top
Cari thinks that the AI may be using the GC2Ships definitions as examples to compare initial designs to (such as the scout) when it doesn't already have any. So it appears that you should be able to change them, so long as you don't remove them or mess with the internal name.

She also confirmed that the behavior where the AI tries to send the start ships on their typical missions regardless of loadout is also known and intended (it wasn't efficient or worthwhile to make them have to analyze the ships when that never comes up during normal unmodded play).

She also noted (I was going to comment on this in my initial reply but must have inadvertently revised it out before posting) that the starting ships' names are based out of the strings file rather than GC2Ships.

Finally, a modding guide update is on the wishlist, but there's just no time for it at present.
Reply #8 Top
In a current game the Colonials keep building "Heavy Fighters". In the details of the ships the descriptions match the hulls but there are two hulls (both of the small category) being used for different versions of the same "Heavy Fighter" design. The model displayed is the same for all versions of the design but it isn't correct for either hull. I can't work out where any of the information is coming from (many sources it would seem) and the clincher is that there is no "Heavy Fighter" name or displayname mentioned in any xml file I can find?!?!?!

The modguide was great, thanks Cari.

BUT, to whoever now looks after such things, or anyone that can help...

It is impossible to release a major mod that isn't fundamentally buggy because the game's xml files seem to combine together in some kind of kinky grapple that spawns a totally random result. I can't assume anything works and the main source of useful information on the inner workings of the game comes from trial and error. This is not fun, especially when the trial and error involves testing things live in an epic 4x strategy game - it's making me hate the best game ever!
Reply #9 Top
The model displayed is the same for all versions of the design but it isn't correct for either hull.


It picks a Heavy Fighter template to use for the model, but that's actually independent of the hull component it chooses. WAI as far as I'm aware.
Reply #10 Top
Any extra info is handy thanks Kryo, but without some kind of resolution to the issues mention above and here,
It is impossible to release a major mod that isn't fundamentally buggy

Maybe once "Twilight of the Arnor" is out... but I am so over it for now.