Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/RPCharacters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TFMC runs Minecraft **1.21.10**. See the [shared platform and build baseline](..
- [Online player list](docs/player-list.md)
- [Professions](docs/professions-system/SYSTEM.md)
- [Profession validation](docs/professions-system/RUNBOOK.md)
- [Development characters and realm wipes](docs/dev-characters.md)
- [Website realm wipe](docs/realm-wipe.md)
- [Persistent parties](docs/persistent-parties.md)
- [Playtime tracking](docs/playtime-tracking.md)

Expand Down
83 changes: 0 additions & 83 deletions projects/RPCharacters/docs/dev-characters.md

This file was deleted.

48 changes: 48 additions & 0 deletions projects/RPCharacters/docs/realm-wipe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Website realm wipe

**Repos:** `rpcharacters` (owner), `ProvinceSystem` (website DB + plugin-key routes)

Player-facing strings: no em dash. Use `-` or `:`.

`/rpcharacter wipe website` deletes the website's character data for the realm this server belongs to. Use it to reset a realm, for example after pre-season testing. It does not touch the plugin's own character files.

Each realm has its own website: Dev (realm `dev`) uses the dev site, and Main (realm `main`) uses the main site. So characters made on Dev never reach the main site, and every server syncs characters with its own site.

---

## Behavior

| Piece | Choice |
|-------|--------|
| Realm | Read from the TFMCWeb gateway (`realm.id`), same as pending ingest and catalog sync. Deletes site tables for **this** `realm_id` only. Aborts if TFMCWeb cannot supply a realm id. |
| Confirm | `/rpcharacter wipe website` then `/rpcharacter wipe website confirm`. 30s TTL, same sender. No bare `/rpcharacter confirm`. |
| Auth | Command: `rpcharacters.admin`, console allowed. HTTP: `X-Plugin-Key` via `ProvinceSystemClient`. |
| Player meta | Does **not** clear `rpc_player_meta` / `character_player_meta` (ranks, 18+, slots). |
| Local data | Does **not** delete `plugins/RPCharacters/data/**`. In-game characters reappear on the site at their owner's next roster push. |

Only one server should ingest a realm; two ingesting servers would race on pending ack.

---

## Commands (player-facing)

| Input | Effect |
|-------|--------|
| `/rpcharacter wipe website` | Admin. Prints realm + that a confirm is required. |
| `/rpcharacter wipe website confirm` | Admin + pending. Calls plugin-key realm wipe. |

Usage / errors: `Usage: /rpcharacter wipe website [confirm]`. `Nothing to confirm.` `Confirm expired. Run the wipe command again.`

---

## Website wipe tables (`realm_id` = this server)

Delete:

- `character_roster`
- `character_creates`
- `character_wardrobe_slots`
- `character_create_wardrobe`
- `lore_item_customisations`

Do not delete player rank/age meta.