Quick Modding Questions Thread

Are Icons attributed individually to each Great Person, or are they linked to the Great Person class?

In other words, if I add a Male Great Scientist to the game, do I need to specify an Icon for it, or is this done automatically when i define GREAT_PERSON_CLASS_SCIENTIST and M for the appropriate columns in the GreatPersonIndividuals table?

Edit: Tried and it worked.
 
Last edited:
So I guess that's one advantage of BaseGameText. It defines the language to be used as 'en_US'. Maybe that's why Sukritact used it.
I think it doesn't define any language, and show the text you've set in that table whatever the user language is.
 
I think it doesn't define any language, and show the text you've set in that table whatever the user language is.

Code:
CREATE VIEW BaseGameText AS 
	SELECT Tag, Text, Gender, Plurality FROM LocalizedText WHERE Language = 'en_US';
	
CREATE TRIGGER AddBaseGameText INSTEAD OF INSERT ON BaseGameText
BEGIN
	INSERT INTO LocalizedText ('Language', 'Tag', 'Text', 'Gender', 'Plurality') VALUES('en_US', NEW.Tag, NEW.Text, NEW.Gender, NEW.Plurality);
END;
Since it doesn't seem anything has yet been added to LocalizedText when the CREATE VIEW chunk executes it appears to be created as an "empty" view that's merely being used as a hold-box for data that will later be added to BaseGameText (and then added to LocalizedText).
 
And to add to the confusion of the modding community as to what is sent where with regard to Localization Text, the DLC and Expansions do not use BaseGameText, they all appear to write to <EnglishText> instead. Which is probably why nothing in the Localization system that is added by DLC and Expansions is modifiable by modders.

The data in DebugLocalization.sqlite appears to be created after the Base Game (hence BaseGameText) is "made" but before the expansions or the DLC load.
 
The game includes a Resources_FOW.dds file yet it doesn't seem to use it, only Resources256_FOW.dds.



Am I understanding this correctly, or am I missing something?
---

2nd: Furthermore, what actually happens if I do not add a FOW atlas? Keep in mind I'm adding non-tile resources, like Cloves or Jeans. I don't recall any instance in the game where the FOW applies to those resources since they don't appear on the map.

They are still defined and indexed in the game files, however. But is it necessary?
 
What is Sukritact attempting to accomplish in the second line of code here:



The other two are self-explanatory but not this one. The Icon_Resources.xml file, for instance, adds:

<IconDefinitions>
<Row Name="ICON_RESOURCE_BANANAS" Atlas="ICON_ATLAS_RESOURCES" Index="0"/>
<Row Name="ICON_RESOURCE_BANANAS_FOW" Atlas="ICON_ATLAS_RESOURCES_FOW" Index="0"/>
</IconDefinitions>

But not:
<Row Name="RESOURCE_BANANAS" Atlas="ICON_ATLAS_RESOURCES" Index="0"/>

So what is he doing?

Edit: I found something in FontIcons.xml. I think it might have something to do with Sukritact including the 22.dds file here whereas in the base game files the FontIcons are in a separate Atlas. Is that correct?
 
Last edited:
In these two identical mods, the UpdateArt Action is done via InGameActions in one case, and FrontEndActions in the other. Why is that? I thought Resource updates would have to occur via InGame Actions since it refers to the GamemplaySchema database.



2nd: In this thread Deliverator says:
When your mod includes any .artdef files or .xlp files, the build process creates a .dep file. This is the file you need to reference in your <UpdateArt> .modinfo action. But! this file is generated at build time. So what you want to use instead is (Mod Art Dependency File) which is just a way of telling ModBuddy to fill in the blank later with the generated .dep file.

But I don't understand what he means by Mod Art Dependency File. Is that the Mod.Art.xml which is already there?

Edit: Found the (Mod Art Dependency File) option in the dropdown dialogue when adding a file.
 
Last edited:
It depends on what you mean by "element".

If you load database code like writing to table "Buildings" in both the FrontEnd and InGame actions it would not only be superfluous but would cause a syntax error to be generated on the FrontEnd side.

Art and Text is a different matter depending entirely on what the art or text is for. You wouldn't really cause errors but it might or might not be superfluous.
 
HOLY CR** IT WORKS! :run:



I spent the whole afternoon playing around with settings, trying to figure out how to make the XLP file via asset editor, comparing the results to similar mods, going back and forth with the mod.art.xml file trying different combinations of things, lost count of how many times i started and closed games, then one of the attempts worked just as I was about done trying for the day :eekdance:

That's about 2% of my mod done. Though that's probably the hardest 2% since now it's mostly just copy and paste.

Not a question here, I'm just relieved. :D Thanks for all the help!
 
Do we know what the column AntiquityPriority in the Terrains table does? I can't find references to it in any other table. Edit: I found the same column in the Features table, but for whatever reason using the search function didn't locate it.

I also can't figure out how they define Old Growth. Searched for Forests / Woods / Old Growth. Found some text definitions but nothing more.
 
Last edited:
So according to this thread

https://forums.civfanatics.com/threads/modding-barbarian-ai-level1.660100/#post-15821356

With UNIT_INFANTRY class is created in my mod. telling Barbarians to use them BOTH in offense and defense when the game advances to Renaissance Era requires a new overriding mod XML file and editing these tables
Code:
<BarbarianTribes>
       <Row TribeType="TRIBE_NAVAL" IsCoastal="true" PercentRangedUnits="25" TurnsToWarriorSpawn="10" ScoutTag="CLASS_NAVAL_MELEE" MeleeTag="PROMOTION_CLASS_NAVAL_RAIDER" RangedTag="CLASS_NAVAL_RANGED" SiegeTag="CLASS_NAVAL_RANGED" DefenderTag="CLASS_ANTI_CAVALRY" ScoutingBehaviorTree="Barbarian Found City" RaidingBehaviorTree="Barbarian Attack" RaidingBoldness="10" CityAttackOperation="Barbarian City Assault" CityAttackBoldness="25"/>
       <Row TribeType="TRIBE_CAVALRY" RequiredResource="RESOURCE_HORSES" ResourceRange="3" PercentRangedUnits="25" TurnsToWarriorSpawn="25" ScoutTag="CLASS_RECON" MeleeTag="CLASS_LIGHT_CAVALRY" RangedTag="CLASS_MOBILE_RANGED" SiegeTag="CLASS_HEAVY_CAVALRY" DefenderTag="CLASS_ANTI_CAVALRY" ScoutingBehaviorTree="Barbarian Found City" RaidingBehaviorTree="Barbarian Attack" RaidingBoldness="10" CityAttackOperation="Barbarian City Assault" CityAttackBoldness="25"/>
       <Row TribeType="TRIBE_MELEE" PercentRangedUnits="25" TurnsToWarriorSpawn="15" ScoutTag="CLASS_RECON" MeleeTag="CLASS_MELEE" RangedTag="CLASS_RANGED" SiegeTag="CLASS_SIEGE" DefenderTag="CLASS_ANTI_CAVALRY" SupportTag="CLASS_BATTERING_RAM" ScoutingBehaviorTree="Barbarian Found City" RaidingBehaviorTree="Barbarian Attack" RaidingBoldness="10" CityAttackOperation="Barbarian City Assault" CityAttackBoldness="25"/>
   </BarbarianTribes>
<BarbarianAttackForces>
       <Row AttackForceType="LowDifficultyStandardRaid" MaxTargetDifficulty="DIFFICULTY_CHIEFTAIN" SpawnRate="2" MeleeTag="CLASS_MELEE" NumMeleeUnits="1" RaidingForce="true"/>
       <Row AttackForceType="StandardRaid" MinTargetDifficulty="DIFFICULTY_WARLORD" MaxTargetDifficulty="DIFFICULTY_EMPEROR" SpawnRate="2" MeleeTag="CLASS_MELEE" NumMeleeUnits="2" RangeTag="CLASS_RANGED" NumRangeUnits="1" RaidingForce="true"/>
       <Row AttackForceType="HighDifficultyStandardRaid" MinTargetDifficulty="DIFFICULTY_IMMORTAL" SpawnRate="1" MeleeTag="CLASS_MELEE" NumMeleeUnits="3" RangeTag="CLASS_RANGED" NumRangeUnits="2" RaidingForce="true"/>
       <Row AttackForceType="LowDifficultyStandardAttack" MaxTargetDifficulty="DIFFICULTY_CHIEFTAIN" SpawnRate="2" MeleeTag="CLASS_MELEE" NumMeleeUnits="2" RangeTag="CLASS_RANGED" NumRangeUnits="1" SiegeTag="CLASS_SIEGE" NumSiegeUnits="1"/>
       <Row AttackForceType="StandardAttack" MinTargetDifficulty="DIFFICULTY_WARLORD" MaxTargetDifficulty="DIFFICULTY_EMPEROR" SpawnRate="2" MeleeTag="CLASS_MELEE" NumMeleeUnits="3" RangeTag="CLASS_RANGED" NumRangeUnits="2" SiegeTag="CLASS_SIEGE" NumSiegeUnits="1" SupportTag="CLASS_BATTERING_RAM" NumSupportUnits="1"/>
       <Row AttackForceType="HighDifficultyStandardAttack" MinTargetDifficulty="DIFFICULTY_IMMORTAL" SpawnRate="1" MeleeTag="CLASS_MELEE" NumMeleeUnits="4" RangeTag="CLASS_RANGED" NumRangeUnits="3" SiegeTag="CLASS_SIEGE" NumSiegeUnits="2" SupportTag="CLASS_BATTERING_RAM" NumSupportUnits="1"/>
       <Row AttackForceType="LowDifficultyCavalryRaid" MaxTargetDifficulty="DIFFICULTY_CHIEFTAIN" SpawnRate="2" MeleeTag="CLASS_LIGHT_CAVALRY" NumMeleeUnits="1" RaidingForce="true"/>
       <Row AttackForceType="CavalryRaid" MinTargetDifficulty="DIFFICULTY_WARLORD" MaxTargetDifficulty="DIFFICULTY_EMPEROR" SpawnRate="2" MeleeTag="CLASS_LIGHT_CAVALRY" NumMeleeUnits="2" RangeTag="CLASS_MOBILE_RANGED" NumRangeUnits="1" RaidingForce="true"/>
       <Row AttackForceType="HighDifficultyCavalryRaid" MinTargetDifficulty="DIFFICULTY_IMMORTAL" SpawnRate="1" MeleeTag="CLASS_LIGHT_CAVALRY" NumMeleeUnits="3" RangeTag="CLASS_MOBILE_RANGED" NumRangeUnits="2" RaidingForce="true"/>
       <Row AttackForceType="LowDifficultyCavalryAttack" MaxTargetDifficulty="DIFFICULTY_CHIEFTAIN" SpawnRate="2" MeleeTag="CLASS_LIGHT_CAVALRY" NumMeleeUnits="2" RangeTag="CLASS_MOBILE_RANGED" NumRangeUnits="1" SiegeTag="CLASS_HEAVY_CAVALRY" NumSiegeUnits="1"/>
       <Row AttackForceType="CavalryAttack" MinTargetDifficulty="DIFFICULTY_WARLORD" MaxTargetDifficulty="DIFFICULTY_EMPEROR" SpawnRate="2" MeleeTag="CLASS_LIGHT_CAVALRY" NumMeleeUnits="3" RangeTag="CLASS_MOBILE_RANGED" NumRangeUnits="2" SiegeTag="CLASS_HEAVY_CAVALRY" NumSiegeUnits="1"/>
       <Row AttackForceType="HighDifficultyCavalryAttack" MinTargetDifficulty="DIFFICULTY_IMMORTAL" SpawnRate="1" MeleeTag="CLASS_LIGHT_CAVALRY" NumMeleeUnits="4" RangeTag="CLASS_MOBILE_RANGED" NumRangeUnits="3" SiegeTag="CLASS_HORSE_ARCHER" NumSiegeUnits="2"/>
       <Row AttackForceType="LowDifficultyNavalRaid" MaxTargetDifficulty="DIFFICULTY_CHIEFTAIN" SpawnRate="2" MeleeTag="CLASS_NAVAL_MELEE" NumMeleeUnits="1" RaidingForce="true"/>
       <Row AttackForceType="NavalRaid" MinTargetDifficulty="DIFFICULTY_WARLORD" MaxTargetDifficulty="DIFFICULTY_EMPEROR" SpawnRate="2" MeleeTag="CLASS_NAVAL_MELEE" NumMeleeUnits="2" RangeTag="CLASS_NAVAL_RANGED" NumRangeUnits="1" RaidingForce="true"/>
       <Row AttackForceType="HighDifficultyNavalRaid" MinTargetDifficulty="DIFFICULTY_IMMORTAL" SpawnRate="1" MeleeTag="CLASS_NAVAL_MELEE" NumMeleeUnits="3" RangeTag="CLASS_NAVAL_RANGED" NumRangeUnits="2" RaidingForce="true"/>
       <Row AttackForceType="LowDifficultyNavalAttack" MaxTargetDifficulty="DIFFICULTY_CHIEFTAIN" SpawnRate="2" MeleeTag="CLASS_NAVAL_MELEE" NumMeleeUnits="2" RangeTag="CLASS_NAVAL_RANGED" NumRangeUnits="1" SiegeTag="CLASS_NAVAL_RANGED" NumSiegeUnits="1"/>
       <Row AttackForceType="NavalAttack" MinTargetDifficulty="DIFFICULTY_WARLORD" MaxTargetDifficulty="DIFFICULTY_EMPEROR" SpawnRate="2" MeleeTag="CLASS_NAVAL_MELEE" NumMeleeUnits="3" RangeTag="CLASS_NAVAL_RANGED" NumRangeUnits="2" SiegeTag="CLASS_NAVAL_RANGED" NumSiegeUnits="1"/>
       <Row AttackForceType="HighDifficultyNavalAttack" MinTargetDifficulty="DIFFICULTY_IMMORTAL" SpawnRate="1" MeleeTag="CLASS_NAVAL_MELEE" NumMeleeUnits="4" RangeTag="CLASS_NAVAL_RANGED" NumRangeUnits="3" SiegeTag="CLASS_NAVAL_RANGED" NumSiegeUnits="2"/>
   </BarbarianAttackForces>

Since CLASS_INFANTRY exists since Renaissance onwards (Combining CLASS_MELEE and CLASS_ANTI_CAVALRY with some promotions loaned). means that tags that defines offensive and defensive choice should include BOTH class. What are coding procedures to do so? does <update> simply replaces the unit class assigned in that role? if I want to 'add' the other class in the same role rather than 'replace'. what are codes and patterns to do so?
 
Do we know what the column AntiquityPriority in the Terrains table does? I can't find references to it in any other table. Edit: I found the same column in the Features table, but for whatever reason using the search function didn't locate it.
iirc, it's what helps govern the priority where Antiquity Sites will spawn - 5 being the highest "bias" and 0 not at all.
I also can't figure out how they define Old Growth. Searched for Forests / Woods / Old Growth. Found some text definitions but nothing more.
It's not a mechanic that's exposed, but handled in the game dll. Made last year's debugging of the additional +1 appeal mechanic after Conservation a pain to diagnose.
 
Is the Effects table for stuff handled by the DLL? I've been searching for a few regarding trade routes to see how the effects are implemented, but all I get are DLL files. Eg: EFFECT_ADJUST_PLAYER_TRADE_ROUTE_YIELD_PER_PATH_TILE.

Edit: Nvm they are attached to Modifiers.
 
Last edited:
Top Bottom