1391 words
7 minutes
Otherworld Legends - Advanced Modding Tutorial

Please read this tutorial first.

Game version used in this tutorial: v2.9.1

Windows x64

This tutorial intends to teach you how to modify game character’s Spritesheet so that you can edit beyond the boundary of the source Sprite.

advance_in_game_test

(The final result you will get by the end of this tutorial)

IMPORTANT

Modding comes with unknown risks, including potential game instability, corrupted save files, compatibility issues, and even security vulnerabilities. Always back up your game files and proceed with caution. Proceed at your own risk – I can’t take responsibility if things go sideways.

IMPORTANT

This is a complex tutorial. Please read and follow each step carefully. Send me an issue ticket if you encountered problems that you don’t understand.

Step 1️⃣#

Firstly, download Unity 2021.3.33f1. You won’t need any Unity modules. I also strongly suggest you to learn the basics of Unity first before proceed any further.

Step 2️⃣#

Create a new Unity Project. Choose Unity 3D as template. After you created the project, create the following folders in Assets.

unity_create_project

Inside ‘Dumps’, create ‘Game Dump’ and ‘My Dump’.

dumps_folders

For the purpose of teaching, this tutorial will show you how to replace the idle state spritesheets of Quanhuying’s bartender skin to the idle state spritesheet of the Tianrendao boss. Please do bear in mind that you can definitely apply this technique with your own drawings. Using Tianrendao boss is only an example.

Their names in the spritereference folder are:

unit_asura_tianrendao.asset

unit_hero_quanhuying_bartender.asset

Use AssetStudio to extract their Texture2D files. Put them inside ‘Texture2D’ in Unity.

unity_texture2d

Next select those two files and make the following adjustments in the Inspector.

texture2d_parameter

Make sure:

  1. Texture Type = Sprite (2D and UI)
  2. Sprite Mode = Multiple
  3. Mesh TYpe = Full Rect
  4. Uncheck Generate Physics Shape
  5. Check Read/Write
  6. Filter Mode = Point(no filter)
  7. Compression = None
  8. Apply

Next, use AssetStudio to extract all Dump files.

extract_dumps

Here are the extracted contents. Our focus is on the Sprite folder.

extracted_folders

Do that for both Quanhuying bartender and Tianrendao Sprite. You should get two Sprite folders. Here I have renamed them to ‘Quanhuyin_Sprite’ (spelling mistake) and ‘Tianrendao_Sprite’ and put them inside the Game Dump folder.

game_bundles

Step 3️⃣#

Next, download Unity’s Sprite Editor. Open Package manager.

gapackage_manager_locationme_bundles

Make sure you set Packages to Unity Registry.

unity_reg

Find Features -> 2D -> 2D Sprite and download that.

download_sprite2d

Step 4️⃣#

Next we will slice the Texture2D into multiple Sprites. Find the BatchSpriteDumpImporter.cs script from the ‘scripts’ folder in this tutorial repo。

Put the csharp script (manually verified AI code✅) inside the Editor folder in Unity and wait for Unity to execute the code.

code_sprite_importer

You should see a new option in the Unity menu bar called Tools. Choose Batch Import Sprites From Dumps.

tools

It will show you a popup window. Drag the Tianrendao boss Texture2D file’s icon into Target Texture, then drag Tianrendao_Sprite folder’s icon to Dump Folder. Click ‘Import All Dumps’.

use_sprite_importer

You should now see a small triangular icon next to Texture2D. If you click that you can see all sliced Sprites.

sliced_tianrendao (You can check in the Sprite Editor as well.)

where_is_sprite_editor

sprite_editor

Apply this technique on Quanhuying’s bartender Texture2D as well.

Step 5️⃣#

Next we will be editing the bartender skin (replacing the idle state to Tianrendao boss). Put the two Texture2D in any Pixel art editing software. (Here I will demonstrate using Aseprite).

It should look like this following (you will need to expand the canvas because Tianrendao boss is taller than Quanhuying)

draw

Save this image.

Back to Unity, if you click the small triangular icon next to bartender’s Texture2D. You should find the first 7 sprites changed. However, we still need more adjustments.

texture2d_edit_mismatch

Now this next thing might be hard to understand. We will need to change the Sprtisheet setting for the edited Sprites. Essentially copying the settings from the original Tianrendao boss to the edited Sprites. ⚠️If you are doing your own drawings, you need to manually adjust the Spritesheet and test them so that they look right. I won’t be demonstrating how to do that here. Try search how to use Sprite Editor. After you are done, go to step 6.

Create a new folder inside ‘Game Dump’, call it ‘Temp_Sprite’. From ‘Tianrendao_Sprite’, copy the first seven dumps to there, and also copy from ‘Quanhuyin_Sprite’ (all of them except the first seven).

temp_sprite (The red part is Tianrendao boss and the rest of them are Quanhuying)

Next, copy RenameTextAssets.cs (manually verified AI code✅) from ‘scripts’. After Unity executes it, you should find a new option called Rename TextAssets Window in Tools.

rename_text_assets

Next drag the first 7 dumps that belongs to Tianrendao boss to the popup window. Enter name ‘unit_hero_quanhuying_bartender’. Click ‘Rename Files and Update Contents’. By doing so we have renamed the files.

rename

Using Batch Import Sprites From Dumps, choose Folder ‘Temp_Sprite’ and bartender Texture2D.

temp_sprite_usage

Open bartender’s Sprite Editor.

edit_uvmap

Align the Spritesheet for Tianrendao and apply.

tianrendao_sprite_aligned

Check bartender again.

check_sprite

Step 6️⃣#

In this step we will learn how to make bundles. Select bartender Texture2D and find this option.

make_bundle

Choose ‘New…’, enter ‘unit_hero_quanhuying_bartender’.

new_bundle_name

Find AssetBundleBuilder.cs in scripts folder and put that in Unity Editor. After Unity executes it, you should see a new option call Build Bundles. Now select bartender Texture2D and click that option.

build_bundles

After it finishes, you will see a few new files inside ‘AssetBundles’. There is a file called ‘unit_hero_quanhuying_bartender’ we can open with UABEA.

built_bundles

Step 7️⃣#

Open ‘unit_hero_quanhuying_bartender’ inside UABEA. Choose Memory -> Info. Sort them by name.

my_bundle_uabea

Select the following files.

  1. unit_hero_quanhuying_bartender_0
  2. unit_hero_quanhuying_bartender_1
  3. unit_hero_quanhuying_bartender_2
  4. unit_hero_quanhuying_bartender_3
  5. unit_hero_quanhuying_bartender_4
  6. unit_hero_quanhuying_bartender_5
  7. unit_hero_quanhuying_bartender_6

After you did that, click ‘Export Dump’, put them inside Unity ‘Dumps/My Dump’. Save as UABE text temp.

dump_from_my_bundle

Check your ‘My Dump’.

check_exported_my_bundle

Create a new folder called ‘Source Dump’ inside ‘Dumps’.

new_dump

Open a new UABEA window, and from there open ‘spritereference/unit_hero_quanhuyingbartender’ file. Choose an arbitrary unit_hero_quanhuying_bartender file and Export Dump into the Source Dump.

uabea_for_source

Check your ‘Source Dump’.

check_source_dump

Find ReplacePathID38.cs (manually verified AI code✅) and put that in Unity Editor folder. After Unity executes that you should see a new option called ‘Replace Line 38 From Folder’. Match ‘Source Dump’ and ‘My Dump’ and click ‘Replace Line 38’.

replace_line38

(FYI: Line 38 in a TextAsset is the PathID of texture. We do this to change our bundle’s PathID to the source bundle’s PathID.)

⚠️ After the replacement is complete. Delete all files inside ‘Source Dump’ to avoid bugs next time you make mod.

Step 8️⃣#

Open a new UABEA window, and from there open ‘spritereference/unit_hero_quanhuyingbartender’ file. Replace the Texture2D file. Plugins -> Edit Texture -> Ok -> Load. Select the edited Texture2D in Unity project. Save process is the exact same as before.

Next open ‘spritereference/unit_hero_quanhuyingbartender’ file again. This time we want to replace Sprtes.

Select unit_hero_quanhuying_bartender_0. Click ‘Import Dump’. Find the corresponding file in ‘My Dump’.

import_dump

corresponding_dump

Do the same with 1, 2, 3, 4, 5, 6, then apply the exact same save process.

After that, run the addrtool. Test it in the game.

advance_in_game_test



💗 If you liked this blog, consider following me on GitHub.



👾 Happy Gaming 👾

Otherworld Legends - Advanced Modding Tutorial
https://marblestack.github.io/marblestack/posts/a_unity/a_owl/b_advanced/
Author
MarbleStack
Published at
2025-05-15
License
CC BY-NC-SA 4.0