Update Setup

Raphtalia 2024-07-26 05:54:19 +00:00
parent def8c0dce9
commit bea9336807
1 changed files with 5 additions and 1 deletions

@ -10,7 +10,9 @@ If you'd like to use this mod's API and callback features, reference the same `D
Inside the Project tab, right click to open the Assets tab. Select `Create/DunGenExtender` to create the `DunGenExtender` asset. Inside that asset, reference the `DungeonFlow` that will be linked to this Extender asset. Finally, set it's AssetBundle name to the same one as your interior's asset, `DungeonFlow` or `ExtendedDungeonFlow` whichever it may be. Inside the Project tab, right click to open the Assets tab. Select `Create/DunGenExtender` to create the `DunGenExtender` asset. Inside that asset, reference the `DungeonFlow` that will be linked to this Extender asset. Finally, set it's AssetBundle name to the same one as your interior's asset, `DungeonFlow` or `ExtendedDungeonFlow` whichever it may be.
If you are creating a `.lethalbundle` asset to be automatically handled by LethalLevelLoader, then that's it. The DungeonGenerationPlus mod will automatically extract and read the `DunGenExtender` asset from the `.lethalbundle` asset when the game runs. ![](https://i.imgur.com/a010wJr.png)
If you are creating a `.lethalbundle` asset to be automatically handled by LethalLevelLoader, then that's it. The DungeonGenerationPlus mod will automatically extract and load the `DunGenExtender` asset from the `.lethalbundle` asset when the game runs.
If you are loading the asset manually, you must register the 'DunGenExtender' asset manually through the API. The following is a code example of how you may want to do it. If you are loading the asset manually, you must register the 'DunGenExtender' asset manually through the API. The following is a code example of how you may want to do it.
```cs ```cs
@ -20,6 +22,8 @@ DunGenPlus.API.AddDunGenExtender(dungeon, extender);
``` ```
After any of the two previous steps, verify that the Extender was registered by finding this message in the logs. After any of the two previous steps, verify that the Extender was registered by finding this message in the logs.
![](https://i.imgur.com/yVUBkPj.png)
### Setting up the API Callbacks ### Setting up the API Callbacks
After your interior is selected but before it is generated, a shallow copy of the DunGenExtender's properties is passed to an event caller thing. You can register a function call to this event caller thing to modify the properties before they are used. This is useful if you have configs for your dungeon's generation. The following is a code example of how to register a function call and how you may want to use it. After your interior is selected but before it is generated, a shallow copy of the DunGenExtender's properties is passed to an event caller thing. You can register a function call to this event caller thing to modify the properties before they are used. This is useful if you have configs for your dungeon's generation. The following is a code example of how to register a function call and how you may want to use it.