You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the summary API for file lists and quick metadata reads without a full parse:
88
+
Validation is an optional step to check the save for inconsistencies that may prevent the game from loading the save (e.g. invalid character name or mercenary level).
-`FormatId`: concrete file format version/layout (`V99`, `V105`, or `Unknown(version)`)
193
-
-`GameEdition`: edition family (`D2RLegacy` or `RotW`), derived from known `FormatId` values
194
-
-`ExpansionType`: `Classic`, `Expansion`, or `RotW` (canonical on `Save` as `save.expansion_type()`)
195
170
196
-
Known layout versions mapped by this crate:
171
+
## Compatibility rules (examples)
197
172
198
-
-`v99` -> `D2RLegacy`
199
-
-`v105` -> `RotW`
173
+
- Warlock requires RotW edition and expansion
174
+
- RotW expansion cannot be encoded to non-RotW formats
175
+
- Druid/Assassin cannot be encoded as Classic
176
+
- Unknown class IDs cannot be safely converted
200
177
201
-
Use `save.expansion_type()` / `save.set_expansion_type(...)` to read/write expansion mode.
202
-
Use `save.game_edition()` to inspect the edition family.
203
-
Use `save.character.status()` to inspect status bits, and `save.character.set_hardcore(...)` / `set_ladder(...)` / `set_died(...)` for status mutations.
204
-
Use `save.validate()` when you want to check the current save state without writing it.
205
178
206
-
Current blocking rules (compatibility checks) include:
207
-
- Warlock requires RotW edition and RotW expansion type.
208
-
- RotW expansion type cannot be encoded to non-RotW editions.
209
-
- Druid/Assassin cannot be encoded as Classic.
210
-
- Unknown class ids cannot be safely converted to known target formats.
179
+
## Notes
211
180
212
-
Level is stored in both the character section and the attributes section. Use `save.set_level(...)` to keep them in sync.
181
+
- Level is stored in multiple sections; use `save.set_level(...)` to keep it consistent
182
+
- Additional reverse-engineering notes are available in `NOTES.md`
213
183
214
-
Additional notes about the format, quest flags, and general reverse-engineering work can be found in `NOTES.md`.
215
184
216
-
This repository also contains several example .d2s files used in tests to verify that parsing and round-trip encoding work correctly.
185
+
## Documentation
217
186
187
+
API docs: https://docs.rs/halbu
188
+
Changelog: [CHANGELOG.md](CHANGELOG.md)
218
189
219
190
## References
220
191
221
-
These resources have helped me understand the .d2s format. Many thanks to their authors.
192
+
These resources helped me understand the .d2s format. Many thanks to their authors.
0 commit comments