You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask whether it is possible to manipulate the data for the level graph just before generating the dungeon.
My specific case: I want to be able to select a LevelGraph and a RoomTemplateSet via code just before generating a dungeon. The rationale is that the player will decide whether to generate a "long" or "short" dungeon (represented by different level graphs) and which biome (let's say "desert", "ice", "jungle", etc - represented by different room template sets).
I have been able to do both of the above by simply accessing the DungeonGenerator object and setting my desired values at runtime, but I ran into a problem with different biomes. All works perfectly well for normal rooms, but I have a spawn room in my level graphs which uses a room-specific template - so I need to set the template for that room as well, otherwise it will not match the biome.
I found that I would need to access the RoomBase children of the LevelGraph I am using (and I found which room to actually modify), but from what I can see that class only has getters and no visible way to actually set something. Would be grateful if you can correct me here :)
Of course what I can theoretically do is simply forget setting the biomes on the room template level and prepare separate level graphs for each biome. The issue is that then I would need a lot more level graphs (number of size options multiplied by number of biomes) so if possible I would prefer to avoid it.
The text was updated successfully, but these errors were encountered:
Hello,
do you by any chance have the PRO version of the plugin? Because this whole scenario is quite simple there as you can implement custom input tasks. With them, you no longer have to prepare (assign) your room templates at design time. Instead, you can use the level graph only for the graph structure and then based on individual room types you implement a method that picks the correct room templates. So if you have a variable that indicates the current biome, you can just add an if statement that picks the correct spawn room for that biome.
If you don't have the PRO version, you can probably continue with what you're trying. If you found the correct RoomBase class, you should be able to just cast it to Room and access the room templates there. The RoomBase class is just the common ancestor for all the rooms (you can have custom room classes in the PRO version) and the concrete implementation in the free version is the Room class.
Hi,
I would like to ask whether it is possible to manipulate the data for the level graph just before generating the dungeon.
My specific case: I want to be able to select a LevelGraph and a RoomTemplateSet via code just before generating a dungeon. The rationale is that the player will decide whether to generate a "long" or "short" dungeon (represented by different level graphs) and which biome (let's say "desert", "ice", "jungle", etc - represented by different room template sets).
I have been able to do both of the above by simply accessing the DungeonGenerator object and setting my desired values at runtime, but I ran into a problem with different biomes. All works perfectly well for normal rooms, but I have a spawn room in my level graphs which uses a room-specific template - so I need to set the template for that room as well, otherwise it will not match the biome.
I found that I would need to access the RoomBase children of the LevelGraph I am using (and I found which room to actually modify), but from what I can see that class only has getters and no visible way to actually set something. Would be grateful if you can correct me here :)
Of course what I can theoretically do is simply forget setting the biomes on the room template level and prepare separate level graphs for each biome. The issue is that then I would need a lot more level graphs (number of size options multiplied by number of biomes) so if possible I would prefer to avoid it.
The text was updated successfully, but these errors were encountered: