Toggle search
Search
Toggle menu
Toggle personal menu
Editing
Modding
(section)
From Desynced Wiki
Read
Edit
Edit source
View history
Page
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Mod Developer Mode == While developing a mod, you are strongly encourage to enable the game's "Mod Developer Mode". To do so, start the game with the <code>-moddev</code> command line argument. In addition, a permanent logging console window can be opened next to the game window by specifying the <code>-log</code> argument. To do so in Steam, right-click the game in your Steam Library, then select "Properties" and add the command line arguments under "LAUNCH OPTIONS". === Hot Reload === To hot reload any changes made in .lua code, just press F7 while playing the game. As an alternative CTRL+ALT+/ (on the numpad) can also be used. Hot reloading is a very quick way to iterate on any code changes and is key to keeping mod development uninterrupted and fun. === Suspend === By pressing CTRL+ALT+* (on the numpad), the game will quickly save and then shut down. The next time the game is started (in mod developer mode) it will load the saved state and resume the game. This is similar to [[#Hot Reload|hot reload]] but it will also fully reload any changed assets (textures, models, sounds) from disk. === Logging Console === While running with mod developer mode, you will find a tiny gray triangle in the lower right side of the screen. By clicking it, the in-game logging console will show up and list any errors and warnings as well as output from the Lua <code>print()</code> function. As mentioned above, it is also possible to specify the <code>-log</code> command line argument to get a separate, always open logging console window. === Enhanced Warnings === With mod developer mode active the game will run stricter checks which Lua data tables get modified in what [[Modding/Code Context|code context]]. This is highly useful to prevent mistakes like writing to global variables in simulation context, modifying simulation data tables from UI context or changing data tables which are immutable after startup. Keep an eye on the [[#Logging Console|logging console]] while developing your mod and make sure not to release any mods to the public that print warnings or errors in mod developer mode.
Summary:
Please note that all contributions to Desynced Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Desynced Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)