Modding and mods

## Introduction

Outcore has not official modloader or mod supports (not about clown nose), but exist method like Romhacking

**What we need to start modding**

Before you start modifying the game you need to install the following programs:

1.    Unity Hub (With it we will download the engine itself, where we will make builds for modding)

2.     Unity Asset Bundle Extractor Avalonia (Short - UABEA, we need this tool to work with the assets of the game, which we will modify (replacement of sprites, audio, video, text. Export of sprites, audio, text)).

3.      DnSpy (Needed to work with game scripts)

Download these tools (installation instructions will not be provided)

After installing Unity Hub download the Unity 2019 LTS version (It works the best). (unity weighs 20GB approximately)

Create a folder for your modified game project, in it make folders "Build" (where the Unity build will be compiled), "Assets" (where you can dump sprites, texts for replacement), "Game" (folder with the game itself, where the mod will be), "Dumps" (folder for dumps).

Create an empty project in Hub

After creating and opening the project, you will be presented with the following interface

Сцена = (Scene)

Иерархия объектов на сцене = Hierarchy of objects on the stage

Инспектор = Inspector

Библиотека проекта = Project Library

## Creating a build with audio and video

1.       Throw all audio, video you want to replace into the project library

2.      Rename these files to the one you want to replace (Example, I want to replace "**Candy course**" with other music. I drop in audio with any name and name it to "**Candy course**")

3.      After this point, drag and drop all the audio/video you want onto the scene

4.      Click File/Build Settings

After opening this window, click Build

Select the Build folder in your project folder for compilation

Compile the project there.

## Standart name of exported assets in UABEA

UABEA set standard name like "laser-sharedassets4.assets-261.ogg", it explains like "{Name of asset}-sharedassets{numberOfSharedassetsFile}.assets-{Path ID}.{File extension}"

## Sprite and Text Assets modding and the rest of the files

Open UABEA. Click File/Open

Look for the last file with **sharedassets.assets** in the game folder. Example path:

**"Path to project folder\Build/game name\_Data\sharedassets12.assets".**

Now the window of this program has opened, below you can see the explanation of the main buttons that we will need.

Then there are plugins for different file types.

You can export sprites with this plugin and modify them, and import them back later. To import textures, click **Edit texture/Load texture**.

You can do almost the same thing with audio, but only export.

Same here as with the sprites.

To replace the audio we need to pull the dumps from the build we made

Select the last **sharedassets0.assets** from the path.

**"Path to project folder\Build\game name\_Data\".**

Export the audio and video dumps to the **Dumps** folder.

Make a name for the file where the audio/video resources of the mod will be, example - **ModData.resource**. Now name the file **sharedassets0.resource** with this name

With that name, rename the rows:

```
m_Source = "sharedassets.resource"

in similar

m_Source = "ModData.resource" in all dumps.

```
For videos other than this line you must export the original video dump, and replace all lines in your dump from the original dump except those that **START** from zero:

```
0 unsigned int m_ProxyWidth = 1280

0 unsigned int m_ProxyHeight = 720

0 unsigned int Width = 1280

0 unsigned int Height = 720

0 unsigned int m_PixelAspecRatioNum = 1

0 unsigned int m_PixelAspecRatioDen = 1

0 double m_FrameRate = 30,02200698852539

0 UInt64 m_FrameCount = 1367

0 int m_Format = 1

```
This is an example of the strings. But the ones below are **NOT COUNTED!**

```
1 vector m_AudioChannelCount

1 Array Array (1 items)

 0 int size = 1

 [0]

 0 UInt16 data = 2

```
After these steps, import all the necessary files into the game, but do not forget to move your **ModData.resource** file to the folder with the game, i.e. on the path **"Path to the project folder\Build\game name\_Data\".**

**DON'T FORGET!**

The program **(UABEA)** may crash sometimes, so save, but remember after saving restart the program again, otherwise it will crash.

## Script modding

Open DnSpy. Now open the folder at the path "**Path to project folder\Build\game name\_Data\Managed**". Transfer the Outcore.DLL to the **assembly browser**.

In the search bar we type **SteamGameStoreService** (we will remove the license check), look for the line **public void Initialize(Action onInitializationComplete)**

Put the cursor inside the given method and press **right mouse click /Change method (C#)**

A window for changing the method opens

Highlight what's inside the method and replace with a single line

```
public void Initialize(action onInitializationComplete)
{
 onInitializationComplete();
}

```

Click the **Compile** button. Then click **File/Save Module.../OK.**

Save our DLL with the modified script.

## **Conclusion**

After these steps you have made your own mod on Unity game. Yes, of course, if you have caught the times of mods on Granny game, they are also made like this , but without changing the scripts (I mean most of the "mods").

Good luck with modding!

Translated by Guri-Cats. Created by GoustYTC