CallLuaRules in Java AI

CallLuaRules in Java AI

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

CallLuaRules in Java AI

Post by DJ »

In BA there is an option to set advanced construction units to upgrade mexes. Is there anyway for a Java AI to set this option?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: CallLuaRules in Java AI

Post by hoijui »

no, Lua support is non-existent for all Skirmish AIs, not just Java ones.
There have been some topics about it already.. though they were started too early (when the C interface was still to unstable/not released yet) someone should bring it up again.
I made a proposal some days ago, for a generic function pair for this purpose.. nobody cared.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: CallLuaRules in Java AI

Post by Kloot »

It is not non-existent for native AI's, just pointless without cooperation from mod authors (they need to write and include gadget code that responds to AI calls).
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: CallLuaRules in Java AI

Post by jK »

hoijui wrote:no, Lua support is non-existent for all Skirmish AIs, not just Java ones.
There have been some topics about it already.. though they were started too early (when the C interface was still to unstable/not released yet) someone should bring it up again.
I made a proposal some days ago, for a generic function pair for this purpose.. nobody cared.
wrong ...

First, a well programed lua gadgets/widgets uses cmds or actions and I assume you can send those with AIs.
Also AIs can interact with lua via AICallin:
case COMMAND_CALL_LUA_RULES:
{
SCallLuaRulesCommand* cmd = (SCallLuaRulesCommand*) commandData;
cmd->ret_outData = clb->CallLuaRules(cmd->data, cmd->inSize,cmd->outSize);
break;
}
Also iirc there was the possiblity to read so called `Rules` (GameRules, UnitRules, TeamRules) in AIs, but I can't find anything like that anymore in the current code, so it seems it got removed.
Post Reply

Return to “AI”