@noita-ts/create-mod 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -8
- package/package.json +1 -1
- package/template/readme.md +5 -5
- package/template/src/settings.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -50,7 +50,8 @@ async function main() {
|
|
|
50
50
|
placeholder: "A mod written in typescript via noita-ts",
|
|
51
51
|
}));
|
|
52
52
|
const unsafe = cancellable(await p.confirm({
|
|
53
|
-
message: "Unsafe? (aka 'no API restrictions',
|
|
53
|
+
message: "Unsafe? (aka 'no API restrictions', Noita won't load such a mod from " +
|
|
54
|
+
"the Workshop without a DLL patch)",
|
|
54
55
|
initialValue: false,
|
|
55
56
|
}));
|
|
56
57
|
const author = cancellable(await p.text({
|
|
@@ -75,11 +76,10 @@ async function main() {
|
|
|
75
76
|
},
|
|
76
77
|
],
|
|
77
78
|
}));
|
|
78
|
-
const workshop =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}));
|
|
79
|
+
const workshop = cancellable(await p.confirm({
|
|
80
|
+
message: "Setup (some of) Steam Workshop metadata?",
|
|
81
|
+
initialValue: true,
|
|
82
|
+
}));
|
|
83
83
|
let workshopName;
|
|
84
84
|
let workshopDescription;
|
|
85
85
|
if (workshop) {
|
|
@@ -104,8 +104,12 @@ async function main() {
|
|
|
104
104
|
["noita.name"]: name,
|
|
105
105
|
["noita.compat"]: 12,
|
|
106
106
|
...(unsafe ? { ["noita.unsafe"]: true } : {}),
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
// both default to what the mod itself is called and says, so they are only
|
|
108
|
+
// worth writing down when they actually differ
|
|
109
|
+
...(workshopName && workshopName !== name
|
|
110
|
+
? { ["noita.workshop.name"]: workshopName }
|
|
111
|
+
: {}),
|
|
112
|
+
...(workshopDescription && workshopDescription !== description
|
|
109
113
|
? { ["noita.workshop.description"]: workshopDescription }
|
|
110
114
|
: {}),
|
|
111
115
|
scripts: {
|
package/package.json
CHANGED
package/template/readme.md
CHANGED
|
@@ -21,7 +21,7 @@ The keys from the `package.json` file used by `nts` to produce a mod:
|
|
|
21
21
|
- `"noita.description": "An example mod written in TypeScript using noita-ts"`\
|
|
22
22
|
Description of the mod shown in-game, defaults to package description.
|
|
23
23
|
- `"noita.unsafe": false`\
|
|
24
|
-
Sets the `"request_no_api_restrictions"="1"` key in mod.xml - unsafe mods
|
|
24
|
+
Sets the `"request_no_api_restrictions"="1"` key in mod.xml - unsafe mods are not sandboxed, meaning you can do network/file access, ffi and literally anything at all, including being a crypto miner. `nts publish` will upload one anyway once you confirm it: Noita refuses to load an unsafe mod that came from the workshop, so subscribers need a DLL patch for it to run and installing it manually is the usual way. `--via-game` refuses outright, since the game will not upload one.
|
|
25
25
|
- `"noita.workshop.id": 0`\
|
|
26
26
|
This will be set by the publish command automatically. If you want to publish the mod as a separate workshop item (e.g. after deleting the original), remove this, otherwise don't touch it
|
|
27
27
|
- `"noita.workshop.name": "Example TypeScript Mod"`\
|
|
@@ -29,13 +29,13 @@ The keys from the `package.json` file used by `nts` to produce a mod:
|
|
|
29
29
|
- `"noita.workshop.description": "Uploaded to the workshop!"`\
|
|
30
30
|
The description of the mod on the steam workshop page, defaults to value of `noita.description`.
|
|
31
31
|
- `"noita.workshop.tags": []`\
|
|
32
|
-
Tags for the mod on the steam workshop page
|
|
32
|
+
Tags for the mod on the steam workshop page. Steam only accepts the tags Noita declares, and `nts publish` rejects anything else up front: `gameplay`, `graphics`, `quality of life`, `translations`, `perks`, `spells`, `player characters`, `loadouts`, `biomes`, `total conversions`, `game modes`, `creatures`, `bosses`, `alchemy`, `tweaks`, `items`, `audio`, `cheats`, `funny`, `streaming integration`, `mod dependencies`.
|
|
33
33
|
- `"noita.workshop.skip-files": []`\
|
|
34
|
-
Files to
|
|
34
|
+
Files to leave out of the workshop upload, as paths relative to the mod root.
|
|
35
35
|
- `"noita.workshop.skip-folders": []`\
|
|
36
|
-
Folders to
|
|
36
|
+
Folders to leave out of the workshop upload, as paths relative to the mod root - the folder and everything under it is skipped.
|
|
37
37
|
- `"noita.compat": 12`\
|
|
38
|
-
API compatibility version, should Noita release a big update that changes this number, an icon "this mod has not been tested with latest mod api" will be shown in the modlist.
|
|
38
|
+
API compatibility version, should Noita release a big update that changes this number, an icon "this mod has not been tested with latest mod api" will be shown in the modlist. Leaving it out means no `compatibility.xml` and so that icon always shows - the game used to fill this in for you when it did the uploading, and `nts publish` does not.
|
|
39
39
|
- `"noita.ui-newgame-name": null`\
|
|
40
40
|
This and everything below is just setting other mod.xml properties:
|
|
41
41
|
- `"noita.ui-newgame-description": null`
|