What is ThunderKit?
masterGameObjects and ScriptableObjects. It provides editor tooling that approximates the development environment used by the game's original developers, enabling a more integrated workflow for asset-heavy modding.repository·master·Indexed 41 days ago
https://github.com/risk-of-thunder/r2wikiA community-maintained documentation hub for Risk of Rain 2 modders. It provides guides on custom character creation using SurvivorAPI, implementing artifacts via ItemModCreationBoilerplate or Thunderkit, and a comprehensive mapping of item internal codes to display names.
GameObjects and ScriptableObjects. It provides editor tooling that approximates the development environment used by the game's original developers, enabling a more integrated workflow for asset-heavy modding.The Data Oriented Technology Stack (DOTS) is a development philosophy for creating high-performance code using data-oriented programming. In the context of Risk of Rain 2 modding via ThunderKit, two pillars are accessible:
While the Entity Component System (ECS) is a core part of DOTS, its availability for modding is currently unknown.
A ContentPack (found in the RoR2.ContentManagement namespace) is a class that represents a package of content for Risk of Rain 2. It is used by the game's catalog systems to load and manage various assets.
Common assets included in a ContentPack:
ItemDef, EquipmentDef, BuffDef, EffectDef, etc.Precautions:
ContentPack must have a unique name.ItemDefs); doing so will cause the game to crash.UNetWeaver is a utility that patches NetworkBehaviour components to ensure proper serialization and deserialization of data across the network. It allows developers to use standard Unity Networking (UNet) features outside of the Unity Editor in Risk of Rain 2 mods.
Key benefits:
using UnityEngine.Networking; syntax.Hooking and Patching are techniques used to modify the behavior of .NET assemblies, such as the Risk of Rain 2 codebase, other mods, or Unity's C# components.
There are two primary frameworks used for this:
MMHOOK_RoR2.dll) to provide IL and On namespaces, enabling easy method referencing and autocompletion.Common Intermediate Language (CIL) is the intermediate form produced when C# code is compiled. It is processed by the runtime and converted into machine code.
CIL operates using a Stack. In this model:
ret), the stack must be empty. If instructions or values remain on the stack, the process will terminate with an Invalid ILCode error.Reflection provides Type objects that describe assemblies, modules, and types. TypeInfo acts as a unique signature for a type (classes, interfaces, arrays, etc.). You can use typeof() to perform comparisons to ensure an object conforms to a specific type before attempting to invoke methods or access fields.
var obj = "asdf";
if(typeof(obj) == typeof(string)) {//true}A functional stage requires three primary components in its hierarchy:
Contains Scene Info (NodeGraphs and MapNodeGroups) and Classic Stage Info (Monster/Interactable DCCs Pools and Director Credits).
Manages monster and ally spawns. Every stage requires a Network Identity, Director Core, and Scene Director.
Combat Director objects: one for faster/weaker waves and one for slower/stronger waves. The difference lies in the Min Reroll Spawn Interval and Max Reroll Spawn Interval fields.Addressable Injector component to inject an asset into the Scene Director's Teleporter Spawn Card field.RoR2/Base/Teleporters/iscTeleporter.assetRoR2/Base/Teleporters/iscLunarTeleporter.assetMust contain a Global Event Manager component. This handles core events like Character Deaths and Level Ups. Without this, the stage is unplayable.
Expansion icons appear in the lobby to indicate content from a specific mod or expansion.
Technical Specifications:
512 x 512.200.Design Tips:
63 and 186:186).63).To create randomized stage elements (like door states or shrine positions), use the Scene Object Toggle Group component.
Create an empty object (e.g., under SceneInfo) and add the Scene Object Toggle Group component. Add elements to the list, defining a Min Enabled and Max Enabled range for how many objects in that group should be active.
To prevent invalid gameplay spaces (e.g., a closed door with a chest behind it), use Gates.
Gate Name (found in the Node Group).Use specialized components to enable/disable gates based on conditions:
Gate State Setter: Enables specific gates if the GameObject is enabled, and disables others.Gate State Setter (Inverse): The opposite of the above.Gate Toggle On Purchase: Used for items like the Fan jump pad. It enables/disables gates when the item is purchased.To make a 'switch' (where one gate is on and the other is off), use two Gate State Setter objects on a single GameObject that is controlled by a Scene Object Toggle Group.