R2API TempVisualEffect

v1.0.3·Updated 2024-09-08

API for adding custom temporary visual effects for characters.

About this mod Author’s original text

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.3'

  • Initial fixes for SOTS DLC2 Release.

'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.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

bbepis-BepInExPackRiskofThunder-HookGenPatcherRiskofThunder-R2API_CoreRiskofThunder-R2API_ContentManagement

File & checksum

Filename
R2API_TempVisualEffect-1.0.3.zip
File size
14.5 KiB