HD2Runtime v0.40.0

A Mod for Helldivers 2
HD2Runtime akl_mod_preview_image
HD2Runtime requires BingusSharedLoader 18 or later

A modding runtime that maps many Helldivers 2 values into an easier and safer API for creating mods with much less manual reverse engineering and guesswork.

Join the HD2Runtime Discord

For support, development discussion, modding help, updates, and community projects


ABOUT PUBLIC MATCHMAKING
its enabled again. i apologies for any troubles the initial released had caused.

here be dragons

if you encounter crashes with this in public lobbies its highly likely to be some of the experimented features that REQUIRE everyone in the lobby to have runtime installed to work correctly and safely

GameGuard:
some people have reported the recent 0.30.0 releases of hd2r has caused gameguard to refuse to boot. this is likely due to the mouse scroll wheel hook and can be disabled in your mod loader
1791508707139.png




Always Give Bingus Shared Loader Higher Load Priority Than HD2Runtime



Support Development

Enjoying HD2Runtime or ModBuilder? If you'd like to support continued development, you can support me on Ko-fi




Recommended Runtime Mods




Recommended Mod Manager
from personal testing, Echelon Mod Manager has been the most reliable for using HD2Runtime




Making a Mod with HD2Runtime

HD2Runtime is installed once and shared by mods that use it.

Creating a mod


Recommended Tool:
https://github.com/SkyeShade/HD2Runtime-ModBuilder/releases

1790642443139.png

Runtime Modbuilder is a tool i made specifically to lower the barrier of entry to modding this game.

Warning:
Some features are still experimental, and a few values may not map perfectly yet.


Manual Option:


1. Download and extract HD2Runtime-ModTemplate-<version>.zip from the github release page
2. Open the extracted folder in Rider or another code editor
3. Edit hd2runtime.json
- Change the mod name
- Change the resource ID to something unique, for example:
mods/yourname/my_mod
- Set the required HD2Runtime version for the features you use
4. Edit src/addon.lua
5. Run build.cmd
6. Import the ZIP created in the build folder into Arsenal or your mod manager
7. Enable Bingus Shared Loader, HD2Runtime, and your mod, then deploy and restart the game

Very Basic example


1790594165038.png

expect is the vanilla value Runtime expects before writing. Copy it from the SDK capability metadata; don’t guess it.


This changes the Liberator Concussive fire rate from its expected vanilla value of 400 RPM to 1100 RPM.

How do I know what values I can edit?


Download the HD2Runtime SDK from the github release and look inside its capability files.

Useful files include:

PlayerWeaponAuthoringCapabilities.json -> primary and secondary weapons
SupportWeaponAuthoringCapabilities.json ->support weapons
StratagemAuthoringCapabilities.json -> stratagems and deployed entities
VehicleAuthoringCapabilities.json -> vehicles
BackpackAuthoringCapabilities.json -> backpacks
MagazineAttachmentCapabilities.json -> magazine attachments

These files tell you:

- supported object names
- editable fields
- vanilla/default values
- whether a field is writable
- whether the edit affects shared data
- whether special safety acknowledgement flags are required

The expect value should normally come from the published baseline in these files. Do not guess it.

HD2Runtime checks the expected value before writing. If the game updated, another mod changed the value, or the target no longer matches what Runtime expects, the write is rejected instead of blindly modifying memory.

Useful operations


hd2.patch(...) -> applies one guarded change.

hd2.ensure(...) -> keeps a change applied if the game later resets it.

hd2.transaction(...) -> changes several fields on the same object together.

hd2.plan(...) -> coordinates changes across multiple objects.

Logs


If your mod does not work, check:

%LOCALAPPDATA%\CowboyBingus\Helldivers2\Logs\

Useful files:

BingusSharedLoader.log
HD2Runtime.log

APPLIED means Runtime successfully changed the value.

ALREADY_DESIRED means the value was already what your mod requested.

Full developer guide


See the HD2Runtime GitHub documentation for target navigation, safety flags, vehicles, backpacks, magazine attachments, plans, transactions and troubleshooting.

Github Link: https://github.com/SkyeShade/HD2Runtime





Found a bug?
Bugs are inevitable in a project as large as HD2Runtime, especially while it is still in early development.

If you find a bug or incompatibility, please reach out to me or submit an issue report on GitHub so I can investigate it and, if possible, implement a fix.



Missing feature?

If you think HD2Runtime is missing a feature or you have an idea for a new addition, feel free to reach out to me here. Please avoid opening GitHub issues for feature requests unless the request is specifically related to an existing issue.



Credits
Bans, for the True Lasgun Beam Overhaul, whose LAS beam research led to HD2Runtime's beam features.
https://ayakamods.com/members/bans.388863/





[Disclaimers]

HD2Runtime does not support public matchmaking.

HD2Runtime is intended for private, friends only, invite only, and other controlled modded sessions where all participants have chosen to use mods.

Using HD2Runtime in public lobbies can and will lead to crashes depending on what mods are used alongside it. i cannot fix this but i will do my best

LLMs were used during the development of this mod.
  • Like
Reactions: D-Glitch
5.9 MB
Log in or sign up to download
Uploaded by
SkyeShade
Downloads
15,421
Comments
301
Views
82,212
First release
Last update
Platform
PC 
Version
v0.40.0
Total Size
5.9 MB
Rating
4.50 star(s) 38 ratings

Uploaded by

  • 15,421
  • 82,212

Ratings

4.50 star(s) 38 ratings

More mods from SkyeShade

  • PC HD2R Editor

  • PC Buffed AR-23C Liberator Concussive

  • PC Vampiric Throwing Knives

Latest updates

  1. HD2Runtime v0.40.0 - Enemies, Spawning & Armor Perks

    The biggest update since 0.30.0: enemy and spawn controls, mission timers, and a lot more weapon...
  2. HD2Runtime v0.31.3 - LAS-22 Shear (partially), Exosuit Ammo and Shield Relay Recharg

    Another hotfix built from player reports. - Custom stratagems with warbond carriers: picking a...
  3. HD2Runtime v0.31.2 - No More Stutter, Four Statuses per Hit and more

    A hotfix built from player reports. - No more stutter: custom stratagems no longer cause a...

Desiderium

Members
Members
Oct 4, 2026
95
28
I apologize for not posting this as a Github issue as you requested, as I do not have (nor plan to have) a Github account.

IMPORTANT:



​
I discovered a compatibility issue with this mod and the popular Total Arsenal Overhaul. Many of TAO's changes were not properly applying.

h5zYf9n.png



nAGiZIa.png


I ran the following prompt through Antigravity on Gemini 4 Argon:

> Look inside the folders `HD2Runtime-0.40.0-runtime_AR828537` and `Total-Arsenal-Overhaul-1.4.2_AR445157`.
>
> In `HD2Runtime-0.40.0-runtime_AR828537`, find the Stingray archive file (`.patch_0`) that contains the embedded plaintext Lua script `hd2runtime/core/stratagem.lua`. Specifically, locate the validation check around line 59 that returns or errors with `"empty payload pointer change"`.
>
> 1. First, create a backup copy of the `.patch_0` file outside the mod folder (in the parent `mods` directory as `HD2Runtime_patch_0.bak`) so HD2 Arsenal doesn't deploy the backup.
> 2. Write and run a Python script to inspect the exact Lua code around `"empty payload pointer change"` inside the `.patch_0` file and show me the surrounding 30 lines of Lua.
> 3. Patch the embedded Lua in-place so that an empty payload pointer change table in a `stratagem-plan` is treated as a no-op (skipped cleanly without refusing the rest of the stratagem plan) instead of returning the `"empty payload pointer change"` refusal.
> 4. CRITICAL: Because this is a compiled Stingray `.patch_0` container without recalculated header offsets, the total byte length of the embedded Lua chunk and the `.patch_0` file MUST remain 100% identical to the original byte count. Pad any shortened bytes with ASCII spaces (`0x20`) inside the Lua chunk, and assert in Python that `len(new_bytes) == len(original_bytes)` before writing the file.
> ```




> 5. Scan the embedded Lua in `Total-Arsenal-Overhaul-1.4.2_AR445157` and compare the targets it modifies against all other mod folders in this directory to list which mods are colliding with its `hd2.ensure` / `hd2.plan` operations.
> ```


gFiGDIZ.png



Surrounding 35 Lines of Lua (hd2runtime/core/stratagem.lua, lines 37–71):​


Code:
  37:         assert(count>0 and count<=s.entries and b.u32(bytes,root+12)==0,
  38:             'stratagem row count/reserved')
  39:         local start,row_representation=array_offset(b.pointer(bytes,root),root,base,finish,
  40:             count*s.stride,'stratagem rows')
  41:         for row=0,count-1 do
  42:             if cooperate and row%8==0 then cooperate()end
  43:             local ro=start+row*s.stride
  44:             local kind=b.u32(bytes,ro)
  45:             assert(kind<s.entries and not seen[kind],'stratagem type duplicated/out of range')
  46:             seen[kind]=true;total=total+1
  47:             assert(b.pointer(pointers,kind*8)==base+ro,'stratagem runtime table mismatch')
  48:             local payload_count=b.u32(bytes,ro+160)
  49:             assert(payload_count<=s.payload_max and b.u32(bytes,ro+164)==0,
  50:                 'payload count/reserved')
  51:             local payloads,payload_representation={},'empty'
  52:             if payload_count>0 then
  53:                 local payload_at
  54:                 payload_at,payload_representation=array_offset(b.pointer(bytes,ro+152),root,
  55:                     base,finish,payload_count*8,'payload list')
  56:                 for index=0,payload_count-1 do
  57:                     payloads[#payloads+1]=b.resource(bytes,payload_at+index*8)
  58:                 end
  59:             else assert(b.pointer(bytes,ro+152)==0,'empty payload pointer changed')end
  60:             records[#records+1]={record_kind=kind,id=b.u32(bytes,ro+4),group=group,row=row,
  61:                 package=b.resource(bytes,ro+168),payload_count=payload_count,payloads=payloads,
  62:                 payload_pointer=payload_representation,row_pointer=row_representation,offset=ro,
  63:                 use_count=b.u32(bytes,ro+80),spawn_time=b.value(bytes,ro+84,'f32'),
  64:                 spawn_radius=b.value(bytes,ro+88,'f32'),beacon_linger_time=b.value(bytes,ro+96,'f32'),
  65:                 extra_travel_time=b.value(bytes,ro+100,'f32'),cooldown=b.value(bytes,ro+104,'f32'),
  66:                 cooldown_failed=b.value(bytes,ro+108,'f32'),cooldown_type=b.u32(bytes,ro+148),
  67:                 max_in_loadout=b.u32(bytes,ro+204),
  68:                 has_shared_uses_pool=bytes:byte(ro+209)%2==1}
  69:         end
  70:         groups[#groups+1]={group=group,count=count,offset=start,row_pointer=row_representation}
  71:     end

(In addition, hd2runtime/domains/stratagem_writes.lua has a per-operation planner guard assert(next(payload_changes)~=nil,'empty payload pointer change') at offset 60,842,459 inside plan_payload_pointer; however, M.capture_many short-circuits with if want_payloads~=nil then so plan_payload_pointer is only called when payloads is explicitly passed, whereas line 59 of hd2runtime/core/stratagem.lua was the check failing on empty-payload stratagems.)

ANac3td.png


The new HD2Runtime 9ba626afa44a3aa3.patch_0 modified by me using Gemini 4 Argon is completely conflict-free with Total Arsenal Overhaul.

Here is a link to the updated file if you want to inspect it personally:
View: https://drive.google.com/file/d/15GpU-udl9nSbrAHuK4vf8KnSbdSm8Ium/view?usp=drive_link

This is STRICTLY a temporary, manual hotfix until Skye fixes the source issue.