Update 'Migrating from loose files'
parent
1467d5a2b1
commit
46243aaada
1 changed files with 9 additions and 4 deletions
|
@ -13,10 +13,15 @@ id = ""
|
||||||
// The human-readable name of the mod. This will show up in places like DTMM's mod list and DMF's options view
|
// 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 = ""
|
||||||
// A summary of what your mod does. Shows up in DTMM
|
// A summary of what your mod does. Shows up in DTMM
|
||||||
description = ""
|
summary = ""
|
||||||
// A version number to track changes in your mod with. Not used, yet, but good practice to always have anyways.
|
// A version number to track changes in your mod with. Shows up in DTMM
|
||||||
version = ""
|
version = ""
|
||||||
|
|
||||||
|
// A list of mod IDs that this mod depends on.
|
||||||
|
depends = [
|
||||||
|
DMF
|
||||||
|
]
|
||||||
|
|
||||||
// File paths to Lua files, as passed in the second parameter of DMF's `new_mod`
|
// File paths to Lua files, as passed in the second parameter of DMF's `new_mod`
|
||||||
resources = {
|
resources = {
|
||||||
// The Lua file to be called by DMF when it initializes your mod.
|
// The Lua file to be called by DMF when it initializes your mod.
|
||||||
|
@ -33,7 +38,7 @@ packages = [
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that all file paths should be specified _without_ file extension. The `resources` section can be adapted from the contents of your `.mod` file. All instances of `<id>` are intended to be replaced with the value you specify in `id = ""`, i.e. the value passed to DMF's `new_mod` and `get_mod`.
|
Please note that all file paths should be specified _without_ file extension. The `resources` section can be adapted from the contents of your `.mod` file. All instances of `<id>` are intended to be replaced with the value you specify in `id = ""`, which must be the same value you pass to DMF's `new_mod` and `get_mod`.
|
||||||
|
|
||||||
The `.package` file supports wildcards, so the most simple version would look like this:
|
The `.package` file supports wildcards, so the most simple version would look like this:
|
||||||
|
|
||||||
|
@ -59,6 +64,6 @@ A suggested final file structure looks as follows:
|
||||||
└──localization.lua
|
└──localization.lua
|
||||||
```
|
```
|
||||||
|
|
||||||
All additional Lua files can then be dropped into `scripts/mods/<id>` (sub-directories are supported) and can be `require`d in-game with the full path, e.g. `require("scripts/mods/<id>/my_extra_file")`.
|
All additional Lua files can then be dropped into `scripts/mods/<id>` (subdirectories are supported) and can be `require`d in-game with the full path, e.g. `require("scripts/mods/<id>/my_extra_file")`.
|
||||||
|
|
||||||
Modding veterans from VT2 may recognize this file structure 🙂
|
Modding veterans from VT2 may recognize this file structure 🙂
|
Loading…
Add table
Reference in a new issue