Warhammer 40,000: Gladius - Relics of War

Warhammer 40,000: Gladius - Relics of War

Create and Share Custom Mods
The best mods for Warhammer 40,000: Gladius live here. Mods are made by players, for players and are not officially licensed by Games Workshop. Click 'Learn More' below to read our Modder’s Guide.
Learn More
How to mod AI unit use?
If I wanted to increase the AI's use of a certain unit e.g. having orks spam basic boyz or Tyranids create hordes of gaunts what would be the best way to go about doing it?

There doesn't seem to be a way to alter AI recruitment priority and I know from experience that simply reducing the cost of a given unit won't necessarily mean that the AI will choose to build it in greater numbers.

I thought maybe adding boyz to other production buildings might do it but that feels like a messy solution and it might not even work.

Anyone have any insight into how Gladius handles recruitment or what the best approach might be?
< >
Showing 1-2 of 2 comments
Vaeki 20 22 Feb @ 12:17pm 
I do! It's pretty easy and can be done with the *.ext format. For example, make a OrkBoyz.xml.ext file in your ./mods/YOURMOD/Data/World/Units/Orks/ directory with this code:
<unit>
<strategyModifiers>
<modifier>
<effects>
<increaseInfantryScore base="XXX"/>
</effects>
</modifier>
</strategyModifiers>
</unit>
Where XXX is decimal number representing the strength of the recruitment, the default being "1.0".
If you want to have the Ai not research or build a unit, set it to "-1".
There are a few types of unit strategyModifiers, Ai will try and have a mix of ...
Infantry
Aircraft
Heroes
Vehicles
Colonizers
If you want to turn off all Heroes, for example, you have to set all the increaseHeroesScore base to "-1". I find if a unit has a base="2", the Ai will prioritize it over other units until it has many, many of the same type.
There's a productionWeight, too, in the header, like <unit productionWeight="1.0">, invisible in most units because the default is one. This is strength of, "OK build some but not too many."
So together, if you want just a single unit of a type, give it a high strategyModifier but a productionWeight of 0.01.
Hope that helps! :steamhappy:
Last edited by Vaeki; 22 Feb @ 2:55pm
Crux2 23 Feb @ 12:11am 
Thanks, this sounds spot on. I'll give it a go and see how it turns out.
< >
Showing 1-2 of 2 comments
Per page: 1530 50