Page 1 of 1
Lua "base files" that game needs?
Posted: 16 May 2013, 01:02
by knorke
My mod is broken in 94.1, So I thought it is because some of the files in myMod\LuaRules\ are maybe wrong or outdated.
But then I noticed I do not know where to get correct ones.
I mean the files such as
draw.lua
gadgets.lua
system.lua
main.lua
gadgets\unit_script.lua
and maybe more or less.
Which files must be copypasted into mod so it works?
In other mods those files seem to have game-specifique things added to them?
Re: Lua "base files" that game needs?
Posted: 16 May 2013, 03:28
by Forboding Angel
Technically you shouldn't need those as they are already in basecontent.
What errors are you getting? (If any)
Re: Lua "base files" that game needs?
Posted: 16 May 2013, 03:56
by knorke
The files are in base content but as I understand you still have to include them.
So at least needs a unit_script.lua with something like
Code: Select all
return include("LuaGadgets/Gadgets/unit_script.lua")
etc (or put in the whole file but that is stupid)
but even for something appearently simple there is variations like
Code: Select all
return VFS.Include("LuaGadgets/Gadgets/unit_script.lua", nil, VFS.ZIP_ONLY)
And in other files is often more strange things that I dont understand.
Plus the stuff added by mods like for example
https://code.google.com/p/evolutionrts/ ... s/draw.lua
Code: Select all
if (Spring.GetModOption("camode")=="deploy")or
(Spring.GetModOption("camode")=="tactics")
then
Re: Lua "base files" that game needs?
Posted: 16 May 2013, 08:17
by FLOZi
http://mwspring.svn.sourceforge.net/vie ... athrev=565
All you 'need' are main.lua, draw.lua and a unit_script.lua is ofc a good addition.
Re: Lua "base files" that game needs?
Posted: 18 May 2013, 09:18
by knorke
thanks flozi.