Does that mean that the "game" engine (not Spring but, ex, Zero-K's engine) can exchange «proper» messages with a non-Lua AI? Do you know how to best achieve that? All i'm seeing in the Java interface is:
- Send/receive text message from/to player(s)
- luaMessage() //unsure what this does / how it works
Yes! Non-gadget AI's can exchange text messages with the game (half-duplex). It is up to game developers to decide how to handle those messages and what messages to send.
Here are a couple examples: Shard can use ZK retreat-haven gadget and zkgbai and freundAI metal map parsing is handled by SkirmishAIMessage rather than GameRulesParams like in CircuitAI because when those were originally made, GameRulesParams were not supported by Java interface.
(you should use GRP parsing now instead)
The Shard case looks like
this:
Code: Select all
game:SendToContent("sethaven|"..upos.x..'|'..upos.y..'|'..upos.z);
"SendToContent" is Shard-speak for "CallRules". The message is then processed by the game code
here:
Code: Select all
function gadget:RecvSkirmishAIMessage(aiTeam, dataStr)
HandleLuaMessage(dataStr, aiTeam);
end
function HandleLuaMessage(msg, teamID)
...
end
Note that the function HandleLuaMessage is a shared handler for LuaUIMessage and SkirmishAImessage - basically, this shows how trivial it is to expose advanced luarules-to-external-AI integration for game developers (looking at MCL here).
The second case is about as trivial:
1) Game
sends a JSON-encoded string with metal data to locally hosted AI
2) The AI
parses the data.
3) AI deliberately and agressively attacks enemy expansion.
Where the heck can I download the Zero-K content pack!? I can't find it anywhere - all I seem to find is the lobby... I care not about the lobby.
You can use the lobby to auto-download fresh game version, or just checkout the git repository like in @lamer's post.
(and while at it, all I can find is one lobby - couldn't find those "SWL" and "flobby" you wrote about even though I don't want a lobby)
Obtain SWL
here, and flobby is probably either
here or
there.