• v0.3.0 9f5079b4af

    v0.3.0
    All checks were successful
    CI / msrv (1.90) (pull_request) Successful in 45s
    CI / audit (pull_request) Successful in 24s
    CI / stable (pull_request) Successful in 1m52s
    CI / python bindings (3.11) (pull_request) Successful in 44s
    CI / msrv (1.90) (push) Successful in 47s
    CI / audit (push) Successful in 23s
    CI / stable (push) Successful in 1m54s
    CI / python bindings (3.11) (push) Successful in 46s
    Release / wheel + c bundle (manylinux x86_64) (push) Successful in 1m52s
    Release / build (cli + windows wheel + c bundle) (push) Successful in 2m42s
    Release / publish (push) Successful in 13s
    Release / publish (crates.io) (push) Successful in 1m31s
    Release / publish (npm) (push) Successful in 1m36s
    Release / publish (PyPI) (push) Successful in 17s
    Stable

    jqueuniet released this 2026-10-26 22:46:05 +01:00 | 132 commits to main since this release

    Signed by jqueuniet
    SSH key fingerprint: SHA256:hjUxou9yR5AKBQ8zK2FkTEp12iDlEomvb63VBpXVwN4

    Added

    • wasm — resforkListJson and resforkExtract, at parity with FFI and
      Python.
    • Saves / wasm / FFI / Python — containers nested in containers are
      listed and edited in place: <loc>/in:<index> locations
      (ContainerLocation) for saveContainerJson, saveContainerPut and
      saveContainerTake.
    • Saves / wasm / FFI / Python — champion field limits per save variant,
      read off the encoding masks (ChampionLayout::limits, wasm
      saveFieldLimitsJson): range, step and display scale (Mac stamina ×10).
    • Saves / Graphics / wasm / FFI / Python — skill helpers: level from
      experience, the least experience for a level
      (hero::skill_level, hero::experience_for_level), and the inventory
      panel's skill titles (Archive::skill_title), runes included (wasm
      skillLevel, skillExperienceForLevel, skillTitleJson).
    • Saves / Graphics / wasm — item names come with a glyph_name giving
      rune n the private-use code point U+E000 + n
      (Archive::item_glyph_name); the npm package ships a matching vector
      rune font (dm2-runes.css, dm2-runes.woff2).
    • Saves / wasm / FFI / Python — item catalog: item_create::item_catalog
      (wasm itemCatalogJson, dm2_item_catalog_json, dm2_tools.item_catalog)
      lists every kind item creation accepts, with name, icon and settable
      field ranges.
    • Saves / wasm — inventory item fields carry a settable flag: the
      fields item creation accepts.
    • Saves / wasm — inventory items carry a movable flag; false for
      the maps move, copy and clear refuse.
    • FFI / Python — the wasm save editing exports: full save JSON,
      inventory read / move / copy / clear, container contents / put / take
      and item creation (dm2_save_*_json, dm2_tools.save_*).
    • Saves / wasm — item creation: SaveFileFull::create_item /
      SaveDump::create_item (wasm saveItemCreate) put a new item, given as
      a category and named fields, at an empty held location. Non-persistent
      fields, out-of-range values and unknown item kinds are refused; each item
      grows its type's record pool, capped at 1024.
    • Saves / wasm — held container contents: RecordStream::container_contents
      / put_in_container / take_from_container and
      inventory_view::container_view (wasm saveContainerJson,
      saveContainerPut, saveContainerTake), under the game's rules: 8
      items per chest or bag, no nesting except money boxes, arrows only in
      quivers, coins and gems only in money boxes, which give coins back one
      at a time. Money box contents report charge as persistent and
      important as not.
    • Saves / wasm — inventory edits on a full dump:
      RecordStream::move_item / copy_item / clear_item between any two
      slots or the cursor, across champions (wasm saveInventoryMove,
      saveInventoryCopy, saveInventoryClear; locations parse as
      ItemLocation, cursor or <hero>:<slot>). Records move verbatim, so
      chests keep their contents; occupied destinations and map containers
      are refused.
    • Graphics / saves / wasm — item names: Archive::item_name resolves
      an item's GDAT class to the game's name; InventoryView items carry
      name (fallback "<category> #<cls2>") and icon, the class tuple of
      the base icon for graphicsDecodePng. saveInventoryJson now takes
      graphics.dat and a language (en, de, fr, jp).
    • Graphics — Text::parse_plain / parse_with_flags and
      FeatureFlags::obfuscated_text (bit 0x08): the DOS 0.9 Beta stores
      dtText unobfuscated, so its 664 text records now decode.
    • Saves / wasm — inventory read model: InventoryView (and wasm
      saveInventoryJson, from a saveToJsonFull dump) lists every champion's
      30 slots, empty ones included, plus the cursor item. Each item carries its
      type, subtype, a container flag and its fields, each marked persistent or
      dropped on re-encode.
    • Saves — champion experience: Champion::experience /
      set_experience for the 20 skill counters (Skill order), and
      skill_level with the engine's level formula (item bonuses excluded:
      they are not saved). The save JSON gains skills
      (name, experience, level; only experience is applied on rebuild).
      Values the save cannot store (not a multiple of 32, or ≥ 2²⁹) are
      rejected.
    • Saves — the save JSON (and so saveToJson) now carries each champion's
      seven abilities (cur / max / enhanced), herotype and ench_aura,
      re-applied on rebuild like the HP/stamina/mana fields. schema_version is
      now 2; version-1 dumps no longer load.
    • wasm — saveToJsonFull / saveFromJsonFull dump and rebuild a save
      with its record stream decoded, given the save's dungeon.dat and
      graphics.dat. A dungeon from another port or version is rejected, as is a
      save whose record stream does not fully decode. Adds about 14 KB gzipped to
      the wasm module.
    • Release — cargo release <version> now does the mechanical half of a
      release: the workspace version, every inter-crate requirement, Cargo.lock,
      the Python package's version, and the changelog's heading and link-reference
      surgery. It is configured not to tag, push or publish, so tagging stays the
      deliberate act that triggers the workflow. Changelog entries are still
      written by hand.
    • Release — the tag now publishes to crates.io, npm and PyPI. Three jobs
      (publish-crates, publish-npm, publish-pypi) run after the Forgejo
      release, each gated on it, and each skipping a version already present on
      its registry so a half-failed run can be re-run. PyPI receives the same
      wheels the release carries, and npm's package is built by the same
      build-npm.sh used locally. None of the three registries accepts a
      self-hosted Forgejo as an OIDC trusted publisher, so each job carries a
      scoped long-lived token from the repository secrets.

    Changed

    • Dependencies — base64 0.23, sha2 0.11, comfy-table 8, xmrs and
      xmrsplayer 0.15; CI uses uv 0.13.5 and actions/checkout v7.

    Fixed

    • Saves / wasm — bones read <champion>BONES, the champion their
      state picks, instead of {hero_name}BONES; past the party, BONES.
    • Saves — a field-driven rebuild re-pads the bitstream for its new
      length: an edit that grew a save, rebuilt and reloaded, then reverted no
      longer leaves an extra trailing byte.
    • Saves — held maps are named as maps (MAGIC MAP, SCOUT MAP, MINION
      MAP), not as the chest, bag or money box sharing their subtype.
    • Graphics — Archive::item_name spells rune glyphs as rune names
      (Ra Sar SHIELD, not vw SHIELD).
    • CLI — dm2 save inventory --move / --copy keep chest contents
      and class, --move x=x no longer deletes the item, and occupied
      destinations and map containers are refused instead of overwritten or
      desynced.
    • wasm — build-npm.sh --dev failed: the script always passed
      --release, which wasm-pack rejects next to another profile. It now
      passes --release only when no profile flag is given. The README
      documents the tools wasm-pack downloads and how to build offline.
    • Saves — DOS Beta champions are read and written with their own
      layout (ChampionLayout::DosBeta) instead of the retail one: abilities,
      herotype and ench_aura previously hit the wrong bytes, and
      herotype edits were silently dropped. Applies to the library, the save
      JSON and dm2 save champion. On Beta, enhanced_ability is None
      (JSON null) and setting it is an error. API: enhanced_ability returns
      Option<u8>, set_enhanced_ability returns bool, and
      decode_champions_with_mask is replaced by decode_champions_with_layout.
    Downloads