How to add new assets, step by step

washy

Chieftain
Joined
Feb 9, 2015
Messages
60
I was struggling for some hours to get everything rigth for adding new assets, so i made a recopilation of the steps i take

1/ Install Git: https://gitforwindows.org/
2/ Install unity: https://unity3d.com/unity/whats-new/2020.3.25

3/ You need this only if you want to see and edit the game Assets. You Can skip 3 and 4.
Install AssetStudio: https://github.com/Perfare/AssetStudio/releases Download the zip last version and unzip
This require downloading and installing:
.NET Framework 4.7.2 / https://dotnet.microsoft.com/en-us/download/dotnet-framework/net472
.NET Desktop Runtime 5.0 / https://dotnet.microsoft.com/en-us/download/dotnet/5.0
.NET Desktop Runtime 6.0 / https://dotnet.microsoft.com/en-us/download

4/ Open AssetStudioGUI and go to file/load folder and open: (Steam\Steamapps\Common or Epic Games)\Old World\OldWorld_Data and then export everything to a folder (This are the game assets)

5/ Create a new Unity project and ensure it is in the 2020.3.25f1 version

6/ Install the Asset Bundle Browser:

-Open the Unity [Package Manager]((https://docs.unity3d.com/2020.1/Documentation/Manual/upm-ui.html) in your Project (menu: Windows > Package Manager).
-Click the + (Add) button at the top, left corner of the window.
-Choose Add package from git URL…
-Enter https://github.com/Unity-Technologies/AssetBundles-Browser.git as the URL
-Click Add.

7/ Add TextMeshPro essential resources to unity


8/ Import your assets to Unity



9/ Change the texture type to 2D And UI


10/ Select a texture and create a TextMesh Pro Sprite Asset


11/ Fix some values, here as far i have experienced you have to put the BX to 0 in all the cases, and make BY 3/4 of the total Heigth
And the scale depends, in the yields 1.2 its ok, but for the projects you need 2.5, maybe im making the icons too small (104*104 to proyects and 64*64 for resources)


12/ When you have all the files ready, open the Asset Bundle Browser, select them and drop them in the Bundle, create only one bundle for all the files


13/ Select the Assets folder in your mod and build. (Select Force rebuild and Standar Compression)


-Good Luck

9/ Create Asset-add.xml with this line
Code:
<Root>
    <Entry>
        <zType>ASSET_SPRITE_SHEET_MY_YIELD</zType>
        <zAsset>myyieldbundle/YIELD_MY_YIELD</zAsset>
    </Entry>
</Root>

10/ Create spriteGroup-append.xml with this line
Code:
<Root>
    <Entry>
            <zType>SPRITE_GROUP_YIELD_ICONS</zType>
            <aeSpriteSheets>                 
                    <zValue>ASSET_SPRITE_SHEET_MY_YIELD</zValue>
            </aeSpriteSheets>
    </Entry>
    <Entry>
        <zType>SPRITE_GROUP_TRAIT_ICONS_SMALL</zType>
        <aeSpriteSheets>
             <zValue>ASSET_SPRITE_SHEET_MY_YIELD</zValue>
            </aeSpriteSheets>
    </Entry>
</Root>
Im not sure about the tag here for all the different icons, just go to the original spriteGroup and check what they re using

11/ Add your asset to the game: For example create yield-add.xml with
Code:
<Root>
    <Entry>
        <zType>YIELD_WOOD</zType>
        <zIconName>YIELD_MY_YIELD</zIconName>
    </Entry>
</Root>

If i can improve something, please tell me

If are strating from zero you also need a code editor, you can use notepad, but i use Visual Studio its very helpful https://code.visualstudio.com/Download
And a image editor, I use Paint.Net, its free and very easy tu use https://www.getpaint.net/download.html
 
Last edited:
Good on you for putting this together, had been meaning to to do it myself once I solved some outstanding issues.

5/ Create a new Unity project and ensure it is in the 2020.3.14 version

Old World currently uses Unity 2020.3.25f1 so you'd be better to link to that one. Output.txt shows which version Mohawk is using, worth checking that every now and then.

I'd also recommend ticking 'Force Rebuild' in Asset Bundle Browser's advanced settings.


There are some things I'm still trying to solve:
  1. According to some discussions on Discord you're also supposed to use the TextMeshPro package and the shaders within it in your bundles. However I can't get these to work, and most of the 2D assets I've tried so far seem to work without this.
  2. The _SMALL versions of crests and religion icons are driving me insane. I can't get them to appear no matter what I try and in the latest test build the Sprite Groups for them appear to have been removed - yet they're still in game.
  3. Anything related to 3D assets.

I'd be very keen to hear if you have any luck or insight with these.
 
Updated thanks

Check the education mod by revan, the small icon appears without a problem, i was waching it because im trying to make a wider top bar for more resources icon.

Im tell you when i figure something , because now is trial and luck
 
Check the education mod by revan, the small icon appears without a problem, i was waching it because im trying to make a wider top bar for more resources icon.

They work in several mods just fine, but not mine heh. No idea what I'm doing wrong and now it seems Mohawk have changed how they work on the test build anyway. Now they're broken for me in lots of mods, even @Dale 's.
 
I'm currently on family vacation till end of June. Once I'm back I want to get more info on how to mod OW out there.
 
I'm currently on family vacation till end of June. Once I'm back I want to get more info on how to mod OW out there.

That would be fantastic. Enjoy your holiday!
 
To create icons that appear in encyclopedia and in the small forms you have to create a text mesh. Step By step:

First of All you need to install Unity, AssetBundle Browser, and AddtextmeshPro essential resources to unity
0-AddTextMeshFiles.jpg

-Create a New project, make sure it is in the 2020.3.25f1 version
-Import the new assets

1-ImportNewAssets.jpg


-Change the texture type to 2D And UI
2-ChangeThemTo2D-UI.jpg


-Select a texture and create a TextMesh Pro Sprite Asset
3-GoToTextMeshAndCreateASprite.jpg


-Fix some values, here as far i have experienced you have to put the BX to 0 in all the cases, and make BY 3/4 of the total Heigth
And the scale depends, in the yields 1.2 its ok, but for the projects you need 2.5, maybe im making the icons too small (104*104 to proyects and 64*64 for resources)
4-FixSomeValues.jpg


-When you have all the files ready, open the Asset Bundle Browser, select them and drop them in the Bundle, create only one bundle for all the files
5-DropTheFilesInTheAssetBundle.jpg


-Select the Assets folder in your mod and build. (Select Force rebuild and Standar Compression)
6-SelectYourModAssetFolderAndBuild.jpg


-Good Luck
 
I started a project for a total economic conversion, the idea is make something like banished, and learn in the process
i managed to change the top bar, add a bunch of new resources and 3 custom 3d buildings (some meshs are missing)

demo.png


For the 3d asset, you have to importe the 3d asset and all the textures to Unity, put it inside the game, and create a original prefab, dont forget to set x,y, z to 0 o near to it. i found that you need sometime y +1 to apear properly, and scale down also.
You have to create a folder called Prefabs, inside this another one called Improvements, and the prefab you make inside, and then you put all the folder in the Asset browser for import.

Then call it in asset-add (prefab/Prefabs/Imporovements/NEW_3D_ASSET)

When i have everything figured i make a better tuto
 

Attachments

  • economic-total-conversion.rar
    3.5 MB · Views: 33
Last edited:
i could fix the 3d textures and show the floor texture correct, but im missing something with the clutter splat to take out the urban buildings in the place of the new buildings and the trees, only the improvements in empty plains look good. Any tip is welcome
 
Wow, this is great. Quite complex for a layman like me though. I am interested to see how unit assets can be altered.
I have modded units for Civilization 6 via Blender but using a lot of the tested tools created by the community over time to export and import assets.
I have a good database of models, including arms, shields, helmets and the like.
 
Thanks for this guide. Using the AssetStudioGUI I extracted the Chariot_Rig Animator to Blender via FBX which is a start. There are a lot of root objects called things like leftFinger2_Joint3_end which suggests the entire skeleton is not being imported to Blender correctly but it's a start and step towards a complete round trip from OW -> Blender -> OW.

chariot_rig.jpg
 
Managed to get Hoplite_portrait exported with attack animation but had to rescale the mesh by 0.4 to get it looking right.

hoplite_animation_manual_correction.png
 
Many assets are adjusted in the game by having their prefab use some rotation or scale. The Hoplite_portrait for instance has xyzw rotation of (0, 1, 0, 0) and a scale of (2.5, 2.5, 2.5).
 
  • Like
Reactions: uhu
Many assets are adjusted in the game by having their prefab use some rotation or scale. The Hoplite_portrait for instance has xyzw rotation of (0, 1, 0, 0) and a scale of (2.5, 2.5, 2.5).

Thanks for the info. Since 1 / 2.5 = 0.4 that might explain why the mesh scaling needs correction by that amount in Blender.
 
If you figure out the functionality...I can for sure cut and crop and transpose parts of models like helmets and shields in Blender, judging by the images above.

The question would remain whether the game can see units as part of different cultures.
The idea is to diversify between say Egyptian and Roman spearmen, which are now the same.
 
There's no such support currently.
 
At the moment the only viable option is making diferent units for every Civ, but is gonna be messy with other mods that change units, At the moment i remember that the tribes already have split units of the same type
 
Thanks for this guide. Using the AssetStudioGUI I extracted the Chariot_Rig Animator to Blender via FBX which is a start. There are a lot of root objects called things like leftFinger2_Joint3_end which suggests the entire skeleton is not being imported to Blender correctly but it's a start and step towards a complete round trip from OW -> Blender -> OW.

View attachment 632032

Downloading the Bledner to try that! i was only using unity as i dont know much of 3d but is nice to learn something diferent
 
Downloading the Bledner to try that! i was only using unity as i dont know much of 3d but is nice to learn something diferent

I know a lot of Blender but I'm a Unity noob so perhaps together we can work on getting an initial 3D guide going.
 
For the 3d asset, you have to importe the 3d asset and all the textures to Unity, put it inside the game, and create a original prefab, dont forget to set x,y, z to 0 o near to it. i found that you need sometime y +1 to apear properly, and scale down also.
You have to create a folder called Prefabs, inside this another one called Improvements, and the prefab you make inside, and then you put all the folder in the Asset browser for import.

Then call it in asset-add (prefab/Prefabs/Imporovements/NEW_3D_ASSET)

This is the key part of the process I'd like to crack. I've put together a Unit Prefab using the Huscarl exported FBX file and textures following your instructions. Built out the bundle OK it seems.

I'm testing by swapping ASSET_UNIT_SCOUT to point to my imported model.

Code:
<Root>
    <Entry>
        <zType>ASSET_UNIT_SCOUT</zType>
        <zAsset>prefabs/Prefabs/Units/Huscarl_Iain</zAsset>
    </Entry>
</Root>

unity_huscarl.png


Scout is invisible rather than a pink cube in game so I think that my asset is being found OK but there is something wrong the Unity set up. Some Unity template projects would be helpful.

scout_invis.png
 
Top Bottom