Update 'dtmt.cfg Reference'

Lucas Schwiderski 2023-03-16 19:51:34 +01:00
parent bb16a73135
commit 831d2a8bd8

@ -1,37 +1,49 @@
The file format is SJSON (like most text files concerning DTMM, DTMT and the game engine are/will be), which is a modified version of JSON.
The gist is:
- comments (line: `//`, block `/* */`)
- strings and object keys only need quotes when they include certain characters (or when they're empty)
- array and object values can be separated by newline instead of comma (or mixed)
- the top level value of a file must be an object, without the outer braces
See [Autodesk Stingray: About the SJSON data format](https://help.autodesk.com/view/Stingray/ENU/?guid=__stingray_help_managing_content_sjson_html) and [github.com/Autodesk/sjson/](https://github.com/Autodesk/sjson/) for more.
## Example
```sjson
// The unique mod ID. Both DTMM and DMF will run into issues if this duplicates with another mod
id = ""
id = DMF
// The human-readable name of the mod. This will show up in places like DTMM's mod list and DMF's options view
name = ""
name = "Darktide Mod Framework"
// A one- or two-sentence summary of what your mod does. Shows up in DTMM
summary = ""
summary = "An open-source, community-run framework that provides enhanced Darktide modding support."
// A version number to track changes in your mod with. Shows up in DTMM
version = ""
version = "2023-03-12"
// An optional, longer description of your mod. Currently unused, but matched to Nexus's long description
// description = ""
// Name of the individual or group that made this mod
author = ""
author = "Darktide Modders"
// A file path with extension to an image to show in DTMM. Recommended width: 500 - 1000 px
image = "assets/icon.png"
// A list of arbitrary strings that will show up in DTMM.
// Grouping, filtering and other features may be implemented in the future, so you'll want to match up with other mods
categories = [
Misc
Tools
]
// A list of mod IDs that this mod depends on.
// A list of mod IDs that this mod depends on. DTMM will check before deployment
depends = [
// Just the ID defaults to "before"
DMF
foo
// Long form of the above
{
id = other_dependency
id = bar
order = before
}
// Dependencies may be require to come after the current mod
{
id = yet_another_dependency
id = baz
order = after
}
]
@ -39,19 +51,18 @@ depends = [
// File paths to Lua files, as passed in the second parameter of DMF's `new_mod`
resources = {
// The Lua file to be called by DMF when it initializes your mod.
init = "scripts/mods/<id>/init"
init = "scripts/mods/DMF/init"
// The Lua file returning the mod's DMF configuration.
data = "scripts/mods/<id>/data"
data = "scripts/mods/DMF/data"
// The Lua file returning localization strings to be registered with DMF.
localization = "scripts/mods/<id>/localization"
localization = "scripts/mods/DMF/localization"
}
packages = [
// At least one package file to load your files. It doesn't have to be named after your mod's ID value, but it is good practice to do so.
"packages/mods/<id>"
"packages/mods/DMF"
]
```
**Note:** Unless otherwise noted file paths must be specified _without_ file extension.<br>
**Note**: All instances of `<id>` are intended to be replaced with the value you specify in `id = ""`.