Custom Civilization - ModBuddy template

Custom Civilization - ModBuddy template 2.4

Hey mac, great work on the template! I do like being able to know more-or-less what certain stuff does.

That being said, is there a way to populate the databases via xml files rather than direct sql?

Yes, you can mod content into Civ VI using either the XML or the SQL languages/syntax.

My template is, of course, in SQL - but there is nothing preventing someone from using XML instead. The principles are the same - and, indeed, you can mix-and-match files of both types within a mod.
 
I believe the OlmecAtlas.xlp needs the forward slash added between the 'UI and Texture':
<m_ClassName text="UI/Texture"/>

Maybe this creates another issue, but it seems to fix the build.
Thanks for this. I've just started trying out this template and I ran into the same double error when doing a build of the unedited template.. Adding the forward slash between UI and Texture gave me a successful build.

And of course, also many thanks to the creator of the template. It's late where I live right now and I'm going to have to go to sleep in a bit, but looking forward to dive into this deeper this weekend.
 
maconnolly updated Custom Civilization - ModBuddy template with a new update entry:

Custom Civilization - ModBuddy template v.2

Long overdue, I suspect, I have now updated the ModBuddy custom civilization template.

The key changes include:

1. Correcting 1x code error that was preventing something from functioning in-game.
2. Correcting numerous errors within the example XLP files that were intended to showcase artwork outcomes.
3. A complete overhaul of the Build Actions to ensure they are efficient.
4. The addition of comprehensive explanations on how to put together the non-code elements of the template. Now, the...

Read the rest of this update entry...
 
maconnolly updated Custom Civilization - ModBuddy template with a new update entry:

Custom Civilization - ModBuddy template v.2.1

Long overdue, I suspect, I have now updated the ModBuddy custom civilization template.

The key changes include:

1. Correcting 1x code error that was preventing something from functioning in-game.
2. Correcting numerous errors within the example XLP files that were intended to showcase artwork outcomes.
3. A complete overhaul of the Build Actions to ensure they are efficient.
4. The addition of comprehensive explanations on how to put together the non-code elements of the template. Now, the...

Read the rest of this update entry...
 
Last edited:
maconnolly updated Custom Civilization - ModBuddy template with a new update entry:

Custom Civilization - ModBuddy template v.2.3

This revision contains two minor correction, to remove an obsolete reference from an icon file and to amend one part of the Textures help file.

The obsolete reference was causing a non-impacting error within the Asset Cooker log, though it may have been confusing the troubleshooting process for some. With this change, the error no longer appears.

Read the rest of this update entry...
 
Hey @maconnolly !
Thank you for this tremendous effort, it is an incredibly helpful template as the game has changed quite a lot during these years. For me it's a great starting point.

I have an issue with the assets though. Not sure if it's only me or it's an issue of the latest revision but no portraits or backgrounds load. Could you please assist?
 
Hey @maconnolly !
Thank you for this tremendous effort, it is an incredibly helpful template as the game has changed quite a lot during these years. For me it's a great starting point.

I have an issue with the assets though. Not sure if it's only me or it's an issue of the latest revision but no portraits or backgrounds load. Could you please assist?

Thanks! I am happy to try and assist. As a first step, can you confirm which version you're using (latest is 2.3)?

The best test to fundamentally confirm whether the template has an issue, or whether there's a user-introduced issue, is to build the template with no modifications and start a game with it enabled (but no other mods - although other mods shouldn't really cause a compatibility issue, it's just best-practice) and see how you get on.

In all of my pre-release testing, all artwork has functioned exactly as expected - but I am not ruling out that there is an error on my side. I will make a point of testing it again at my end, to be certain.
 
Thanks! I am happy to try and assist. As a first step, can you confirm which version you're using (latest is 2.3)?

The best test to fundamentally confirm whether the template has an issue, or whether there's a user-introduced issue, is to build the template with no modifications and start a game with it enabled (but no other mods - although other mods shouldn't really cause a compatibility issue, it's just best-practice) and see how you get on.

In all of my pre-release testing, all artwork has functioned exactly as expected - but I am not ruling out that there is an error on my side. I will make a point of testing it again at my end, to be certain.
Thank you for the fast reply :) Yes, I've downloaded it today so it was 2.3. I've looked through this thread and noticed some stuff like "UITextures" that should be "UI/Textures" but I'm not sure how it's supposed to be. I will try without other mods but I would say that none of those that I have should interfere (I have a couple other leaders and they seem to be fine)
 
Thank you for the fast reply :) Yes, I've downloaded it today so it was 2.3. I've looked through this thread and noticed some stuff like "UITextures" that should be "UI/Textures" but I'm not sure how it's supposed to be. I will try without other mods but I would say that none of those that I have should interfere (I have a couple other leaders and they seem to be fine)
You can safely disregard the previous commentary in this thread, to be honest. It all relates to the initial version. The newer versions corrected those issues.

I will perform a test as soon as my working day allows and circle back here to confirm the outcome.
 
Thank you for the fast reply :) Yes, I've downloaded it today so it was 2.3. I've looked through this thread and noticed some stuff like "UITextures" that should be "UI/Textures" but I'm not sure how it's supposed to be. I will try without other mods but I would say that none of those that I have should interfere (I have a couple other leaders and they seem to be fine)
I tested the template, standalone, earlier. Downloaded it, opened it, built it and started a new game. No other mods loaded. All artwork is working as expected.

It is likely you have introduced an error somewhere, or not configured things as required. Hard to say what without seeing your files. I would recommend you post in the Mod Creation Help forum, attaching your project (as a zip file). Then myself, or someone else, can try and assist.
 
Maconnolly, thank you for the template and instruction. Will definitely be a great guide for me to to improve my own mod.
 
Just coming back here to update my previous post in here, and wanting to say thank you again for the amazing template. This is what got me into Civilization VI modding, and with zero prior modding experience, I couldn't have done it without this template to start out with. I've since then made my own template that fits my own way of doing things, making it quick and easy to create a new custom Civilization or Leader when I want to. Looking through the files from other modded Leaders/Civilizations is very helpful too, to see different approaches to how people organise their files and code.
To anyone new starting out, definitely get this template. Read through the entire thing. Play around with it. Join the Discord servers and ask questions if you get stuck on anything. And don't give up.👍
 
Hi @maconnolly , thanks a ton for the template! I have been following it to make a custom civilization, as it's my first time trying to mod the game. I have had mostly success so far, however I have encountered a really frustrating error. The unique building I have added for my civilization does not show up in the game. I am not sure what is the issue, as the name and description show up in my civ's screen when creating a new game.

I've attached my mod files here if you want to take a look. It is still a work in progress, so a lot of the textures are still the default ones from the template, and I haven't renamed most of the images yet. Hopefully you can spot what I am doing wrong and let me know.
Thanks again!
 

Attachments

  • New_Civ_BoS.zip
    5 MB · Views: 13
Hi @maconnolly , thanks a ton for the template! I have been following it to make a custom civilization, as it's my first time trying to mod the game. I have had mostly success so far, however I have encountered a really frustrating error. The unique building I have added for my civilization does not show up in the game. I am not sure what is the issue, as the name and description show up in my civ's screen when creating a new game.

I've attached my mod files here if you want to take a look. It is still a work in progress, so a lot of the textures are still the default ones from the template, and I haven't renamed most of the images yet. Hopefully you can spot what I am doing wrong and let me know.
Thanks again!
I'm not in a position to quickly download your mod's contents wholesale and check for errors, unfortunately. However, based on your description, it sounds as though the file that you have coded your unique building in has errors.

If you take a look at the help files, there's a section about basic troubleshooting. These should direct you to the Database.log and Modding.log files. The Database.log file will output the syntax/code errors and I suspect you'll find at least one that will be coming from your building's SQL/XML file.

Now, that Database.log file won't actually tell you it is in that file. The Modding.log file will help make that connection. Database.log will tell you the nature of the error, however. The troubleshooting readme includes some common examples of errors and what they mean.

If you can share the output of that Database.log file here, by way of reply, I can advise further (and possibly at that point grab your mod files and take a deeper dive).
 
I'm not in a position to quickly download your mod's contents wholesale and check for errors, unfortunately. However, based on your description, it sounds as though the file that you have coded your unique building in has errors.

If you take a look at the help files, there's a section about basic troubleshooting. These should direct you to the Database.log and Modding.log files. The Database.log file will output the syntax/code errors and I suspect you'll find at least one that will be coming from your building's SQL/XML file.

Now, that Database.log file won't actually tell you it is in that file. The Modding.log file will help make that connection. Database.log will tell you the nature of the error, however. The troubleshooting readme includes some common examples of errors and what they mean.

If you can share the output of that Database.log file here, by way of reply, I can advise further (and possibly at that point grab your mod files and take a deeper dive).
Thanks for the reply! I took a look in my database.log and found out that my problem was that I did not remove the "icon" attribute from my code when changing from an improvement to a building. Removing that line fixed it so that my unique building now shows up in the game.

Now the picture for my unique building is blank, which led to the amazing bug that displays a different image for my unique building in the select civ screen depending on how far I am scrolled down. I saw that for other civs with unique buildings, rather than improvements, the image shows the icon for the district where there building would go. Is there a variable I need to put in to tell the game what to display for my building on the select civ screen? Also what do I need to do to assign the little image for my building in-game, i.e. where it shows up on the tech tree?
 
It sounds to me like you need to set up the icon for the building. Buildings have icons just like other gameplay items. With no icon defined, the game will show the last icon it loaded of that type - hence that but you describe.

To set up an icon, you need to have the textures in all the different sizes (there’s a readme for that), set up the icon definitions in the code and make sure they’re updated in an UpdateIcons action. You should be able to reference what is already in the template. It’s the same principle.

The sizes you need can be cross-referenced from the base-game files.
 
It sounds to me like you need to set up the icon for the building. Buildings have icons just like other gameplay items. With no icon defined, the game will show the last icon it loaded of that type - hence that but you describe.

To set up an icon, you need to have the textures in all the different sizes (there’s a readme for that), set up the icon definitions in the code and make sure they’re updated in an UpdateIcons action. You should be able to reference what is already in the template. It’s the same principle.

The sizes you need can be cross-referenced from the base-game files.
I have all of my textures in the appropriate sizes, but I'm not sure how to define an icon for a building. Looking in the game files, for Improvements.xml, there is an icon attribute in the improvements table; however in Buildings.xml, there is no icon attribute. Where do you define the icon for buildings?
 
I have all of my textures in the appropriate sizes, but I'm not sure how to define an icon for a building. Looking in the game files, for Improvements.xml, there is an icon attribute in the improvements table; however in Buildings.xml, there is no icon attribute. Where do you define the icon for buildings?
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.
 
Top Bottom