# xiisuma/slime-rancher-2-mods architecture

> Architecture diagram of the GitHub repository xiisuma/slime-rancher-2-mods, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xiisuma/slime-rancher-2-mods
- Repository: https://github.com/xiisuma/slime-rancher-2-mods

## Overview

This repository is a suite of independent Slime Rancher 2 mods, not one application: MelonLoader loads each mod, which adds gameplay content or ranch features to the running game. The main workflow is creating and registering content, then applying per-save behavior such as spawn rates and plort values. Other branches add crops, shop upgrades, artwork, and multiplayer fixes. README-listed features without sampled implementation are represented at their source directories; their internal wiring is not inferred.

Main entry points: [`Source/BubbleSlimes/src/Main.cs`](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/BubbleSlimes/src/Main.cs) (Bubble Slimes), [`Source/GemSlimes/src/Main.cs`](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/GemSlimes/src/Main.cs) (Gem Slimes), [`Source/TwinkleSlime/src/Main.cs`](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/TwinkleSlime/src/Main.cs) (Twinkle Slimes), [`Shared/SR2Kit/Hooks.cs`](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Hooks.cs) (Lifecycle Hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creatures["Slime Content"]
  node_bubble["Bubble Slimes<br/>[Main.cs]"]
  node_bubblepop["Pop Behavior<br/>[BubblePop.cs]"]
  node_gems["Gem Slimes<br/>[Main.cs]"]
  node_gemchain["Gem Growth Chain<br/>[Transformations.cs]"]
  node_twinkle["Twinkle Slimes<br/>[Main.cs]"]
  node_lucky["Lucky Plorts<br/>[Main.cs]"]
end

subgraph group_ranch["Ranch Features"]
  node_ginger["Ginger Crop<br/>[GingerCrop.cs]"]
  node_gingerwild["Wild Ginger<br/>[WildGinger.cs]"]
  node_corral["Corral Upgrades"]
  node_corralshop["Corral Upgrade Shop<br/>[UpgradeShop.cs]"]
  node_pond["Pond Upgrades"]
  node_pondshop["Pond Upgrade Shop<br/>[UpgradeShop.cs]"]
end

subgraph group_integration["Game Integrations"]
  node_assets["Modded Assets<br/>[Main.cs]"]
  node_assetlibrary["Asset Library<br/>[AssetLibrary.cs]"]
  node_patcher["Multiplayer Patcher<br/>[Main.cs]"]
  node_persistence["Save Registration"]
  node_ownership["Actor Ownership"]
end

subgraph group_kit["Shared Runtime"]
  node_hooks["Lifecycle Hooks<br/>[Hooks.cs]"]
  node_registry["Content Registry"]
  node_spawns["Slime Spawns<br/>[SlimeSpawns.cs]"]
  node_economy["Plort Economy<br/>[PlortEconomy.cs]"]
  node_pedia["Slimepedia<br/>[Pedia.cs]"]
  node_translations["Translations<br/>[Translations.cs]"]
end

node_loader(("MelonLoader"))
node_game["Slime Rancher 2"]
node_player(("Rancher"))
node_mpbridge["Ranching Together"]

node_loader -->|"loads"| node_bubble
node_loader -->|"loads"| node_gems
node_loader -->|"loads"| node_twinkle
node_loader -->|"loads"| node_lucky
node_loader -->|"loads"| node_ginger
node_loader -->|"loads"| node_corral
node_loader -->|"loads"| node_pond
node_loader -->|"loads"| node_assets
node_loader -->|"loads"| node_patcher
node_bubble -->|"registers callbacks"| node_hooks
node_gems -->|"registers callbacks"| node_hooks
node_twinkle -->|"registers callbacks"| node_hooks
node_lucky -->|"registers callbacks"| node_hooks
node_ginger -->|"registers callbacks"| node_hooks
node_patcher -->|"registers callbacks"| node_hooks
node_bubble -->|"creates content"| node_registry
node_bubble -->|"registers spawn"| node_spawns
node_bubble -->|"registers value"| node_economy
node_bubble -->|"documents slime"| node_pedia
node_bubble -->|"adds text"| node_translations
node_bubble -->|"attaches behavior"| node_bubblepop
node_gems -->|"creates content"| node_registry
node_gems -->|"registers spawn"| node_spawns
node_gems -->|"registers values"| node_economy
node_gems -->|"documents slimes"| node_pedia
node_gems -->|"configures growth"| node_gemchain
node_twinkle -->|"creates content"| node_registry
node_twinkle -->|"registers spawn"| node_spawns
node_twinkle -->|"registers values"| node_economy
node_twinkle -->|"documents slimes"| node_pedia
node_twinkle -->|"adds text"| node_translations
node_lucky -->|"creates plort"| node_registry
node_lucky -->|"registers value"| node_economy
node_ginger -->|"sets up"| node_gingerwild
node_ginger -->|"registers crop"| node_game
node_corralshop -->|"applies upgrades"| node_corral
node_pondshop -->|"applies upgrades"| node_pond
node_assets -->|"loads artwork"| node_assetlibrary
node_assets -->|"sets icons"| node_game
node_patcher -->|"runs registration"| node_persistence
node_patcher -->|"installs watchdog"| node_ownership
node_patcher -.->|"resolves optionally"| node_mpbridge
node_ownership -->|"claims actors"| node_player
node_ownership -->|"tracks actors"| node_game

click node_bubble "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/BubbleSlimes/src/Main.cs"
click node_bubblepop "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/BubbleSlimes/src/BubblePop.cs"
click node_gems "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/GemSlimes/src/Main.cs"
click node_gemchain "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/GemSlimes/src/Transformations.cs"
click node_twinkle "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/TwinkleSlime/src/Main.cs"
click node_lucky "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/LuckyPlorts/src/Main.cs"
click node_ginger "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/KookadobaGingerGrower/src/GingerCrop.cs"
click node_gingerwild "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/KookadobaGingerGrower/src/WildGinger.cs"
click node_corral "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MoreCorralUpgrades/src/CorralUpgradeHandler.cs"
click node_corralshop "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MoreCorralUpgrades/src/UpgradeShop.cs"
click node_pond "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/PondUpgrades/src/PondUpgradeHandler.cs"
click node_pondshop "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/PondUpgrades/src/UpgradeShop.cs"
click node_assets "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/ModdedAssets/src/Main.cs"
click node_assetlibrary "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/ModdedAssets/src/AssetLibrary.cs"
click node_patcher "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MultiplayerModPatcher/src/Main.cs"
click node_persistence "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MultiplayerModPatcher/src/PersistenceRegistration.cs"
click node_ownership "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MultiplayerModPatcher/src/OwnershipWatchdog.cs"
click node_hooks "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Hooks.cs"
click node_registry "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/IdentifiableRegistry.cs"
click node_spawns "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/SlimeSpawns.cs"
click node_economy "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/PlortEconomy.cs"
click node_pedia "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Pedia.cs"
click node_translations "https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Translations.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bubble,node_bubblepop,node_gems,node_gemchain,node_twinkle,node_lucky toneBlue
class node_ginger,node_gingerwild,node_corral,node_corralshop,node_pond,node_pondshop toneAmber
class node_assets,node_assetlibrary,node_patcher,node_persistence,node_ownership toneMint
class node_hooks,node_registry,node_spawns,node_economy,node_pedia,node_translations toneRose
class node_loader,node_game,node_player,node_mpbridge toneIndigo
```

## Components

### Slime Content

- [Bubble Slimes](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/BubbleSlimes/src/Main.cs): `Source/BubbleSlimes/src/Main.cs`
- [Pop Behavior](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/BubbleSlimes/src/BubblePop.cs): `Source/BubbleSlimes/src/BubblePop.cs`
- [Gem Slimes](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/GemSlimes/src/Main.cs): `Source/GemSlimes/src/Main.cs`
- [Gem Growth Chain](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/GemSlimes/src/Transformations.cs): `Source/GemSlimes/src/Transformations.cs`
- [Twinkle Slimes](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/TwinkleSlime/src/Main.cs): `Source/TwinkleSlime/src/Main.cs`
- [Lucky Plorts](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/LuckyPlorts/src/Main.cs): `Source/LuckyPlorts/src/Main.cs`

### Ranch Features

- [Ginger Crop](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/KookadobaGingerGrower/src/GingerCrop.cs): `Source/KookadobaGingerGrower/src/GingerCrop.cs`
- [Wild Ginger](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/KookadobaGingerGrower/src/WildGinger.cs): `Source/KookadobaGingerGrower/src/WildGinger.cs`
- [Corral Upgrades](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MoreCorralUpgrades/src/CorralUpgradeHandler.cs): `Source/MoreCorralUpgrades/src/CorralUpgradeHandler.cs`
- [Corral Upgrade Shop](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MoreCorralUpgrades/src/UpgradeShop.cs): `Source/MoreCorralUpgrades/src/UpgradeShop.cs`
- [Pond Upgrades](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/PondUpgrades/src/PondUpgradeHandler.cs): `Source/PondUpgrades/src/PondUpgradeHandler.cs`
- [Pond Upgrade Shop](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/PondUpgrades/src/UpgradeShop.cs): `Source/PondUpgrades/src/UpgradeShop.cs`

### Game Integrations

- [Modded Assets](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/ModdedAssets/src/Main.cs): `Source/ModdedAssets/src/Main.cs`
- [Asset Library](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/ModdedAssets/src/AssetLibrary.cs): `Source/ModdedAssets/src/AssetLibrary.cs`
- [Multiplayer Patcher](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MultiplayerModPatcher/src/Main.cs): `Source/MultiplayerModPatcher/src/Main.cs`
- [Save Registration](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MultiplayerModPatcher/src/PersistenceRegistration.cs): `Source/MultiplayerModPatcher/src/PersistenceRegistration.cs`
- [Actor Ownership](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Source/MultiplayerModPatcher/src/OwnershipWatchdog.cs): `Source/MultiplayerModPatcher/src/OwnershipWatchdog.cs`

### Shared Runtime

- [Lifecycle Hooks](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Hooks.cs): `Shared/SR2Kit/Hooks.cs`
- [Content Registry](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/IdentifiableRegistry.cs): `Shared/SR2Kit/IdentifiableRegistry.cs`
- [Slime Spawns](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/SlimeSpawns.cs): `Shared/SR2Kit/SlimeSpawns.cs`
- [Plort Economy](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/PlortEconomy.cs): `Shared/SR2Kit/PlortEconomy.cs`
- [Slimepedia](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Pedia.cs): `Shared/SR2Kit/Pedia.cs`
- [Translations](https://github.com/xiisuma/slime-rancher-2-mods/blob/main/Shared/SR2Kit/Translations.cs): `Shared/SR2Kit/Translations.cs`

### Other components

- **MelonLoader**
- **Slime Rancher 2**
- **Rancher**
- **Ranching Together**

## Connections

- MelonLoader → Bubble Slimes: loads
- MelonLoader → Gem Slimes: loads
- MelonLoader → Twinkle Slimes: loads
- MelonLoader → Lucky Plorts: loads
- MelonLoader → Ginger Crop: loads
- MelonLoader → Corral Upgrades: loads
- MelonLoader → Pond Upgrades: loads
- MelonLoader → Modded Assets: loads
- MelonLoader → Multiplayer Patcher: loads
- Bubble Slimes → Lifecycle Hooks: registers callbacks
- Gem Slimes → Lifecycle Hooks: registers callbacks
- Twinkle Slimes → Lifecycle Hooks: registers callbacks
- Lucky Plorts → Lifecycle Hooks: registers callbacks
- Ginger Crop → Lifecycle Hooks: registers callbacks
- Multiplayer Patcher → Lifecycle Hooks: registers callbacks
- Bubble Slimes → Content Registry: creates content
- Bubble Slimes → Slime Spawns: registers spawn
- Bubble Slimes → Plort Economy: registers value
- Bubble Slimes → Slimepedia: documents slime
- Bubble Slimes → Translations: adds text
- Bubble Slimes → Pop Behavior: attaches behavior
- Gem Slimes → Content Registry: creates content
- Gem Slimes → Slime Spawns: registers spawn
- Gem Slimes → Plort Economy: registers values
- Gem Slimes → Slimepedia: documents slimes
- Gem Slimes → Gem Growth Chain: configures growth
- Twinkle Slimes → Content Registry: creates content
- Twinkle Slimes → Slime Spawns: registers spawn
- Twinkle Slimes → Plort Economy: registers values
- Twinkle Slimes → Slimepedia: documents slimes
- Twinkle Slimes → Translations: adds text
- Lucky Plorts → Content Registry: creates plort
- Lucky Plorts → Plort Economy: registers value
- Ginger Crop → Wild Ginger: sets up
- Ginger Crop → Slime Rancher 2: registers crop
- Corral Upgrade Shop → Corral Upgrades: applies upgrades
- Pond Upgrade Shop → Pond Upgrades: applies upgrades
- Modded Assets → Asset Library: loads artwork
- Modded Assets → Slime Rancher 2: sets icons
- Multiplayer Patcher → Save Registration: runs registration
- Multiplayer Patcher → Actor Ownership: installs watchdog
- Multiplayer Patcher → Ranching Together: resolves optionally
- Actor Ownership → Rancher: claims actors
- Actor Ownership → Slime Rancher 2: tracks actors
