ItemDisplayFix
Makes item displays show up again on modded survivors built from the old ItemDisplays template (AC6, Cadet, Scout, Assassin and more).ItemDisplayFix
Many modded survivors are built from a shared template whose ItemDisplays.PopulateDisplays() copies item display prefabs from Commando's item display rules (followerPrefab). In the current version of Risk of Rain 2, those rules reference their display prefabs by Addressables address instead, so followerPrefab is empty. The template finds nothing, and the log fills with item display DisplayXxx returned null. On those survivors, no items show up on the model at all.
What it does
- Before a template reads the rules, it loads the missing display prefabs from their Addressables address and fills
followerPrefabin the vanilla item display rules. - It also fills each template's
itemDisplayPrefabsdictionary, in case the mod already read the rules earlier.
It finds every mod with that template automatically (any type with a static itemDisplayPrefabs dictionary and a PopulateDisplays() method), so no per-mod config is needed.
Tested with: Armored Core 6 Raven, Cadet, Scout, Seamstress, Unforgiven, Assassin, Arsonist, Ganondorf, Risk of Ruina, Lee Hyperreal, M4A1, Dante, AH-64, HAN-D Overclocked, Rocket, MinerUnearthed. After installing it, the returned null errors were gone from the log, and items showed on the models.
This is visual only and does not change gameplay. Install it on every player, since each player renders models on their own side.
Credits
- Thanks to the authors of the survivor mods above. This mod does not include or change any of their files.
- BepInExPack by bbepis: https://thunderstore.io/c/riskofrain2/p/bbepis/BepInExPack/
- HarmonyX (bundled with BepInEx), used for runtime patching.
Source code is in the src folder. Contact: https://github.com/EVReborns
