-
Notifications
You must be signed in to change notification settings - Fork 23
Loading Your Custom Content
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.
-
Obtain & Load your AssetBundle containing your relevant DunGen files.
-
Create a new
ExtendedLevel : ScriptableObject
instance for your Custom Level. -
Add your ExtendedLevel to the
AssetBundleLoader.obtainedExtendedLevelsList
List.
-
Add the
LevelLevelLoader.dll
to your Unity Project. -
Create a new
ExtendedLevel : ScriptableObject
and fill in the provided values with your relevant content. -
Build an AssetBundle including all relevant Custom Level assets.
-
Change the file extension to
.lethalbundle
-
Move the AssetBundle to anywhere inside the
/LethalCompany/BepInEx/plugins/
folder.
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;
-
Obtain & Load your AssetBundle containing your relevant DunGen files.
-
Create a new
ExtendedDungeonFlow : ScriptableObject
instance for your Custom DungeonFlow. -
Assign your
ExtendedDungeonFlow
'sdungeonFlow
anddungeonFirstTimeAudio
references, as well as any other settings you wish to adjust -
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);
As of 1.0.0 this feature is not currently implemented.