Custom Civilization - ModBuddy template

Custom Civilization - ModBuddy template 2.4

maconnolly

Warlord
Joined
Jun 3, 2019
Messages
209
maconnolly submitted a new resource:

Custom Civilization - ModBuddy template - Complete ModBuddy project to help you configure a custom civilization for use Vanilla/R&F/GS

This is intended as an all-in-one ModBuddy project template for those who are interested in creating their own custom civilization for Civilization VI. The civilization in this template has its own unique leader, unique unit (replacing a base-game unit), unique infrastructure (improvement) and unique abilities (civilization and leader). Essentially - all of the core components you'd expect a civilization to consist of.

I am sharing this as someone who has gone through the learning process...

Read more about this resource...
 
The SQL part is well explained and i followed nice, but what about the ArtDefs, XLP's, .tex files, compiling? I can't find a single tutorial that explain these things, i just want to make alternate leaders. I could edit the .dds files but that was it...

And it raises another question, why the hell is so complicated to just make a custom leader for this game??!! so many strange files and complex methods
 
Last edited:
I am going to work on updating the template so it does include instructions regarding 2D artwork - I just need to find time to do it. That is essentially my next 'step' for this template. As per the current description, there is a disclaimer that this does not include advice about compiling artwork - it includes the various files to illustrate how it all looks when put together. There are lots of guides available in different corners of the forum that, together, advise everything someone would need. But, they are not all in one place and it is difficult to wrap your head around as a beginner. Therefore, I'm undertaking a bit of work to draw it into one place.

I hope the updated template will materialise during the course of this week.

Bkd_civ said:
why the hell is so complicated to just make a custom leader for this game?

In its simplest form, it is not necessarily that complicated - although these things are all relative, right? Compared with games that have in-game customisation that give you a nice UI and easy ability to import images, yes - it's very complicated. To mod Civilization VI, we essentially need to become capable with back-end/raw file editing. It's a barrier to entry, sure, but it's just the way it is. That being said, when you consider what the most complicated implementation could be - an animated, 3D leader - then suddenly it is, actually, quite a complex thing. So the system needs to allow for that level of complexity, because that's what it can do. Applying something simple in place of something complex often means instructing the parts of the system that are complex to do nothing, so that the simple version takes its place. That, in itself, can make it complicated.

It's not helped by there being proprietary file types, like XLPs and BLPs that are not commonly understood/used. Again, it's just another barrier to entry but there's no way for any of us to answer the question about why Firaxis used these without an element of guesswork/speculation. I tend to think they wanted to protect their artwork, but it may just be a combination of different things having to interact that led to their decision.
 
Thank you so much for your effort Maconnolly! It's really appreciated!
I tried more steps further like editing the .tex files on the modbuddy (that i copied from your template) but it gives several XML errors...
Another question is it obligatory to download the Asset Tools (36gb) to finish a custom leader project?
 
It's become really clear to me that Firaxis HATES the mod community. They broke Ynamp giant maps compatibility, introduced strange bugs when certain mods enabled, made it really hard for creating custom assets like new leaders...
They had so much time to make a nice UI for us to create our civs and leaders, but they deliver zombies and vampires to a game mode nobody asked for
 
I tried more steps further like editing the .tex files on the modbuddy (that i copied from your template) but it gives several XML errors...

TEX files and DDS files are tied together at the point they are created through Asset Editor - that is the simplest way I can explain it. Essentially, the only way I know to create/modify a TEX file is to go into Asset Editor and to perform the creation there. The workflow for a new file is:

1. Open your mod through ModBuddy. Launch Asset Editor through ModBuddy.
2. Click New. Choose Texture.
3. Specify the type (UserInterface, from the dropdown) and point to the source file (which should be somewhere else that is not part of the ModBuddy project folder structure). Ensuring the source file (DDS) name is unique to anything that is currently in the Textures folder of your ModBuddy project is a good idea.
4. Save the TEX in Asset Editor. It'll name it the same filename as the Source DDS file. At this point, it'll save the TEX file into the Textures folder and bring in the DDS file, too.
5. Back in ModBuddy, right-click your Textures folder and choose Add Existing Item. Browse to the DDS/TEX pair that are now in the Textures folder. They'll then appear in ModBuddy.

Bkd_civ said:
Another question is it obligatory to download the Asset Tools (36gb) to finish a custom leader project?

In a word - no. The SDK Assets are all of the 3D artwork (amongst other things) from the base game. Assuming you can create your artwork without using the Civ VI art as a base then you don't need the SDK Assets. For the purposes of an example, you can just use any old image, ensuring it is saved as DDS with the right compression. From that starting point, all you need is ModBuddy (and Asset Editor) and the right knowledge of how to create the necessary TEX, ArtDef, XLP, etc and how to tie it all together with the right references in the SQL/XML code that you'll build out at the end.

The SDK Assets are illuminating to get an understanding of how the base-game models are put together - and I expect are particularly handy for modding custom 3D models, like units, buildings and so on. But leaders are only visually represented through icons and a diplomacy screen. They're straightforward by comparison - at least for static (image) leader screens. I wouldn't even know where to begin for an animated leader, personally.
 
I'm trying to customize the unique abilities and traits for my custom leader. I can find the list of agendas in:

C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data

but I can't find where I can find a list of abilities (for both civ and leader). Is there anything I can use as a reference for such things.?
 
Also, when I build the solution (without changing the template), I get two errors:

EXEC(0,0): error asset: (UIErrorTexture)
EXEC(0,0): error asset: (UIErrorTexture)

what is going on here?
 
I just wanted to check-in - as I'm not normally one to commit to something and then leave it (and some of you) high-and-dry.

I just wanted to acknowledge the reports that have happened in here since I was last active - regarding the two UIErrorTexture results: I have seen these and need to spend some time to isolate and resolve. These 'appeared' following a recent update to the SDK, I just have not had a proper chance to troubleshoot and eliminate.

Regarding the need for the SDK Assets - again, I suspect I have created a reliance on these by referencing them in one of the ArtDef files. I will, again, try and strip this out and upload a corrected version so that use of the template is not reliant on the 36Gb of Assets; I appreciate these can be a bit of an onerous barrier-to-entry.

Mahmood said:
but I can't find where I can find a list of abilities (for both civ and leader). Is there anything I can use as a reference for such things.?

I will be back online this evening to try and answer this for you - don't have access to my Civilization VI installation right now.
 
This ModBuddy template has been fantastic and super helpful! It's amazing! One question... will you be making a guide on how to do your own custom icons and artwork? I know you said its available, but all the guides confuse me and this one has been super clear and I think you could explain it very well. Thanks!
 
Also, how exactly do I configure it so that I do not need Rise & Fall for the mod to run? (I don't have it)
 
Tutupos said:
One question... will you be making a guide on how to do your own custom icons and artwork?

Yes - this remains in the pipeline. I will absolutely get something done that walks through some artwork creation steps, including the workflow to get them into a mod; though it'll take me some time so I can't promise a date.

Tutupos said:
Also, how exactly do I configure it so that I do not need Rise & Fall for the mod to run?

OK, so I've quickly put the below together:

Of course, in the template, I have - as best I can - populated the notes in the template to indicate the parts that are expansion-specific - the reason the template, in its raw form, is R&F- and GS-compatible is because the example civilization leverages the Golden Age mechanic (R&F) for the Unique Unit ability, but also because it populates the various 'named places' (flavour text) for deserts, rivers, mountains and volcanoes.

To be cohesive with these requirements, I have included - but commented-out - the Players and PlayerItems entries for the vanilla game. It's in the Leader_Config.sql file and we'll start with that file.

Right at the top of the file (well, line 7), there's a comment section titled: "Players (Base Game / Vanilla)". Beneath that, there's a whole host of commented-out SQL, which starts with "INSERT INTO Players". For me, it's lines 16-33. You'll want to remove the two leading hyphens on each of lines 16-33.

If you have no interest in your mod appearing in either R&F or GS, you can delete lines 35-89. These are equivalent Players tables. Please note, you can leave these in if you wish. This will simply serve the purpose that anyone who runs your mod with either expansion applied will still be able to select your custom civilization.

The second part of the Leader_Config.sql has three equivalent PlayerItems tables. If you look for line 91 onwards, you should see "--INSERT INTO PlayerItems" on line 99. Remove the leading two hyphens from lines 99-102. Again, if you wish, you can delete lines 103 onwards - or leave them in.

Next, head on over to the Civilization_Config.sql file.

If you comment-out all of the references to the 'named places' flavour text, then that gets you halfway there. Or, you can delete the references entirely. Lines 55-202 contain all of the 'named places' code in this file.

We'll go and take out the in-game text strings for the equivalent 'named places' from the Civilization_Localisation.sql. Simply delete lines 60-128.

The next step is to remove the R&F-dependency, which is introduced by the Unique Unit (the Werejaguar). The file in question is the Civilization_UU.sql. The simplest option would be to remove the unit's ability (which grants a Combat Boost during a Golden Age) entirely. To do this, you'll need to unlink the Trait from the unit, remove the Trait, remove the UnitAbilities entries and strip out the modifier-related code that actually references the Golden Age mechanic. It's a few entries, but if you start from the top of the file and take out anything that relates to the unit's ability, you should end up with less code and no R&F-dependency.

Finally, in the Mod Properties, there is a Dependency configured for R&F - you'll want to delete that.

From memory, that should be everything needed to make it Vanilla-compatible.
 
First, thanks to maconnolly for taking the time and effort to put this template together. I'll echo the appreciation of the built-in comments to your code that help explain everything-awesome job.

Add me to the list that it anxious to see an update that includes custom (2d) art and explains XLPs, compiling options, etc. I did some modding in Civ4 and then used ModBuddy to make a couple of Civ6 vanilla mods (using Josh Atkins' template/instructions) early on, but I'm revisiting after a big break and wanted to follow an updated template that used sql like yours. I've been trying to piece together elements from Josh's, raen's, and yours, but I'm basically stuck at this point with no build errors but not seeing my mod in the game (regardless of standard or R&F rules). I did piece together a more xml-dependent mod that shows up (but crashes the game after the leader load screen is displayed), but I'd rather stick with the sql template here.

A few questions when someone has time:
1. When I "rebuilt" my custom images using the Asset Editor to produce the tex files, I noticed the resulting tex files referenced the original image's height/width (though the actual image sizes were correct); I assumed this was an issue and went through the process again using the 'ResizeToTarget' option to correct. Was this necessary, or will this actually create problems...or were there other options I should have selected before saving?

2. I followed the instructions in this thread to remove the unique unit abilities, as I want to use my mod with both standard and R&F rules. I also attempted to add a custom building to replace the new civ's monument with a newly-named monument with modifiers, but I'm not sure I did that quite right. I think when using xml, this requires adding a Buildings.xml and then a Buildings.artdef file that includes the element code with the updated building name reference at the end, but I assume using a Civilization_UB.sql file can accomplish the same thing. If so, would the template closely resemble the Civilization_UU.sql file? (If someone wants to share an example, great.)

3. Is there a good breakdown somewhere of frontend and in-game mod property options? I feel like I'm just guessing at these. And am I missing something about how to select multiples file for the import option? (I did that manually for the frontend side and then did a copy/paste for the in-game portion to save myself some time.)

One suggestion: maybe list out each exact find/replace-all text string with definitions. I don't know about other modders, but I find myself second-guessing these at times, so if there was a list somewhere, that would be ideal...something like:
MC_OLMEC: my unique civ
MC_PO_NGBE: my unique leader
UNIT_WEREJAGUAR: my unique unit
OLMEC_COLOSSAL_HEAD: my unique improvement
LET_THE_GODS_FEED_US: my unique civilization ability
LEADER_FEAR_NOT_EXPLORATION: my unique leader ability

Maybe I got all of those-maybe not. If I know up front that these are included and what they do, then I know if I want to do a find/replace-all or maybe find and comment out some of these and the related code, etc. I'm not sure why civs and leaders have the author's initials but units, abilities, etc. do not, and I would also think the texture files (dds/tex) would follow the same naming conventions, but maybe there are good reasons for this. I've been out of the modding game a good while, so I'm speaking out of ignorance.

Thanks again to maconnolly.
 
Top Bottom