SpawnPrefab

v1.1.0·Updated 2024-11-10

Adds a command to spawn a prefab. `spawn_prefab "<prefab_key>" <pos_x> <pos_y> <pos_z> <rotation_x> <rotation_y> <rotation_z>`

About this mod Author’s original text

Spawn Prefab

Adds a command to spawn a prefab.

Syntax:

spawn_prefab ""

Use the ~ prefix before a position value to make it relative to the player's position. Similarly, use the ~ prefix before a rotation value to make it relative to the prefab's base rotation.

For a list of available prefabs, refer to this link. You may want to filter by UnityEngine.GameObject to see only the spawnable objects.

Examples:

  • spawn_prefab "RoR2/Base/ExplosivePotDestructible/ExplosivePotDestructibleBody.prefab"
  • spawn_prefab "RoR2/Base/Teleporters/LunarTeleporter Variant.prefab" ~20 ~5 ~0
  • spawn_prefab "RoR2/Base/Teleporters/Teleporter1.prefab" ~0 ~0 ~0 ~0 ~0 ~90

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-HookGenPatcher

File & checksum

Filename
SpawnPrefab-1.1.0.zip
File size
26.9 KiB