Add timecycle/fog export (sixng timecycle) #45

Manually merged
github merged 1 commit from gh-pr/45/head into gh-pr/45/base 2026-11-26 20:05:28 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 13:26 UTC · original
holdmysocks:claude/timecycle → master · +822 −0 · 4 files · 1 commits · merged 2026-11-23 13:32 UTC

Adds sixng timecycle [archive=common] [--name <regex>] [-o <dir>], which exports the game's timecycle, fog and sky data as JSON. The first target is the arcade minigames.

Where the data is. The timecycle data are plain XML files in common.rpf, so every variable comes out with its name. The minigame pack and the other packs have no timecycle files. The archive stores no file names, so each document is recognised by its root element.

What it decodes:

  • Modifiers: 4,593 in 50 files. Each has its attributes, its submodifiers and the two numbers of each variable:
    • value is what the modifier sets.
    • b has no known meaning. It is 0 in 88 % of records and 1 in 10 %.
    • Animated modifiers also get axes.
    • The weather modules also get high_level_vars blocks.
    • One variable is written twice with different numbers. It is listed under repeated.
  • Weather cycles: 27 keyframe files. Each has GLOBAL and URBAN regions, with one number per time sample for about 1,000 variables, plus the High_Level_Vars.
  • Time samples: 13 hours, with their interpolation.
  • Other files: the weather types (weather.json) and the custom cloud groups (custom_clouds.json), as generic JSON. variables.json lists the 1,426 variable names by family (fog, sky, postfx …).

File names. Unnamed modifier files get their names from the game's own file list (TC_Files.meta). The archive packs files in case-insensitive name order, so the names are aligned to the files by that order and by how well each file's modifier names fit (fit in files.json). All 50 listed files are matched.

Concatenated documents. Some entries hold several XML documents back to back. For example, @32b000 holds the FH, FI and FW area files. All of them are read.

Arcade set. This is the default output:

  • the 34 ARCADE_* modifiers of TC_mods_Arcade_Games.xml;
  • the arcade modifiers in TC_mods_APFX.xml. These include Overlay_ArcadeCabinetCRT (postfx_noise 1.0, postfx_noise_size 0.6, postfx_exposure_perpixel_amount 0.75), plus ArcadeGame_* and ArcadeShooter_*;
  • the 6 submodifiers from other files that those modifiers use;
  • the arcade_TwinStickShooter cloud group.

Checks. Every decoded value was compared with an independent parse of the raw XML: 32,742 modifier values, 11 blocks and 59,170 cycle rows, with 0 mismatches. 6 new unit tests cover the XML reader, several documents in one entry, the modifier, cycle and time-sample records, generic JSON and file naming. All 122 core tests pass.

Not known from the data: what the engine does with each variable, how strongly a modifier is applied at run time, and the meaning of b and user_flags.

**@⁠holdmysocks** on GitHub · 2026-11-23 13:26 UTC · [original](https://github.com/holdmysocks/SixNG/pull/45) `holdmysocks:claude/timecycle` → `master` · +822 −0 · 4 files · 1 commits · merged 2026-11-23 13:32 UTC Adds `sixng timecycle [archive=common] [--name <regex>] [-o <dir>]`, which exports the game's timecycle, fog and sky data as JSON. The first target is the arcade minigames. **Where the data is.** The timecycle data are plain XML files in `common.rpf`, so every variable comes out with its name. The minigame pack and the other packs have no timecycle files. The archive stores no file names, so each document is recognised by its root element. **What it decodes:** - **Modifiers:** 4,593 in 50 files. Each has its attributes, its submodifiers and the two numbers of each variable: - `value` is what the modifier sets. - `b` has no known meaning. It is 0 in 88 % of records and 1 in 10 %. - Animated modifiers also get `axes`. - The weather modules also get `high_level_vars` blocks. - One variable is written twice with different numbers. It is listed under `repeated`. - **Weather cycles:** 27 keyframe files. Each has `GLOBAL` and `URBAN` regions, with one number per time sample for about 1,000 variables, plus the `High_Level_Vars`. - **Time samples:** 13 hours, with their interpolation. - **Other files:** the weather types (`weather.json`) and the custom cloud groups (`custom_clouds.json`), as generic JSON. `variables.json` lists the 1,426 variable names by family (`fog`, `sky`, `postfx` …). **File names.** Unnamed modifier files get their names from the game's own file list (`TC_Files.meta`). The archive packs files in case-insensitive name order, so the names are aligned to the files by that order and by how well each file's modifier names fit (`fit` in `files.json`). All 50 listed files are matched. **Concatenated documents.** Some entries hold several XML documents back to back. For example, `@32b000` holds the FH, FI and FW area files. All of them are read. **Arcade set.** This is the default output: - the 34 `ARCADE_*` modifiers of `TC_mods_Arcade_Games.xml`; - the arcade modifiers in `TC_mods_APFX.xml`. These include `Overlay_ArcadeCabinetCRT` (`postfx_noise` 1.0, `postfx_noise_size` 0.6, `postfx_exposure_perpixel_amount` 0.75), plus `ArcadeGame_*` and `ArcadeShooter_*`; - the 6 submodifiers from other files that those modifiers use; - the `arcade_TwinStickShooter` cloud group. **Checks.** Every decoded value was compared with an independent parse of the raw XML: 32,742 modifier values, 11 blocks and 59,170 cycle rows, with 0 mismatches. 6 new unit tests cover the XML reader, several documents in one entry, the modifier, cycle and time-sample records, generic JSON and file naming. All 122 core tests pass. **Not known from the data:** what the engine does with each variable, how strongly a modifier is applied at run time, and the meaning of `b` and `user_flags`.
Decodes the plain-XML timecycle data of common.rpf: 4,593 modifiers in
50 files (values, submodifiers, animated axes, weather-module blocks),
27 weather cycles (GLOBAL/URBAN, 13 time samples), the time samples, the
weather types and the custom cloud groups. Unnamed modifier files are
named from TC_Files.meta by packing order and content; entries holding
several documents are split. Prints the arcade minigame set by default
(TC_mods_Arcade_Games, Overlay_ArcadeCabinetCRT and the other arcade
modifiers with their submodifiers); -o writes everything.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:05:27 +00:00
github manually merged commit f6a7ef78e8 into gh-pr/45/base 2026-11-26 20:05:28 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.