RiskofThunder-R2API_TempVisualEffect icon

R2API TempVisualEffect

API for adding custom temporary visual effects for characters.

Last updated 9 months ago
Total downloads 1305071
Total rating 4 
Categories Libraries
Dependency string RiskofThunder-R2API_TempVisualEffect-1.0.2
Dependants 637 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2109 icon
bbepis-BepInExPack

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

Preferred version: 5.4.2109
RiskofThunder-HookGenPatcher-1.2.3 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.3
RiskofThunder-R2API_Core-5.0.8 icon
RiskofThunder-R2API_Core

Core R2API module

Preferred version: 5.0.8
RiskofThunder-R2API_ContentManagement-1.0.1 icon
RiskofThunder-R2API_ContentManagement

API for adding content to the game

Preferred version: 1.0.1

README

R2API.TempVisualEffect - Custom temporary visual effects for characters.

About

R2API.TempVisualEffect is a submodule assembly for R2API that allows mod creators to easily add new VisualEffects to Characters that appear after a certain condition has been fulfilled.

Use Cases / Features

R2API.TempVisualEffect works via the method AddTemporaryVisualEffect, which allows you to have a prefab be instantiated in a CharacterBody after a specific condition becomes true. The prefab supplied must have the TemporaryVisualEffect component.

For the condition you use the EffectCondition delegate, which returns true if the visual effect should appear for the body.

You can also specify if the effect should be scaled using the body's best fit radius, or if the effect should spawn in a specific ChildLocator entry.

A separate overload for AddTemporaryVisualEffect takes an EffectRadius delegate, which returns a specific radius for the visual effect.

Related Pages

Changelog

'1.0.2'

  • Add missing BepInDependency to R2API.ContentManagement

'1.0.1'

  • Fix the NuGet package which had a dependency on a non-existent version of R2API.Core.

'1.0.0'

  • Split from the main R2API.dll into its own submodule.