Art Assets in Civilization 6: A Modding Guide

Since Reliquary is asking about attachments, I'm also curious about how to create FX/how to move FX to the location that I want?

I've now uploaded the Modbuddy Project for Even Moar Units! Macedon and Persia as a reference.

Download it and look for <m_Name text="FX_Launch_Loc_01"/> in Ballista.ast. You can see that I am rotating that attachment point by 1.5708 radians (90 degrees) in the Z-axis. You can use the m_position x,y,z to alter the position of attachment points too. There is an example of repositioning in ModernInfantry.bhv in the MoreAustraliaCooker project in this download - see the MuzzleFlash attachment point.

Hope this helps!
 
Hello, quick question, how do you replace Civ 6 art with custom art? I thought from looking at MOAR units it was just a case of creating an artdef with the same name as the unit you want to replace like here with UNIT_LEOPARD2 in Units.arfdef with UNIT_MODERN_ARMOR. But the old unit does not disappear it is still lurking underneath. Thanks.
 
Hello, quick question, how do you replace Civ 6 art with custom art? I thought from looking at MOAR units it was just a case of creating an artdef with the same name as the unit you want to replace like here with UNIT_LEOPARD2 in Units.arfdef with UNIT_MODERN_ARMOR. But the old unit does not disappear it is still lurking underneath. Thanks.

In your Unit Members section make sure you have m_ReplaceMergedCollectionElements set to true and m_AppendMergedParameterCollections set to false. Otherwise your new entries will be appended to the previous Unit rather than replacing them. See below example.

Code:
<Element>
   <m_CollectionName text="Members"/>
   <m_ReplaceMergedCollectionElements>true</m_ReplaceMergedCollectionElements> <!-- NOTE -->
   <Element>
      <m_Fields>
         <m_Values>
            <Element class="AssetObjects::FloatValue">
               <m_fValue>1.000000</m_fValue>
               <m_ParamName text="Scale"/>
            </Element>
            <Element class="AssetObjects::IntValue">
               <m_nValue>4</m_nValue>
               <m_ParamName text="Count"/>
            </Element>
            <Element class="AssetObjects::ArtDefReferenceValue">
               <m_ElementName text="UnitMember_SepoyJan"/>
               <m_RootCollectionName text="UnitMemberTypes"/>
               <m_ArtDefPath text="Units.artdef"/>
               <m_CollectionIsLocked>false</m_CollectionIsLocked>
               <m_TemplateName text=""/>
               <m_ParamName text="Type"/>
            </Element>
         </m_Values>
      </m_Fields>
      <m_ChildCollections/>
      <m_Name text="Sepoyz"/>
      <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections> <!-- NOTE -->
   </Element>
</Element>
 
Cool thanks once again, I thought it would be something simple like that but I just didn't know what.
 
@Deliverator I found through .cn6 file type method some of my meshes don't carry over uv sets, while exactly same model, b2r files work just fine. Wonder if you are aware of this.
By the way, I just tried playing around with Unit models for my next new leader:
AE_MC.jpg

20170629231402_1.jpg
 
@Deliverator I found through .cn6 file type method some of my meshes don't carry over uv sets, while exactly same model, b2r files work just fine. Wonder if you are aware of this.

I'll need a more specific example of the issue if you want me to look into it - either upload, the .br2 and .cn6 or whatever. The main difference between .cn6 and .br2 is that .cn6 supports 3 UV layers wheres .br2 only supports one. There shouldn't be any issues apart from that. I've been using .cn6 and it has worked OK for me.
 
Hello, Deliverator, I have a question that CivNexus6 is work with leader? since I can't figure it out about making Leader without any error since I have made a test leader that will be using for future update of my civilization of Civilization VI but when using Assets Tool is nothing show but error and also the Modbuddy is refuse to build the mod as well but when I test with a custom unit is still appear, I don't know what I have miss some part about make a 3D Leader because I have using same step as Unit so this is my step...
- 1: Open a Vanilla Leader from Civ6 DevAssets with CivNexus6 and export in Cn6 file.
- 2: Open Blender and import an Leader model as Cn6 file.
- 3: Import Custom Leader in Smd file and edit the custom leader's bone into same location as Civ Leader's bone and then export into Obj file and reimport.
- 4: Do as Blender want such as weight a model, put a texture (although put a texture is not need for them) and export with Cn6 file.
- 5: Open CivNexus6 and Overwrite the Leader model with custom one.
- I have watch the custom leader with Viewer is just work fine without any problem.
- 6: Edit Material, Set XML for Ast file, Create a Geo file as class "Leader" and set Bone Bindings 1 UV and then save.
- 7: Create a Material by using Assets Tool and save it in their material name that using in model.
- I have using a single texture since this custom leader don't need AO or normal texture.
- 8: Using exist Leader Ast. file and copy a text from XML file and paste on what they want to paste, from <m_GeometrySet> and save.
- 9: Import a all exist file to the Modbuddy.

Note: Rest of step like make a ArtDef and XLP are just same as unit but just look on leader.

And then nothing work, although I have using same method to my custom unit which is still appear, I have a question that what I have missing some part since I hope that I will make a custom leader into the game as soon as you know, but I still can't find it why it don't appear, it just a error, I have a rumor that Sukritact also have make a custom leader as well and currently appear in the game as well, so I need to find out, and of course that SMD import/export are conflict with Nb2/Br2, but not with Cn6, and also that I'm not careless to miss any step anyway.
 
I'll need a more specific example of the issue if you want me to look into it - either upload, the .br2 and .cn6 or whatever. The main difference between .cn6 and .br2 is that .cn6 supports 3 UV layers wheres .br2 only supports one. There shouldn't be any issues apart from that. I've been using .cn6 and it has worked OK for me.
Sure here are the files, also attached blender file for you to check.
 

Attachments

  • MC.zip
    397.4 KB · Views: 301
I'll need a more specific example of the issue if you want me to look into it - either upload, the .br2 and .cn6 or whatever. The main difference between .cn6 and .br2 is that .cn6 supports 3 UV layers wheres .br2 only supports one. There shouldn't be any issues apart from that. I've been using .cn6 and it has worked OK for me.
Hey buddy, I think I found why that happens. So your b2r script loops through each TRIANGLE of the mesh, and writes UV information but your cn6 script loops through each VERTEX of the mesh. In some cases they work the same, but I had solid meshes and the UV set unfolded into several different pieces so that I can tweak them to align with the texture mapping I use. Then the triangle-base script still works because the tessellation count is still the same, but vertex-based script messed up the UV set because UV point count is actually more than mesh vertex count.
I hope this makes sense to you. And hope there will be a fix to the scripts (Or better unfolding UV technique you can share.)

Thanks!
 
Hey buddy, I think I found why that happens. So your b2r script loops through each TRIANGLE of the mesh, and writes UV information but your cn6 script loops through each VERTEX of the mesh. In some cases they work the same, but I had solid meshes and the UV set unfolded into several different pieces so that I can tweak them to align with the texture mapping I use. Then the triangle-base script still works because the tessellation count is still the same, but vertex-based script messed up the UV set because UV point count is actually more than mesh vertex count.
I hope this makes sense to you. And hope there will be a fix to the scripts (Or better unfolding UV technique you can share.)

You are right, the .br2 export and .cn6 are working differently at the moment. In the Granny .fgx files each vertex can only have one pair of UV coordinates per UV layer, but in Blender it is possible for a single vertex to have different UV coordinates for each face it is part of. This is what causes the complication. With the .br2 extract I had code to export each unique vertex/UV coordinate combination as a separate vertex. With the .cn6 export I am currently just exporting each Blender vertex as a single vertex in the .cn6 regardless of how many different UV coordinates it might have. I can put the .br2 logic into the .cn6 script - I think the reason I didn't is because .cn6 supports up to 3 UV layers and so I wasn't sure whether I should create a new vertex across each unique vertex/UV0/UV1/UV2 coordinate combination. Perhaps I need a toggle on the export script for exporting 1/2/3 UV layers so the logic can be different if you are only interested in a single layer. I'll have a think about it.

BlanecWH said:
I have a rumor that Sukritact also have make a custom leader as well and currently appear in the game as well, so I need to find out, and of course that SMD import/export are conflict with Nb2/Br2, but not with Cn6, and also that I'm not careless to miss any step anyway.

It's not a rumour! Sukritact has custom mesh and animations working for a Civ 6 3D Leader. :D


If you subscribe to his Ethiopia Civ you can check out some of the files e.g. Leader_suk_ZaraYakob.ast for the Asset. The mod download doesn't contain the Animations, Geometries, Materials but perhaps if you ask him he would be kind enough to share those. I haven't had a go at putting custom Leader animations and meshes in the game myself yet.

It does sound like you have got most of the way there. On point 7: You need to specify all Textures in the Material to have the model work properly: AO, Normal, Metalness and Gloss. You can default this to plain images: AO (all white 4x4 pixel square texture), Metalness and Gloss (all black 4x4 pixel square texture), Normal (all RGB 255,128,128 4x4 pixel square texture).

It sounds like you must have an error somewhere in your asset files if you can't open in the Asset Viewer or build out the mod in Modbuddy. If everything works in the FGX Viewer then you are most of the way there. It can take a bit of trial and error to find the problem in your asset files because the error messages in Modbuddy are not very helpful. Sorry I can't give much more specific advice. If you upload your Modbuddy project then I can try and take a look at it but it won't be until next week.
 
I guess not since I can make a unit without using a lot of texture as just using BaseColor only (although it will seen as not realistic), I find the cause now, it was AssetTool is refuse to view a leader model in Geometries folder although AssetTool is still allow to view a unit model although the model is directly on Geometries folder, I think that it not cause from I have delete original Geometries folder when I have open AssetTool at first time as I didn't make that folder and Modbuddy need to delete before make a same folder because it will not loading, I think this is werid now, but I can't upload that Modbuddy because it not allow to somebody to use or stolen, also that AssetTool didn't have any error message when your model is missing or error, I can't figure it out to fix that problem and I can't ask Sukritact how to put that because I'm not have time to do.
 
Hello again, Deliverator, I really find a truth about the bug with Leader as I have using 'Output', I find out that Leader will need ".wig" file with in ".geo" since your CivNexus6 didn't export geo file with WIG or support WIG which code is look like this "<Element><m_ID text="WIG"/><m_RelativePath text="YourLeaderWIG.wig"/></Element>" as you have put them After "<m_ID text="GR2"/>" so you really open a exist leader.geo and copy that code "<m_ID text="WIG"/>" into your .geo, also you gonna need your own .wig by copy exist leader.wig and rename to your custom leader wig since I don't sure that using exist .wig will working.

Thank Knew for try, so I really seek a real problem and I will make a custom leader model for good, but before I will leave, I have another question is model is buggy with werid texture while view with AssetTool, it since put from SMD file with smooth setting although in Blender is not have this problem.



Thank for looking a problem so you may need to support Wig export or Geo with WIG for a leader.
 
Thank Knew for try, so I really seek a real problem and I will make a custom leader model for good, but before I will leave, I have another question is model is buggy with werid texture while view with AssetTool, it since put from SMD file with smooth setting although in Blender is not have this problem.

Did you use .br2 or .cn6 to export the mesh? Because I've just fixed a problem with the .cn6 export in the latest script.

Hello again, Deliverator, I really find a truth about the bug with Leader as I have using 'Output', I find out that Leader will need ".wig" file with in ".geo" since your CivNexus6 didn't export geo file with WIG or support WIG which code is look like this "<Element><m_ID text="WIG"/><m_RelativePath text="YourLeaderWIG.wig"/></Element>" as you have put them After "<m_ID text="GR2"/>" so you really open a exist leader.geo and copy that code "<m_ID text="WIG"/>" into your .geo, also you gonna need your own .wig by copy exist leader.wig and rename to your custom leader wig since I don't sure that using exist .wig will working.

Thank for looking a problem so you may need to support Wig export or Geo with WIG for a leader.

Support for .wig files is not something I'm able to add as I understand almost nothing about them. There was some brief discussion about them earlier in the thread from here and here.

The .wig files are used for hair but you can just use regular meshes as with Sukritact's Zara Yaqob.
 
Umm... I use '.cn6' to export a model and of course is previous version just prior before have fix it, but the model is look fine after I have download your lastest script and export the model again and just look better than previous one.



Also .Wig file may is not important since you may can using regular meshes but it really need to attach as well since I see almost Geo file that have <Element text="Leader"/> will always need wig file or will error upon open to AssetTool.
 
Hey, man! Sorry for adding to the seemingly endless question pile lol. I've made a ton of progress on a test improvement tile mod I'm using as a springboard into more complex things. I'm pretty sure it's almost ready to go but there's something missing somewhere that I can't seem to wrap my head around and have been at it for days. Everything is in place: the xmls, the icons, the assets, geometries and animations and all that jazz. I think the problem is in the modart file unless I'm misunderstanding something about the artdefs.

If ya don't mind could you take a look? It's driving me nuts!
 

Attachments

  • BMB_Windtower_wip.zip
    1,012.8 KB · Views: 359
Hey, man! Sorry for adding to the seemingly endless question pile lol. I've made a ton of progress on a test improvement tile mod I'm using as a springboard into more complex things. I'm pretty sure it's almost ready to go but there's something missing somewhere that I can't seem to wrap my head around and have been at it for days. Everything is in place: the xmls, the icons, the assets, geometries and animations and all that jazz. I think the problem is in the modart file unless I'm misunderstanding something about the artdefs.

If ya don't mind could you take a look? It's driving me nuts!
I don't know if it really matters, but I usually don't put in ".blp" or such extensions in Mod.Art. And this <relativePackagePaths> is asking for the package you assign in XLP files, so you don't have to put the exact XLP file name because after you build project the XLP files will be parsed into several different BLP files per package. A wrong entry in Mod.Art may crash your game.
upload_2017-7-5_13-26-42.png

Hope this can help you.
 
Top Bottom