Update Setup

Raphtalia 2024-07-26 05:48:24 +00:00
parent 20c8d3f92a
commit def8c0dce9
1 changed files with 16 additions and 2 deletions

@ -1,6 +1,6 @@
### Setting up the plugin in your Unity project ### Setting up the plugin in your Unity project
Download the `DunGenPlus.dll` through Thunderstore or through this Github repository. Drag and drop the `.dll` file into your interior Unity project. This mod also requires the LethalLevelLoader plugin to be installed in your Unity project. With just those simple steps, the mod is installed. You can now setup and use this mod's features. Download the `DunGenPlus.dll` through Thunderstore or through this Github repository. Drag and drop the `.dll` file into your interior Unity project. This mod also requires the [LethalLevelLoader](https://thunderstore.io/c/lethal-company/p/IAmBatby/LethalLevelLoader/) plugin to be installed in your Unity project. With just those simple steps, the mod is installed. You can now setup and use this mod's features.
This goes without saying, this mod also requires the DungeonGenerationPlus mod to be installed in your Lethal Company mod pack. This goes without saying, this mod also requires the DungeonGenerationPlus mod to be installed in your Lethal Company mod pack.
@ -22,4 +22,18 @@ After any of the two previous steps, verify that the Extender was registered by
### Setting up the API Callbacks ### Setting up the API Callbacks
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 it's I'm not sure if the extension must be `.lethalbundle` or if Unity automatically fixes it; either way set the extension as `.lethalbundle` to be safe. 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.
```cs
dunGenExtender.Events.OnModifyDunGenExtenderProperties.AddListener(UpdateDunGenExtenderProperties);
public void UpdateDunGenExtenderProperties(DunGenExtenderProperties props) {
props.MainPathCount = PluginConfig.Instance.mainPathCountValue;
if (PluginConfig.Instance.disableBasementValue) {
props.MainPathCount = Mathf.Min(props.MainPathCount, 2);
}
props.DungeonSizeBase = new Vector3(PluginConfig.Instance.dunGenWidthBaseValue, props.DungeonSizeBase.y, PluginConfig.Instance.dunGenLengthBaseValue);
props.DungeonSizeFactor = new Vector3(PluginConfig.Instance.dunGenWidthMultiFactorValue, props.DungeonSizeBase.y, PluginConfig.Instance.dunGenLengthMultiFactorValue);
}
```