Quick Modding Questions Thread

Make sure you aren't making the common mistake of assuming file names have any real meaning other than to make it easier to find stuff. There is a file called Projects_Expansion2.xml in the DLC folder for Gathering Storm, but that's just a filename, not a database table name.

To find the definitions of all the Vanilla database tables look first in file
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data\Schema/01_GameplaySchema.sql
The other files in the same folder also have some table-definitions for oddball stuff. Remember that these are the definitions of the names of the tables and the various columns each table uses, but in the quoted folder there is no data. Data for these tables is added from the contents of the files found (for Vanilla) in folder
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data

Expansion1 (Rise and Fall) has its data in folder
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Expansion1\Data
and the definitions of new tables added by Rise and Fall is in this same folder in file Expansion1_Schema.sql

Expansion2 (Gathering Storm) has its data in folder
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Expansion2\Data
and the definitions of new tables added by Rise and Fall is in this same folder in file Expansion2_Schema.sql
 
I've created a map on world builder and would like to assign a fixed city name to each tile. How can I do that?
Not sure I understand what you are trying to do. Tiles aren't inherently assigned city names so far as which city owns the tile. The game adds this in tooltips and the like when in-game depending upon which city is working a tile and which city the game engine determines "owns" the plot.
 
I'm trying to assign city names as certain YnAMP maps do. Real city names, if you will. I've created a map of Brazil and would like the cities each to have their real names depending on which tile they were founded.

Thanks for the reply!
 
Hi Trying to replace building maintenance with production. How would I write an SQL code to give every buildingtype in building_YieldChanges a - production value = to its maintenance in Buildings?

UPDATE Buildings_YieldChanges
SET YieldType = Production, YieldChange = Maintenace?
WHERE BuildingType = BuildingT
 
I'm trying to assign city names as certain YnAMP maps do. Real city names, if you will. I've created a map of Brazil and would like the cities each to have their real names depending on which tile they were founded.

Thanks for the reply!
YnAMP real city naming is actually very easy to do once you get used to it. You'll need the YnAMP mod (which I already assume you have) as well as a YnAMP format map. If your map is WorldBuilder format, it's easy to convert with Yet (not) Another Bit Map Converter. There will be an option, defaulted on for "Map Supports Real City Naming". Leave that on, and once it converts your map, you only need to edit Map\Maps.xml and Map\MapText.xml in your mod folder to get the custom city names to appear.

YnABMC actually already provides some instructions in comments in the generated xml files, but rock_and_ride has also made a post with more Real City Naming documentation.
 
Hi is there any modifier that works similar to Building_BuildChargeProductions and District_BuildChargeProductions, i.e let a unit rushes stuff but only when the modifier is attached?
 
Also can you please tell me how to add icons for a city project? I tried copying Removable Districts but the game would crash if I choose the project:

I made icon file (.dds) using Paint .NET with various sizes: 30, 32, 38, 50, 70, 80, 256. And this is the definition:


Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
    <IconTextureAtlases>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="30"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-30.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="32"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-32.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="38"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-38.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="50"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-50.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="70"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-70.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="80"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-80.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="256"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-256.dds"/>
    </IconTextureAtlases>
        
    <IconDefinitions>
        <Row Name="ICON_PROJECT_BUILD_INFRASTRUCTURE" Atlas="ICON_ATLAS_BUILD_INFRASTRUCTURE" Index="1"/>
    </IconDefinitions>
</GameInfo>

I used ImportFiles for the icons files, then UpdateIcon for the above XML file.

Any specific thing I have to do to ensure the dds file work?
 
Also can you please tell me how to add icons for a city project? I tried copying Removable Districts but the game would crash if I choose the project:

I made icon file (.dds) using Paint .NET with various sizes: 30, 32, 38, 50, 70, 80, 256. And this is the definition:


Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
    <IconTextureAtlases>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="30"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-30.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="32"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-32.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="38"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-38.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="50"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-50.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="70"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-70.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="80"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-80.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="256"  IconsPerRow="1" IconsPerColumn="1" Filename="icons/icon-256.dds"/>
    </IconTextureAtlases>
       
    <IconDefinitions>
        <Row Name="ICON_PROJECT_BUILD_INFRASTRUCTURE" Atlas="ICON_ATLAS_BUILD_INFRASTRUCTURE" Index="1"/>
    </IconDefinitions>
</GameInfo>

I used ImportFiles for the icons files, then UpdateIcon for the above XML file.

Any specific thing I have to do to ensure the dds file work?

I'm fairly certain that the Filename should not contain any folders as part of the relative name. It should just be the actual filename (e.g. icon-30.dds) versus what you have (e.g. icons/icon-30.dds). Those files should be within a folder called Textures within the root of your built mod.
 
@maconnolly Thanks for the response. Unfortunately, it still crashed :( I tried to: remove the dash in the filename (so it is the same as Removable District), changed the folder to Textures (and update the Imports + Files accordingly), set the Icons LoadOrder to 9999 (same as the aforementioned mod).

Code:
<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
    <IconTextureAtlases>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="30"  IconsPerRow="1" IconsPerColumn="1" Filename="icon30.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="32"  IconsPerRow="1" IconsPerColumn="1" Filename="icon32.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="38"  IconsPerRow="1" IconsPerColumn="1" Filename="icon38.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="50"  IconsPerRow="1" IconsPerColumn="1" Filename="icon50.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="70"  IconsPerRow="1" IconsPerColumn="1" Filename="icon70.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="80"  IconsPerRow="1" IconsPerColumn="1" Filename="icon80.dds"/>
        <Row Name="ICON_ATLAS_BUILD_INFRASTRUCTURE" IconSize="256"  IconsPerRow="1" IconsPerColumn="1" Filename="icon256.dds"/>
    </IconTextureAtlases>
       
    <IconDefinitions>
        <Row Name="ICON_PROJECT_BUILD_INFRASTRUCTURE" Atlas="ICON_ATLAS_BUILD_INFRASTRUCTURE" Index="1"/>
    </IconDefinitions>
</GameInfo>

In-game, the icon and civilopedia looks like this:



If I click the project to build, it crashes the game.

Modinfo file of that part:

Code:
  <InGameActions>
    <UpdateDatabase id="BuildInfrastructureProject_Database">
      <Properties>
            <LoadOrder>125</LoadOrder>
        </Properties>
        <File>BuildInfrastructureProject.sql</File>
    </UpdateDatabase>
    <UpdateText id="BuildInfrastructureProject_Text">
      <Properties>
        <LoadOrder>125</LoadOrder>
      </Properties>
      <File>BuildInfrastructureProject_Text.sql</File>
    </UpdateText>
    <ImportFiles id="BuildInfrastructureProject_Import">
      <Properties>
        <LoadOrder>1</LoadOrder>
      </Properties>
      <Items>
        <File>Textures/icon30.dds</File>
        <File>Textures/icon32.dds</File>
        <File>Textures/icon38.dds</File>
        <File>Textures/icon50.dds</File>
        <File>Textures/icon70.dds</File>
        <File>Textures/icon80.dds</File>
        <File>Textures/icon256.dds</File>
      </Items>
    </ImportFiles>
    <Icons id="BuildInfrastructureProject_Icons">
      <Properties>
        <LoadOrder>9999</LoadOrder>
      </Properties>
      <File>BuildInfrastructureProject_Icon.xml</File>
    </Icons>
  </InGameActions>
  <Files>
    <File>BuildInfrastructureProject.sql</File>
    <File>BuildInfrastructureProject_Text.sql</File>
    <File>Textures/icon30.dds</File>
    <File>Textures/icon32.dds</File>
    <File>Textures/icon38.dds</File>
    <File>Textures/icon50.dds</File>
    <File>Textures/icon70.dds</File>
    <File>Textures/icon80.dds</File>
    <File>Textures/icon256.dds</File>
    <File>BuildInfrastructureProject_Icon.xml</File>
  </Files>
 
This is incorrect modinfo syntax when using InGameActions
Code:
     <ImportFiles id="BuildInfrastructureProject_Import">
      <Properties>
        <LoadOrder>1</LoadOrder>
      </Properties>
      <Items>
        <File>Textures/icon30.dds</File>
        <File>Textures/icon32.dds</File>
        <File>Textures/icon38.dds</File>
        <File>Textures/icon50.dds</File>
        <File>Textures/icon70.dds</File>
        <File>Textures/icon80.dds</File>
        <File>Textures/icon256.dds</File>
      </Items>
    </ImportFiles>
This is the correct syntax
Code:
    <ImportFiles id="BuildInfrastructureProject_Import">
      <Properties>
        <LoadOrder>1</LoadOrder>
      </Properties>
        <File>Textures/icon30.dds</File>
        <File>Textures/icon32.dds</File>
        <File>Textures/icon38.dds</File>
        <File>Textures/icon50.dds</File>
        <File>Textures/icon70.dds</File>
        <File>Textures/icon80.dds</File>
        <File>Textures/icon256.dds</File>
    </ImportFiles>
<Items> is only valid for the older method of using <Settings> and <Components> instead of the newer system of <FrontEndActions> and <InGameActions>
 
Still have the same issues with <Items> removed. I have zipped all the files, please check if I made any mistake, thanks a lot!

P.s: is the .dds file need to be anything special? I just create it using Paint .NET with default settings. I checked and all the sizes match.
 

Attachments

  • 2217693401.zip
    17.2 KB · Views: 35
Modinfo Syntax error -- you need
Code:
		<UpdateIcons id="BuildInfrastructureProject_Icons">
			<Properties>
				<LoadOrder>9999</LoadOrder>
			</Properties>
			<File>BuildInfrastructureProject_Icon.xml</File>
		</UpdateIcons>
XML code error, which I did not notice earlier. You need
Code:
	<IconDefinitions>
		<Row Name="ICON_PROJECT_BUILD_INFRASTRUCTURE" Atlas="ICON_ATLAS_BUILD_INFRASTRUCTURE" Index="0"/>
	</IconDefinitions>
Your art files have only one image each, which means that your "Index" number for which image within the file is to be used must be integer 0.

Image file Index numbers always start with image number 0. So a file with 8 total images only has index numbers 0,1,2,3,4,5,6,7

Image Index #0 is always the uppermost leftmost image in the file of images. Image index numbering moves from this position rightwards until the end of a row, and then continues on the next row (if any) again at the leftmost position.

I recreated your images using GIMP as extra insurance but I don't think that step was actually necessary -- fix the two issues with the code and modinfo file and see if this does not solve the problem. If you get question marks instead of the expected image then your settings in Paint.net when converting to dds format are not right. I don't know anything about Paint.net so cannot advise what needs to be changed. I've always had success using GIMP and its default settings for converting (exporting in GIMP-lingo) to DDS.
 
Goodness! I wonder how the mod I am copying from doesn't crash and runs well! I fixed the two problems you told me and now the icon shows up in the Build panel as well as in Civilopedia but it still crashes if I click it to start building the project. Can you please show me any mod/template with icon so I can learn from that instead. Sorry for this prolonging, I thought it would be a short problem.
 
Is there a way to set the modinfo ActionCriteria so that it detects if a map is being played?
I'm working on a Middle-earth map, which uses custom continent names, but I want the continents (like Eriador, Minhiriath, etc.) to load only when my map is being played, so that they won't interfere in normal map generation.

Part of the difficulty for me is that I don't know what the valid arguments are for Criteria types.

I've seen ConfigurationValueMatches being used in other mods, however it just doesn't seem to work for me and results in it always acting as "off":
Code:
<ActionCriteria>
    <Criteria id="Mew_MiddleEarth_selected">
        <ConfigurationValueMatches>
            <MapName>Mew_MiddleEarth_Map</MapName>
        </ConfigurationValueMatches>
    </Criteria>
<ActionCriteria>

<InGameActions>
    <UpdateDatabase id="Mew_MiddleEarth_Continents">
        <Criteria>Mew_MiddleEarth_selected</Criteria>
        <File>Data/Continents.xml</File>
    </UpdateDatabase>
</InGameActions>

I've seen the included Scenarios use the following to implement unique civilizations, features, and things that don't affect anything outside of the scenario:
Code:
<ActionCriteria>
    <Criteria id="NubiaScenario">
        <RuleSetInUse>RULESET_SCENARIO_NUBIA</RuleSetInUse>
    </Criteria>
</ActionCriteria>
However, making a new ruleset seems too convoluted, when I think the solution is probably something much simpler than I'm thinking of.
 
Have you tried "MapInUse" instead of "MapName" and ConfigurationValueMatches:
Code:
<ActionCriteria>
    <Criteria id="Mew_MiddleEarth_selected">
        <MapInUse>Mew_MiddleEarth_Map</MapInUse>
    </Criteria>
</ActionCriteria>
MapInUse does not show anywhere in any Firaxis content other than a file search through all the game's files in the DLL
Code:
RuleSetInUse LeaderPlayable MapInUse ModInUse GameCoreInUse GameModeInUse
So it may or may not work, and you may or may not need the file extension ".Civ6Map"
 
Thank you, LeeS! I have not tried "MapInUse" before, but I'll play around with it and see if I can get it to work the way I want! :)
 
Last edited:
Error exporting model
upload_2020-9-6_9-58-9.png


I've triangulated and assigned everything perfectly. did I miss something??
 

Attachments

  • upload_2020-9-6_10-0-22.png
    upload_2020-9-6_10-0-22.png
    371.8 KB · Views: 39
  • SiegeArtillery_V1.rar
    324.5 KB · Views: 36
Last edited:
YnAMP real city naming is actually very easy to do once you get used to it. You'll need the YnAMP mod (which I already assume you have) as well as a YnAMP format map. If your map is WorldBuilder format, it's easy to convert with Yet (not) Another Bit Map Converter. There will be an option, defaulted on for "Map Supports Real City Naming". Leave that on, and once it converts your map, you only need to edit Map\Maps.xml and Map\MapText.xml in your mod folder to get the custom city names to appear.

YnABMC actually already provides some instructions in comments in the generated xml files, but rock_and_ride has also made a post with more Real City Naming documentation.

Wow!!! Thank you so much!!! I can't believe I can actually make this happen :D
 
Hi, I seem to have a problem once again.

So I have gotten and pretty much completed the (yet-to-be-tested) modifiers for my mod, so I am now getting them to appear on the menu at least, but they are not appearing at all, and looking at the logs, the problem seems to be traced back to lack of artdef files, and so I am now dealing with artdefs. I've looked very hard at all the tutorials regarding artdefs, the ones made by Leugi has been by far the most helpful, the only problem is that it was made at a time I suspect before the Asset Editor updated....

I am having a hard time finding the "Add Asset" button, and if there is a way to add the assets with the overlays having been changed, can someone please help me figure out how to add more than one asset in the Asset Preview?

Actually, my intention overall, I should explain: I plan to copy paste the texture of the vanilla scout for my unique unit (which replaces the scout anyway), and the texture of the Mine improvement for my unique improvement, as I want to leave working on custom textures for another time, but with the Asset Editor having a completely different layout to how these tutorials show and describe (I suspect it's because of being slightly outdated), I am pretty much stuck, confused and lost at this point. If anyone could help me with this dilemma, I'd be grateful
 
Last edited:
Question about Goody Hut rewards.
Where are the amounts of rewards defined? Specifically: amount of gold, amount of faith, number of units granted (builder, etc.), how much a unit is healed, amount of experience.
 
Top Bottom