Advanced Permissions
A handful of the features added by BETAS require a little more care to implement and use in such a way that prevents (or at least deters) potential misuse, whether that misuse is intentional or accidental. In order to make use of these features in your own mod, you must explicitly enable using them for your mod and opt in to specific permissions in order for those features to work. You do not need to opt in to every permission—you don't have to opt in to any at all—and BETAS will continue to function for your mod correctly so long as you do not attempt to use features that require permissions you have not enabled. A message will be logged to the SMAPI console to let users know which permissions your mod has opted in to.
That said, please be aware that the method in which I have implemented opting in to these permissions cannot possibly prevent every chance of another content pack taking advantage of you enabling them. However, please keep in mind that I specified "content pack" for a reason; any C# mod can already do anything listed on this page to or with your mod regardless of whether you want them to. The fact that I am requiring you to take these additional steps anyway is simply to not let perfect be the enemy of good and to provide some protection from misuse (again, potentially accidental).
If your mod is found to be abusing the fact that another mod has enabled any of these permissions, your mod will be blacklisted and BETAS will disable itself if it detects that your mod is installed and log an alert to the SMAPI console to let users know why.
Enabling Permissions
In order to enable advanced permissions for your mod, you must add some additional information to your mod's manifest.json. The reason they are added to your manifest is so that no other mod can enable these permissions on your behalf; you must make the decision to enable them yourself. If you do not enable a permission in your manifest, then you do not need to worry about any other content pack using your Unique ID for any advanced features relating to that permission.
The data you must add to your manifest.json is a field named Spiderbuttons.BETAS whose value is an object with the following field:
| FIELD | PURPOSE |
|---|---|
| AdvancedPermissions | A list of strings where each string is the name of a permission type you are enabling. |
Here is an example manifest that is enabling every advanced permission currently available:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
Global Mod Data
Permission Required: GlobalModData
By enabling this permission, BETAS will be able to read and write data to the player's global mod data on your mod's behalf. This mod data is different from the usual mod data in that it is stored in their game files and will stay the same not only across different save files but potentially across different computers, too, as global mod data may be synchronized with other game files via Steam/GOG if the user has that enabled. This data will be stored in a betas.json file inside a folder named after the UniqueID from your manifest in the user's app data. See Global App Data for more information.
Logging
Permission Required: Logging
By enabling this permission, BETAS will be allowed to log messages to the SMAPI console on your mod's behalf. Messages printed to the console in this way will appear to come from your mod rather than BETAS and users will not be able to tell that it is actually BETAS doing the logging.