|
SL2 Analyzer
Read a FromSoftware .sl2 save and report what is in it
|
Functions | |
| _ids (value) | |
| Ids for one table entry. | |
| load_item_db (db_dir, flat, files) | |
| Load item-name tables for a game family. | |
| merge_qty (items) | |
| Collapse duplicate stackable items into one line, summing counts, in first-seen order. | |
| load_scan_db (db_dir, files, refine=None) | |
Load an id-scan database: per-category JSON of {name: id}, flattened to {id: (name, category)}. | |
Variables | |
| dict | DS2_DB_FILES |
| DS2 tables: filename stem to category. | |
| dict | DS1_DB_FILES |
| DS1 (DSR and PtDE) tables. | |
Item-name databases. Three id schemes across the four games — see the db_*/ folders and CLAUDE.md for why DS2 is id-keyed and the others are not.
|
protected |
Ids for one table entry.
A name whose value is a LIST owns several ids.
The tables are name-keyed, so one name can normally hold one id — which silently dropped every duplicate the game really ships (DS3 has one "Cinders of a Lord" per lord, DS1 has a base and an alternate-path row under one name). A list value keeps them all; a bare value is the ordinary single-id case.
Definition at line 46 of file itemdb.py.
Referenced by sl2.itemdb.load_item_db(), and sl2.itemdb.load_scan_db().
| sl2.itemdb.load_item_db | ( | db_dir, | |
| flat, | |||
| files | |||
| ) |
Load item-name tables for a game family.
| db_dir | Folder holding the JSON tables. |
| flat | True for DS2 (one id-to-(name,category) dict); False for DS1 (a dict per category). |
| files | The filename-stem to category mapping to load. |
Definition at line 57 of file itemdb.py.
References sl2.itemdb._ids().
| sl2.itemdb.merge_qty | ( | items | ) |
| sl2.itemdb.load_scan_db | ( | db_dir, | |
| files, | |||
refine = None |
|||
| ) |
Load an id-scan database: per-category JSON of {name: id}, flattened to {id: (name, category)}.
| db_dir | Folder of category JSON files. |
| files | Filename-stem to category mapping. |
| refine | Optional (id, cat) -> cat hook, used to split DS3's one goods file into the finer categories the render prints. |
Definition at line 107 of file itemdb.py.
References sl2.itemdb._ids().
| dict sl2.itemdb.DS2_DB_FILES |
DS2 tables: filename stem to category.
Ids are unique across categories. Categories are finer than the game's raw tabs so the output can mirror the in-game menu: consumables, trade goods, emotes and boss souls each stand alone.
| dict sl2.itemdb.DS1_DB_FILES |
DS1 (DSR and PtDE) tables.
Ids repeat across categories, so lookups stay category-scoped and the slot type decides which table to use. Spells are stored as ordinary goods by the game (Soul Arrow is good 3000), but they are kept in their own file so they render under their own heading like DS2/DS3 — the slot type cannot tell them apart, the id range can.