Skip to content

Commit 63ef42b

Browse files
add some more common rejection reasons (#104)
1 parent 2ce2948 commit 63ef42b

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

mods/guidelines.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,23 @@ A mod found breaking any of these rules will be **rejected unconditionally** fro
4242
A mod found breaking any of these rules will likely be rejected, although depending on the situation, they could also still be approved.
4343

4444
* The mod **is incompatible with other mods for no good reason**. Note that mods can be fundamentally incompatible (such as two different texture pack managers)
45-
* The mod **crashes the game** due to preventible issues
45+
* The mod **crashes the game** due to preventible issues (see [possible pitfalls](#possible-pitfalls) for notes about throwing exceptions)
4646
* The mod **doesn't do anything meaningful**. Note that joke mods can be considered meaningful; see [our policy on them](#joke-mods)
4747

4848
A mod found breaking any of these rules will likely still be approved, although constant and/or prolific breaking can result in a rejection.
4949

5050
* The mod has **several common bugs**
5151
* The mod can't **preserve state** between bootups (save data, load data) normally
5252
* The mod's **codebase is really hard to read**. The reason this might result in a rejection is if the people verifying the mod for the index are unable to properly ascertain if the mod breaks any of the other rules due to the (hopefully unintended) obfuscation
53+
* The mod **doesn't attempt to be compatible** with other mods. Mods should really try to be compatible with at least mods that do the same features or popular mods that end users are likely to have installed. This can be done in many ways, and at a minimum:
54+
* Nodes made by the mod *should* have IDs (and if they do, they should be prefixed with the mod id by using _spr: `node->setID("my-fun-node"_spr)`)
55+
* The mod should also attempt to dodge or at least account for at a minimum Node IDs menus that may be expanded by other mods, such as `bottom-menu` in MenuLayer, but ideally should also account for places where mods might have added buttons
5356

5457
## Non-rules
5558

5659
These are some things one might expect to result in a rejection, but actually most likely won't.
5760

58-
* The mod is **logically incompatible** with another mod on the index (for example, two mods that completely reshape `MenuLayer` in different ways are never going to be compatible)
61+
* The mod is **logically incompatible** with another mod on the index (for example, two mods that completely reshape `MenuLayer` in different ways are never going to be compatible) - but these mods should be marked as incompatible in the mod's mod.json if they are truly really incompatible
5962
* The mod **looks bad**. We won't shame you for not having HJfod's UI skills! However, if the mod's UI/UX is not just bad but actively harmful, it probably violates the "no false information" rule
6063
* The mod is **not in English**. That's just cool! It might take us a while to verify a mod whose source code is written in another language though
6164

@@ -130,9 +133,9 @@ While nothing in this section are absolute rules, they are red flags that index
130133
131134
* Avoid generating exceptions.
132135
133-
Due to compatibility issues, functions that generate C++ exceptions should be avoided, _even if you catch the exception_. Either verify that the exception will not be generated beforehand, or use an alternative function that does not throw one. One such function is `std::stoi` and `std::stof`, which should be replaced with Geode's [`numFromString`](/functions/geode/utils/numFromString/).
136+
Due to compatibility issues, functions that generate C++ exceptions should be avoided, _even if you catch the exception_ (since try/catch blocks **don't work** on all platforms). Either verify that the exception will not be generated beforehand, or use an alternative function that does not throw one. One such function is `std::stoi` and `std::stof`, which should be replaced with Geode's [`numFromString`](/functions/geode/utils/numFromString/).
134137
135-
Functions from the `<filesystem>` header should be handled carefully. Most filesystem functions have `std::error_code` overloads, which do not throw exceptions on failure. Use them. Calling `string()` on a `std::filesystem::path` must also be avoided - this may crash on certain setups. Instead, use [`pathToString`](/functions/geode/utils/string/pathToString/).
138+
Functions from the `<filesystem>` header should be handled carefully. Most filesystem functions have `std::error_code` overloads, which do not throw exceptions on failure. **You should use error_code overloads**! Calling `string()` on a `std::filesystem::path` must also be avoided - this may crash on certain setups. Instead, use [`pathToString`](/functions/geode/utils/string/pathToString/).
136139
137140
Calling `unwrap()` on a [Result](/classes/geode/Result/) without first checking if it is `ok()` will lead to an instant rejection. You can never be certain that your web calls will always succeed!
138141
@@ -152,9 +155,11 @@ While this isn't typically a rejection reason, new developers tend to find thems
152155
153156
Developers should also be aware of Geode's [directory functions](https://github.com/geode-sdk/geode/blob/main/loader/include/Geode/loader/Dirs.hpp), which can be used for storing mod files and determining the location of game data. Unless you have good reason, mod files should be stored within the mod's save directory, which can be determined with [`Mod::getSaveDir`](/classes/geode/Mod#getSaveDir) (using the config directory through `getConfigDir` is also fine).
154157
155-
* Avoid submitting locally built mods.
158+
* Avoid submitting **locally built mods**.
156159
157-
For new developers, we strongly recommend making use of the cross-platform [build-geode-mod](https://github.com/geode-sdk/build-geode-mod/) action that comes with the default mod template. This action helpfully builds your mod for all platforms, which makes it very easy for developers to support them.
160+
You should be using the cross-platform [build-geode-mod](https://github.com/geode-sdk/build-geode-mod/) action that comes with the default mod template. This action helpfully builds your mod for all platforms, which makes it very easy for developers to support them. This will be the `.github/workflows/multi-platform.yml` file in your repo.
161+
162+
If this doesn't exist, you likely said no to adding it when making the geode project (though this option has since been removed, and it will always be added). Add the [`multi-platform.yml`](https://github.com/geode-sdk/build-geode-mod/blob/main/examples/multi-platform.yml) file from the examples folder into `.github/workflows/multi-platform.yml`, then check the Actions tab in GitHub and take the Build Output from the most recent commit, take the .geode file out of it and place that in the release.
158163
159164
Those who are uploading their code on platforms outside of GitHub should also be using the CI instances offered by those platforms for building their mod. This makes it easier for us to verify that a mod has not been tampered with.
160165

mods/publishing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Once your awesome mod is finished, it's time to publish it for all the world to see! Geode comes with an in-game "Download" section where users can download mods from, which gets its content from [the Geode Index](https://api.geode-sdk.org/v1/mods).
44

5-
Make sure to [read the **submission guidelines**](/mods/guidelines/) first to avoid common mistakes.
5+
Make sure to [**read the submission guidelines**](/mods/guidelines/) first to avoid common mistakes.
66

77
## Getting Your Mod on the Repo
88

0 commit comments

Comments
 (0)