Modding

## **Introduction**

**Mods are supported for Mac PC and Linux!**

Mods consist of files ending in .assets or under a files that end in .dll.

You can download mods from the Official WorldBox Discord server. (*link*)

For NCMS Installation guide scroll down.

On newer versions Bepinex does not work so you need NCMS

## **Assembly-CSharp Mod Installation**

#### **Windows**

*Note: Make sure hidden files are shown, you can google how to do this if they're not shown.*

1. Download https://github.com/BepInEx/BepInEx/releases/download/v5.4.5/BepInEx\_x64\_5.4.5.0.zip into your Window

2. Unzip the file at C:\Program Files (x86)\WorldBox

3. Starts a game and after Seeing nothing crashed, Exit the game.

4. Open the Plugins File located at C:\Program Files (x86)\WorldBox\BepInEx and Download the mod inside of Plugins File

You're Done!

#### **Mac**

1. Ctrl-Click/Right Click your worldbox launcher

2. Click show package contents

3. Click contents->Resources->Data->Managed

4. Replace the Assembly-CSharp.dll/files ending with .assets with the modded one

You're Done!

#### **Common Fixes**

***Tip Text Tip Text... & Other loading issues:***
- Use the game version the mod was made for
- Rename the modded file to the original file name (*Example: Assembly-CSharp(2).dll ---> Assembly-CSharp.dll*)

***Mod not showing up:***

- Make sure the original file is overwritten
- Check if the modded file got removed by Antivirus software

***Other problems:***

- Ask for help in the discord server

### **Windows**

You can follow one of the videos, use the written instructions, or use the WBMI.

### **WBMI**

A worldbox bepinex mod installer, made for a very easy and simple install.

More Info/Guide here: WBMI

### **Videos:**

You only need to watch one of the videos as each teach you full installation in their video.

https://youtu.be/KfEOEFTfboQ - Andreiavich, Mod Installation & Simple GUI guide

https://youtu.be/kep3Tp-5a\_U - DogsAreBetterThanCats, Mod Installation

### **Written Instructions**

1. Install BepInEx from: here

2. Open the BepInEx zip you get from the download

3. Copy and paste the contents in that zip into **C:\Program Files (x86)\WorldBox** *(or if you have it custom installed elsewhere, put these next to the exe)*

4. Double Check and make sure that the folder ***BepInEx***, and the files ***winhttp.dll***, and ***doorstop\_config.ini*** are in **C:\Program Files (x86)\WorldBox** *(the folder with the Worldbox.exe)*

5.Take whatever BepInEx mod that **ends with .dll** is and put it into ***BepInEx->plugins*** *(create this folder, or launch the game and it'll create this folder)*

*Cheers you're done!*

Note: If the game doesn't start up, try running the game as administrator by right clicking the exe and clicking that option on the list of options.

## **Creating Mods**

WorldBox Modding will consist of either code changes or texture changes. These changes affect how the game looks and works.

For coding, you will need basic C# knowledge and a decompiler of choice.

Texturing requires a tool that can extract and import textures. You can find tutorials for both types of editing, this guide will assume you have some prior experience.

### **Modding: Coding**

Coding changes in this game are made through a file called Assembly-CSharp.dll. This file once opened by a decompiler such as **DnSpy**, or **DotPeek** will show a list of all the classes and code. There are notable library classes such as ActorStatsLibrary, ActorTraitLibrary, and PowerLibrary which let you edit Stats, Traits, and Powers with ease. Though these libraries do not contain all the code for their actions. Using DnSpy your analyzer can find your code references throughout to find the code you need. Generally, you'll find what you need by searching its name in your search bar. The other larger notable classes are Actor, ActorBase, and Mapbox containing all sorts of random information, and maybe the best place to look if you cannot find what you need.

Check this page for Code Examples.

### **Modding: Textures**

Texture editing is possible through editing a variety of files ending in ".assets". You'll use tools such as UTinyRipper, Asset Studio, and Unity Asset Bundle Extractor to extract images and audio. To import/change these images to make a texture change you'll use Unity Asset Bundle Extractor Also known as (UABE). Using UABE you can edit imagery, add resources (audio, image, sprite, etc), and edit audio. The game uses sprite sheets and will consist of all zoomed-in sprites under "sactx-1024x1024-Uncompressed-WorldAtlas-5e0836b1". The UI is in a similar file with "SpriteAtlas" instead of WorldAtlas. These two atlases contain a large number of sprites and any changes you wish to make on sprites contained within them can only be made through them. Any Icons or other images can be found and edited individually.

***Note: Texture changing through processes such as UABE is tedious and will out-date every update, a better idea is to only use these processes for texture extraction and make an assembly or bepinex mod to actually import the sprites or images.***

### **Modding: BepInEx**

To be written, some useful links in the meantime:

BepInEx docs

Harmony docs

BepInEx How To Mod Steam Guide

## **Modding: NCMS installation**

**Installation for Windows/OSX**

https://denq04.github.io/ncms/how-to-install/

**Installation for Linux** (Isn't supported natively but there is a third party method to get mods to work takes a bit of work tho.)

https://steamcommunity.com/app/1206560/discussions/0/3418808280406220269/

## Modding: How to use NCMS to create mods

NCMS provides easy modding for Worldbox. In order to create one, you need a config.json file with the mod name, description, icon path, etc of the mod. Also a code file to hold all the code (in C#). To add textures, you can create a GameResources file and put the texture inside.

Modding with NCMS requires .dll decompiler mentioned on **Moding:Coding** (Jetbrains Dotpeek is recommended). With the decompiler, use it on the Assembly-CSharp and search “library” . After that, you can just look at the librarys to see examples of the modding content your gonna make. (Like BuildingLibrary for building mods)

YouTube video that further explains the usage of NCMS on Worldbox:

https://youtu.be/Lat2UWbt-Sw