load.lua questions
Posted: Wed May 12, 2010 5:19 am
Hi DG,
I finally got TE4 downloaded tonight. What's funny is I started going through the code before I even played the game. heh.
In figuring out how the ToME4 module loads (so I can make a Template Module), I noticed that body parts are loaded directly in load.lua instead of being called by a loadDefinition. Is there a reason some are coded directly in load.lua and others are loaded?
dofile - is the precompiling certain Lua code files ahead of time so it doesn't have to interpret them as they come up?
loadDefinition - this is loading variables into memory so they can be more easily referenced?
I do admit that I know nothing about Lua (well, next to nothing. Tonight I read from the Lua manual), but am interested.
Thanks.
[NOTE: this may not be in the right forum. Feel free to move it if needed.]
I finally got TE4 downloaded tonight. What's funny is I started going through the code before I even played the game. heh.
In figuring out how the ToME4 module loads (so I can make a Template Module), I noticed that body parts are loaded directly in load.lua instead of being called by a loadDefinition. Is there a reason some are coded directly in load.lua and others are loaded?
dofile - is the precompiling certain Lua code files ahead of time so it doesn't have to interpret them as they come up?
loadDefinition - this is loading variables into memory so they can be more easily referenced?
I do admit that I know nothing about Lua (well, next to nothing. Tonight I read from the Lua manual), but am interested.
Thanks.
[NOTE: this may not be in the right forum. Feel free to move it if needed.]