Replace brush-based health & HEV chargers with models #3
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
unforeseen-consequences/featureful-campaigns#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
and for an HEV charger:
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:
Chargers in level transitions
One of the causes seems to be
item_healthchargerentities 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 sameglobalnamekey 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.