You are viewing a potentially older version of this package. View all versions.
Moffein-DefenseMatrixManager-1.0.0 icon

DefenseMatrixManager

Library that allows for mods to add entities that can block hitscan attacks on a per-team basis.

Date uploaded 2 weeks ago
Version 1.0.0
Download link Moffein-DefenseMatrixManager-1.0.0.zip
Downloads 19810
Dependency string Moffein-DefenseMatrixManager-1.0.0

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2117 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2117
RiskofThunder-HookGenPatcher-1.2.4 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.4

README

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

  1. Create a DefenseMatrixManager.DefenseMatrixInfo instance.

    • This should contain all colliders to be included.
    • TeamIndex of the owner.
  2. Add DefenseMatrixInfo instance to the DefenseMatrixManager using DefenseMatrixManager.AddMatrix(DefenseMatrixInfo).

  3. When destroying your GameObject, remove your DefenseMatrixInfo using DefenseMatrixManager.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.

CHANGELOG

1.0.0

  • Release