Skip to content

Loading Your Custom Content

IAmBatby edited this page Feb 7, 2024 · 9 revisions

Loading Your Custom Level (Manually via BepInEx Plugin)


To manually register your Custom Dungeon with LethalLevelLoader, You need to do the following;

Note: The following steps must be executed before GameNetworkManager.Awake() in order for relevant dungeon prefabs to be registered for network syncing.

  1. Obtain & Load your AssetBundle containing your relevant DunGen files.

  2. Create a new ExtendedLevel : ScriptableObject instance for your Custom Level.

  3. Add your ExtendedLevel to the AssetBundleLoader.obtainedExtendedLevelsList List.

Loading Your Custom Level (Automatically via AssetBundles)


  1. Add the LevelLevelLoader.dll to your Unity Project.

  2. Create a new ExtendedLevel : ScriptableObject and fill in the provided values with your relevant content.

  3. Build an AssetBundle including all relevant Custom Level assets.

  4. Change the file extension to .lethalbundle

  5. Move the AssetBundle to anywhere inside the /LethalCompany/BepInEx/plugins/ folder.

Loading Your Custom Dungeon (Manually via BepInEx Plugin)


Note: The following steps must be executed before GameNetworkManager.Start() in order for relevant dungeon prefabs to be registered for network syncing.

To manually register your Custom Dungeon with LethalLevelLoader, You need to do the following;

  1. Obtain & Load your AssetBundle containing your relevant DunGen files.

  2. Create a new ExtendedDungeonFlow : ScriptableObject instance for your Custom DungeonFlow.

  3. Assign your ExtendedDungeonFlow's dungeonFlow and dungeonFirstTimeAudio references, as well as any other settings you wish to adjust

  4. Use AssetBundleLoader.RegisterExtendedDungeonFlow(ExtendedDungeonFlow extendedDungeonFlow) with your provided assets.

Example

// Step 1.

AssetBundle myAssetBundle;
DungeonFlow myDungeonFlow = myAssetBundle.LoadAsset<DungeonFlow>("MyDungeonFlow.asset");
AudioClip myFirstTimeDungeonAudio = myAssetBundle.LoadAsset<AudioClip>("MyDungeonAudio.asset");

//Step 2.

ExtendedDungeonFlow myExtendedDungeonFlow = ScriptableObject.CreateInstance<ExtendedDungeonFlow>();

//Step 3.

myExtendedDungeonFlow.dungeonFlow = myDungeonFlow;
myExtendedDungeonFlow.dungeonFirstTimeAudio = myFirstTimeDungeonAudio;

myExtendedDungeonFlow.dynamicLevelTagsList.Add(new StringWithRarity("Canyon", 150));
myExtendedDungeonFlow.dynamicLevelTagsList.Add(new StringWithRarity("Tundra", 20));

//Step 4.

PatchedContent.RegisterExtendedDungeonFlow(myExtendedDungeonFlow);

Loading Your Custom Dungeon (Automatically via AssetBundles)


As of 1.0.0 this feature is not currently implemented.