Resource icon

Community BugFix Mod 0.9.2

Another case of a coder not reading the description properly *sigh*
Same deal as with the missing naval units qualifier on the tradition; no attempt is made in the code to distinguish unique resources:
Code:
<Modifier id="NUMIDIAN_CAVALRY_MOD_COMBAT_PER_CAPITAL_RESOURCE" collection="COLLECTION_OWNER" effect="EFFECT_ADJUST_UNIT_CAPITAL_RESOURCES_COMBAT_MODIFIER">
    <Argument name="Amount">1</Argument>
</Modifier>
 
Last edited:
Almost sounds like it is (half-)intended or a communication mix-up - no mention of "naval" in the file.
It's more ridiculous if you read the first modifier for the tradition, which is correctly tagged for naval units just four lines earlier:
Code:
<Modifier id="QUINQUEREME_MOD_NAVAL_MAINTENANCE" collection="COLLECTION_OWNER" effect="EFFECT_PLAYER_ADJUST_UNIT_MAINTENANCE_EFFICIENCY">
    <Argument name="Amount">1</Argument>
    <Argument name="UnitTag">UNIT_CLASS_NAVAL</Argument>
    <String context="Description">LOC_TRADITION_QUINQUEREME_DESCRIPTION</String>
</Modifier>
<Modifier id="QUINQUEREME_MOD_PURCHASE_RATE_UNITS" collection="COLLECTION_OWNER" effect="EFFECT_ADJUST_PLAYER_OR_CITY_UNIT_PURCHASE_EFFICIENCY">
    <Argument name="Percent">25</Argument>
</Modifier>
This makes me wonder if it's the tooltip that's wrong, and not the code. Consider that Numidian Cavalry can only be purchased, not built, and they're more expensive than normal cavalry. Consider also that Antiquity naval units are stupid because we don't get fleet commanders. Personally, I'll be revising the tooltip on this one and not the effect.
 
Personally, I'll be revising the tooltip on this one and not the effect.
You maybe have a point regarding the cavalry (it's just a bit much when combined with the broken resource bonus).

But making the doubling settlers and merchants even cheaper? I don't know... (You already save extra money because their costs go up slower)
 
Looks like we need a fix for the Great Britain unlock. The unlock UI triggers with 2 naval commanders but they remain locked. This is with Augustus, Carthage+Spain so no historical unlock. FWIW I knew about this bug going in so I made a third one to check with no luck
 
Anyway, adding the line

<Modifier id="QUINQUEREME_MOD_PURCHASE_RATE_UNITS" collection="COLLECTION_OWNER" effect="EFFECT_ADJUST_PLAYER_OR_CITY_UNIT_PURCHASE_EFFICIENCY">
<Argument name="UnitTag">UNIT_CLASS_NAVAL</Argument>
<Argument name="Percent">25</Argument>
</Modifier>

works, I checked (just needed 10 turns or so on online speed). Doesn't fix running save games though.

Before / after slotting the Qinquereme policy with the fix in place:
Screenshot 2025-03-05 233253.pngScreenshot 2025-03-05 233326.png
 
Normans specific civic Domesday book gives a +2 (+4 during celebrations) golds on farms.
It doesn't apply on floodplains.

not necessarily game breaking but still sad :(

Thanks again for doing firaxis job !
 

Attachments

  • 1295660_57.jpg
    1295660_57.jpg
    666.8 KB · Views: 171
Last edited:
Anyway, adding the line

<Modifier id="QUINQUEREME_MOD_PURCHASE_RATE_UNITS" collection="COLLECTION_OWNER" effect="EFFECT_ADJUST_PLAYER_OR_CITY_UNIT_PURCHASE_EFFICIENCY">
<Argument name="UnitTag">UNIT_CLASS_NAVAL</Argument>
<Argument name="Percent">25</Argument>
</Modifier>

works, I checked (just needed 10 turns or so on online speed). Doesn't fix running save games though.

Before / after slotting the Qinquereme policy with the fix in place:
View attachment 723495View attachment 723496
I usually err on the side of the devs over the text. Especially when the name of the modifier doesn't specify naval units: QUINQUEREME_MOD_PURCHASE_RATE_UNITS. But, when the tradition is named explicitly after a warship design, I can't see how this should thematically apply to all units, so I'll add this fix to the mod soon.
 
From first inspection, I can't see any alternative game effect or modifier argument that I can add to this to resolve in this mod unfortunately.
I don't have a convincing idea for this either (it would be easy to solve in JS for sure) - maybe incrementing by just 0.5 would help? (Don't know how the game handles this for CS.)

I just commented it out and gave the numidian cavalry a flat +5 CS - that's not really a bugfix at all though.
But this is a flashy problem and all over the Civ-Subreddit now, FXS will probably fix that soon.
 
I don't have a convincing idea for this either (it would be easy to solve in JS for sure) - maybe incrementing by just 0.5 would help? (Don't know how the game handles this for CS.)
Yeah, my plan on Numidians is changing the tooltip and bonus to +0.5 CS per resource (a number that is never used in the vanilla modules or DLC except for Tecumseh's Warclub memento, which still erroneously says +1 CS per suz in its incorrect tooltip). My understanding is that it will round up, so 1 resource = +1 CS, 3 = +2 CS, &c. Still an improvement on 23 resources = +23 CS.

Seems like a bit of an opinionated change, though.
 
You are my hero! Is there any way to fix the fact that songhai civic gives +5 combat bonus everywhere and not only on navigable rivers?

This is definitely a game-breaker bug, basically it's like if they are one tier above anyone else always.

For nubian cavalry, if there's no way to fix the +1 combat bonus for every unique resources I would suggest too to reduce the bonus to +0.5 per resource (if possible). Otherwise at the moment that also yoo much broken.
 
You are my hero! Is there any way to fix the fact that songhai civic gives +5 combat bonus everywhere and not only on navigable rivers?

This is definitely a game-breaker bug, basically it's like if they are one tier above anyone else always.

For nubian cavalry, if there's no way to fix the +1 combat bonus for every unique resources I would suggest too to reduce the bonus to +0.5 per resource (if possible). Otherwise at the moment that also yoo much broken.
Re: the Songhai one, I've just tried a few things and haven't had any luck. It's weird. If anyone else knows a way to fix, I'm all ears.
 
Re: the Songhai one, I've just tried a few things and haven't had any luck. It's weird. If anyone else knows a way to fix, I'm all ears.
If nothing works, probably also here I would simply change it with something like "+3 to all naval units everywhere"
 
Re: the Songhai one, I've just tried a few things and haven't had any luck. It's weird. If anyone else knows a way to fix, I'm all ears.
I'm not sure but you could take inspiration from the normans code, I think their combat bonus works as expected when adjacent to coast.

Also thanks about my bug !
 
<Modifier id="MOD_HI_KOI_RIVER_COMBAT" collection="COLLECTION_PLAYER_COMBAT" effect="EFFECT_ADJUST_UNIT_STRENGTH_MODIFIER">
<OwnerRequirements>
<Requirement type="REQUIREMENT_UNIT_TAG_MATCHES">
<Argument name="Tag">UNIT_CLASS_COMBAT</Argument>
</Requirement>
<Requirement type="REQUIREMENT_PLOT_IS_RIVER">
<Argument name="Navigable">true</Argument>
</Requirement>
</OwnerRequirements>
<Argument name="Amount">5</Argument>
<String context="Preview">LOC_MOD_HI_KOI_RIVER_COMBAT_DESCRIPTION</String>
<String context="Description">LOC_MOD_HI_KOI_RIVER_COMBAT_DESCRIPTION</String>
</Modifier>

Looks similar to the Norman effect, but: "OwnerRequirements"? - all similar effects have "SubjectRequirements" instead? Shouldn't be that hard to test, right? Trying now...


[Edit]
It works with "SubjectRequirements", at least in the battle preview... (it was kind of hard btw to lure the AI on a large river...) The +5 text was gone in all other cases.
However: is it a great bonus if that is the intention? Not sure... If you're using it defensively, melee units can't even attack you anyway.

The Norman implementation for this is better though (not quoting here, it's quite long): it considers the ranged units' position and not the position of the target, so it essentially constructs two different effects (one for melee and one for ranged)

[More editing]
On further reflection, the Norman implementation is bugged too, because ranged units don't get the bonus when defending on the coast - but we'd never notice that in gameplay.


Screenshot 2025-03-07 154850.png
 
Last edited:
<Modifier id="MOD_HI_KOI_RIVER_COMBAT" collection="COLLECTION_PLAYER_COMBAT" effect="EFFECT_ADJUST_UNIT_STRENGTH_MODIFIER">
<OwnerRequirements>
<Requirement type="REQUIREMENT_UNIT_TAG_MATCHES">
<Argument name="Tag">UNIT_CLASS_COMBAT</Argument>
</Requirement>
<Requirement type="REQUIREMENT_PLOT_IS_RIVER">
<Argument name="Navigable">true</Argument>
</Requirement>
</OwnerRequirements>
<Argument name="Amount">5</Argument>
<String context="Preview">LOC_MOD_HI_KOI_RIVER_COMBAT_DESCRIPTION</String>
<String context="Description">LOC_MOD_HI_KOI_RIVER_COMBAT_DESCRIPTION</String>
</Modifier>

Looks similar to the Norman effect, but: "OwnerRequirements"? - all similar effects have "SubjectRequirements" instead? Shouldn't be that hard to test, right? Trying now...


[Edit]
It works with "SubjectRequirements", at least in the battle preview... (it was kind of hard btw to lure the AI on a large river...) The +5 text was gone in all other cases.
However: is it a great bonus if that is the intention? Not sure... If you're using it defensively, melee units can't even attack you anyway.

The Norman implementation for this is better though (not quoting here, it's quite long): it considers the ranged units' position and not the position of the target, so it essentially constructs two different effects (one for melee and one for ranged)

[More editing]
On further reflection, the Norman implementation is bugged too, because ranged units don't get the bonus when defending on the coast - but we'd never notice that in gameplay.


View attachment 723824
You are heroes!

So also Norman should be fixed I guess...!

If you would be able to add it in the mod you would be my hero
 
<Modifier id="MOD_HI_KOI_RIVER_COMBAT" collection="COLLECTION_PLAYER_COMBAT" effect="EFFECT_ADJUST_UNIT_STRENGTH_MODIFIER">
<OwnerRequirements>
<Requirement type="REQUIREMENT_UNIT_TAG_MATCHES">
<Argument name="Tag">UNIT_CLASS_COMBAT</Argument>
</Requirement>
<Requirement type="REQUIREMENT_PLOT_IS_RIVER">
<Argument name="Navigable">true</Argument>
</Requirement>
</OwnerRequirements>
<Argument name="Amount">5</Argument>
<String context="Preview">LOC_MOD_HI_KOI_RIVER_COMBAT_DESCRIPTION</String>
<String context="Description">LOC_MOD_HI_KOI_RIVER_COMBAT_DESCRIPTION</String>
</Modifier>

Looks similar to the Norman effect, but: "OwnerRequirements"? - all similar effects have "SubjectRequirements" instead? Shouldn't be that hard to test, right? Trying now...


[Edit]
It works with "SubjectRequirements", at least in the battle preview... (it was kind of hard btw to lure the AI on a large river...) The +5 text was gone in all other cases.
However: is it a great bonus if that is the intention? Not sure... If you're using it defensively, melee units can't even attack you anyway.

The Norman implementation for this is better though (not quoting here, it's quite long): it considers the ranged units' position and not the position of the target, so it essentially constructs two different effects (one for melee and one for ranged)

[More editing]
On further reflection, the Norman implementation is bugged too, because ranged units don't get the bonus when defending on the coast - but we'd never notice that in gameplay.


View attachment 723824
Weird, there should be no difference with ownerrequirements. It still inserts requirements sets, requirements, arguments in the same way with all the same parameters. I'll take another look.

[edit]
nvm, found and fixing
 
Last edited:
I was going to suggest it needs to be broken up into a modifier which grants an ability if you are a Navigable river.

Is there a difference in OwnerRequirements and SubjectRequirments? This feels like a coder didn't know about SubjectRequirments so they made up OwnerRequirements.
 
Back
Top Bottom