EnemySkinRegistry
Compatibility mod for custom enemy skins.
Screenshots 6 screenshots
About this mod Author’s original text
Enemy Skin Registry
This mod gives developers a means to register client-side enemy skins to be mutually exclusive with other registered enemy skins. It gives users the ability to control when and where those skins will appear, as well as how frequently.
Features
Completed
- LethalConfig-accessible GUI for end users to set configurations
- Registration of custom Skin implementations
- Configurable distribution of skins per enemy
- Configurable distribution of skins per moon
- Automatic registration for LLL moons
- Named skin configuration profiles
- Events on vanilla enemies for making fully custom skins with fewer patches (send a request for an event type to my discord or as a feature request on github)
Implemented but not fully tested
- Custom Enemy Registration
- Config synchronization for players that have the same mods installed
Planned
- More Event listeners
User Guide
Configuration Menu
The enemy skin configuration is accessible through the Lethal Config menu.
The top bar will let you scroll through the registered enemies.
Use the right and left arrows to navigate through them. The name of the enemy in the middle will have its configuration displayed in the rest of the ui below.
The panel in the lower left may be used to activate and de-activate registered skins. Click the skin's icon on the left side of each entry to toggle whether an enemy can spawn with this skin or not. Deactivation works mid round to allow for buggy skins to be removed if they are causing problems. This is the only time where adjusting the config will change any already-spawned enemy.
The panel in the lower right is used to configure the likelihood of a skin being selected when an enemy of a particular type spawns. Each moon can be given its own distribution of skins. The "Default" distribution is for any moon that does not have an explicit distribution. Add a skin to a distribution by clicking the "Add Skin..." dropdown on a configuration.
Each skin on each moon can be set to spawn more or less frequently. Setting the bar to the max will make it take up all of its fair share of the remaining spawn chance, and setting the bar to nothing will make it never spawn. So if you have three skins all set to the max value, they'll each have a 1/3 chance of spawning. But if you set two of those skins to half, then the distribution becomes 1/4, 1/4, 1/2.
Add a distribution for a moon by clicking the "Add Moon..." dropdown.
Any default configurations modders have included with their mod will appear in the dropdown menus just above the "Save Config" section of the GUI. Select "Moon" or "Skin" from the first dropdown and your desired mod in the second dropdown, then click the "Reapply" button to apply it to the working configuration.
Finally, hit the "Save Config" button to save any changes. Changes are immediately applied to skin selection rates and will affect any enemies that spawn after. Changes will not affect enemies that have already spawned except in the case of deactivating skins.
If you want to store your configuration as a profile for quickly loading later, hit the "Store as Profile" button. Profiles can be loaded using the same dropdowns
as the default skin and default moon configs.
Other Options in Lethal Config
- Allow Sync - When this setting is toggled on, clients can opt in to syncing with your profile when you're the host of a game
- Attempt Sync - When this setting is toggled on, if you're playing a game as a client, you will attempt to sync your profile with the host
- Indoor/Outdoor - Toggles the indoor and outdoor tabs in the skin configuration menu
- Log Level - The verbosity of the skin registry's logger - for troubleshooting purposes
For Developers
Getting this mod as a dependency
To add this mod to your project, I'd recommend using ThunderKit. But if you'd rather avoid using it, you can simply download this mod and use it like a unity package.
Adding a Custom Skin Implementation
This mod has a companion mod with default
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: