Replace brush-based health & HEV chargers with models #3

Open
opened 2026-05-11 00:53:21 +00:00 by AmbientImpact · 0 comments
AmbientImpact commented 2026-05-11 00:53:21 +00:00 (Migrated from codeberg.org)

I've already gotten permission from DGF to include these phenomenal chargers:

https://gamebanana.com/mods/167509

Updated charger models are found in https://codeberg.org/unforeseen-consequences/models-chargers

Docs

Method

Looks like we can do this with newbspguy locally and then export the entities which can then be scripted to apply to the user's maps so we don't redistribute them.

(new)bspguy snippets

Copy and paste the following into the main (new)bspbuy interface to create a model-based health charger:

{
"classname" "item_healthcharger"
}

and for an HEV charger:

{
"classname" "item_recharge"
}

Decompiling maps?

Since the brush models' origins or geometry of any sort don't seem available when dumping entities, we may have to resort to decompiling maps just to see if we can access that info programmatically.

Issues and workarounds

Common issues are maps failing to load on level transitions, often with variations of this in the console:

6835 0008 svc_time
6835 0013 svc_clientdata
6835 0026 svc_deltapacketentities
6836 0008 svc_time
6836 0013 svc_clientdata
BAD:   29:svc_bad
Wrote erroneous message to buffer.dat
Host_Error: ED_LoadFromFile: found

Chargers in level transitions

One of the causes seems to be item_healthcharger entities in both maps in the same origin as the game will try to carry over the entity from the previous map but find the counterpart in the same location in the new map. This is solved by adding the same globalname key and value to both entities so the engine knows they're the same entity across level transitions:

https://twhl.info/wiki/page/VERC%3A_In_Depth%3A_Level_Transitions#Global_Consistency

Other causes

Since we're using lazyripent to alter maps, it seems to do so regardless of whether rules were applied, and some maps still end up failing to load with the above error in the console regardless; the simple fix for now is to delete those maps from our directory and use the unmodified one from the vanilla game. We may have to follow up later on this and find the root cause if it blocks changes to those maps.

I've already gotten permission from DGF to include these phenomenal chargers: https://gamebanana.com/mods/167509 Updated charger models are found in https://codeberg.org/unforeseen-consequences/models-chargers # Docs * https://freeslave.github.io/halflife-featureful/docs/entity-guide/entities/item_healthcharger/ * https://freeslave.github.io/halflife-featureful/docs/entity-guide/entities/item_recharge/ # Method Looks like we can do this with [newbspguy](https://twhl.info/wiki/page/Tutorial%3A_Editing_Compiled_BSPs_With_newbspguy%3A_The_Basics) locally and then export the entities which can then be scripted to apply to the user's maps so we don't redistribute them. * https://twhl.info/wiki/page/Ripent * https://developer.valvesoftware.com/wiki/Ripent * https://github.com/Zode/Lazyripent2 * https://github.com/twhl-community/HalfLife.UnifiedSdk-CSharp/tree/master/src/HalfLife.UnifiedSdk.MapUpgrader.Upgrades ## (new)bspguy snippets Copy and paste the following into the main (new)bspbuy interface to create a model-based health charger: ```json { "classname" "item_healthcharger" } ``` and for an HEV charger: ```json { "classname" "item_recharge" } ``` ## Decompiling maps? Since the brush models' origins or geometry of any sort don't seem available when dumping entities, we may have to resort to decompiling maps just to see if we can access that info programmatically. * https://developer.valvesoftware.com/wiki/Half-Life_Unified_SDK_Map_Decompiler * https://github.com/twhl-community/HalfLife.UnifiedSdk.MapDecompiler # Issues and workarounds Common issues are maps failing to load on level transitions, often with variations of this in the console: ``` 6835 0008 svc_time 6835 0013 svc_clientdata 6835 0026 svc_deltapacketentities 6836 0008 svc_time 6836 0013 svc_clientdata BAD: 29:svc_bad Wrote erroneous message to buffer.dat Host_Error: ED_LoadFromFile: found ``` ## Chargers in level transitions One of the causes seems to be `item_healthcharger` entities in both maps in the same origin as the game will try to carry over the entity from the previous map but find the counterpart in the same location in the new map. This is solved by adding the same `globalname` key and value to both entities so the engine knows they're the same entity across level transitions: https://twhl.info/wiki/page/VERC%3A_In_Depth%3A_Level_Transitions#Global_Consistency ## Other causes Since we're using lazyripent to alter maps, it seems to do so regardless of whether rules were applied, and some maps still end up failing to load with the above error in the console regardless; the simple fix for now is to delete those maps from our directory and use the unmodified one from the vanilla game. We may have to follow up later on this and find the root cause if it blocks changes to those maps.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
unforeseen-consequences/featureful-campaigns#3
No description provided.