My First Mod

The code

terrorsoul Beginner General Modding

Trailmakers mods are written in the lua (an programming language), it supports most lua functionality.


For our first mod we are going to create a very basic mod that will write a small message to a file that trailmakers creates for mods. 


Open the main.lua file that we created, you can use various editor programs for this such as Visual Studio Code etc.. but for this tutorial you can use notepad. 


Now that we have the file open we are going to use a small peice of code that is made available to us by trailmakers modding, this is: tm.os.Log(""), This basically sends a message to the log file that trailmakers creates.


So in our main.lua write the following code: tm.os.Log("Hello World"), save the changes to the file and you are now ready for the next step.

Discussion

Please log in to post a comment.