Group AIs changed to use Lua?
Moderators: hoijui, Moderators
Group AIs changed to use Lua?
As the title says, I'm wondering wether group ais shouldn't be moved into Lua scripts (or at least have the option to be written in lua). The main reason for this that I can raise right now is linux support. IE DLLs don't run under native linux. Besides that, a misbehaving group ai right now can and will crash spring.
It's still possible to crash spring through lua, the AI interface is hardly bullet proof
e.g.
Command c;
c.id = CMD_MOVE;
cb->GiveOrder(unit_id,&c):
And there are lots of things that can eb doen in C++ that cant be doen in lua.
If you want it that much you can go bind lua to a groupAI.
But every groupAI available to the public was made by me SJ or colorblind, and I dont think any of us know lua, or are willign to recode in lua.
Whatsmore, if there's an error in a groupAI, dont sit there, fix it! make a patch! Give us crash data! Tell us what you where doing when it crashed, whcihg roupAI did ti what unit you assigned it to, how far ingame you where, what mod/.map.
And if these crashes you talk fo are the oens where you get the message box at the beginning of spring, thats not a groupAI crash, thats you not clearing out 0.71b1 groupAI's after installing 0.72b1
e.g.
Command c;
c.id = CMD_MOVE;
cb->GiveOrder(unit_id,&c):
And there are lots of things that can eb doen in C++ that cant be doen in lua.
If you want it that much you can go bind lua to a groupAI.
But every groupAI available to the public was made by me SJ or colorblind, and I dont think any of us know lua, or are willign to recode in lua.
Whatsmore, if there's an error in a groupAI, dont sit there, fix it! make a patch! Give us crash data! Tell us what you where doing when it crashed, whcihg roupAI did ti what unit you assigned it to, how far ingame you where, what mod/.map.
And if these crashes you talk fo are the oens where you get the message box at the beginning of spring, thats not a groupAI crash, thats you not clearing out 0.71b1 groupAI's after installing 0.72b1
I did a clean install of 0.72b1, no group AI versioning issues. They all lead to general spring instability. IE I can play around with them, but in about 30 minutes they crash. Sometimes they will cause some odd exception catches from the global ai, other times spring just dies. One even managed to get microsoft saying that spring asked it to kill it in an unusual fashion.