Quick Modding Questions Thread

Is there a way to get game activity sent to a spreadsheet?
For example city build orders, technology order and all that with an associated turn time.
Would absolutely love this for recording benchmarks in games instead of doing it manually.
Thanks in advance!
 
I am trying to see what sort of changes I can make to barbarian AI. However, I can't find barbarian warriors anywhere in the table and all I see are raiders, horseman, and horse archers. where are the barbarian warriors defined?
 
They just make use of the regular warrior unit so far as I am aware. Just as they do the Scout, and other units that are "basic" and don't require any resource. The Barbarian Raider specifically replaces the normal Galley in table <UnitReplaces>. The Barbarian Horseman and Horse Archer are not registered in table <UnitReplaces>, but the Barbarians cannot have Horse resources so they cannot (theoretically at least) acquire regular horsemen.

All three of Barbarian Horseman, Barbarian Horse Archer, and Barbarian Raider are tied to the TraitType="TRAIT_BARBARIAN" in table <Units>.
 
where are the barbarian warriors defined?
Warriors and other Barb melee units are defined in the BarbarianTribes & BarbarianAttackForces tables not as specific units, but as classes (i.e. CLASS_MELEE is set in the MeleeTag columns). You might look at Shadow's Revenge of the Barbarians mod for ideas on what is possible.
 
Why did no one modded religions into corporations after 4 years?
 
Sounds like you just volunteered! Best of luck! ;)

No, no, it didn't sound like that at all. It only sounded that I volunteered a cool idea, and probably discussion, beta-testing, bug finding, critique, playing and expressing appreciation down the road -- so, yeah, the luck will be needed, thank you ;). To each its own, modders need supporters, you know :cooool:
 
What is a leaders "Flavor"? I have been digging around in files and found that each leader has a number of flavors such as "FLAVOR_OFFENSE". Does anyone know the effect these have?

EDIT: Also, how are barbarian camps placed on the map
 
Last edited:
This is my first post (yay) I have a question about specialist yields in Civ 6. I want to add a building which increases specialist yields in the city by one. I tried adding in the xml piece that defines citizen yields into the building definition, but it does nothing, probably because it is a district property. How can I go about modifying citizen yields in this manner? I have programming experience so I am open to scripting, but I don't want to if I don't have to.
 
Last edited:
What is a leaders "Flavor"? I have been digging around in files and found that each leader has a number of flavors such as "FLAVOR_OFFENSE". Does anyone know the effect these have?

EDIT: Also, how are barbarian camps placed on the map
This is Civ5 code, not Civ6 code.

FLAVOR_ does not exist anywhere in the game's XML files except for the names of Emergency Text-Tags, and then it is a "Flavor" of Emergency.

In both Civ5 and Civ6 Barbarian Camps are auto-generated onto the map by the game engine. This process follows certain rules, however, like in Civ5 the map plot had to be at least X tiles from any player capital, the plot had to be currently in the fog of war for all players, and there could not already be "too many" barbarian camps in the same region of the map. Civ6 follows pretty much the same rules regarding Barbarian Camp placement.

FLAVOR_X in Civ5 determines how likely a leader is to do "X" or be "X" on a scale of 1 - 10 so a leader with a high setting for FLAVOR_OFFENSE is more likely to build units that are seen as being good for offense by the AI system as well as to construct wonders or buildings that are considered to be good for making Offense. A leader with a high setting on the scale for FLAVOR_USE_NUKE is more likely to use nukes if they have them, for example. But Flavors do not force a leader to do anything in particular -- they just make that leader more likely to follow a given path.
 
Last edited:
Hey.
Can someone help me with using "REQUIREMENT_REQUIREMENTSET_IS_MET"? I know it does, but I don't know how to use because I never used it before. I have a modifier and I want to attach 2 different requirement sets to it. The first one checks the district itself (it needs to be an encampment) and the second requirement checks the plot it is placed on (needs to be desert).

As far as I know, 2 different requirement sets can't pack together with the same modifier or am I misunderstanding?
 
Hey.
Can someone help me with using "REQUIREMENT_REQUIREMENTSET_IS_MET"? I know it does, but I don't know how to use because I never used it before. I have a modifier and I want to attach 2 different requirement sets to it. The first one checks the district itself (it needs to be an encampment) and the second requirement checks the plot it is placed on (needs to be desert).

As far as I know, 2 different requirement sets can't pack together with the same modifier or am I misunderstanding?
Look over here.
 
Hey.
Can someone help me with using "REQUIREMENT_REQUIREMENTSET_IS_MET"? I know it does, but I don't know how to use because I never used it before. I have a modifier and I want to attach 2 different requirement sets to it. The first one checks the district itself (it needs to be an encampment) and the second requirement checks the plot it is placed on (needs to be desert).

As far as I know, 2 different requirement sets can't pack together with the same modifier or am I misunderstanding?
I don't see why you would need two different RequirementSets. You should really only need two RequirementIds assigned to a single RequirementSetId in table RequirementSetRequirements.


In table RequirementSets you want a RequirementSetType of "REQUIREMENTSET_TEST_ALL". This means that each individual requirement added to the set of requirements must be met. Theoretically you can add an unlimited number of Requirements to a single RequirementSetId, in which case a designation of "REQUIREMENTSET_TEST_ALL" means that each and every one of them must be met.
 
How can I use a scenario texture/icon in standard game? Currently it is not displayed, because the scenario assets are not being loaded. How can I force the game engine to load also scenario assets?
 
Dumb question but do I need to create table SQL-style into database prior to using it in XML?
I can see the Gameplay Data file that creates tables such as Types from Base Game. But nowhere in Ethiopia's folder can I find that they would define SecretSocieties table prior to adding rows into it, as If the parser just deduced its creation, columns and their types.

Like I can't think of a way it would deduce primary keys and foreign keys, which are quite prevalent due to civ's preference of as many tables with as little columns, as possible, but the lack of Schema files in DLC folders confuses me.
 
Last edited:
But nowhere in Ethiopia's folder can I find that they would define SecretSocieties table prior to adding rows into it, as If the parser just deduced its creation, columns and their types.
Only the base game and expansions contain the schema files for setting up tables. The SS table is set up in "..\Expansion1\Data\Expansion1_Schema.sql" and "..\Expansion2\Data\Expansion2_Schema.sql" depending on which ruleset you're using.
 
I have a mod that changes all purple Policy Cards into green ones and ran into a problem when trying to update the icons displayed in the civipedia. I'd like to change all policy icons with an Index of 3 (purple) to be 2 (green) instead. The issue is that I can't seem to reference the Index column with my Update command. The game just ignores it. I can use the same command to reference the Atlas without issue.

These lines work:
Code:
UPDATE IconDefinitions SET 'Index'=2 WHERE Atlas='ICON_ATLAS_POLICIES';
DELETE FROM IconDefinitions WHERE Atlas='ICON_ATLAS_POLICIES';

These do not:
Code:
UPDATE IconDefinitions SET 'Index'=2 WHERE Atlas='ICON_ATLAS_POLICIES' AND 'Index'=3;
DELETE FROM IconDefinitions WHERE Atlas='ICON_ATLAS_POLICIES' AND 'Index'=3;
DELETE FROM IconDefinitions WHERE 'Index'=3;


Any ideas on how I can get this to work? I considered Updating each individual card, but they are a bit of a pain to hunt down since they appear in multiple files. I'd much rather have a blanket solution that covers all cases and won't need updating.
 
I have a mod that changes all purple Policy Cards into green ones and ran into a problem when trying to update the icons displayed in the civipedia. I'd like to change all policy icons with an Index of 3 (purple) to be 2 (green) instead. The issue is that I can't seem to reference the Index column with my Update command. The game just ignores it. I can use the same command to reference the Atlas without issue.

These lines work:
Code:
UPDATE IconDefinitions SET 'Index'=2 WHERE Atlas='ICON_ATLAS_POLICIES';
DELETE FROM IconDefinitions WHERE Atlas='ICON_ATLAS_POLICIES';

These do not:
Code:
UPDATE IconDefinitions SET 'Index'=2 WHERE Atlas='ICON_ATLAS_POLICIES' AND 'Index'=3;
DELETE FROM IconDefinitions WHERE Atlas='ICON_ATLAS_POLICIES' AND 'Index'=3;
DELETE FROM IconDefinitions WHERE 'Index'=3;


Any ideas on how I can get this to work? I considered Updating each individual card, but they are a bit of a pain to hunt down since they appear in multiple files. I'd much rather have a blanket solution that covers all cases and won't need updating.
Download or subscribe to the Better District Icons mod and take a look at the SQL code therein. I remember there are issues with using UPDATE statements on table IconDefinitions because it is not actually a "table" but is rather what is called a "view" as I recall. Sukritact had to add some extra code-gymnastics to replace original icon designations with the new ones they were adding. There is as I recall in his code commands to delete things from a table called "IconAliases", which is used by the game in creating the actual information the game will use for showing Icons.

I also recall he ended up needing to use INSERT OR REPLACE INTO syntax instead of UPDATE syntax.
 
Back
Top Bottom