1v0ry_k1ng wrote:hey, does this AI use configs? if it does (that seems like a logical reason for it to only play BA/arm), I dont mind doing some configs for you (if i can understand the syntax of your config files anyway :p)
Hi 1v0ry_k1ng,
Yes, it is config based, at least maybe 95%, maybe there are a few places where there are unit def names hard-coded in the code, but it's dead-easy for me to shift those into the config once I notice them, or if someone points them out to me.
There are two config files:
AI/Skirmish/HughAI/0.1/<mod name>_2.xml -> main config file, mixture of general configuration options, and some unit name preferences.
AI/Skirmish/HughAI/0.1/<mod_name>_workflows/default.xml -> workflow file: decides what gets built in general
I'd hesitate to get you to generate config files at this point though. The whole config bit is a little up in the air and not really stable at the moment, so your configs might not last very long... maybe not more than a day or two...
Anyway, so ...
- in the general config file (<mod name>_2.xml ) , there are the names of units that certain controller classes will tend to take over:
reconnaissanceunitnames => the units that will be used as scouts. They will be assumed to be vehicles for now, with a maximumslope value of at least config.maxvehicleslope, if that makes sense?
offensiveunitnames => the units that will be used as tanks, to attack. They will be assumed to be vehicles, with a maximumslope of at least config.maxvehicleslope
- other values in the general config file that off the top of my head could be important:
maxvehicleslope => the maximum slope on the terrain which vehicles are assumed to be able to traverse
... err.. well.. you can basically see which bits have unit names and stuff
- anything with a name like 'somethingsomethingmarkerunitname' is the name of units that will be drawn onto the terrain as part of debugging. If they don't exist in the mod, you might get exceptions, at least whilst running in debug mode, otherwise they're not too important, don't affect gameplay at all
- right, the workflow is the fun bit, this is where you get to say what gets built and in what order. For example, the BA default workflow looks like the following , at least few lines:
Code: Select all
<listitem priority="2.0" quantity="1" unitname="armvp"/>
<listitem priority="2.1" quantity="2" unitname="armfav"/>
<listitem priority="2.0" quantity="10" unitname="armstump"/>
<listitem priority="2.0" quantity="10" unitname="armsam"/>
<listitem priority="1.95" quantity="4" unitname="armmex"/>
<listitem priority="1.95" quantity="4" unitname="armsolar"/>
<listitem priority="1.9" quantity="3" unitname="armcv"/>
<listitem priority="1.8" quantity="1" unitname="armmstor"/>
<listitem priority="1.8" quantity="1" unitname="armavp"/>
<listitem priority="2.0" quantity="3" unitname="armbull"/>
<listitem priority="2.0" quantity="2" unitname="armmart"/>
So, the units get built in descending order of priority, according to what can be built. So, for example, if armbull (the level 2 tanks) have a higher priority than jeffies, they will be built before jeffies, but only if there happens to be a level 2 factory, otherwise first the jeffies will be built, and then once there is a level 2 factory, the armbulls will be built.
The unitname is the unit that will be built, and the quantity is the number that should be alive before looking for the next down on the priority list.
If 10 armstumps were built, but 5 were killed, 5 more will be built before building other things further down. HOpefully. IN theory. That's how it's supposed to work anyway

I think.
The whole config thing is fairly up in the air, so if you've got ideas on how you'd like to see the config files look, go ahead.
Hugh