MapTrail
by
Noiro1
About this Mod
(Version 5) A simple ingame map editor using a custom camera movement system and placement from mouse position with custom meshes, textures, or even select one of the existing prefabs
( https://flashbulb.atlassian.net/wiki/spaces/TMMOD/pages/218267747/Spawnables )
but without "PFB_"
also includes:
Rotation, Scaling, Offset, Trigger (collision), Static, Visible, Undo, Redo, Delete All Objects, Individual Object Selection (mouse), Delete Object, Add Rotation, Add Position, Set Scale, and directional vectors for selected objects, Custom Mesh, Textures, Custom Rigidbodies, Custom Concave Objects, Custom Objects (meshes loaded in Custom Objects Editor, and click on the object mode button in mapping mode to swap between modes)
meshes loaded from: C:\Program Files (x86)\Steam\steamapps\workshop\content\585420\3096101613\Custom Mesh
(do not put .obj in the mesh name when loading in Custom Objects Editor)
textures loaded from: C:\Program Files (x86)\Steam\steamapps\workshop\content\585420\3096101613\Custom Textures
(do not put .png in the texture name when loading in Custom Objects Editor)
Saves are .json files saved at C:\Program Files (x86)\Steam\userdata\STEAMACCOUNTID\585420\remote\Mods\3096101613\data_dynamic
if you can't find it then you'll have to copy the mod from: C:\Program Files (x86)\Steam\steamapps\workshop\content\585420\3096101613
over to your trailmakers mod folder at C:\Program Files (x86)\Steam\steamapps\common\Trailmakers\mods
this should load the map, replace "SaveName.json" with the file name(.json), move the world file to the static folder, and don't forget to move the Custom Mesh and Custom Textures folders to your mod if you've used custom objects
MapTrail should be able to load old saves without conflict, though you will have to update your mod to use newer features of MapTrail.
© 2023 Noiro1 - no restrictions
( https://flashbulb.atlassian.net/wiki/spaces/TMMOD/pages/218267747/Spawnables )
but without "PFB_"
also includes:
Rotation, Scaling, Offset, Trigger (collision), Static, Visible, Undo, Redo, Delete All Objects, Individual Object Selection (mouse), Delete Object, Add Rotation, Add Position, Set Scale, and directional vectors for selected objects, Custom Mesh, Textures, Custom Rigidbodies, Custom Concave Objects, Custom Objects (meshes loaded in Custom Objects Editor, and click on the object mode button in mapping mode to swap between modes)
meshes loaded from: C:\Program Files (x86)\Steam\steamapps\workshop\content\585420\3096101613\Custom Mesh
(do not put .obj in the mesh name when loading in Custom Objects Editor)
textures loaded from: C:\Program Files (x86)\Steam\steamapps\workshop\content\585420\3096101613\Custom Textures
(do not put .png in the texture name when loading in Custom Objects Editor)
Saves are .json files saved at C:\Program Files (x86)\Steam\userdata\STEAMACCOUNTID\585420\remote\Mods\3096101613\data_dynamic
if you can't find it then you'll have to copy the mod from: C:\Program Files (x86)\Steam\steamapps\workshop\content\585420\3096101613
over to your trailmakers mod folder at C:\Program Files (x86)\Steam\steamapps\common\Trailmakers\mods
this should load the map, replace "SaveName.json" with the file name(.json), move the world file to the static folder, and don't forget to move the Custom Mesh and Custom Textures folders to your mod if you've used custom objects
if #tm.players.CurrentPlayers() == 1 then
local tab = json.parse(tm.os.ReadAllText_Static("SaveName.json"))
for n in pairs(tab) do
if tab[n].Type == 1 then
tm.physics.AddMesh("Custom Mesh/"..tab[n].Mesh..".obj", tab[n].Mesh.."Mesh")
tm.physics.AddTexture("Custom Textures/"..tab[n].Texture..".png", tab[n].Texture.."Tex")
local obj = tm.physics.SpawnCustomObject(tm.vector3.Create(tab[n].Pos), tab[n].Mesh.."Mesh", tab[n].Texture.."Tex")
obj.GetTransform().SetRotation(tm.vector3.Create(tab[n].Rot))
obj.GetTransform().SetScale(tm.vector3.Create(tab[n].Scale))
obj.SetIsTrigger(tab[n].Trigger)
obj.SetIsVisible(tab[n].Visible)
elseif tab[n].Type == 2 then
tm.physics.AddMesh("Custom Mesh/"..tab[n].Mesh..".obj", tab[n].Mesh.."Mesh")
tm.physics.AddTexture("Custom Textures/"..tab[n].Texture..".png", tab[n].Texture.."Tex")
local obj = tm.physics.SpawnCustomObjectRigidbody(tm.vector3.Create(tab[n].Pos), tab[n].Mesh.."Mesh", tab[n].Texture.."Tex", false, tab[n].Mass)
obj.GetTransform().SetRotation(tm.vector3.Create(tab[n].Rot))
obj.GetTransform().SetScale(tm.vector3.Create(tab[n].Scale))
obj.SetIsTrigger(tab[n].Trigger)
obj.SetIsStatic(tab[n].Static)
obj.SetIsVisible(tab[n].Visible)
elseif tab[n].Type == 3 then
tm.physics.AddMesh("Custom Mesh/"..tab[n].Mesh..".obj", tab[n].Mesh.."Mesh")
tm.physics.AddTexture("Custom Textures/"..tab[n].Texture..".png", tab[n].Texture.."Tex")
local obj = tm.physics.SpawnCustomObjectConcave(tm.vector3.Create(tab[n].Pos), tab[n].Mesh.."Mesh", tab[n].Texture.."Tex")
obj.GetTransform().SetRotation(tm.vector3.Create(tab[n].Rot))
obj.GetTransform().SetScale(tm.vector3.Create(tab[n].Scale))
obj.SetIsVisible(tab[n].Visible)
else
local obj = tm.physics.SpawnObject(tm.vector3.Create(tab[n].Pos), tab[n].Name)
obj.GetTransform().SetRotation(tm.vector3.Create(tab[n].Rot))
obj.GetTransform().SetScale(tm.vector3.Create(tab[n].Scale))
if type(tab[n].Visible) == "boolean" and type(tab[n].Static) == "boolean" and type(tab[n].Visible) == "boolean" then
obj.SetIsTrigger(tab[n].Trigger)
obj.SetIsStatic(tab[n].Static)
obj.SetIsVisible(tab[n].Visible)
end
end
end
end
MapTrail should be able to load old saves without conflict, though you will have to update your mod to use newer features of MapTrail.
© 2023 Noiro1 - no restrictions
Recent Updates
13 Dec, 2023 @ 10:31pm
13 Dec, 2023 @ 9:33pm
Version 5.1:Fixed custom object undo/redoFixed the object's name being incorrect when selecting (to fix this for all worlds from V5 undo and redo all objects)
13 Dec, 2023 @ 7:37pm
Version 5: Custom Objects: Rigidbody, Concave, NormalCustom meshesCustom texturesCustom Objects Editor (for loading meshes and textures)Moved info to help windows accessed by buttons in each tab
28 Nov, 2023 @ 6:06am
Version 4: better thumbnail, video, directional vectors for selected objects, set trigger, static, and visible for selected objects, and fixed a few bugs regarding the selection and editing system
27 Nov, 2023 @ 12:38am
Version 3: Added Selection, Add Position, Add Rotation, Set Scale, Trigger, Static, and Visible, also some minor changes to the graphical user interface (labels)
Subscribe on Steam
Platform
Steam Workshop