/luarules reload not working

/luarules reload not working

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators, MR.D, Moderators

Post Reply
aiphee
Posts: 36
Joined: 15 Sep 2011, 11:48

/luarules reload not working

Post by aiphee »

Hi,
im trying to make LUA animation for this:
http://zero-k.info/Forum/Thread/3510

but info on this
http://springrts.com/wiki/Animation-LuaScripting
page seems depreceated. When i add

Code: Select all

return include("LuaGadgets/Gadgets/unit_script.lua")
into that file, it generetes error.

So how do i debug my animation?

Also, im working only with text editor, are there any LUA animation help tools?
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: /luarules reload not working

Post by knorke »

I think you confused something maybe?
The page says: "To enable Lua unit scripts, create a file LuaRules/Gadgets/unit_script.lua, and paste the following into it: ..."

That is just something the game has to do once, so that lua unit scripts work. Kind of including/loading/setting up the "framework", which zeroK already has done.
So it is not anything that goes into your new unit's script or not something that you will have to think about when scripting your new unit.
So how do i debug my animation?
/cheat
/luarules reload
to reload it after editing, then try until it works.
Also, im working only with text editor, are there any LUA animation help tools?
Some tools, but more like "helpers" not full editors or anything like that:
http://springrts.com/phpbb/viewtopic.php?t=27268
I also like this:
http://springrts.com/phpbb/viewtopic.php?f=23&t=25847
because I always forgett the name of pieces and how they attach to each other.
0 x

aiphee
Posts: 36
Joined: 15 Sep 2011, 11:48

Re: /luarules reload not working

Post by aiphee »

Thanks for help.

But no matter how many times i try
/luarules reload
The same animation goes again. When i exit and start game again, it works.

Im writing directly to zip (sdz) and cheats got on.
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: /luarules reload not working

Post by knorke »

might just be that spring does not reload .zip (sdz) files because usally they do not change.
unpack the mod, rename the folder to blabla.sdd and try again.
(dont forget to change modname in modinfo.lua so it is an unique thingy)
0 x

aiphee
Posts: 36
Joined: 15 Sep 2011, 11:48

Re: /luarules reload not working

Post by aiphee »

Hm, i didnt know that i can have folder also with sdz extension taken as mod, ty will try toomorow.
0 x

User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: /luarules reload not working

Post by yuritch »

Unpacked folder extension should be .sdd, not .sdz
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: /luarules reload not working

Post by smoth »

I don't see it here but did you do /cheat
0 x

aiphee
Posts: 36
Joined: 15 Sep 2011, 11:48

Re: /luarules reload not working

Post by aiphee »

Alredy working, it does work with folder.sdd, not with archives. Some admin should ater this page:

http://springrts.com/wiki/Animation-LuaScripting

(and thanks again :)
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6139
Joined: 29 Apr 2005, 01:14

Re: /luarules reload not working

Post by FLOZi »

Alter how?

also note that you can login to wiki using your forum account and change it yourself :wink:
0 x

aiphee
Posts: 36
Joined: 15 Sep 2011, 11:48

Re: /luarules reload not working

Post by aiphee »

edited, can you check it after me?
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6139
Joined: 29 Apr 2005, 01:14

Re: /luarules reload not working

Post by FLOZi »

All is good apart from the last part - sdd is not required for reload to work. :-)
0 x

User avatar
prandipadaro
Posts: 92
Joined: 19 Oct 2011, 22:38

Re: /luarules reload not working

Post by prandipadaro »

So sorry if i reopen this topic but i have a similar problem and dont want to open new question.
I try to understand something about games, i use the springtutorialgame for test.
Just rewrite a weapon and try to test some field like: reloadtime, weapontype, etc.
In order to change ingame the parameters i give the following commands:
/cheat
/editdefs
and try many times
/luarules reload
all work fine for reload unitscripts
but the weapondefs not reloaded
what i wrong?
0 x

hokomoko
Spring Developer
Posts: 591
Joined: 02 Jun 2014, 00:46

Re: /luarules reload not working

Post by hokomoko »

defs can't be reloaded.
0 x

User avatar
prandipadaro
Posts: 92
Joined: 19 Oct 2011, 22:38

Re: /luarules reload not working

Post by prandipadaro »

ok but /editdefs what is?
0 x

gajop
Moderator
Posts: 3027
Joined: 05 Aug 2009, 20:42

Re: /luarules reload not working

Post by gajop »

You can edit the UnitDef object directly. I'm not sure what's restricted there, but you could change the max hp which would be reflected if you created a new unit.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6139
Joined: 29 Apr 2005, 01:14

Re: /luarules reload not working

Post by FLOZi »

Editdefs has never been reliable, I even thought it had been removed.
0 x

User avatar
Silentwings
Moderator
Posts: 3631
Joined: 25 Oct 2008, 00:23

Re: /luarules reload not working

Post by Silentwings »

/editdefs is still listed on the wiki but I don't know of any situation where it works. Imo at this point best to just remove it.
0 x

Post Reply

Return to “Art & Modelling”