跳到正文
Powered by Pagefind
中文
系统指南

Save System - Dual Files, Codec and World State

How Dimraeth stores progress: separate player and world save files, the SaveCodec encoding layer, save slots and what persists per file.

2026/9/17 Dimraeth Archives 最后更新: 2026/9/17 回退显示英文 1 分钟阅读

Dual-file architecture

The save layer splits into two distinct files:

File Holds
PlayerSaveFile Character build, inventory, equipment, spell upgrades, skill tree, Pet Pen contents (PetPenSaveData)
WorldSaveFile Scene/object state — opened chests, harvested nodes, world events, build placement (BuildItemSaveData)

Splitting character from world is what makes co-op drop-in viable: your character travels into another player’s world file.

Encoding layer

SaveCodec sits between the object graph and disk — saves are encoded, not plain JSON. SaveFiles, SaveNameKind, SaveNameVerdict and SaveNameRules implement slot naming and validation (reserved/invalid name handling). SaveOnQuit writes on exit; corruption recovery specifics aren’t visible in code.

What this means in practice

  • Your character is portable across worlds (consistent with the Relay co-op model)
  • World state (which of the 1,784 POIs you’ve cleared) persists per world
  • Pet Pen data rides with the player file — your pets follow you into a friend’s world
  • Editing saves externally requires reversing SaveCodec, which is non-trivial by design

相关条目

对你有帮助吗?