You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ There is a lot of 5e content to automate, so all contribution is welcomed and ap
25
25
26
26
### Coordination
27
27
28
-
We organise on the [5eTools Discord server](https://discord.gg/5etools).
28
+
We organise on the [5etools Discord server](https://discord.gg/5etools).
29
29
30
30
Although we will respond to issues and pull requests here, the easiest way to get a quick response or report minor typos/bugs is to message the **#plutonium-addon-automation** channel. Come join us if you'd like to help out! (*Especially* join us if you plan to fill out a lot of data at once—helps avoid wasted effort.)
31
31
@@ -34,9 +34,10 @@ Although we will respond to issues and pull requests here, the easiest way to ge
34
34
## Setting up
35
35
36
36
Run these precursory steps when you first set up:
37
+
37
38
1) Install [Node.js](https://nodejs.org/en/).
38
39
2) Clone this repo locally.
39
-
3) Run `npm i` within the your local repo.
40
+
3) Run `npm i` within your local repo.
40
41
41
42
### Building locally
42
43
@@ -50,13 +51,13 @@ Use `npm t` to verify the data files against the schema.
50
51
51
52
## Development guide
52
53
53
-
There isn't yet a tutorial to explain the data format. However, you can likely work most of it out by looking at examples. Familiarity with [5eTools' homebrew](https://github.com/TheGiddyLimit/homebrew) format and Foundry's data structure (including for [dnd5e](https://github.com/foundryvtt/dnd5e/wiki/Roll-Formulas), [DAE](https://gitlab.com/tposney/dae/-/blob/master/Readme.md#supported-fields-for-dnd5e), etc.) is very helpful.
54
+
There isn't yet a tutorial to explain the data format. However, you can likely work most of it out by looking at examples. Familiarity with [5etools' homebrew](https://github.com/TheGiddyLimit/homebrew) format and Foundry's data structure (including for [dnd5e](https://github.com/foundryvtt/dnd5e/wiki/Roll-Formulas), [DAE](https://gitlab.com/tposney/dae/-/blob/master/Readme.md#supported-fields-for-dnd5e), etc.) is very helpful.
54
55
55
56
### Data layout
56
57
57
58
The `module/data/` directory is laid out as follows:
58
-
- Each 'entity type' (the array names in 5eTools' JSON format—`"monster"`, `"spell"`, `"classFeature"`, etc.) is given its own directory.
59
-
- Within that directory, a `__core.json` file contains data for all entities which are natively available on 5eTools (i.e. without loading homebrew).
59
+
- Each 'entity type' (the array names in 5etools' JSON format—`"monster"`, `"spell"`, `"classFeature"`, etc.) is given its own directory.
60
+
- Within that directory, a `__core.json` file contains data for all entities which are natively available on 5etools (i.e. without loading homebrew).
60
61
- Within the same directory, each homebrew source has its own file named `<brewSourceJson>.json` (e.g. `WJMAiS.json` for *Wildjammer: More Adventures in Space*). If a homebrew source has multiple datatypes, one file per datatype is required (excluding datatypes without automation).
61
62
62
63
### Macros
@@ -66,6 +67,7 @@ Many facets of automation must be handled with macros. These are attached using
66
67
In the [`macro-item/`](./macro-item) directory is a directory for each datatype. Save your (well-formatted, commented) macro code as a Javascript file in one of these directories, structured as an async function named `macro`, with filename `<sourceJson>_<item-name-lowercase-hyphenated>.js` (e.g. `XGE_toll-the-dead.js`). **Note that the first and last lines of the file**—the ones that turn the macro into an async function—**are stripped on compilation into the module's data**.
67
68
68
69
You can create a new macro file using the `npm run mt --` command. The directory (`-d`) should match that of the JSON file into which the macro will be built.
# example: npm run mt -- -d spell -s PHB -n "toll the dead"
@@ -89,7 +91,7 @@ In the interests of consistency and user experience, we have some guidelines to
89
91
1)**We play D&D 5e.**
90
92
- Always assume the default ruleset.
91
93
- If you can do some fancy (invisible) macro work to support variant rules, go ahead, but never compromise core function.
92
-
2)**Maximum eficiency; minimum effort.**
94
+
2)**Maximum efficiency; minimum effort.**
93
95
- If something can be automated reliably, it should.
94
96
- If something can't be automated reliably, it shouldn't.
95
97
- Avoid automating only half of an item's effects without somehow informing the user of this.
@@ -103,4 +105,4 @@ In the interests of consistency and user experience, we have some guidelines to
103
105
4)**KISS: keep it simple, sweetie.**
104
106
- Avoid using macros except when absolutely necessary, and make sure they're readable and maintainable.
105
107
- Certainly avoid referencing anything outside the item that you can't guarantee will be present.
106
-
- Plutonium should only import one item per game-mechanic name. If a single class feature or spell has multiple, indepdendent functions (e.g. the paladin class' Lay on Hands feature), activating that item should prompt the user to choose the function (via a [macro](https://github.com/TheGiddyLimit/plutonium-addon-automation/issues/26)).
108
+
- Plutonium should only import one item per game-mechanic name. If a single class feature or spell has multiple, independent functions (e.g. the paladin class' Lay on Hands feature), activating that item should prompt the user to choose the function (via a [macro](https://github.com/TheGiddyLimit/plutonium-addon-automation/issues/26)).
-_**Item Macro** > Character Sheet Hook_ — uncheck this.
43
45
- (If installed) _**[Token Action HUD](https://github.com/Drental/fvtt-tokenactionhud)** > Item-Macro: item macro, original item, or both_ — select `Show the original item`. (Note this is a user setting, so ensure that each user does this or use a module such as [Force Client Settings](https://gitlab.com/kimitsu_desu/force-client-settings) to guarantee it.)
44
46
45
47
## Contributing
46
48
47
-
Please see [`CONTRIBUTING.md`](./CONTRIBUTING.md).
49
+
Please see [`CONTRIBUTING.md`](./CONTRIBUTING.md).
0 commit comments