It's specifically coded that way for the coast bonus of the Normans. Actually there are two effects, one for ranged and one for melee.Not sure how we could fix that actually
I was going crazy trying to understand what would cause this bug !Hullo, have you looked into naval units losing their pillaging in Exploration? I managed to fix it, would be happy to contribute it to the bugfix mod. In short, when you get the ShipBuilding Mastery tech, you get a modifier that lets all units go into deep water. Including naval units, which already can, but whats the harm right? The harm is this, it stops pillaging working at all for naval units, except under some weird tile conditions. I found a way to fix it though, you just need to change that modifier so it applies to all units without the naval tag:
SQL:UPDATE Modifiers SET SubjectRequirementSetId = 'MOD_SLTH_ISNT_NAVY_REQS' WHERE ModifierId = 'MOD_TECH_OCEAN_TRAVEL_EMBARKED'; INSERT INTO Requirements(RequirementId, Inverse, RequirementType) VALUES ('MOD_SLTH_ISNT_NAVY', '1', 'REQUIREMENT_UNIT_TAG_MATCHES'); INSERT INTO RequirementArguments(RequirementId, Name, "Value") VALUES ('MOD_SLTH_ISNT_NAVY', 'Tag', 'UNIT_CLASS_NAVAL'); INSERT INTO RequirementSetRequirements(RequirementId, RequirementSetId) VALUES ('MOD_SLTH_ISNT_NAVY', 'MOD_SLTH_ISNT_NAVY_REQS');
So, in reply to myself, this code would be an improvement, taking out the Melee Requirement for the first one and adding the line below.It's specifically coded that way for the coast bonus of the Normans. Actually there are two effects, one for ranged and one for melee.
The code would need to check if the ranged attacker is actually the Norman and not its opponent, but does not. (The bugfix is more complicated though - because the Norman archer doesn't get the bonus from defending on the coast, as well..)
Spoiler :
<Modifier id="TRAIT_MOD_ADJACENT_TO_COAST_COMBAT" collection="COLLECTION_PLAYER_UNITS" effect="EFFECT_ATTACH_MODIFIERS">
<SubjectRequirements>
<Requirement type="REQUIREMENT_UNIT_DOMAIN_MATCHES">
<Argument name="UnitDomain">DOMAIN_LAND</Argument>
</Requirement>
</SubjectRequirements>
<Argument name="ModifierId">TRAIT_MOD_ADJACENT_TO_MELEE_COMBAT, TRAIT_MOD_ADJACENT_TO_COAST_RANGED_COMBAT</Argument>
</Modifier>
<Modifier id="TRAIT_MOD_ADJACENT_TO_MELEE_COMBAT" collection="COLLECTION_UNIT_COMBAT" effect="EFFECT_ADJUST_UNIT_STRENGTH_MODIFIER">
<SubjectRequirements>
<Requirement type="REQUIREMENT_PLOT_ADJACENT_TO_COAST"/>
<Requirement type="REQUIREMENT_COMBAT_TYPE_MATCHES">
<Argument name="CombatType">COMBAT_MELEE</Argument>
</Requirement>
</SubjectRequirements>
<Argument name="Amount">5</Argument>
<String context="Preview">LOC_MOD_ADJACENT_TO_COAST_COMBAT_DESCRIPTION</String>
</Modifier>
<Modifier id="TRAIT_MOD_ADJACENT_TO_COAST_RANGED_COMBAT" collection="COLLECTION_UNIT_COMBAT" effect="EFFECT_ADJUST_UNIT_STRENGTH_MODIFIER">
<SubjectRequirements>
<Requirement type="REQUIREMENT_ATTACKER_PLOT_ADJACENT_TO_COAST"/>
<Requirement type="REQUIREMENT_COMBAT_TYPE_MATCHES">
<Argument name="CombatType">COMBAT_RANGED</Argument>
</Requirement>
</SubjectRequirements>
<Argument name="Amount">5</Argument>
<String context="Preview">LOC_MOD_ADJACENT_TO_COAST_COMBAT_DESCRIPTION</String>
</Modifier>
UPDATE DynamicModifiers SET CollectionType='COLLECTION_PLAYER_CONSTRUCTIBLES' WHERE ModifierType= 'MOD_WYEHI_SIMEKOFI_MAWASKAWE_SKOTE_TYPE';
The problem is that there is an effectIs there someway I can help you to fix this?
This seemed to work except Machu Piccu bonuses on the wharf and shipyard. Sorry for HDR weirdness on screenshot.Brihadeeswara Temple and Machu Pichu only apply their adjacency bonuses to exploration age and ageless buildings (and their specialist yields, even into modern) but do not apply to Modern Age buildings/specialists despite being labeled as ageless wonders
Like the poster above me.. I have a bit of coding experience but no clue how Civ functions behind the scenes.. Searching through the files.. I found something of note in C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base\modules\age-exploration\data\constructibles.xml
In the <Adjacency_YieldChanges> element both Brihadeeswara and Machu are attributed as 'Age="AGE_EXPLORATION"'. Right underneath that the element <Constructible_WarehouseYields> can be found and the ageless buildings listed within do not contain that 'Age' attribute.
I will delete these attributes and report back.
I guess it's something behind that "Attribute_Economic" which is not working, like if it's taking something wrong. If I had any idea how to do it, I would try to change reloading the same file but changing everytime the attribute it's taking, to see if it's taking the correct one and how it changes if I change the attributeThe problem is that there is an effect
EFFECT_CITY_ADJUST_YIELD_PER_ATTRIBUTE
that's used a few times in the files and that's it. What this actually does is "behind the curtain".
They are all structured like this, and there's no obvious mistake (like a typo or something) in it.
<Modifier id="PROPAGANDA_MOD_GOLD_EQUAL_TO_ECON_ATTRIBUTE" collection="COLLECTION_PLAYER_CITIES" effect="EFFECT_CITY_ADJUST_YIELD_PER_ATTRIBUTE">
<SubjectRequirements>
<Requirement type="REQUIREMENT_CITY_IS_TOWN"/>
</SubjectRequirements>
<Argument name="YieldType">YIELD_GOLD</Argument>
<Argument name="Amount">1</Argument>
<Argument name="AttributeType">ATTRIBUTE_ECONOMIC</Argument>
<String context="Description">LOC_TRADITION_PROPAGANDA_DESCRIPTION</String>
</Modifier>
The point is that I've no idea how to perform these fixes@bumpyglint
You can try that - but it would likely take a dev one look in the function that does this (but we have no access to) to find the error - so it's a thankless task. Also it's not guaranteed that this is changed in a savegame if you change the file, you may have to start at least a new age for that.
If you'd want to see if this is behaving correctly - you could put the effect into a policy that's available from the start, so you can easily check on the value as it changes in a game.
But it's unlikely that you'd get enough info to fix this.
I tried the 2 fascist ones and both didnt work (I should have had something like +10, received just something around +2).Do any of the attributes into yields functions work as intended? if so I could have a dive and see whats the difference between that and the broken ones
..........I continue to find it incredible that they've never tested stuff like this, or that they tested it and completely ignored them....I had an idea and took a look into balance_identity.csv in the logs to see if the attribute values are read correctly.
And guess what - it resets the count at the start of the age, so I wouldn't be surprised if it wouldn't count them correctly in a game function either. (Assuming the game goes to the same source data.)
I've attached the file for anyone who can read those things - scroll down to the point where the turn resets to 0 (the transition point obviously) - it suddenly counts 0 attributes for all types and players.