Resource icon

Community BugFix Mod 0.9.2

As far as I'm aware from my (limited) experience with Civ 6 modding, requirements tend to be implemented case-by-case rather than pulling from a universal "requirements" file, so searching is unfortunately necessary (as far as I know).

When it comes to "REQUIREMENT_WONDER_IS_ACTIVE", I couldn't find anything deeper than other wonders calling it the same way. I have no understanding of what exactly an "active" vs "inactive" wonder entails.

A very brief search did find the RequirementId "REQ_AGE_IS_ANTIQUITY" in \Base\modules\base-standard\data\unlocks.xml. I wonder if changing MOD_TERRACOTTA_ARMY_COMMANDER to this could work:
Code:
<Modifier id="MOD_TERRACOTTA_ARMY_COMMANDER" collection="COLLECTION_OWNER" effect="EFFECT_CITY_GRANT_UNIT">
        <SubjectRequirements>
            <Requirement type="REQUIREMENT_WONDER_IS_ACTIVE">
                <Argument name="ConstructibleType">WONDER_TERRACOTTA_ARMY</Argument>
            </Requirement>
            <Requirement type="REQUIREMENT_GAME_AGE_TYPE_MATCH">
                <Argument name="AgeType">AGE_ANTIQUITY</Argument>
            </Requirement>
        </SubjectRequirements>
        <Argument name="UnitType">UNIT_ARMY_COMMANDER</Argument>
        <Argument name="Amount">1</Argument>
    </Modifier>
(I don't really know what I'm doing)
I was able to test it before than expected, this perfectly works!!!

Basically now the Terracotta army gives a commander only in the first age. It still remain partially bugged because if someone conquer the city with the terracotta army during the first Age, he still get one free commander, but it's definitely reducing the problem of this bug.

I would add this to the mod too! (hoping that next weeks they fix it anyway)
 
That would be cool. Think thats what Chicken wanted from their earlier posts, but because they are the only one who can make updates on CFC, he's like an unwilling dictator.

I would also be happy to fire up Bugfixes Expanded, and maybe include the good bugfixes from this mod as a more updated one, and have some handling if both mods are on? idk. I don't want to be taking other peoples work, but also a lot of these changes are quite simple.


I've attached a list of all the requirements in the game, all the Argument Names they can use, and examples of Values for each Argument and an example RequirementId that uses said value. If the Name and Value are NULL it means there was no example with a RequirementArguments row, so it doesnt need one. Should all be valid ones, its technically a bit modded since its part of a WIP project that loads all of the three ages together. But not got any new requirements defined, and was the easiest way to query all three ages. Statement I used in case anyone was wondering

SQL:
SELECT
    R.RequirementType,
    A.Name,
    MIN(A.Value) AS Value,
    MIN(R.RequirementId) AS Example
FROM
    Requirements AS R
LEFT JOIN
    RequirementArguments AS A ON R.RequirementId = A.RequirementId
GROUP BY
    R.RequirementType,
    A.Name;
Sorry if I ask your help again, I'm trying to fix the expansionist attribute n.5. I basically fixed it, except that now it doesn't work on new towns :lol:
In order to fix it totally I think it should be enough to add the requirement "make it works if city population = 1", which I guess is related to this line of your really usefull file:

Spoiler code :
REQUIREMENT_CITY_POPULATION,MaxRuralPopulation,3,MOD_PLAYER_RESPAWN_GRANT_RURAL_POPULATION_SUBJECT_REQUIREMENTS_3


But I'm not sure how I can read it and make it a real requirement in the code. I tried the following:
Spoiler code 2 :


<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_05_C" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_POPULATION" run-once="true" permanent="true">
<SubjectRequirements>
<Requirement type="REQUIREMENT_CITY_IS_TOWN"/>
<Requirement type="REQUIREMENT_CITY_IS_ORIGINAL_OWNER"/>
<Requirement type="REQUIREMENT_CITY_POPULATION">
<Argument name="Population">2</Argument>

</Requirement>
</SubjectRequirements>
<Argument name="Amount">1</Argument>
</Modifier>


but it's not working, I'm pretty sure something is wrong in the bold part. Do someone know how can I fix it?

I've not found anywhere the REQUIREMENT_CITY_POPULATION used in the original code, but if it's in the file I guess it's somewhere

Thanks a lot in advance!!!!
 
Thanks a lot to everyone!

@FungeonKeeper reported the requirement "REQ_AGE_IS_ANTIQUITY", which would fix a good part of the problem for terracotta army (still the bug would appear if the city with terracotta army changes owner during antiquity age, but this fix would be better than nothing for sure), the only questions is "why I don't find this requirement in the Excel kindly sent by @Smayo ?".I don't understand if "REQ_AGE_IS_ANTIQUITY" is something already used by the game or not.

Tonight (European time) I'll try it to see if it works.

Also, if I understood correctly, not only the +1 population expansionist attribute repeat itself every age, but also the +1 promotion for commander militarist attribute? Basically everything happening "once in the game" instead happen "once every age" I guess.... I tried to understand how to fix it but I've no idea, also because I'm definitely someone who is self-teaching how to code and I definitely miss some basic knowledge about it :lol:

In the meantime, I agree that after the patch of 22 april we could do a "brainstorming" about what should be in the mod and what not; I REALLY hope mods fix a lot of the (MANY) bugs, but I'm losing my hope a bit more everyday.
The reason these are happening per age and per game is the age transition is actually just an advanced start on a new game, using all the info of the old game. So extra terracotta dude, a huge amount of culture from Hale o Kauwe reapplying all the culture from coastal buildings, etc.

Oh maybe i didnt make it clear enough, that list i sent isn't a list of every single requirement, but of every RequirementType. So that REQ_AGE_IS_ANTIQUITY, which is a requirementId is not in there, but a similar one using REQUIREMENT_GAME_AGE_TYPE_MATCH is, CHALLENGE_ADA_LOVELACE_CULTURE_VICTORY_ANTIQUITY_COMPLETE_OWNER_REQUIREMENTS_1.
 
I was able to test it before than expected, this perfectly works!!!

Basically now the Terracotta army gives a commander only in the first age. It still remain partially bugged because if someone conquer the city with the terracotta army during the first Age, he still get one free commander, but it's definitely reducing the problem of this bug.

I would add this to the mod too! (hoping that next weeks they fix it anyway)
I would think someone who conquers it should get a commander, no? every other wonder gives benefits on conquering.
Sorry if I ask your help again, I'm trying to fix the expansionist attribute n.5. I basically fixed it, except that now it doesn't work on new towns :lol:
In order to fix it totally I think it should be enough to add the requirement "make it works if city population = 1", which I guess is related to this line of your really usefull file:

Spoiler code :
REQUIREMENT_CITY_POPULATION,MaxRuralPopulation,3,MOD_PLAYER_RESPAWN_GRANT_RURAL_POPULATION_SUBJECT_REQUIREMENTS_3


But I'm not sure how I can read it and make it a real requirement in the code. I tried the following:
Spoiler code 2 :


<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_05_C" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_POPULATION" run-once="true" permanent="true">
<SubjectRequirements>
<Requirement type="REQUIREMENT_CITY_IS_TOWN"/>
<Requirement type="REQUIREMENT_CITY_IS_ORIGINAL_OWNER"/>
<Requirement type="REQUIREMENT_CITY_POPULATION">
<Argument name="Population">2</Argument>

</Requirement>
</SubjectRequirements>
<Argument name="Amount">1</Argument>
</Modifier>


but it's not working, I'm pretty sure something is wrong in the bold part. Do someone know how can I fix it?

I've not found anywhere the REQUIREMENT_CITY_POPULATION used in the original code, but if it's in the file I guess it's somewhere

Thanks a lot in advance!!!!
That requirement is used for SALES_AND_TRADE_MOD_RESOURCE_SCIENCE_SUBJECT_REQUIREMENTS_1, which is an Abbassid one that looks for at least 8 pop in a settlement.

Thing is, I don't think that would solve the problem, since it says it should give a pop to existing towns too, and they could have any number of population.
 
The reason these are happening per age and per game is the age transition is actually just an advanced start on a new game, using all the info of the old game. So extra terracotta dude, a huge amount of culture from Hale o Kauwe reapplying all the culture from coastal buildings, etc.

Oh maybe i didnt make it clear enough, that list i sent isn't a list of every single requirement, but of every RequirementType. So that REQ_AGE_IS_ANTIQUITY, which is a requirementId is not in there, but a similar one using REQUIREMENT_GAME_AGE_TYPE_MATCH is, CHALLENGE_ADA_LOVELACE_CULTURE_VICTORY_ANTIQUITY_COMPLETE_OWNER_REQUIREMENTS_1.
This is honestly a terrible decision by 2K. It just reinforces my belief that they’ll never fix these issues — probably because doing so would require a completely new approach, and they’re already struggling with problems that should be easy to solve.

What worries me even more is that I’ve reported multiple bugs through 2K’s official support channel. Not only is the process incredibly slow and bureaucratic, but the responses suggest they barely understand basic concepts about their own game. I’m guessing they’ve left interns in charge of support — which wouldn’t be a huge issue if I wasn’t starting to suspect the interns might also be the ones developing the game.

Also, sorry if this is a dumb question — I’m completely new to this and trying to learn — but what’s the difference between RequirementType and requirementId?


I would think someone who conquers it should get a commander, no? every other wonder gives benefits on conquering.

That requirement is used for SALES_AND_TRADE_MOD_RESOURCE_SCIENCE_SUBJECT_REQUIREMENTS_1, which is an Abbassid one that looks for at least 8 pop in a settlement.

Thing is, I don't think that would solve the problem, since it says it should give a pop to existing towns too, and they could have any number of population.
I'm not entirely sure what's intended, but I’m pretty confident that, in previous Civ games, wonders that granted one-time bonuses didn’t re-trigger those bonuses when the city was conquered, so I guess this should be the intended behavior (also because otherwise it could create definitely "strange" situation, because it's not so rare especially in multiplayer that a city get conquered, reconquered and then conquered again in just 3/4 turns....that's 3 more commanders in 3/4 turns for this situation).

Anyway I've already """partially""" fixed the problem; now that attribute works perfectly when taken and at the age transition (in this last case, it doesn't give bonus); the "just little problem" is that now it's not giving any bonus to new towns :lol: If I find a way to say "give the bonus always, but just to towns with exactly 1 population" I guess I can fix it. Tonight I'll try again.
 
This is honestly a terrible decision by 2K. It just reinforces my belief that they’ll never fix these issues — probably because doing so would require a completely new approach, and they’re already struggling with problems that should be easy to solve.

What worries me even more is that I’ve reported multiple bugs through 2K’s official support channel. Not only is the process incredibly slow and bureaucratic, but the responses suggest they barely understand basic concepts about their own game. I’m guessing they’ve left interns in charge of support — which wouldn’t be a huge issue if I wasn’t starting to suspect the interns might also be the ones developing the game.

Also, sorry if this is a dumb question — I’m completely new to this and trying to learn — but what’s the difference between RequirementType and requirementId?



I'm not entirely sure what's intended, but I’m pretty confident that, in previous Civ games, wonders that granted one-time bonuses didn’t re-trigger those bonuses when the city was conquered, so I guess this should be the intended behavior (also because otherwise it could create definitely "strange" situation, because it's not so rare especially in multiplayer that a city get conquered, reconquered and then conquered again in just 3/4 turns....that's 3 more commanders in 3/4 turns for this situation).

Anyway I've already """partially""" fixed the problem; now that attribute works perfectly when taken and at the age transition (in this last case, it doesn't give bonus); the "just little problem" is that now it's not giving any bonus to new towns :lol: If I find a way to say "give the bonus always, but just to towns with exactly 1 population" I guess I can fix it. Tonight I'll try again.
RequirementId vs RequirementType:
Basically a RequirementType is the most basic element we have of a requirement, and a RequirementId will use a RequirementType and specify some other things. So for example that
REQUIREMENT_GAME_AGE_TYPE_MATCH Is a RequirementType, and different RequirementIds can use the RequirementType, but specify different RequirementArguments, so that RequirementType can also get used for checking if the age is modern or exploration too. Or checking inverse when it’s defined in Requirements so you can check if it ISNT Antiquity.

One thing I was mulling over is Player Properties, that’s how the game ferries over things like the number of trade route you had last era for legacy cards. Not sure if we have a way to check that with requirements, we used to abuse PLOT_PROPERTY_MATCHES, so maybe they’ll have the other one. But if we did, maybe there’s a way to adjust the property when you get the attribute node, and then give that modifier the requirement you don’t have that property? I’ll do some testing to see if it’s viable
 
Anyway I've already """partially""" fixed the problem; now that attribute works perfectly when taken and at the age transition (in this last case, it doesn't give bonus); the "just little problem" is that now it's not giving any bonus to new towns :lol: If I find a way to say "give the bonus always, but just to towns with exactly 1 population" I guess I can fix it. Tonight I'll try again.

Unfortunately, it doesn't work. At the age transition, regardless of a city's population, the effect for "cities with 0 rural population" always triggers.

Everything works fine during the age itself, but it seems that during the transition—when all the cities are recreated—there’s a moment where their population briefly resets to zero. As a result, they get counted again incorrectly, even if they have 100 population.

Sadly, I don’t think there’s a way for us to fix this on our end. We’ll have to hope 2K addresses it (maybe in next week’s patch... though I’m not feeling too optimistic).
 
What worries me even more is that I’ve reported multiple bugs through 2K’s official support channel. Not only is the process incredibly slow and bureaucratic, but the responses suggest they barely understand basic concepts about their own game. I’m guessing they’ve left interns in charge of support — which wouldn’t be a huge issue if I wasn’t starting to suspect the interns might also be the ones developing the game.
Totally agree with this, the bug report process is 10,000 feet level above the actual bugs we are taking about. When you submit they ask you to verify game files integrity, check installation etc issues. It is more geared towards “can’t play the game” level of issues vs these nuanced bugs we’re talking about. The people reading these don’t know about the game; like you said they’re just admins passing tickets.

Eg I submitted two separate bugs and they sent me an email saying since I have 2 support tix open they will close the other! I didn’t even argue because it would be 2026 before we finish the process lol

Tix from months ago still there

My only hope is the dev team has another bugs list they work on as well and this is not IT. Otherwise yes we are screwed.
 

Attachments

  • IMG_4339.jpeg
    IMG_4339.jpeg
    268.5 KB · Views: 6
Totally agree with this, the bug report process is 10,000 feet level above the actual bugs we are taking about. When you submit they ask you to verify game files integrity, check installation etc issues. It is more geared towards “can’t play the game” level of issues vs these nuanced bugs we’re talking about. The people reading these don’t know about the game; like you said they’re just admins passing tickets.

Eg I submitted two separate bugs and they sent me an email saying since I have 2 support tix open they will close the other! I didn’t even argue because it would be 2026 before we finish the process lol

Tix from months ago still there

My only hope is the dev team has another bugs list they work on as well and this is not IT. Otherwise yes we are screwed.
Lol same esperience, they closed one of my ticket "because I opened two ticket with same issue" while they obviously were COMPLETELY different topic (not even similar subjects). I told them they were wrong and they reopened both of them, but it's embarassing if they do this each time someone open two different ticket. Their inefficiency is ridiculous...
 
Unfortunately, it doesn't work. At the age transition, regardless of a city's population, the effect for "cities with 0 rural population" always triggers.
Actually thanks to the beatiful file of @Smayo I had another idea and now it works!!!

In C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base\modules\base-standard\data\progression-trees-common-gameeffects I changed attribute 5_A and 5_B with the following:

Spoiler Code :

<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_05_A" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_POPULATION" run-once="true" permanent="false">
<SubjectRequirements>
<Requirement type="REQUIREMENT_CITY_IS_TOWN"/>
</SubjectRequirements>
<Argument name="Amount">1</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_05_DESCRIPTION</String>
</Modifier>
<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_05_B" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_POPULATION">
<SubjectRequirements>
<Requirement type="REQUIREMENT_CITY_IS_TOWN"/>
                   <Requirement type="REQUIREMENT_GAME_TURN_IS_LESS_THAN_X" inverse="true">
                         <Argument name="MaxGameTurn">1</Argument>
                   </Requirement>
                   <Requirement type="REQUIREMENT_CITY_POPULATION">
                         <Argument name="MaxRuralPopulation">0</Argument>
                   </Requirement>
</SubjectRequirements>
<Argument name="Amount">1</Argument>
</Modifier>


The first part of the code essentially says: "Apply this effect to every town now, but never again in the future."

The second part (5_B) says: "Apply this effect every time a town with 0 population is found (i.e., just founded), but only if it’s not the first turn in the age." This helps avoid the issue where, at the beginning of a new age, all towns are treated as newly founded with 0 population, causing the effect to trigger incorrectly. Also, you can never settle a new town the first turn of an age (you start with 0 settler and if you buy them they can't move), so you should never be penalized by this.

There’s a small potential bug that could happen in a rare situation: if you settle a town, don’t assign a citizen right away, do take the attribute first, and then assign the citizen. In that really rare case, the effect might incorrectly give the town 2 citizens instead of 1. But this can only happen once per game and is easy for the player to avoid.

Still, this setup is definitely better than the current situation, where at the start of every age, every town gains +1 population again, and former cities gain +2 population—which is a much bigger issue.

If (as I'm afraid) next week they don't fix this, I would suggest to add it to the mod if you agree!
 
The free pop on Towns one is also big, as is the Free Commander promotion.
I've fixed also the free commander promotion!!!

Sorry for the spam on this thread, but with a similar approach to the previous fix, I've fixed the militarist attribute that should give +1 promotion to all your commander now and when another one is created (at the moment, it also gives +1 promotion to everyone at the start of every new age, which is a HUGE bug).

I had to modify both C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base\modules\base-standard\data\progression-trees-common

Spoiler Code 1 :

<!-- Militaristic Attribute -->
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_01" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_01" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_02" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_02" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_03" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_03" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_04" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_04" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_05" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_05" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_06" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_06" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_07" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_07" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_08" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_08" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_09" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_09_A" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_09" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_09_B" UnlockDepth="1"/>
<Row ProgressionTreeNodeType="NODE_ATTRIBUTE_MILITARISTIC_10" TargetKind="KIND_MODIFIER" TargetType="MOD_ATTRIBUTE_MILITARISTIC_10" UnlockDepth="1"/>



Here I divided the attribute in 2 node, then the "real" fix is instead in C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base\modules\base-standard\data\progression-trees-common-gameeffects

Spoiler Code 2 :



<Modifier id="MOD_ATTRIBUTE_MILITARISTIC_09_A" collection="COLLECTION_PLAYER_UNITS" effect="EFFECT_GRANT_UNIT_PROMOTION" run-once="false" permanent="true">
<SubjectRequirements>
<Requirement type="REQUIREMENT_UNIT_TAG_MATCHES">
<Argument name="Tag">UNIT_CLASS_COMMAND</Argument>
</Requirement>
<Requirement type="REQUIREMENT_COMMANDER_HAS_X_PROMOTIONS" inverse="true">
<Argument name="Amount">1</Argument>
</Requirement>
                        <Requirement type="REQUIREMENT_GAME_TURN_IS_LESS_THAN_X" inverse="true">
                              <Argument name="MaxGameTurn">1</Argument>
</Requirement>
</SubjectRequirements>
<Argument name="Amount">1</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_MILITARISTIC_09_DESCRIPTION</String>
</Modifier>
<Modifier id="MOD_ATTRIBUTE_MILITARISTIC_09_B" collection="COLLECTION_PLAYER_UNITS" effect="EFFECT_GRANT_UNIT_PROMOTION" run-once="true" permanent="false">
<SubjectRequirements>
<Requirement type="REQUIREMENT_UNIT_TAG_MATCHES">
<Argument name="Tag">UNIT_CLASS_COMMAND</Argument>
</Requirement>
</SubjectRequirements>
<Argument name="Amount">1</Argument>
</Modifier>




(don't know why copypasting this part all the spaces are randomic distributed, but I hope the code is clear)

To avoid the Age reset I've divided the code in 2. First part works each time a new commander with 0 promotion is created and it's not the first turn of an Age (in the really rare situation where you buy with gold a Commander the first turn of an Age, the promotion will still arrive, but in turn 2). No previous commander can have 0 promotion, because the attribute was used before, so it should always work as intended.

The second part of the code is +1 promotion to everyone at the moment you take the attribute, and it will never happen again (in order to stop it from happening at the start of every new Age and in order to avoid repetation with the first part of the code)
 
I sincerely hope Firaxis has someone (or a bot at least) watching this thread. It'd make the devs' job easier not only for understanding the bug but fixing it as well!
 
Still no news in order to add the new stuff to the mod? Maybe a parallel mod would be usefull again?

In the meatime, I'm trying to study the Civ Code. They reported me a bug that the "Legend" expansionist attribute (+50% for the gold conversion from city to town) work opposite as intended; having the attribute immediatly increase instead of reducing the cost of the city conversion.

In base standard --> data --> progression-trees-common-gameeffects there are the following lines:
Spoiler Code :


<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_ASHOKA_L2" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_TOWN_UPGRADE_DISCOUNT">
<Argument name="Percent">-50</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_ASHOKA_L2_DESCRIPTION</String>
</Modifier>

<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_AUGUSTUS_L2" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_TOWN_UPGRADE_DISCOUNT">
<Argument name="Percent">-50</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_AUGUSTUS_L2_DESCRIPTION</String>
</Modifier>

<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_CONFUCIUS_L1" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_TOWN_UPGRADE_DISCOUNT">
<Argument name="Percent">-50</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_CONFUCIUS_L1_DESCRIPTION</String>
</Modifier>

<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_IBN_BATTUTA_L2" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_TOWN_UPGRADE_DISCOUNT">
<Argument name="Percent">-50</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_IBN_BATTUTA_L2_DESCRIPTION</String>
</Modifier>

<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_ISABELLA_L2" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_TOWN_UPGRADE_DISCOUNT">
<Argument name="Percent">-50</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_ISABELLA_L2_DESCRIPTION</String>
</Modifier>

<Modifier id="MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_PACHACUTI_L2" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_TOWN_UPGRADE_DISCOUNT">
<Argument name="Percent">-50</Argument>
<String context="Description">LOC_MOD_ATTRIBUTE_EXPANSIONIST_LEGEND_PACHACUTI_L2_DESCRIPTION</String>
</Modifier>


Changhing "-50" with "50" seems to work, now it reduces the cost instead of increasing it! Could this be added to the mod too please?
This bug I reported has been fixed exactly like above, all the others bug I reported/ fixed unluckily are the same in the new patch :(
 
1745338863444.webp


Here's one that I've found in Resources.xml for Antiquity, Iron is giving the desert wonder production bonus that belongs to Ivory.
 
View attachment 729775

Here's one that I've found in Resources.xml for Antiquity, Iron is giving the desert wonder production bonus that belongs to Ivory.
huh. Does that do anything except just visually show a different string?

This bug I reported has been fixed exactly like above, all the others bug I reported/ fixed unluckily are the same in the new patch :(
cool. Well I'll make a update on Extended. Also managed to fix Hale o Kauwe and Erdene Zuu regranting culture for the buildings/Cav you made last age.
 
huh. Does that do anything except just visually show a different string?
resources-gameeffects.xml shows ivory for the modifier.
Code:
<Modifier id="MOD_IVORY_DESERT_WONDER_PRODUCTION" collection="COLLECTION_ALL_CITIES" effect="EFFECT_CITY_ADJUST_BIOME_WONDER_PRODUCTION_PER_RESOURCE">
        <Argument name="Empire">true</Argument>
        <Argument name="BiomeType">BIOME_DESERT</Argument>
        <Argument name="ResourceType">RESOURCE_IVORY</Argument>
        <Argument name="Amount">10</Argument>
</Modifier>
 
Been struggling to get your commander promotion fix working, it either grants two promotions (worst case) or doesn't grant newly made commanders a single promotion. Will just make a patch omitting that and add it later:

SQL:
UPDATE ProgressionTreeNodeUnlocks SET TargetType= 'MOD_ATTRIBUTE_MILITARISTIC_09_A' WHERE TargetType='MOD_ATTRIBUTE_MILITARISTIC_09';

INSERT INTO ProgressionTreeNodeUnlocks(ProgressionTreeNodeType, TargetType, TargetKind, UnlockDepth) VALUES
('NODE_ATTRIBUTE_MILITARISTIC_09', 'MOD_ATTRIBUTE_MILITARISTIC_09_B', 'KIND_MODIFIER', 1);

INSERT INTO Modifiers (ModifierId, ModifierType, Permanent, RunOnce, SubjectRequirementSetId) VALUES
('MOD_ATTRIBUTE_MILITARISTIC_09_A', 'MOD_ATTRIBUTE_MILITARISTIC_09_TYPE', 1, 0, 'SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS'),                   -- can apply whenever, to get new commanders a promo
('MOD_ATTRIBUTE_MILITARISTIC_09_B', 'MOD_ATTRIBUTE_MILITARISTIC_09_TYPE', 0,  1, 'MOD_ATTRIBUTE_MILITARISTIC_09_SUBJECT_REQUIREMENTS');         -- applies only clicking button and transient. reuse old subject reqs

INSERT INTO ModifierStrings(Context, ModifierId, Text) VALUES ('Description', 'MOD_ATTRIBUTE_MILITARISTIC_09_A', 'LOC_MOD_ATTRIBUTE_MILITARISTIC_09_DESCRIPTION');


INSERT INTO ModifierArguments(ModifierId, Name, Value) VALUES
('MOD_ATTRIBUTE_MILITARISTIC_09_A', 'Amount', 1),
('MOD_ATTRIBUTE_MILITARISTIC_09_B', 'Amount', 1);

INSERT INTO Requirements(RequirementId, RequirementType, Inverse) VALUES
('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'REQUIREMENT_COMMANDER_HAS_X_PROMOTIONS', 1);

INSERT INTO RequirementArguments(RequirementId, Name, Value) VALUES
('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'Amount', 1),
('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'PromotionsOnly', 'true');
-- ('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'OnPromotionInterval', 0),               -- undocumented if we need this


INSERT INTO RequirementSets(RequirementSetId, RequirementSetType) VALUES
('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'REQUIREMENTSET_TEST_ALL');

INSERT INTO RequirementSetRequirements(RequirementSetId, RequirementId) VALUES
('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'MOD_ATTRIBUTE_MILITARISTIC_09_SUBJECT_REQUIREMENTS_1'),              -- reused, checks for commander tag
-- ('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'SLTH_BUGFIX_NOT_TURN_ONE_REQ'),                                   -- new commanders dont get any promo if this is attached.
('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ');
 
Been struggling to get your commander promotion fix working, it either grants two promotions (worst case) or doesn't grant newly made commanders a single promotion. Will just make a patch omitting that and add it later:

SQL:
UPDATE ProgressionTreeNodeUnlocks SET TargetType= 'MOD_ATTRIBUTE_MILITARISTIC_09_A' WHERE TargetType='MOD_ATTRIBUTE_MILITARISTIC_09';

INSERT INTO ProgressionTreeNodeUnlocks(ProgressionTreeNodeType, TargetType, TargetKind, UnlockDepth) VALUES
('NODE_ATTRIBUTE_MILITARISTIC_09', 'MOD_ATTRIBUTE_MILITARISTIC_09_B', 'KIND_MODIFIER', 1);

INSERT INTO Modifiers (ModifierId, ModifierType, Permanent, RunOnce, SubjectRequirementSetId) VALUES
('MOD_ATTRIBUTE_MILITARISTIC_09_A', 'MOD_ATTRIBUTE_MILITARISTIC_09_TYPE', 1, 0, 'SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS'),                   -- can apply whenever, to get new commanders a promo
('MOD_ATTRIBUTE_MILITARISTIC_09_B', 'MOD_ATTRIBUTE_MILITARISTIC_09_TYPE', 0,  1, 'MOD_ATTRIBUTE_MILITARISTIC_09_SUBJECT_REQUIREMENTS');         -- applies only clicking button and transient. reuse old subject reqs

INSERT INTO ModifierStrings(Context, ModifierId, Text) VALUES ('Description', 'MOD_ATTRIBUTE_MILITARISTIC_09_A', 'LOC_MOD_ATTRIBUTE_MILITARISTIC_09_DESCRIPTION');


INSERT INTO ModifierArguments(ModifierId, Name, Value) VALUES
('MOD_ATTRIBUTE_MILITARISTIC_09_A', 'Amount', 1),
('MOD_ATTRIBUTE_MILITARISTIC_09_B', 'Amount', 1);

INSERT INTO Requirements(RequirementId, RequirementType, Inverse) VALUES
('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'REQUIREMENT_COMMANDER_HAS_X_PROMOTIONS', 1);

INSERT INTO RequirementArguments(RequirementId, Name, Value) VALUES
('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'Amount', 1),
('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'PromotionsOnly', 'true');
-- ('SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ', 'OnPromotionInterval', 0),               -- undocumented if we need this


INSERT INTO RequirementSets(RequirementSetId, RequirementSetType) VALUES
('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'REQUIREMENTSET_TEST_ALL');

INSERT INTO RequirementSetRequirements(RequirementSetId, RequirementId) VALUES
('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'MOD_ATTRIBUTE_MILITARISTIC_09_SUBJECT_REQUIREMENTS_1'),              -- reused, checks for commander tag
-- ('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'SLTH_BUGFIX_NOT_TURN_ONE_REQ'),                                   -- new commanders dont get any promo if this is attached.
('SLTH_BUGFIX_FREE_COMMANDER_PROMOTION_REQS', 'SLTH_BUGFIX_COMMANDER_HAS_NO_PROMOTIONS_REQ');
Wait but did you test it? Is it not working? With me it was working, I test both in game and during age transition. Tomorrow I'll check better eventually!
 
Yeah I tested it with that, maybe something got lost translating it from XML to SQL? Unsure. I'll retest and share what I found too
 
Back
Top Bottom