File information
Created by
Updater Cookay Original Modder MetiousUploaded by
M3dicCookieVirus scan
About this mod
a VERY powerful mod that makes you be able to make a Custom Databox with custom unlocks, names, description and spawns and unlimited amount of Databoxes.
- Requirements
- Permissions and credits
Custom DataBoxes
a VERY powerful mod that makes you be able to make a Custom Databox with custom unlocks, names, description and spawns and unlimited amount of Databoxes.
How to Setup a new DataBox.json ?
Example.json
{
"DataboxID": "SeaglideDatabox",
"AlreadyUnlockedDescription": "Seaglide Databox. already unlocked",
"PrimaryDescription": "Unlock Seaglide",
"SecondaryDescription": "a Databox to unlock the Seaglide",
"ItemToUnlock": "Seaglide",
"BiomesToSpawnIn": [
{
"biome": "grassyPlateaus_Grass",
"count": 1,
"probability": 0.1
},
{
"biome": "grassyPlateaus_TechSite",
"count": 1,
"probability": 0.5
},
{
"biome": "grassyPlateaus_TechSite_Scattered",
"count": 1,
"probability": 0.1
}
],
"CoordinatedSpawns": [
{
"Position": {
"x": 5.0,
"y": -5.0,
"z": 5.0
},
"EulerAngles": {
"x": 10.0,
"y": -100.0,
"z": 253.0
},
"Scale": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
}
]
}
These Json files go into the DataBox folder.
Where do i find a list of Biomes?
Within the CustomDataBoxes folder Biomes.json.
How To Use CustomDataBoxes API in your mod?
Setting up your project
you will need to add a reference to
CustomDataboxes.dll
.once that's done, everything you will need from CustomDataboxes will be in the using CustomDataboxes.API
namespace.just add this line among your using statements.CustomDataboxes Properties
after adding the
CustomDataboxes.API
among your using statements, there are couple Properties you need to setup so it can work properly.
after that, you can call the Patch()
method and CustomDataboxes should take care of everything else.
Properties to setType-Description
Patching your Databox
- Instantiate a new instance of Databox
- Populate all required properties (and any optional properies)
- Invoke the Patch()
method on the instance and that's it, you are good to go.
namespace ExampleDatabox
{
using CustomDataboxes.API;
using System.Collections.Generic;
using BepInEx;
using UnityEngine;
using System.Collections;
using UWE;
using Nautilus.Handlers;
using Nautilus.Assets;
[BepInPlugin(GUID, MODNAME, VERSION)]
[BepInDependency("com.snmodding.nautilus", BepInDependency.DependencyFlags.HardDependency)]
[BepInDependency("com.CustomDataboxes.Metious", BepInDependency.DependencyFlags.HardDependency)]
public class ExampleDataboxMod : BaseUnityPlugin
{
private const string
MODNAME = "CustomDataBoxtest",
AUTHOR = "Cookay",
GUID = "com.CustomDataBoxtest.CKmod",
VERSION = "1.0.0.0";
private readonly string alreadyUnlockedTooltip = "Already Unlocked";
private readonly string primaryTooltip = "Primary Tooltip";
private readonly string secondaryTooltip = "Secondary Tooltip";
private readonly string ClassID = "StasisRifleDataboxID";
private readonly TechType unlockTechType = TechType.StasisRifle;
public void Awake()
{
Databox myDatabox = new Databox()
{
DataboxID = "StasisRifleDatabox",
PrimaryDescription = "StasisRifle Databox",
SecondaryDescription = "Stasis Rifle Databox",
BiomesToSpawnIn = new List<LootDistributionData.BiomeData>
{
new LootDistributionData.BiomeData()
{
biome = BiomeType.GrassyPlateaus_Grass,
count = 1,
probability = 0.1f
},
new LootDistributionData.BiomeData()
{
biome = BiomeType.GrassyPlateaus_TechSite,
count = 1,
probability = 0.5f
},
new LootDistributionData.BiomeData()
{
biome = BiomeType.GrassyPlateaus_TechSite_Scattered,
count = 1,
probability = 0.1f
}
},
TechTypeToUnlock = TechType.StasisRifle
};
myDatabox.Patch(); // Once patched, you're good to go.
}
}
}