Skip to content

Commit aa0d24d

Browse files
authored
Merge pull request #10 from ithinkandicode/develop
2.0.0 - Add support for loading unpacked ZIPs
2 parents d505d9c + 2d2e951 commit aa0d24d

File tree

2 files changed

+209
-82
lines changed

2 files changed

+209
-82
lines changed

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,34 @@ For detailed info, see the [docs for Delta-V Modding](https://gitlab.com/Delta-V
66

77
## Mod Setup
88

9+
### Structure
10+
11+
Mod ZIPs should have the structure shown below. The name of the ZIP is arbitrary.
12+
13+
```
14+
yourmod.zip
15+
├───.import
16+
└───mods-unpacked
17+
└───Author-ModName
18+
├───ModMain.gd
19+
└───_meta.json
20+
```
21+
22+
#### Notes on .import
23+
24+
Adding the .import directory is only needed when your mod adds content such as PNGs and sound files. In these cases, your mod's .import folder should **only** included your custom assets, and should not include any vanilla files.
25+
26+
You can copy your custom assets from your project's .import directory. They can be easily identified by sorting by date. To clean up unused files, it's helpful to delete everything in .import that's not vanilla, then run the game again, which will re-create only the files that are actually used.
27+
28+
29+
### Required Files
30+
931
Mods you create must have the following 2 files:
1032

1133
- **ModMain.gd** - The init file for your mod.
1234
- **_meta.json** - Meta data for your mod (see below).
1335

14-
### Example _meta.json
36+
#### Example _meta.json
1537

1638
```json
1739
{
@@ -31,9 +53,9 @@ Mods you create must have the following 2 files:
3153
}
3254
```
3355

34-
#### Notes
56+
#### Notes on meta.json
3557

36-
Some properties in the JSON are not checke din the code (ATOW), and are only used for reference by yourself and your mod's users. These are:
58+
Some properties in the JSON are not checked in the code, and are only used for reference by yourself and your mod's users. These are:
3759

3860
- `version`
3961
- `compatible_game_version`
@@ -54,7 +76,24 @@ Add a script that extends a vanilla script. `childScriptPath` is the path to you
5476

5577
Inside that extender script, it should include `extends {target}`, where {target} is the vanilla path, eg: `extends "res://singletons/utils.gd"`.
5678

57-
Note that your extender script doesn't have to follow the same directory path as the vanilla file, but it's good practice to do so.
79+
Your extender scripts don't have to follow the same directory path as the vanilla file, but it's good practice to do so.
80+
81+
One approach to organising your extender scripts is to put them in a dedicated folder named "extensions", eg:
82+
83+
```
84+
yourmod.zip
85+
├───.import
86+
└───mods-unpacked
87+
└───Author-ModName
88+
├───ModMain.gd
89+
├───_meta.json
90+
└───extensions
91+
└───Any files that extend vanilla code can go here, eg:
92+
├───main.gd
93+
└───singletons
94+
├───item_service.gd
95+
└───debug_service.gd
96+
```
5897

5998
### addTranslationFromResource
6099

0 commit comments

Comments
 (0)