Toggle search
Search
Toggle menu
Toggle personal menu
Editing
Modding/def.json
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!
The 'def.json' file is the starting file for your mod. * "id" is required. It is the unique mod identifier in the game. * "name" is required. It is the description in game that your mod will go by. * "version_name" is required. It gives a version reference when you update your own code. * "version_code" is required. It is a number. * "author" is required. It should identify the mod author. * "homepage" is not required to be filled out. It can be blank, however it may be useful if you want to link to a source code page. * "description" is required. Gives a quick description about your mod. * "options" is not required. It does give your mod a settings page under the Main Menu > Options > Mods. * "packages" having at least one entry is required. ** Package name can be almost any descriptor. *** Name gives a reference for the package. *** Entry is the main starting point for the package. *** 'map_settings' is an entry point for additional options when starting a new custom game. *** Dependencies give packages your mod package is dependent on. ** Secondary packages are not required, but can be helpful in some instances. <syntaxhighlight lang="js" line="1"> { "id": "YourModId", "name": "Your Mod Name", "version_name": "1.0", "version_code": 1, "author": "You", "homepage": "...", "description": "Example def.json for Your Mod", "options": "options.lua", // If you want your mod to have a settings page under Options > Mods "packages": { "Data": { "name": "Your Mod Data", "entry": "data.lua", "map_settings": "map_set.lua", "dependencies": [ "Main/Data" ], }, "UI": { "name": "Your Mod UI", "entry": "ui.lua", }, "Languages": { "name": "Translations", "languagesdir": "translations", "type": "Translation", "languages": { "en": "English (America)", 'fr': "French", // ... etc } } // ... etc } } </syntaxhighlight>
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)