
Risk of Rain 2
You are viewing a potentially older version of this package. View Latest Version

R2API.Director is a submodule assembly for R2API that allows mod creators to add new Entries to the Director, which allows things such as Interactables, Enemies and more to spawn in runs.
R2API.Director is used for adding new Enemies and Interactables to the Director's SpawnCard pools, the main method of using this is with the events provided by the API, these events are:
Alongside this, R2API.Director also comes bundled with DirectorAPIHelpers, which contains helper methods which greatly simplify interacting with the Events described above.
AddNewMonster / RemoveExistingMonster helper methods not properly handling arena stage.Stage ParseToInternalStageName(string) and string ToInternalStageName(Stage stage) would return invalid values for The Planetarium and Void Locus respectively.DirectorAPI.Helpers methods an optional predicate parameter for more granular control on whether or not a monster / interactable should be added / removed to / from a stage. The predicate have a DirectorCardCategorySelection parameter that you can inspect (you don't have to, you can do other checks instead, like if a specific ExpansionDef is active) to decide whether or not the monster / interactable should be added / removed.