gui.lua for both 74b3 and 75b2

gui.lua for both 74b3 and 75b2

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

gui.lua for both 74b3 and 75b2

Post by zwzsg »


-> I want non-TA mods to start getting played

-> I'm starting by trying to make people play Kernel Panic

-> The current Spring playerbase is devoted to TA based mods, so I'm looking for a new audience, outside of Spring community

-> When presented with a whole new game they're completly unfamiliar with, people wants to do single player before venturing online

-> Therefore I need single player for Kernel Panic

-> At some point, I'd like to have Lua scripted mission tutorials, but for right now using existing AI is easiest

-> I tried all AIs, and the only AI that ever managed to play KP correctly was NTai

-> Under Spring 74b3, I had a NTai.dll that worked perfectly. But the new NTai.dll for 75b2 has idling builers, idling herds of attackers, and most of all, humongous lag spike.

-> That would give first time player a very bad first impression and they will leave it at that and not even try multiplayer

-> I have trouble getting AF acknowledge the issue, and even more fixing it. Beside, fixing such an issue is probably easier said than done

-> Apparently the source for the NTai that worked has been lost, all I have left is the compiled dll

-> Therefore, I'm considering shipping KP with two instances of spring.exe, the 75b2 one, used for online play, and the 74b3 one, for single player

-> They cohabit well, the scripts allows me to specificy the path to the bot used so I can hide the outdated dll where I want, helpers dll errors out but I don't care, the only issue is that LuaUI isnt compatible between 74b3 and 75b2.

-> Without LuaUI, there is no "autospam" widget, and having to turn repeat on, enqueue a bit, on every new socket is a tedious chore that I cannot inflict on new players

-> I need to make it so both 75b2 and 74b3 have LuaUI

-> I heard, and saw telltales in gui.lua, than if there is "LuaUI-<version number>" folder present, it will use it instead of just "LuaUI", that would allow me to have each Spring exe use its own version of LuaUI and so both have working LuaUI. Plus I could do things into the 74b3 LuaUI folder without contaminating the 75b2 one.

-> However, the very nice code in gui.lua that is supposed to make it read diff folder according to Spring version is phail, because the gui.lua included with 74b3 use syntax not accepted by 75b2, and the gui.lau included with 75b2 use syntax not accepted by 75b3. Mainly the VFS thing, but there could be more.

-> Can someone knownledgeable in Lua gives me a gui.lua that works for both 74b3 and 75b2, and doesn't taint 75b2 with downgrading stuff?



Edit:
<trepan> get the old gui.lua, and wrap it in 'if (Game.version == 'whatever') then ... else ... end'
<trepan> that's my best suggestion
<trepan> i'll spend no more time trying to support a dead rel. ;-)
<zwzsg> If that works, that'll be good enough. (For now. (Because the whole idea is painfully ugly))
<zwzsg> Eh... Works!
<zwzsg> Thanks trepan
Post Reply

Return to “Lua Scripts”