Creating Mods

Early backers have already started creating their own assets for our first Alpha release of TUG, and so we want to give you guys some information to help get your items into the game as easily as possible.

Example: [gameobjects.txt] Workbench {               name = "Workbench" model = "Models/Bench/workbench.obj" Diffuse {                   0 = "Models/Bench/workbench_diff.tga" 1 = "Models/Bench/clutter1_diff.tga" } [workbench.obj] # object pivot # object workbench # object clutter # object workbench_coll Rendered-Meshes and Nonrendered-meshes: Our code is set up to not render any mesh called 'pivot' or that ends with '_coll'. Pivot will be what an object uses for location and rotation, and collision is what keeps your character from walking through solid objects. Multiple Textures: In this example, Material 0 is applied to the top rendered-mesh 'workbench', and Material 1 is applied to the next rendered-mesh 'clutter'. 'pivot' and 'workbench_coll' are nonrendered-meshes, and so don't need materials. Exporting for Material Order: When you export your multi-mesh object as an .OBJ file, the meshes are ordered by creation and can become re-ordered if you add new meshes later. This may cause textures to display on the wrong mesh than they'd previously been associated with since the list is now "out of order". To fix this, you need to keep an eye on your hierarchy structure for all of your static meshes. Add the 'pivot' mesh (usually a 0.1 unit cube centered at 0,0,0) to the top of the hierarchy, and the collision mesh (xxxxx_coll) at the bottom of the hierarchy. You can make future updates and additions and as long as they are organized after the previous mesh and before the '_coll', your textures should stay properly associated to the correct meshes.