Modding building yields seems to apply only to cities I found

DarkAlzara

Chieftain
Joined
Jul 1, 2020
Messages
39
Hey all,

So I don't know if this is intended, but I gave one of my civs the ability to gain extra faith from all buildings in Anno Domini's Elder's district. I tested this out and it seemed to be working just fine. However, in one of my test games, I conquered two other cities fairly early on. One of them already had an Elder's district. When I constructed the soothsayer (first building for this district with no extra prerequisite technology), it did not provide the additional faith. I don't know if this has something to do with the city being not originally mine, or maybe because the district was already present when I conquered it, or something else. I pasted the relevant bits of code below. (also can somebody tell me how to paste code in this forum without it looking ugly? I see people with such neat little code blocks it is making me jealous lol :p)

Quick edit: furthermore I have since constructed a soothsayer in my capital (after the one I constructed in the conquered city) and this is providing faith as normal. The conquered city still lacks the bonus faith. Also, for extra information, I believe that I didn't even begin to construct the soothsayer in the conquered city until I had completely eliminated the other civ... so I don't think that the city was considered "occupied" at the time: it is technically my city (though it is the original capital of another civ).

INSERT INTO TraitModifiers
(TraitType, ModifierId )
VALUES ('TRAIT_LEADER_NAERALITH_SHAELANA_UA', 'MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SOOTHSAYER_FAITH' ),
('TRAIT_LEADER_NAERALITH_SHAELANA_UA', 'MODIFIER_LEADER_NAERALITH_SHAELANA_UA_ELDERS_HOUSE_FAITH' ),
('TRAIT_LEADER_NAERALITH_SHAELANA_UA', 'MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SCHOOL_FAITH' );

INSERT INTO Modifiers
(ModifierId, ModifierType, OwnerRequirementSetId, SubjectRequirementSetId, RunOnce, Permanent )
VALUES ('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SOOTHSAYER_FAITH', 'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE', NULL, NULL, 0, 0 ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_ELDERS_HOUSE_FAITH', 'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE', NULL, NULL, 0, 0 ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SCHOOL_FAITH', 'MODIFIER_PLAYER_CITIES_ADJUST_BUILDING_YIELD_CHANGE', NULL, NULL, 0, 0 );

INSERT INTO ModifierArguments
(ModifierId, Name, Value )
VALUES ('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SOOTHSAYER_FAITH', 'BuildingType', 'BUILDING_SOOTHSAYER' ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SOOTHSAYER_FAITH', 'YieldType', 'YIELD_FAITH' ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SOOTHSAYER_FAITH', 'Amount', 1 ),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_ELDERS_HOUSE_FAITH', 'BuildingType', 'BUILDING_ELDERS_HOUSE' ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_ELDERS_HOUSE_FAITH', 'YieldType', 'YIELD_FAITH' ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_ELDERS_HOUSE_FAITH', 'Amount', 1 ),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SCHOOL_FAITH', 'BuildingType', 'BUILDING_SCHOOL' ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SCHOOL_FAITH', 'YieldType', 'YIELD_FAITH' ),
('MODIFIER_LEADER_NAERALITH_SHAELANA_UA_SCHOOL_FAITH', 'Amount', 1 );
 
[.code.]without the dots because otherwise the forum will want to turn it into a code block. And you must terminate with [./code.]So without the period signs
Code:
without the dots because otherwise the forum will want to turn it into a code block. And you must terminate with

-----------------------------------------------------------------

Additional yields that stem from modifiers are often not applied to buildings that survived a city owner-change

Has to do with the way the 'object' for the building is implemented (ie, modifiers and whatnot that ought to be attached) when the building was first completed

The specific version of the building (the game 'object') that is placed into the game did not get the modifier attached when first completed, and the game very often will never look to whether it should attach that modifier later on. Often a save and reload of the game will cure the issue because part of the reloading process is for the game to re-place everything on the map and attach the needed modifiers that apply at the time the reload is conducted.

-----------------------------------------------------------------

Player level modifiers seem more common to fail to implement for conquered or other owner-changed cities.
 
Last edited:
[.code.]without the dots because otherwise the forum will want to turn it into a code block. And you must terminate with [./code.]So without the period signs
Code:
without the dots because otherwise the forum will want to turn it into a code block. And you must terminate with

-----------------------------------------------------------------

Additional yields that stem from modifiers are often not applied to buildings that survived a city owner-change

Has to do with the way the 'object' for the building is implemented (ie, modifiers and whatnot that ought to be attached) when the building was first completed

The specific version of the building (the game 'object') that is placed into the game did not get the modifier attached when first completed, and the game very often will never look to whether it should attach that modifier later on. Often a save and reload of the game will cure the issue because part of the reloading process is for the game to re-place everything on the map and attach the needed modifiers that apply at the time the reload is conducted.

-----------------------------------------------------------------

Player level modifiers seem more common to fail to implement for conquered or other owner-changed cities.

OK awesome thank you. It appears that a reload did not fix the issue but at least now I know why there was a problem!

Also

Code:
Insert Into THANK_YOU_SO_MUCH
(ThankfulFor, LevelOfGratitude)
VALUES ('CODING_HELP', 10);

Looks like the code block works great! Thanks!
 
Back
Top Bottom