LUASystem

From SimsWiki
Revision as of 15:49, 17 September 2012 by Kiwi tea (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/LUASystem
To save the trouble of explaining, LUA system or general files are composed of blocks of any of the following

An Opening block with dofile("") commands A function A command or a definition like (etcetera=game.constants_etcetera or return 0) A Definition block (see other specification) An if Statement (IF variable is true, do this etc) An ending block consisting of more if statements or verifying statements

This various things will all adhere to the various definitions scripts in the game as well as LUA standards.

-From Ralph-

Each DAT file can contain its' own LUA (any instance number) and will autoexecute based on the top of the LUA containing the following:

--#-package:BD008913# -- package signature
 

The package number must be unique also, of which you can use the generated Instance. However if you have two dat with LUA's with the same package number, one will not work (depending on the load ordere).

If the LUA doesn't execute, try changing the first character of the Package ID to "0". It seems that my generated id of :A3506332 is not valid. However :03506332 is valid. go figure...

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox