Skip to content

KingdomMod v0.3.1 - Runtime logging, mount modding, and F1 cleanup

Choose a tag to compare

@github-actions github-actions released this 30 Jun 18:03

What's changed

Extended runtime logging

  • Adds an opt-in runtime interaction logger that writes structured JSONL to
    UserData/KingdomMod/logs/runtime-latest.jsonl, chosen from F1 with four
    levels: None, Bug (crown, boar, damage, droppables, wallets, and
    builder/construction flows), Event (adds scene/player/NPC/power/mount and
    selected state-machine transitions), and Raw (adds noisier job/target/state
    calls, capped per session).
  • Each session truncates to a fresh file and flushes once per second; output is
    capped at 200,000 lines so a long session can't fill the disk.
  • The level buttons now sit inline next to the Log title in the F1 panel
    (the separate "Logging" column was removed).

Mount modding

  • Adds docs/mount-modding.md, a full guide to reading and changing steed
    (mount) stats, with the complete SteedType list and every tunable field.
  • The Game Data Dumper (F3, formerly Challenge Dumper) now also dumps
    steeds.json, levelconfigs.json, and biomes.json alongside
    challenges.json, capturing real deserialized values the static IL2CPP dump
    can't show.
  • AnyMount gains a Perverted deers option: when on, every active mount
    attracts deer (including after mount swaps). The option is rendered last in
    the F1 Mods list.

Fixes

  • Removes a dead Droppable.OnDestroy Harmony patch that threw at HarmonyInit
    and then logged repeated "method missing" warnings — Droppable never
    declares OnDestroy, and the existing OnDisable hook already covers the
    same teardown path.
  • Reads StateMachine._owner through its Il2CppInterop property instead of
    reflection, clearing the AccessTools.Field: Could not find field warning
    (interop exposes IL2CPP fields as properties, not reflectable fields).

Docs

  • Updates README, API reference, capabilities, and getting-started for the
    logging and mount-modding features.

Validation

  • Build Release locally.
  • Deploy locally with tools\install-mods.ps1 -NoBuild -NoDefenderExclusion.
  • In game, verify: the MelonLoader log is free of the Droppable OnDestroy and
    StateMachine _owner warnings; F1 shows the logging level buttons beside the
    Log title and Perverted deers last under Mods; F3 writes
    steeds/levelconfigs/biomes/challenges JSON; and runtime logs appear at the
    selected level under UserData/KingdomMod/logs/.