Page 1 of 1

Lua with AIPs

Posted: Thu Jan 29, 2015 9:28 am
by AI_Unit
I've been scanning through different mods to get ideas on how to make my AI more efficient in the way it works. I've noticed that different mods such as G66 and/or FE use Lua for different things such as defending pools, builders or essential units. Is the Lua all pre written or would I have to write my own stuff? I would like to find out how to do it, I'm sure it's the Lua that controls all of this stuff due to the fact that in the G66 AIPs they have so many DefendArea priorities that link to a specific Lua file, can some explain what the Lua actually does or how I can do it? I really want to make my AI efficient.

Re: Lua with AIPs

Posted: Thu Jan 29, 2015 3:51 pm
by General BlackDragon
Red Devil is the only modder to have made use of the AIP's LuaCondition. Read the changelog for more info.

Re: Lua with AIPs

Posted: Thu Jan 29, 2015 8:25 pm
by Red Devil
the main reason i used Lua was because the current AIP functions used for path checking don't work well and, well, then i got carried away :mrgreen:

also, Ken added full Lua support to BZ1, so you can use Lua there, too.

Re: Lua with AIPs

Posted: Thu Jan 29, 2015 10:20 pm
by AI_Unit
Well I see units defending, patrolling and what not, and I don't think they're ODF specific. I want to figure it out

Re: Lua with AIPs

Posted: Thu Jan 29, 2015 11:51 pm
by Red Devil
it uses the provideName/Names in order to 'genericize' things.