How to add new assets, step by step

Could be that mixing and matching models with animation sets doesn't work.
 
I only get or a pink cube or invisible units also, they have 3 types of asset, the animator mesh and the portrait, i edit the 3 of them and tryed differtn thing, but i dont know how, sorry

i also try uploading with no modifications and nothing

the improvments works, so i think its because the animation

This is inside formations
Code:
<Entry>
        <zType>FORMATION_WARRIOR</zType>
        <UnitAsset>ASSET_UNIT_WARRIOR</UnitAsset>
    <UnitMeshAnimatorAsset>ASSET_UNIT_WARRIOR_MESH_ANIMATOR</UnitMeshAnimatorAsset>
    <UnitPortraitAsset>ASSET_UNIT_PORTRAIT_WARRIOR</UnitPortraitAsset>      
    </Entry>

And the files are saved NAME, NAME_AnimatedMesh and NAME_portrait
The animated mesh is in a new folder inside units called MeshAnimator
 
Last edited:
And the files are saved NAME, NAME_AnimatedMesh and NAME_portrait
The animated mesh is in a new folder inside units called MeshAnimator

Without a Unity template and/or guide it is going to almost impossible to guess what needs to be done to import Unit assets.
 
I agree i tried a lot of stuff and didnt work
 
Finally got somewhere with modding 3D Units thanks to AssetRipper which does a pretty thorough job of turning the asset bundles back into a functional Unity project.

unity_reskin.png


scout_reskin.png
 
I don't follow the graphics stuff closely, but Deliverator, please tag me if you need to see something from the actual Unity project to make it easier for you.
 
@Solver I wondered whether Mohawk would consider releasing the source Unity project as an enabler for modding? Or at least the Unity Mono Scripts necessary to make modified versions of existing 3D assets? Using the AssetRipper library I was able to reconstruct the structure of much of the source project including the Prefabs for Units, Terrain, Improvements etc. The issue is that most if not all 3D Prefabs are dependent on one or more Mono Scripts. AssetRipper decompiles these from the C# assemblies but that process is not perfect so the code doesn't recompile.

A concrete example of a limitation I'm running into: without having the Mono Scripts working correctly I can't make new graphical Terrain tiles - not even simple reskins of the existing Terrains. All the Terrain tiles appear as flat grey squares in Unity and when I build them into Unity bundles they appear as flat grey tiles in the game. The Scout Unit reskin worked up to a point, but since Units generally seem to have four Mono Scripts the resulting modded Unit Prefab is not as fully functioning as the base game Unit (it's possible I can work around this). The reason why having working base game asset examples is important is that the vast majority of modded 3D graphical content in Civ and Civ-like games has come from modifying existing game assets - either simply 2D texture reskins or taking existing 3D models and adapting them or recombining them to make new assets.

While it's possible I could get a reverse engineered project working using a combination of decompilation and the managed DLLs to get the Unity environment fully compiling, but this is not guaranteed and it would be generally better and simpler if you guys could release the code and source material that was used to build the assets in the first place. Releasing the source ingredients for the asset building process is exactly what Firaxis did when they released the Civ VI SDK Assets via Steam Tools. I appreciate there may be all sort of reasons why this may not be possible.
 
Yeah, I heard that you'd asked that - we need to do a bit more thinking internally before we can even give a coherent answer.

I'm a bit surprised about the terrain there - those are simple prefabs - but understand the point about units. The Scout prefab for instance has few objects but does have these four scripts. The last one is just for testing in the editor so not needed strictly speaking, but the other three are necessary. Is the scripts you would need, or does having the actual prefabs add something? From what I've seen, looks like the prefabs you're extracting from the asset bundle are exactly the originals.

upload_2022-7-4_23-30-44.png
 
Yeah, I think our first step would involve figuring out what can or can't be released. For instance, I know because I asked in the past, but the WWise project stuff can't be released as that's proprietary to the company that did the audio for the game. I know that's audio, not graphics related, but that's just an example of things we need to work out first.
 
A good start point would be this use case: As a modder I would like to recolour an existing graphical Terrain tile in order to create a new Terrain type.

The ability to create new Terrain types will do a lot to pave the way for future total conversions.

The Terrain Tile prefabs depend on a few Mono Scripts such as TerrainHeightSplat.cs, TerrainTexturePVTSplat.cs and TerrainMinimapSplat.cs. Using the decompiled source I can see what the Material properties and Textures are used for each, but only after bringing a certain number of decompiled Mono Scripts into the project.

upload_2022-7-5_11-29-3.png


upload_2022-7-5_11-32-27.png


I duplicated TileArid_01 to make TileArid_04 with a recoloured orange albedo texture.

upload_2022-7-5_11-33-32.png


Obviously the Terrain tiles aren't rendering correctly in Unity here - I presume they are viewable in the original project?

I add my new Terrain prefab into a bundle and assemble it into a mod. In game, as in the Unity editor new Terrain tiles are grey and flat (I know that the asset is correctly hooked up because missing references appear as black terrain tiles rather than grey).

upload_2022-7-5_11-39-29.png


It is not too surprising that this doesn't work because the GUIDs for the decompiled scripts used in the Terrain tile assets will be different to the originals but it highlights the difficulty in pulling off what you might think should be a relatively simple change.
 
Yeah, I heard that you'd asked that - we need to do a bit more thinking internally before we can even give a coherent answer.

I'm a bit surprised about the terrain there - those are simple prefabs - but understand the point about units. The Scout prefab for instance has few objects but does have these four scripts. The last one is just for testing in the editor so not needed strictly speaking, but the other three are necessary. Is the scripts you would need, or does having the actual prefabs add something? From what I've seen, looks like the prefabs you're extracting from the asset bundle are exactly the originals.

I fully appreciate this is not as simple as "just release the stuff" and I hope I didn't come across as too pushy.

Terrain depends on scripting too (see above), but there are a lot of assets that do not such as Improvements, Wonders, City Sets which is good news.

Is the scripts you would need, or does having the actual prefabs add something? From what I've seen, looks like the prefabs you're extracting from the asset bundle are exactly the originals.
I think the issue is primarily around the Mono Scripts since all the other raw material in the Prefabs such as meshes, animation, materials and textures seem to be extracted correctly and without issue. If there was a drastically cut down graphics template Unity project that had sufficient Mono Scripts to allow functional Terrain and Unit assets to be built into bundles that would be an excellent start. Perhaps with one fully working example of each category of Prefab. (I'd like to be able to play with the Fog Of War too, but that is a more niche request than Terrain and Units).
 
Reskinning seems to work then. But can you cut out the head model and replace it with something else?

If you're asking can you modify the mesh of Units as well as the texture then the answer is yes, but if you want something equivalent to the Attachment system in Civ VI then Old World doesn't work in that way. Each Unit Prefab is a complete model with all body parts, armour and weapons. I guess you could do something where you had helmets that were rigged to the head bone (assuming the naming is consistent on different skeletons) and then you could reuse the same helmet for multiple different Unit Prefabs - that might work.
 
If you're asking can you modify the mesh of Units as well as the texture then the answer is yes, but if you want something equivalent to the Attachment system in Civ VI then Old World doesn't work in that way. Each Unit Prefab is a complete model with all body parts, armour and weapons. I guess you could do something where you had helmets that were rigged to the head bone (assuming the naming is consistent on different skeletons) and then you could reuse the same helmet for multiple different Unit Prefabs - that might work.
Yes, judging by what I see, it will work like in Civ 4 and 5...it's just making entirely new unit models, prefabs. That would be alright. The question to resolve is how to add the new prefabs as culture-related replacements of the existing units, so that a Carthaginian spearman would be different from the Babylonian in looks only. At this stage, from what I read, that's not possible. A workaround would be to add unique units for all nations that have the same base stats, but sounds like more work.
 
Yes, judging by what I see, it will work like in Civ 4 and 5...it's just making entirely new unit models, prefabs. That would be alright. The question to resolve is how to add the new prefabs as culture-related replacements of the existing units, so that a Carthaginian spearman would be different from the Babylonian in looks only. At this stage, from what I read, that's not possible. A workaround would be to add unique units for all nations that have the same base stats, but sounds like more work.

It may be possible to create a framework for cultural variation for units via a DLL mod.
 
If graphics modding gets under way, I'd be happy to add support for nation-specific unit graphics into the game.
 
Hells to the YES!
 
I can definitely jump into unit modding, but I need tools with an interface and a tutorial to start with it. Seems Deliverator's onto it. I will need to fiddle around and get the hang of it, but I have plenty of assets to recook from Civ modding.
 
Top Bottom