/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

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

/luarules reload not working

Post by aiphee » 24 Jul 2013, 21:27

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 » 24 Jul 2013, 21:58

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 » 25 Jul 2013, 00:12

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 » 25 Jul 2013, 00:25

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 » 25 Jul 2013, 01:09

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 » 25 Jul 2013, 08:17

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

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

Re: /luarules reload not working

Post by smoth » 25 Jul 2013, 15:06

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 » 28 Jul 2013, 15:16

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: 6106
Joined: 29 Apr 2005, 01:14

Re: /luarules reload not working

Post by FLOZi » 28 Jul 2013, 15:44

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 » 30 Jul 2013, 21:15

edited, can you check it after me?
0 x

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

Re: /luarules reload not working

Post by FLOZi » 30 Jul 2013, 22:06

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 » 04 Oct 2015, 10:48

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: 581
Joined: 02 Jun 2014, 00:46

Re: /luarules reload not working

Post by hokomoko » 04 Oct 2015, 11:01

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 » 04 Oct 2015, 11:03

ok but /editdefs what is?
0 x

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

Re: /luarules reload not working

Post by gajop » 04 Oct 2015, 12:30

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: 6106
Joined: 29 Apr 2005, 01:14

Re: /luarules reload not working

Post by FLOZi » 04 Oct 2015, 12:52

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

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

Re: /luarules reload not working

Post by Silentwings » 04 Oct 2015, 18:00

/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”