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

Functions

 address (fid, groups, areas)
 Byte offset and uint32 mask for an 8-digit DS1 flag, or None.
 
 addressing ()
 
 main ()
 

Variables

 BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 
 SRC = os.path.join(BASE, "test", "flag_data", "files8", "dark_souls_1_flags.csv")
 
 OUT = os.path.join(BASE, "db_ds1", "world_events.json")
 
dict TITLE
 

Detailed Description

Build `db_ds1/world_events.json` — Dark Souls 1 world flags, by what they record.

Source: `test/flag_data/files8/dark_souls_1_flags.csv`, extracted from
`HotPocketRemix/DSEventScriptTools`, which commits every vanilla PtDE `.emevd` unpacked
AND the `.emeld` files carrying FromSoft's own event names. The extraction attributes each
`Set Event Flag` instruction to its enclosing `Event ID: N` header, then looks N up in the
matching `.names.txt`.

READ THIS BEFORE TRUSTING A NUMBER HERE. Everything in this table is `derived`, and it is
shipped on the strength of its source rather than on a save this repo has verified it
against. What was checked is that it decodes (398/398 through the repo's own DS1
addressing) and that it discriminates -- 140 set on the NG+2 all-bonfires mule against 110
on a mid-game character and 85 on an all-items mule, which is the right order. What was
NOT established is that each family means what its name says:

  * `lever` reads 0 of 11 on a save with every bonfire lit and 23 bosses dead. A flag that
    must be true there and is not is TRANSIENT -- set while the event runs, cleared after.
    The same signature got DS1's "Boss Fight" category dropped from `known_flags.json`.
  * `boss_defeat` reads 33 on a mule with four bosses proven dead, so it counts FLAGS and
    not bosses: arena, phase and cutscene flags ride in the same family.

Both are printed anyway, with the section note saying so, because the source is real and a
count that moves is better than a blank. Neither number is a boss count and neither should
be read as one. Fixing this means splitting the families per row against the `.emevd` text.

Names are FromSoft's own, VERBATIM JAPANESE. They are not translated here and they are not
rendered -- the section prints per-family counts only. Guessing at a translation would be
inventing a label, and a Japanese string in an English report teaches a reader nothing.

Run from repo root: python3 tools/gen_ds1_world_events.py

Function Documentation

◆ address()

gen_ds1_world_events.address (   fid,
  groups,
  areas 
)

Byte offset and uint32 mask for an 8-digit DS1 flag, or None.

G AAA S NNN, MSB-first within the word. The same expression db_ds1/known_flags.json is generated with, and it reproduces all twelve independently-derived boss flags exactly.

Definition at line 68 of file gen_ds1_world_events.py.

Referenced by main().

Here is the caller graph for this function:

◆ addressing()

gen_ds1_world_events.addressing ( )

Definition at line 84 of file gen_ds1_world_events.py.

Referenced by main().

Here is the caller graph for this function:

◆ main()

gen_ds1_world_events.main ( )

Definition at line 101 of file gen_ds1_world_events.py.

References address(), addressing(), and main().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ BASE

gen_ds1_world_events.BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Definition at line 39 of file gen_ds1_world_events.py.

◆ SRC

gen_ds1_world_events.SRC = os.path.join(BASE, "test", "flag_data", "files8", "dark_souls_1_flags.csv")

Definition at line 40 of file gen_ds1_world_events.py.

◆ OUT

gen_ds1_world_events.OUT = os.path.join(BASE, "db_ds1", "world_events.json")

Definition at line 41 of file gen_ds1_world_events.py.

◆ TITLE

dict gen_ds1_world_events.TITLE
Initial value:
1= {
2 "absolution": "Absolution",
3 "bell": "Bells",
4 "bonfire": "Bonfire events",
5 "boss_defeat": "Boss-fight flags",
6 "boss_event": "Boss events",
7 "covenant": "Covenant events",
8 "door": "Doors",
9 "elevator": "Elevators",
10 "enemy_spawn": "One-time enemy spawns",
11 "lever": "Levers",
12 "npc_death": "NPC deaths",
13 "npc_hostile": "NPCs turned hostile",
14 "seal": "Seals",
15 "trap_switch": "Trap switches",
16 "treasure_chest": "Treasure chests",
17}

Definition at line 45 of file gen_ds1_world_events.py.