Skip to content

Commit

Permalink
Merge pull request #24224 from SkippyMcSkip/document-revisions
Browse files Browse the repository at this point in the history
Document Revisions for MODDING.md
  • Loading branch information
ZhilkinSerg authored Jul 8, 2018
2 parents 736b245 + ed49254 commit f0b80c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/MODDING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Modding guide

Certain features of the game can be modified without rebuilding the game from source code; you should be able to just modify the pertinent files and run the game to see your changes. This attempts to document these features.
Certain features of the game can be modified without rebuilding the game from source code. This includes professions, monsters, npcs, and more. Just modify the pertinent files and run the game to see your changes.

An in-depth review of all json files and their appropriate fields is available in [JSON_INFO.md](JSON_INFO.md).
The majority of modding is done by editing JSON files. An in-depth review of all json files and their appropriate fields is available in [JSON_INFO.md](JSON_INFO.md).

## Adding a profession.

Let's say we want to add a "survivalist" profession.

We'll say this profession starts with archery, survival, traps, beef jerky and a few survival items. We'll set the starting cost at 3 points since it modifies skills and items. We could do that with the following entries:
We'll say this profession starts with archery, survival, traps, beef jerky and a few survival items. We'll set the starting cost at 3 points since it modifies skills and items. We can do that with the following entries:

````json
{
Expand Down Expand Up @@ -39,7 +39,7 @@ We'll say this profession starts with archery, survival, traps, beef jerky and a
},
````

After adding this to the professions.json file, we should see the new profession show up in the character creation screen.
After adding this to the `data/json/professions` file, we should see the new profession show up in the character creation screen.

## Adding an item
1. Open the appropriate json in `data/json/items` and add your item near similar types.
Expand All @@ -50,6 +50,6 @@ After adding this to the professions.json file, we should see the new profession

## Important note on json files

The following characters: `[ { , } ] : "` are *very* important when adding or modifying the JSON files for technical reasons. This means a single missing `,` or `[` or `}` can be the difference between a working file and a hanging game at startup.
The following characters: `[ { , } ] : "` are *very* important when adding or modifying JSON files. This means a single missing `,` or `[` or `}` can be the difference between a working file and a hanging game at startup.

Many editors have features that let you track `{ [` and `] }` to see if they're balanced (ie, have a matching opposite); [Notepad++](https://notepad-plus-plus.org/) is a popular, free editor on Windows that contains this feature. On Linux, there are a plethora of options, and you probably already have a preferred one 🙂

0 comments on commit f0b80c9

Please sign in to comment.