Page 1 of 1
Can't get an AI to work for Conflict Terra
Posted: 31 Aug 2010, 03:51
by oksnoop2
http://codepad.org/9oc9JxmJ AAI config
http://codepad.org/813lELqW AAI error log
Shard is just crashing the game right off the bat.
Kaik does not know what to do with the flagshipbase same for Rai.
If anyone one wants to tell me what i'm doing wrong or better yet how to fix it. I would be grateful. I will share any other files you request to look at just ask.
Re: Can't get an AI to work for Conflict Terra
Posted: 31 Aug 2010, 11:56
by slogic
All AIs do not know about mod-specific morphing command. Your last chance is Shard.
Re: Can't get an AI to work for Conflict Terra
Posted: 31 Aug 2010, 19:47
by AF
Try the shard dll I posted in the Shard thread, although the morphing will still be a problem as those API calls caused a crash in the engine
Re: Can't get an AI to work for Conflict Terra
Posted: 31 Aug 2010, 21:45
by oksnoop2
At slogic: I added a modoption to start with the flagship in factory mode. Still does not seem to know what to do.
At AF: It still crashes, maybe my configs are wrong. I tried replacing the .dll and it still crashes.
Re: Can't get an AI to work for Conflict Terra
Posted: 01 Sep 2010, 00:42
by AF
Is this with conflict terra, or all content regardless?
Re: Can't get an AI to work for Conflict Terra
Posted: 01 Sep 2010, 02:13
by oksnoop2
After testing Evo still works just fine.
Re: Can't get an AI to work for Conflict Terra
Posted: 01 Sep 2010, 13:25
by slogic
oksnoop2 wrote:At slogic: I added a modoption to start with the flagship in factory mode. Still does not seem to know what to do.
Here is event queue form E323AI:
Code: Select all
[00:00] (II): CE323AI::UnitCreated Oda Class Cruiser(155, -1)
[00:00] (II): CE323AI::UnitFinished Oda Class Cruiser(155, -1)
[00:00] (II): CEconomy::addUnitOnFinished Oda Class Cruiser(155, -1)
[00:00] (II): CE323AI::UnitCreated Mobile Headquarters(11, -1)
[00:00] (II): CE323AI::UnitFinished Mobile Headquarters(11, -1)
[00:00] (II): CEconomy::addUnitOnFinished Mobile Headquarters(11, -1)
[00:00] (II): CGroup::reset Group(1): range(-4.31602e+008), buildRange(-4.31602e+008), los(-4.31602e+008), speed(-4.31602e+008), strength(-4.31602e+008), amount(0)]
[00:00] (II): CGroup::addUnit Mobile Headquarters(11, -1) to Group(1): range(1000), buildRange(128), los(31.25), speed(0), strength(1470), amount(1) [Mobile Headquarters(11, -1)]
[00:00] (II): CE323AI::UnitDestroyed Oda Class Cruiser(155, -1)
[00:00] (II): CUnit::remove Oda Class Cruiser(155, -1)
[00:00] (II): CUnitTable::remove Oda Class Cruiser(155, -1)
I think no one AI expects you created mobile commander, then static commander, then remove mobile. AIs usually bind to the first commander which you have removed. This is the problem. Try spawning static commander without intermediate one (if possible).
Another problem arises if commander is a factory at the same time. Even in NOTA commander can't build units inside itself and most AIs try to build resource makers first, then initial factory.
The last problem i can fix in E323AI, but don't know how to deal with the first one. To fix this i need to reinitialize economy when first spawned commander is dead, or just ignore first _flying_ commander, which is too hardcoded and not suitable.
PS. Looks like i fixed the first problem in E323AI by removing COMMANDER tag in config for Oda unit (also had to tweak some .cpp file which respected untidef's isCommander tag instead of custom AI tag). Still units wanna assist factory & other units, strange cause i'm checking unitdef's canBeAssisted in appropriate places.
Re: Can't get an AI to work for Conflict Terra
Posted: 01 Sep 2010, 19:20
by slogic
I added basic initial support of CT in E323AI 3.22.1 (it may be bundled with Spring > 0.82.4). Though one strange thing occurs for land military units: they can't reach usual metal extractors & other ground units. So land attack is stalled. But builders are everywhere :)
Re: Can't get an AI to work for Conflict Terra
Posted: 01 Sep 2010, 19:22
by oksnoop2
Thanks!

Where can i get this version?
Re: Can't get an AI to work for Conflict Terra
Posted: 17 Nov 2010, 00:52
by zwzsg
Made you a gadget to give metal and energy truck built by AI random move order then morph order. Test with NullAI and found working.
Three issues however:
- CT current morph gadget breaks when the morph order is given by another gadget ("recursion is not permitted").
FIX: update CT to this lastest version of unit_morph.lua from CA.
- The morph command ID are hardwritten at the top of the gadget, but these numbers were hard to get, and are bound to change when you add/remove new morphing units: It works now, it may stop work if you edit d\luarules\configs\morph_defs.lua
FIX: I will have to edit both unit_morph.lua and Spread_n_Deploy.lua
EDIT: Done. See attachement and http://springrts.com/phpbb/viewtopic.php?f=23&t=23998
- I doubt AI will appreciate having some of their unit randomly move and deploy anywhere: A depot deploying in the wrong place might block unit exit pathes out of the base.
FIX: There is no way I write code to analyze where is best spot to deploy, so we'll need better support from the AI devs there.
Re: Can't get an AI to work for Conflict Terra
Posted: 17 Nov 2010, 00:53
by oksnoop2
Did not mean to bump this. Sorry.