Lua Creator

Savage

New Member
Joined
Nov 28, 2016
Messages
17
So I was tired of making 100's of lua files. Having typo's, trying to hunt those errors and worse of all, I HATED adding objects to the objects.lua file.  I asked a buddy of mine if he could help me create a script that would do this for me, he did and here it is...

This is a little HTA script that will create tangible .lua's and draft_schematic .lua files.  It will also create the object.lua and serverobjects.lua file.

How to set up

- Extract LuaCreator.7z

Exported Tre Setup

For the script to properly work you must have something (even if you don't need it) in both the tangible folder and the draft_schematic folder.

Here is an example of how I did my custom paintings folders where my .iff files were located. This is just an example of the folders structure. If your .tre is extracted you can just point the HTA to the object/tangible and object/draft_schematic folder.

Tangible Folder
objects/tangible/paintings/shared_painting1.iff
objects/tangible/paintings/shared_painting2.iff
objects/tangible/paintings/shared_painting3.iff
objects/tangible/paintings/shared_painting4.iff

draft_schematic Folder
objects/draft_schematic/paintings/shared_painting1.iff
objects/draft_schematic/paintings/shared_painting2.iff
objects/draft_schematic/paintings/shared_painting3.iff
objects/draft_schematic/paintings/shared_painting4.iff

Running the LuaCreator.HTA
- Browse to where you extracted the files from the LuaCreator.7z.
- Double click on LuaCreator.hta
- If prompted Select Microsoft HTML Application Tool
- Select Path to Tangible Files
- Select Path to Draft Schematic Files  (both paths must be populated)
- Click the button "Make it Happening"

The script will create your tanbile/draft_schematic .lua's in the folder you selected, along with the serverobjects.lua and the objects.lua.

The draft_schematics have the meat of the variables commented out so you can add in your own requirements.

The .lua's are created from the templates in the folder and the server/objects.lua are created with in the hta. 

I am sure this can be improved, customized and modified.  But this little script has saved me COUNTLESS hours!!!! 

I thought I would share so all can enjoy.

If you have any quests you can post here and I will try to answer.

Thanks!

Savage

[attachment=101]
 

Attachments

thrax989

New Member
Joined
May 3, 2015
Messages
14
Can you guys add Mobile and Intangible to the list as well i want to add rest of all the npc to the game as well as all the vehicles. Great tool works well.
 

Savage

New Member
Joined
Nov 28, 2016
Messages
17
Hey Toxic,

I can have a look at it and let ya know. Should not be that hard :)
 
Top Bottom