SL2 Analyzer
Read a FromSoftware .sl2 save and report what is in it
Loading...
Searching...
No Matches
sl2.roster Namespace Reference

Functions

 parse_roster (menu_data, game)
 Read the character roster from a DS3 or ER header entry.
 

Variables

dict ROSTER_PARAMS
 Header-entry index, occupancy-flag offset, first-descriptor offset, descriptor stride, and max name length, per game.
 

Detailed Description

The header roster block: character names, and DS3's play-time field.

Function Documentation

◆ parse_roster()

sl2.roster.parse_roster (   menu_data,
  game 
)

Read the character roster from a DS3 or ER header entry.

These games keep a load-screen table of ten slots — an occupancy byte each, then fixed-stride descriptors that begin with the character name. That name is trustworthy; the deeper stat and inventory blocks are not mapped in this build, so only the roster is returned.

Parameters
menu_dataThe decrypted header entry.
game"ds3" or "er".
Returns
A list of (slot_index, name).

Definition at line 37 of file roster.py.

Variable Documentation

◆ ROSTER_PARAMS

dict sl2.roster.ROSTER_PARAMS
Initial value:
1= {
2 "ds3": {
3 "menu": 10,
4 "occ": 4244,
5 "desc": 4254,
6 "stride": 554,
7 "namelen": 16,
8 "decrypt": DS3_KEY,
9 },
10 "er": {
11 "menu": 10,
12 "occ": 6484,
13 "desc": 6494,
14 "stride": 588,
15 "namelen": 16,
16 "decrypt": None,
17 },
18}

Header-entry index, occupancy-flag offset, first-descriptor offset, descriptor stride, and max name length, per game.

Definition at line 8 of file roster.py.