Skip to content

Releases: MrChengl11/hd2-lua-mod-skill

更多经验

Choose a tag to compare

@MrChengl11 MrChengl11 released this 24 Sep 09:55

加入了更多经验

卡顿修复

Choose a tag to compare

@MrChengl11 MrChengl11 released this 23 Sep 08:44

修复了制作mod时,ai写的mod重复扫描内存导致掉帧的情况

修复mod技能

Choose a tag to compare

@MrChengl11 MrChengl11 released this 22 Sep 12:57

现在,ai会修复mod了!

normal improve

Choose a tag to compare

@MrChengl11 MrChengl11 released this 22 Sep 05:05

现在ai会制作解包mod了

skill-improved

Choose a tag to compare

@MrChengl11 MrChengl11 released this 21 Sep 03:38

加入了更多经验

lua-skill improved

Choose a tag to compare

@MrChengl11 MrChengl11 released this 20 Sep 15:23

加入了更多的经验参考

v1.0.0 — first public release

Choose a tag to compare

@MrChengl11 MrChengl11 released this 20 Sep 09:13

v1.0.0 — first public release

An agent skill for building Helldivers 2 Lua-injection mods: the kind that load inside the
running game through Bingus Shared Loader and use LuaJIT FFI to read/write game process memory.

Validated against game build 24826606 (exe 1.8.45317.0).

Download

Asset What it is
hd2-lua-mod-skill-1.0.0.zip Drop-in skill. Unzip into your agent's skills directory and you are done — it contains hd2-lua-mod/SKILL.md and hd2-lua-mod/references/.
Source code (zip) The whole repo, including tools/ (.patch_N reader/writer, addon packager, typelib exporter) and verify.py. GitHub generates this automatically.
# install the skill
unzip hd2-lua-mod-skill-1.0.0.zip -d ~/.dsh/skills/
# -> ~/.dsh/skills/hd2-lua-mod/SKILL.md

# if you also want the tooling
git clone https://github.com/MrChengl11/hd2-lua-mod-skill
cd hd2-lua-mod-skill && python verify.py

What's in it

  • Offline-first workflow — the game's data tables are encrypted on disk, but a plaintext
    mirror ships inside FileDiver's Go module, together with the game's own type library. Most of
    the work can be finished before you launch the game.
  • Data-table format — the LDLD block layout, its two different instance layouts, and the
    two hash functions that are easy to mix up (type hashes are djb2, resource hashes are
    MurmurHash64A).
  • Read-only recon — how to write a recon addon that never writes memory, and why it has to
    survive its own mistakes: the loader has no hot-reload, so a crash costs a full game restart.
  • Runtime patching — the validate → back up → VirtualProtect → write → read back → re-check
    loop, plus a list of checks that must pass before a single byte is written.
  • Offline simulation — a type-strict fake-FFI harness for lupa and mutation testing,
    which together caught real bugs before they reached the game.
  • Two worked case studies: the R-36 Eruptor round on the JAR-5 Dominator, and
    Double Leveller — making one EAT-411 call-in drop two launchers with a 64-byte patch,
    found entirely offline and verified in a single game session.

Tooling

Tool What it does
tools/hd2_archive.py read/write the .patch_N archive format
tools/build_addon.py package a plaintext .lua addon into an installable ZIP
tools/inspect_patch.py dump an archive's structure + round-trip self-check
tools/dump_typelib/main.go export dl_library.dl_typelib to JSON (1177 types)
references/ldld.py LDLD table parser

verify.py self-tests the checkout against real data.

Requirements

  • Bingus Shared Loader v15+ — every mod built with this skill depends on it
  • Python 3.10+ for the offline tooling, pip install lupa for the simulation harness
  • Go 1.21+ and the FileDiver source, only if you want to regenerate the typelib JSON

Notes

  • Not an asset mod. This covers runtime memory; replacing models, textures or sounds goes
    through the normal data/ pipeline.
  • Game updates will break offsets. The workflow is built to fail safely — write nothing and
    log why — rather than corrupt data.
  • Client-side only. HD2 is peer-to-peer and partly host-authoritative, so a locally patched
    object may not be visible to other players.
  • Anti-cheat applies. HD2 ships nProtect GameGuard. The skill's own rule: never read game
    memory from an external process; stay inside the game with a read-only addon.

Credits

Bingus Shared Loader by CowboyBingus · FileDiver by xypwn · numbers cross-checked against the
Helldivers Wiki · built on the file-format research of the HD2 modding community.