Subnautica

File information

Last updated

Original upload

Created by

PrimeSonic - MrPurple6411

Uploaded by

MrPurple6411

Virus scan

Safe to use

About this mod

Create and customize your own batteries and power cells

Requirements
Permissions and credits
Changelogs
Donations
Taken over from PrimeSonic with full permission.

Requires Nautilus

Update/Conversion of the popular CustomBatteries for SMLHelper converted to Nautilus for better compatibility with Future mods.


If you've ever wanted to add a new battery and power cell to the game,
with your own choice of crafting materials and your choice of energy capacity,
then this mod is for you.

This mod formalizes the common code of old MidGameBatteries and EnzymeChargedBattery mods into a flexible mod library that handles all the common patches needed to add new batteries and power cells to the game.

Sample plugin pack files for the original Deep Batteries and Enzyme Charged Batteries can be found here
You can use these as a starting point to create your own custom batteries.

Batteries and Power Cells are placed into their own Fabricator crafting tabs
  • This mod will add two new crafting tab nodes to the Electronics tab of the Fabricator: One for batteries, one for power cells.

Custom Batteries can be created and configured by non-coders using Text file plugins
  • Instructions on how to make a text plugin pack are on this wiki
  • Text plugin packs can be made with nothing more than a simple text editor
  • Text plugin packs support custom sprites which can be made with any image editor
Custom Batteries can be created through public mod APIs
  • Modders who wish to do a little more with their custom batteries, and prefer to avoid copy/pasting the same patch methods all custom batteries would be using, can use this mod as an API
  • Simply add a DLL reference to your project and check out the example code available on GitHub
  • Instantiate a new CbBattery and CbPowerCell instance, populate the required properties, and call the provided Patch() method when ready.
  • There are many optional properties you can set which will allow further customization of your batteries in both appearance and function
  • For a more in-depth guide, check out the wiki

For all item references, you must use the spawn ID (aka, debug ID) of the item you want to reference.
You can find all of this in the Subnautica Fandom Wiki

Installation Requirements
  • CustomBatteries (Purple Edition) uses Bepinex
  • You should also have Nautilus installed.


Outline of a Text Plugin Pack
Text plugin packs use EasyMarkup format.
If you have played around with CustomCraft3 at all, this should feel familiar.
Remember that colons, semi-colons, parenthesis, and commas are special characters.
You can use the files provided as a starting point you can customize to your liking.
Instructions on how to make a text plugin pack are on this wiki

Full Example
CustomBatteriesPack:
(
PluginPackName:MyCustomBatteries;
BatteryCapacity:120;
UnlocksWith:Copper;
BatteryID:MyBattery;
BatteryName:"My Own Battery";
BatteryFlavorText:"Flavor text goes here";
BatteryParts: Titanium,Lithium,Magnetite;
BatteryIconFile:"MyBattery.png";
PowerCellID:MyPowerCell;
PowerCellName:"My own Power Cell";
PowerCellFlavorText:"Other flavor text in here";
PowerCellAdditionalParts:;
PowerCellIconFile:"MyPowerCell.png";
);


Source code: Source