Skip to content

Commit d505d9c

Browse files
authored
Merge pull request #6 from ithinkandicode/develop
Docs + Fixes + Minor Edits
2 parents a2598c5 + eac8d50 commit d505d9c

File tree

2 files changed

+260
-100
lines changed

2 files changed

+260
-100
lines changed

README.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,83 @@
22

33
A general purpose mod-loader for GDScript-based Godot Games.
44

5-
# Credits
5+
For detailed info, see the [docs for Delta-V Modding](https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/MODDING.md), upon which ModLoader is based. The docs there cover mod setup and helper functions in much greater detail.
66

7-
### 🔥 Based on the work of these brilliant people 🔥
7+
## Mod Setup
8+
9+
Mods you create must have the following 2 files:
10+
11+
- **ModMain.gd** - The init file for your mod.
12+
- **_meta.json** - Meta data for your mod (see below).
13+
14+
### Example _meta.json
15+
16+
```json
17+
{
18+
"id": "AuthorName-ModName",
19+
"name": "Mod Name",
20+
"version": "1.0.0",
21+
"compatible_game_version": ["0.6.1.6"],
22+
"authors": ["AuthorName"],
23+
"description": "Mod description goes here",
24+
"website_url": "",
25+
"dependencies": [
26+
"Add IDs of other mods here, if your mod needs them to work"
27+
],
28+
"incompatibilities": [
29+
"Add IDs of other mods here, if your mod conflicts with them"
30+
]
31+
}
32+
```
33+
34+
#### Notes
35+
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:
37+
38+
- `version`
39+
- `compatible_game_version`
40+
- `authors`
41+
- `description`
42+
- `website_url`
43+
44+
45+
## Helper Methods
46+
47+
Use these when creating your mods. As above, see the [docs for Delta-V Modding](https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/MODDING.md) for more details.
48+
49+
### installScriptExtension
50+
51+
installScriptExtension(childScriptPath:String)
52+
53+
Add a script that extends a vanilla script. `childScriptPath` is the path to your mod's extender script path, eg `MOD/extensions/singletons/utils.gd`.
54+
55+
Inside that extender script, it should include `extends {target}`, where {target} is the vanilla path, eg: `extends "res://singletons/utils.gd"`.
56+
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.
58+
59+
### addTranslationFromResource
60+
61+
addTranslationFromResource(resourcePath: String)
62+
63+
Add a translation file, eg "mytranslation.en.translation". The translation file should have been created in Godot already: When you import a CSV, such a file will be created for you.
64+
65+
Note that this function is exclusive to ModLoader, and departs from Delta-V's two functions [addTranslationsFromCSV](https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/MODDING.md#addtranslationsfromcsv) and [addTranslationsFromJSON](https://gitlab.com/Delta-V-Modding/Mods/-/blob/main/MODDING.md#addtranslationsfromjson), which aren't available in ModLoader.
66+
67+
### appendNodeInScene
68+
69+
appendNodeInScene(modifiedScene, nodeName:String = "", nodeParent = null, instancePath:String = "", isVisible:bool = true)
70+
71+
Create and add a node to a instanced scene.
72+
73+
### saveScene
74+
75+
saveScene(modifiedScene, scenePath:String)
76+
77+
Save the scene as a PackedScene, overwriting Godot's cache if needed.
78+
79+
80+
## Credits
81+
82+
🔥 ModLoader is based on the work of these brilliant people 🔥
883

984
- [Delta-V-Modding](https://gitlab.com/Delta-V-Modding/Mods)

0 commit comments

Comments
 (0)