anubis_85 wrote:i try to find an other solution
for the sorian ai it works
Sure it works for the sorian.
Sorian is using the templatename "T3ArmoredAssaultSorian" but normal AI's are using the templatename "T3ArmoredAssault".
So if you use "T3ArmoredAssaultSorian" inside the customunit.lua then only the sorian AI can build this platton, and if you
insert "T3ArmoredAssault" as name, then my AI and the GPG (build in) AI can build the platoon but not the sorian.
The only way to solve this is to have a 2 tables with the same units. One named T3ArmoredAssault and the other T3ArmoredAssaultSorian.
Good thing, we don't need to make 2 identical tables, we can copy them:
In case we have already a table named T3ArmoredAssault, then we can assign the table to an alias named T3ArmoredAssaultSorian like this:
- Code: Select all
UnitList['T3ArmoredAssaultSorian'] = UnitList['T3ArmoredAssault']
This way you can copy any platoontemplate to a new name for sorian and still having the original named templates:
- Code: Select all
UnitList = {
T3ArmoredAssault = {
UEF = {'brnt2htt3', 50}, -- Twister MK3 (Heavy Armored Tank)
Cybran = {'brmt3ht', 50}, -- Carnage mk.3 (Medium Tank)
Aeon = {'brot3aa', 50}, -- Tachylite (Mobile Anti-Air)
Seraphim = {'brpt3bt', 50}, -- Hethaamah (Battle Tank)
},
T3LandBot = {
UEF = {'brnt2htt3', 50}, -- Twister MK3 (Heavy Armored Tank)
Cybran = {'brmt3ht', 50}, -- Carnage mk.3 (Medium Tank)
Aeon = {'brot3aa', 50}, -- Tachylite (Mobile Anti-Air)
Seraphim = {'brpt3bt', 50}, -- Hethaamah (Battle Tank)
},
}
UnitList['T3ArmoredAssaultSorian'] = UnitList['T3ArmoredAssault']
UnitList['T3LandBotSorian'] = UnitList['T3LandBot']
Btw, don't put any non bot units into the T3LandBot platoon. (like in the example)
The AI can identify and count bot units by reading the unit category from the blueprint 'category.BOT'.
But if you build non BOT units with this platoon, then the AI will infinitely build them.
That's because the unit count for BOTs does not increase and the AI thinks that
building this platoon was not executed and build it again and again...
Please test all changes also with the GPG AI.
Btw are you using the FAF game version or only Steam ?
With FAF you could test my AI