News:

If you are a developer, please build MegaGlest on your own and get in touch to contribute (or post your patches on the forums).

Main Menu

More AI behavior control

Started by softcoder, 31 March 2012, 08:30:35

softcoder

I committed some more changes for faction specific AI Behaviour documented Below. In the Faction xml file under the faction tag you may add:

        <ai-behavior>
        <static-values>
<!--    You may use type or type-name (either will work)

        Possible values for type

aibsvcMaxBuildRadius = 0                        default value: 40     --> Maximum radius of cells a worker will consider for building a new unit
aibsvcMinMinWarriors = 1                        default value: 7     
aibsvcMinMinWarriorsExpandCpuEasy = 2           default value: 1
aibsvcMinMinWarriorsExpandCpuMega = 3           default value: 3
aibsvcMinMinWarriorsExpandCpuUltra = 4          default value: 3
aibsvcMinMinWarriorsExpandCpuNormal = 5         default value: 3
aibsvcMaxMinWarriors = 6                        default value: 20
aibsvcMaxExpansions = 7                         default value: 2  --> Maximum # of bases to expand to
aibsvcVillageRadius = 8                         default value: 15   --> The minimum spacing between bases
aibsvcMinStaticResourceCount = 9                default value: 20  --> the minimum # of static resources the faction needs
aibsvcScoutResourceRange = 10                   default value: 20   --> the maximum range a unit will look for resources
aibsvcMinWorkerAttackersHarvesting = 11         default value: 3  --> the minimum # of special 'worker attacker' units required to be harvesting before they will attack
        aibsvcMinBuildSpacing = 12                               default value: 1  --> the minimum cell spacing between units to build

        Possible values for type-name

MaxBuildRadius
MinMinWarriors
MinMinWarriorsExpandCpuEasy
MinMinWarriorsExpandCpuMega
MinMinWarriorsExpandCpuUltra
MinMinWarriorsExpandCpuNormal
MaxMinWarriors
MaxExpansions
VillageRadius
MinStaticResourceCount
ScoutResourceRange
MinWorkerAttackersHarvesting
        MinBuildSpacing
-->
                <static type="9" value="80"/>
                <static type="0" value="75"/>
                <static type="7" value="4"/>
                <static type-name="VillageRadius" value="25"/>
        </static-values>
        </ai-behavior>

wciow

I would like to test this but I dont build my own MG so I will have to wait a while   :|
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Ishmaru


MaxBuildRadius
MinMinWarriors
MinMinWarriorsExpandCpuEasy
MinMinWarriorsExpandCpuMega
MinMinWarriorsExpandCpuUltra
MinMinWarriorsExpandCpuNormal
MaxMinWarriors
MaxExpansions
VillageRadius
MinStaticResourceCount
ScoutResourceRange
MinWorkerAttackersHarvesting


Would someone mind explaining what each value means? I have a rough idea but it would be nice to know for sure :)
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Mr War

Very cool, looking forward to modding possibilities. Thanks softcoder.

Per ishmaru, is there any nuances hidden in these options we can't guess at?