Custom Civilization - ModBuddy template

Custom Civilization - ModBuddy template 2.4

Apologies, my previous reply was a little hurried so I didn't really provide the detailed steps.

For buildings, specifically, the icon definitions are handled solely via the NewIcons.sql in the template. The equivalent file in the base-game is Icons_Buildings.xml, which can be found in \Base\Assets\UI\Icons\. The game uses standard naming conventions, which it looks for automatically, that are based on the string that defines the building itself. It's simple a case of prefixing ICON_ in front of the building name (e.g. BUILDING_MONUMENT).

If your building is defined as BUILDING_MYBUILDING, your entry in IconDefinitions (in the NewIcons.sql file) will be ICON_BUILDING_MYBUILDING.

The Icons_Buildings.xml will illustrate how this works most directly - you're just looking to translate an equivalent entry into your NewIcons.sql file (in the template) and things should align.
Okay, if that is the case then I think what I've already had should have worked. In NewIcons.sql I have
Code:
INSERT INTO IconTextureAtlases    
        (Name,                                    IconSize,    IconsPerRow,    IconsPerColumn,        Filename                    )
VALUES --some lines
        ('ICON_ATLAS_ETC_BUNKER',            38,            1,                1,                    'ColossalHead38.dds'        ),
--other sizes

INSERT INTO IconDefinitions
        (Name,                                        Atlas,                            'Index'                )
VALUES --other stuff
        ('ICON_BUILDING_ETC_BUNKER',                'ICON_ATLAS_ETC_BUNKER',        0                    );

Based on what you're saying, the game should recognize that ICONS_BUILDING_ETC_BUNKER goes with BUILDING_ETC_BUNKER? Is there not a line needed somewhere to connect the two? And if not, then I'm not sure why the game is not pulling the textures in because I think that I have done it how you described.
 
Apologies, my previous reply was a little hurried so I didn't really provide the detailed steps.

For buildings, specifically, the icon definitions are handled solely via the NewIcons.sql in the template. The equivalent file in the base-game is Icons_Buildings.xml, which can be found in \Base\Assets\UI\Icons\. The game uses standard naming conventions, which it looks for automatically, that are based on the string that defines the building itself. It's simple a case of prefixing ICON_ in front of the building name (e.g. BUILDING_MONUMENT).

If your building is defined as BUILDING_MYBUILDING, your entry in IconDefinitions (in the NewIcons.sql file) will be ICON_BUILDING_MYBUILDING.

The Icons_Buildings.xml will illustrate how this works most directly - you're just looking to translate an equivalent entry into your NewIcons.sql file (in the template) and things should align.
Sorry, ignore my last reply. I figured out what the problem was- the required texture sizes for improvement icons are different from those for buildings, and I forgot to change them. It is working excellently now! Thanks for your help :)
 
Hello! I'm new to modding this game and I am trying to make a civ using this template. Thank you very much for the clear template! It is so, so much better than Jasper Kitty!

I have run into two issues which I would like advise on:
  • When renaming every typename from MC_MasterTemplate to a project-specific name (and changing the references) I tend to get a lot more errors and games fail to load. Should I just be more careful about going through every file and changing the name, or is there a setting somewhere?
  • I am trying to add Theodora as a second leader. I have copied most of her things and that seems to work, gameplay-wise. However, the game gave me neutral Cleopatra instead of Theodora. After updating the .Art.xml and adding in the dependencies at the end (including Byzantium_Gaul and GreatBuilders) I somehow broke Po Ngbe, the civ icons etc. My best guess is because I added a leaders.artdef to try and give my copy the same art as the original Cleopatra, but I guess that messed something up?
After I have these things worked out I can start actually changing the infrastructure to a building (district: city center), so that will be exciting. (My civ is based on the idea that Rome never truly died, and that all 'successor' states like the HRE or the Russian Empire are all just aspects of Rome. It will be OP.)

EDIT: Also, if I remove the leaders.artdef file and add the copy leader to fallbackleaders.artdef, then I notice that the asset editor does not see any DLC civs and I have to add it by hand. Is that the source of my problem, and if so then how do I tell asset editor I'm using DLCs?
 
Last edited:
Hi MC, i just discovered your template, its awesome. However i am stuck at a quite basic thing, which i couldnt find an answer to. How can i actually turn this template into "my" mod, without renaming every single file at once? VB obviously has a mass replace with ctrl+h so i can replace civ/leader name and replace "_MC_" with my own tag. but im not so sure about filenames. Is there a way to do that? There are a lot of other spots besides just the project name that i have to rename and im a bit afraid i might miss some spots and break something?
 
Hi MC, i just discovered your template, its awesome. However i am stuck at a quite basic thing, which i couldnt find an answer to. How can i actually turn this template into "my" mod, without renaming every single file at once? VB obviously has a mass replace with ctrl+h so i can replace civ/leader name and replace "_MC_" with my own tag. but im not so sure about filenames. Is there a way to do that? There are a lot of other spots besides just the project name that i have to rename and im a bit afraid i might miss some spots and break something?
hey, i'm new to this too but i think i have your answer. CTRL+H will allow you to find all. next to that box there are two options, one is to replace all -- HOWEVER, if you want to replace every instance in the entire solution, you must hit the drop down under that to encompass the entire solution. (source: my own trial and error & countless brief internet searches when i had time.) currently on my 3rd attempt at the walkthrough. each time it gets a little easier and i get a little more complete. good luck!
 
I'm a couple sections through this tutorial and have - for now - just one question. In addition to adding my own semi-custom unique, which I'm just about done... I also want to mix & match a few existing unique units for my test civ. haven't settled on anything just yet, but a quick example of what i'd be looking to do would be to have the Mountie replace the generic horseman or the U-boat replace the generic submarine on my unit tree/table (unsure of the terminology.) -- I downloaded a bunch of unit mods off steam and replicated what they did, I just can't seem to lock it down.
 
Hi MC, i just discovered your template, its awesome. However i am stuck at a quite basic thing, which i couldnt find an answer to. How can i actually turn this template into "my" mod, without renaming every single file at once? VB obviously has a mass replace with ctrl+h so i can replace civ/leader name and replace "_MC_" with my own tag. but im not so sure about filenames. Is there a way to do that? There are a lot of other spots besides just the project name that i have to rename and im a bit afraid i might miss some spots and break something?
As a general rule, I don't recommend doing widespread find-and-replace across the whole project. I mean, you can do it, but I don't recommend it because it's one way a modder can take their eye off the ball and the devil is in the detail, a lot of the time. Until familiar with the construct, I'd suggest taking the medicine associated with doing it manually. Sure, it's more work, but it helps ensure you step through every code section.

There is no real requirement to rename files. The files that you are likely to want to rename, for convenience, are the various artwork files and, if you follow the template's guidance, you'll see that you will be creating your own artwork, deleting what is there and then importing your ones anyway. So the advice is 'name your source files however you want' and then follow the instructions to (a) delete the equivalent 'example files' and (b) import your source files accordingly.

hammurabi's_burner said:
I also want to mix & match a few existing unique units for my test civ.

If what you want to do is grant access to an existing, unique unit for your custom civilization, maintaining the way it is used by the original civilization, then the code associated with that is very simple. All you have to do is assign the trait for that unique unit to your leader/civilization, via either the LeaderTraits or CivilizationTraits table. The fact that the thing you are using is already in the game means your civilization will just 'pick it up' and use it, wholesale.

If you want to create a variation on the original unique unit (for example, have it replace a different unit in your custom civilization from the unit it replaces for the original civilization), then you effectively need to create a second copy of it, top-to-bottom, and amend the relevant variables. Which is, of course, far more involved (it is about as involved, from a gameplay code perspective, as creating a new one - though you can make time-savings by reusing art, to a degree). I would suggest the complexity, if you're just starting out, might be greater than just following the template to make your own, unique unit, though.
 
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



Read more about this resource...
I've looked at how to mod this game for a few days now and ModBuddy is confusing me. Im looking to create a simple mod that upon founding a new settlement a trigger is run creating a builder with a single build. Just like ancestral hall building does but not with full build charges. Also I would like all new holy site districts to spawn a missionary with a single charge. Can anyone walk me through this? I would like to understand how.
 
I've looked at how to mod this game for a few days now and ModBuddy is confusing me. Im looking to create a simple mod that upon founding a new settlement a trigger is run creating a builder with a single build. Just like ancestral hall building does but not with full build charges. Also I would like all new holy site districts to spawn a missionary with a single charge. Can anyone walk me through this? I would like to understand how.
This is a bit of a delayed reply - as I don't frequent the forums very regularly anymore; so apologies for that.

@Ekmek is right on the suggested approach - effectively, you need to create a new Unit that has the capabilities you want. In general, each Unit has its capabilities set, in the database, and whenever that unit is created, an instance of it is created with the same capabilities (so, in the case of Builders, they have three charges by default). There are, of course, some scenarios that vary the build charges, through the use of modifiers - the most obvious one is the Qin Shi Huang Unique Ability, which boosts the default build charges up to four for each Chinese builder (when he is their leader). There are also a couple of Policy Cards (Serfdom and Public Works) that grant extra build charges to any Builders trained whilst they are active. All this intends to do is illustrate there are modifiers, in the game, that allow you to alter the build charges variable - however, I'm fairly confident they are built around the principle of applying to any Builders that a particular player creates.

As such, the easiest approach is to create a new Unit and, effectively, prevent it from being trained entirely. The unit will be identical to the Builder in all aspects, except for the amount of Build Charges (same principle for the Missionary). This prevents the player from choosing it from the build queue. You then grant that unit whenever the conditions are met that you wish (in your case, it is whenever the player founds a city for the free builder, or whenever they build a Holy Site for the free Missionary).

In reality, the 'trickiest' part of this mod is probably crafting the requirements. From a very brief check, I think the best/easiest RequirementType to use would be the REQUIREMENT_CITY_HAS_DISTRICT one. For the Builder, you can specify DISTRICT_CITY_CENTER as the DistrictType (every new city gets a City Center) and then use the EFFECT_GRANT_UNIT_IN_CITY EffectType as part of your modifier. You'd attach that modifier to all of the player's cities (or all players' cities, if you want to give this to all players). You'd do pretty much the same thing for the religious unit, but use DISTRICT_HOLY_SITE instead.
 
Thank you so much for this wonderful resource! I was trying to follow along when I realised on attempting to build it and test a few things I get the error 'cannot find the asset cooker. This is required since the mod includes art assets'

I tried downloading a fresh, unchanged version of the template and building it and the same error occurs.

I wonder if a recent patch could have broken the template? Or am I just missing something really obvious!

Thanks again so much, this is heads and shoulders above any other resource I've found out there!
 
Thank you so much for this wonderful resource! I was trying to follow along when I realised on attempting to build it and test a few things I get the error 'cannot find the asset cooker. This is required since the mod includes art assets'

I tried downloading a fresh, unchanged version of the template and building it and the same error occurs.

I wonder if a recent patch could have broken the template? Or am I just missing something really obvious!

Thanks again so much, this is heads and shoulders above any other resource I've found out there!
I can confirm the template works, including with any/all the most recent updates to the Civ VI Modding SDK (i.e. ModBuddy & the other tools).

The error you're receiving suggests you've got a localised issue with one part of the Modding SDK - the Asset Cooker. I've never come across an issue with it, myself (nor heard about one from anyone else); but I'd recommend checking to see if you can see Civ6AssetCooker_FinalRelease.exe in the following folder: \Sid Meier's Civilization VI SDK\AssetModTools\Cooker\. That's where it is for me.

Whether it is there, or not, I'd potentially be trying to do a reinstall/validate the install (via Steam). Just in case something went awry during your installation of the Modding SDK.

Alternatively, perhaps you have an odd permissions issue which is preventing it from being accessible when you try and run a build process. But that is more of a speculative guess and is a more generic application troubleshooting suggestion than anything Civ-specific.
 
I can confirm the template works, including with any/all the most recent updates to the Civ VI Modding SDK (i.e. ModBuddy & the other tools).

The error you're receiving suggests you've got a localised issue with one part of the Modding SDK - the Asset Cooker. I've never come across an issue with it, myself (nor heard about one from anyone else); but I'd recommend checking to see if you can see Civ6AssetCooker_FinalRelease.exe in the following folder: \Sid Meier's Civilization VI SDK\AssetModTools\Cooker\. That's where it is for me.

Whether it is there, or not, I'd potentially be trying to do a reinstall/validate the install (via Steam). Just in case something went awry during your installation of the Modding SDK.

Alternatively, perhaps you have an odd permissions issue which is preventing it from being accessible when you try and run a build process. But that is more of a speculative guess and is a more generic application troubleshooting suggestion than anything Civ-specific.
Thank you so much for your reply, turns out i am a fool- it prompted me to check the directories in the options and it was pointing to the wrong location for the SDK path and now it is working.

Thank you again!!!
 
I had the same issue and googled to get the right directories from there.

I got my civ working but I do recommend an update or two, specifically in localization.

I recommend changing things like:

LOC_NAMED_MOUNTAIN_CORDILLERA_NEOVOLCANICA to LOC_NAMED_MOUNTAIN_MC_OLMEC_1

That way its faster/easier to do a replace when changing place names. I edited it my version. see attached
 

Attachments

  • Civilization_Localisation.zip
    10.8 KB · Views: 5
Whilst what @Ekmek is saying is accurate/valid, the author of the template is fundamentally against that approach for new modders. Setting it up for copy-and-paste invites laziness/complacency/taking shortcuts in understanding. I am set in my conviction that the first time someone goes through it, they shouldn’t be copy-pasting any values. Not even one. While @Ekmek may find it faster, now being familiar with it, I would guard against complacency. It’s a slippery slope to widespread copy-pasting, breaking things and having more of a job to undo whatever was broken. I speak from experience of supporting many people who have done exactly that.

Of course, everyone is free to do as they wish and modify it to their own liking; that is what it is there for.

From a validation perspective, using meaningful names is a better approach than numerical ones. It’s also consistent with the base-game approach. Admittedly, in the template, I jump between the two approaches a bit - I think I use numbered strings for cities and citizens. The next version - if I get around to releasing it - will do away with those and use meaningful names for each string in every case.

Anyway, do as you please, people.
 
Hey, I just downloaded this to give it a try. New to modding but kind of an experienced programmer if that helps.

As I understood it, this is ready to be built right off the bat. I followed the instructions on the first .txt and built the project clicking Build --> Build Solution. Everything seems to go allright and the mod appears on my mod list when I open the game, however, I can't seem to find the custom civ on the list. As I don't see any error or warning log anywhere I don't know where to look at.

I looked on Google and there seem to be some people with the same problem, but this shouldn't be the case with this mod I believe. As I said, the project seems to build correctly and the paths are set like they should too. Any advice on this?

Thanks.
 
Hey, I just downloaded this to give it a try. New to modding but kind of an experienced programmer if that helps.

As I understood it, this is ready to be built right off the bat. I followed the instructions on the first .txt and built the project clicking Build --> Build Solution. Everything seems to go allright and the mod appears on my mod list when I open the game, however, I can't seem to find the custom civ on the list. As I don't see any error or warning log anywhere I don't know where to look at.

I looked on Google and there seem to be some people with the same problem, but this shouldn't be the case with this mod I believe. As I said, the project seems to build correctly and the paths are set like they should too. Any advice on this?

Thanks.
By default, the built mod in the template will create a custom civilization and leader that is enabled for the Gathering Storm ruleset only. The most common thing I see is that people are looking for it with one of the other rulesets enabled.
 
Hello, long time player but not created my own Mod since Civ 2... I'm no programmer and find it all super hard so forgive the basic questions.
I just want to copy an existing Civ and do some renaming, add traits from another civ and maybe some custom leader artwork.
Where can I find the master files of the Civs to copy?
 
Top Bottom