Some mods may be broken due to the recent Alloyed Collective update.
DefenseMatrixManager
Library that allows for mods to add entities that can block attacks on a per-team basis.
| Last updated | a week ago |
| Total downloads | 261222 |
| Total rating | 1 |
| Categories | Mods Libraries |
| Dependency string | Moffein-DefenseMatrixManager-1.1.1 |
| Dependants | 53 other packages depend on this package |
This mod requires the following mods to function
RiskofThunder-RoR2BepInExPack
Simplify the modding ecosystem of Risk of Rain 2, making it easier for modders to create and maintain their mods while preventing harmful bugs.
Preferred version: 1.36.0README
DefenseMatrixManager
Allows mods to create Defense Matrixes that can block hitscan attacks on a per-team basis.
Projectile deletion functionality is not included, and should be handled by your own custom logic.
This mod was mainly made for my own personal mods since they share this functionality.
How to Implement
-
Create a
DefenseMatrixManager.DefenseMatrixInfoinstance.- This should contain all colliders to be included.
- TeamIndex of the owner.
-
Add
DefenseMatrixInfoinstance to theDefenseMatrixManagerusingDefenseMatrixManager.AddMatrix(DefenseMatrixInfo). -
When destroying your GameObject, remove your
DefenseMatrixInfousingDefenseMatrixManager.RemoveMatrix(DefenseMatrixInfo).
If you want to automatically handle DefenseMatrix instance lifecycle, add a DefenseMatrixComponent to your prefab (requires TeamFilter), and it will automatically handle it for you.