# bbluesky123/mystiarareinvitealwayssuccess architecture

> Architecture diagram of the GitHub repository bbluesky123/mystiarareinvitealwayssuccess, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bbluesky123/mystiarareinvitealwayssuccess
- Repository: https://github.com/bbluesky123/mystiarareinvitealwayssuccess

## Overview

This is a BepInEx IL2CPP mod that guarantees success for an already-unlocked daytime rare-guest invitation by temporarily changing the level parameter passed to the game's Invite method. The game retains control of eligibility and the normal post-invitation flow. A lower-level dialogue-selection prefix is registered as a fallback. The README documents these boundaries; source excerpts show patch registration and prefix behavior, but not the game's internal Invite implementation.

Main entry points: [`Plugin.cs`](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Plugin.cs) (Plugin loader), [`Patches/RareInvitePatch.cs`](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Patches/RareInvitePatch.cs) (Invite prefix), [`MyPluginInfo.cs`](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/MyPluginInfo.cs) (Plugin metadata)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin lifecycle"]
  node_plugin["Plugin loader<br/>[Plugin.cs]"]
  node_metadata["Plugin metadata<br/>[MyPluginInfo.cs]"]
end

subgraph group_patches["Invite patches"]
  node_main_patch["Invite prefix<br/>[RareInvitePatch.cs]"]
  node_fallback_patch["Dialogue fallback<br/>[RareInvitePatch.cs]"]
end

subgraph group_game["Game invitation flow"]
  node_invite["Game Invite"]
  node_helper["InviteSpecGuest"]
  node_normal_flow["Normal invite flow"]
end

node_player(("Player"))

node_plugin -->|"reads identity"| node_metadata
node_plugin -->|"registers prefix"| node_main_patch
node_plugin -->|"registers fallback"| node_fallback_patch
node_player -->|"selects invitation"| node_invite
node_invite -->|"runs prefix"| node_main_patch
node_main_patch -->|"sets level parameter"| node_invite
node_invite -->|"continues invitation"| node_normal_flow
node_helper -->|"runs prefix"| node_fallback_patch
node_fallback_patch -->|"returns success"| node_normal_flow

click node_plugin "https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Plugin.cs"
click node_metadata "https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/MyPluginInfo.cs"
click node_main_patch "https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Patches/RareInvitePatch.cs"
click node_fallback_patch "https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Patches/RareInvitePatch.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_plugin,node_metadata toneBlue
class node_main_patch,node_fallback_patch toneAmber
class node_invite,node_helper,node_normal_flow toneMint
class node_player toneIndigo
```

## Components

### Plugin lifecycle

- [Plugin loader](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Plugin.cs): `Plugin.cs`
- [Plugin metadata](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/MyPluginInfo.cs): `MyPluginInfo.cs`

### Invite patches

- [Invite prefix](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Patches/RareInvitePatch.cs): `Patches/RareInvitePatch.cs`
- [Dialogue fallback](https://github.com/bbluesky123/mystiarareinvitealwayssuccess/blob/main/Patches/RareInvitePatch.cs): `Patches/RareInvitePatch.cs`

### Game invitation flow

- **Game Invite**
- **InviteSpecGuest**
- **Normal invite flow**

### Other components

- **Player**

## Connections

- Plugin loader → Plugin metadata: reads identity (evidence: `Plugin.cs`)
- Plugin loader → Invite prefix: registers prefix (evidence: `Plugin.cs`)
- Plugin loader → Dialogue fallback: registers fallback (evidence: `Plugin.cs`)
- Player → Game Invite: selects invitation (evidence: `README.md`)
- Game Invite → Invite prefix: runs prefix (evidence: `README.md`)
- Invite prefix → Game Invite: sets level parameter (evidence: `Patches/RareInvitePatch.cs`)
- Game Invite → Normal invite flow: continues invitation (evidence: `README.md`)
- InviteSpecGuest → Dialogue fallback: runs prefix
- Dialogue fallback → Normal invite flow: returns success (evidence: `Patches/RareInvitePatch.cs`)
