[UNRESOLVED] Amani Promotion Question

Social_Mech

Chieftain
Joined
Feb 8, 2021
Messages
28
NOTE: This is an update of my old post. This is the new code I'm using (which, of course, doesn't work).

I'm trying to give Amani a promotion that gives a City-State defensive strength and/or gives the City State units within the borders combat strength. I want the promotion to NOT give any other units combat strength. I tried just using two of Victor's governor promotions and I placed them on one of Amani's promotions.
Code:
<Modifiers>
       <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" ModifierType="MODIFIER_CITY_ADJUST_INNER_DEFENSE" OwnerRequirementSetId="SM_AMBASSADOR_REQS" OwnerStackLimit="1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" ModifierType="MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS" OwnerRequirementSetId="SM_AMBASSADOR_REQS" OwnerStackLimit="1"/>
    </Modifiers>
    <ModifierArguments>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" Name="Amount" Value="50"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Name="Amount" Value="50"/>
    </ModifierArguments>
    <ModifierStrings>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Context="Preview" Text="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER_PREV"/>
    </ModifierStrings>
    <RequirementSets>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementId="SM_PLAYER_IS_CITY_STATE"/>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI"/>
    </RequirementSetRequirements>
    <Requirements>
        <Row RequirementId="SM_PLAYER_IS_CITY_STATE" RequirementType="REQUIREMENT_PLAYER_IS_MINOR"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" RequirementType="REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE"/>
    </Requirements>
    <RequirementArguments>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="GovernorPromotionType" Value="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="Established" Value="true"/>
    </RequirementArguments>
    <GameModifiers>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
    </GameModifiers>
    <GovernorPromotionModifiers>
        <!-- <Delete GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/> -->
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE" ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1"/>
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE" ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
    </GovernorPromotionModifiers>
I cannot get this to work. Any ideas?
 
Last edited:
There is currently no way to restrict Governors from being placed in your own cities.

There might be a slightly more painful way of achieving the effect you describe:

Code:
<Types>
<Row Type="SM_MODIFIER_PLAYER_CITIES_ADJUST_INNER_DEFENSE" Kind="KIND_MODIFIER"/>
<Row Type="SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS" Kind="KIND_MODIFIER"/>
</Types
<!-- These new DynamicModifiers use COLLECTION_PLAYER_CITIES in order to apply their respective Modifier to all cities of a player. -->
   <DynamicModifiers>
        <Row>
            <ModifierType>SM_MODIFIER_PLAYER_CITIES_ADJUST_INNER_DEFENSE</ModifierType>
            <CollectionType>COLLECTION_PLAYER_CITIES</CollectionType>
            <EffectType>EFFECT_ADJUST_CITY_INNER_DEFENSE</EffectType>
        </Row>
        <Row>
            <ModifierType>SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS</ModifierType>
            <CollectionType>COLLECTION_PLAYER_CITIES</CollectionType>
            <EffectType>EFFECT_ADJUST_CITY_COMBAT_BONUS</EffectType>
        </Row>
    </DynamicModifiers>
   <Modifiers>
       <!-- This attaches a modifier to ALL players... as long as they fulfill the requirementset (being a city-state) -->
       <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" ModifierType="MODIFIER_ALL_PLAYERS_ATTACH_MODIFIER" SubjectRequirementSetId="SM_PLAYER_IS_CITY_STATE_REQSET"/>
       <!-- This is the actual modifier that SM_DEFENSE_CITY_STATE_COMBAT_BONUS1 will reference. It's being applied to ALL city-state cities... as long as they fulfill the requirementset (has Amani with the Affluence promotion)-->
       <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_INNER_DEFENSE" SubjectRequirementSetId="SM_CITY_HAS_AMBASSADOR"/>
       <!-- This attaches a modifier to ALL players... as long as they fulfill the requirementset (being a city-state) -->
       <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_PLAYERS_ATTACH_MODIFIER" SubjectRequirementSetId="SM_PLAYER_IS_CITY_STATE_REQSET"/>
       <!-- This is the actual modifier that SM_DEFENSE_CITY_STATE_COMBAT_BONUS2 will reference. It's being applied to ALL city-state cities... as long as they fulfill the requirementset (has Amani with the Affluence promotion)-->
       <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_INNER_DEFENSE" SubjectRequirementSetId="SM_CITY_HAS_AMBASSADOR"/>
    </Modifiers>
   <ModifierArguments>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" Name="Amount" Value="5"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Name="Amount" Value="5"/>
    </ModifierArguments>
   <RequirementSets>
        <Row RequirementSetId="SM_PLAYER_IS_CITY_STATE_REQSET" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
        <Row RequirementSetId="SM_CITY_HAS_AMBASSADOR" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
    </RequirementSets>
    <RequirementSetRequirements>
       <Row RequirementSetId="SM_PLAYER_IS_CITY_STATE_REQSET" RequirementId="SM_PLAYER_IS_CITY_STATE"/>
       <Row RequirementSetId="SM_CITY_HAS_AMBASSADOR" RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI"/>
    </RequirementSetRequirements>
   <Requirements>
        <Row RequirementId="SM_PLAYER_IS_CITY_STATE" RequirementType="REQUIREMENT_PLAYER_IS_MINOR"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" RequirementType="REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE"/>
    </Requirements>
   <RequirementArguments>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="GovernorPromotionType" Value="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="Established" Value="true"/>
    </RequirementArguments>

You won't need to apply any modifiers to Amani's governor promotions, since SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI specifies which promotion it requires.

I haven't tested this code at all but hopefully it helps.
 
I tried this out and it didn't work... quite...
The city-state units didn't receive the bonus (in or out of the city-state's borders).
The city-state itself gained +2/3 city defense (as soon as Amani became establish, it went up from 19 to 21, then when I declared war on the city-state and she left the city, it went from 21 to 18...).
It is easy to say "oh, okay. It didn't work" but it's super weird when something works only halfway??? Weird.

Edit: I changed the mistake and inserted "SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS" ModifierType in the second bonus. Still didn't work >.<
 
Last edited:
The city defense that is displayed is not always accurate. See the mouse-over combat preview for the actual numbers. If it's still only "working halfway" then it'd be easy enough to adjust the numbers I guess.

As for the second bonus - first off, sorry for the mistake, but also I didn't include a combat preview definition for the combat bonus, which would go like this:

Code:
    <ModifierStrings>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Context="Preview" Text="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER_PREV"/>
    </ModifierStrings>

    <EnglishText>
        <Row Tag="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER_PREV" Text="+5 [ICON_Strength] Combat Strength from Affluence."/>
    </EnglishText>

If that doesn't show up then I got nothin'.
 
I just tested it.
I set the bonuses to give +50 just so I could clearly see if it was working or not.
The combat strength to units doesn't work at all T~T
The combat strength given to the city is weird. Before she was established in the city, it says "+6 from outside influence", then when she was, it jumped to +16. This additional +10 was weird though because before that it was lower.
So, +50 = +10? Is it a percentage of something rather than a flat bonus? Not sure.
 
I would try it this way
Code:
<GameData>
	<Modifiers>
		<Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
		<!--The Defender Effect Added to Amani -->
		<Row>
			<ModifierId>SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER</ModifierId>
			<ModifierType>MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS</ModifierType>
			<OwnerRequirementSetId>SM_CITY_HAS_AMBASSADOR</OwnerRequirementSetId>
			<OwnerStackLimit>1</OwnerStackLimit>
		</Row>
	</Modifiers>
	<ModifierArguments>
		<Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER"/>
		<!--The Defender Effect Added to Amani -->
		<Row>
			<ModifierId>SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER</ModifierId>
			<Name>Amount</Name>
			<Value>5</Value>
		</Row>
	</ModifierArguments>
	<RequirementSets>
		<Row RequirementSetId="SM_CITY_HAS_AMBASSADOR" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
	</RequirementSets>
	<RequirementSetRequirements>
		<Row RequirementSetId="SM_CITY_HAS_AMBASSADOR" RequirementId="SM_PLAYER_IS_CITY_STATE"/>
		<Row RequirementSetId="SM_CITY_HAS_AMBASSADOR" RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI"/>
	</RequirementSetRequirements>
	<Requirements>
		<Row RequirementId="SM_PLAYER_IS_CITY_STATE" RequirementType="REQUIREMENT_PLAYER_IS_MINOR"/>
		<Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" RequirementType="REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE"/>
	</Requirements>
	<RequirementArguments>
		<Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="GovernorPromotionType" Value="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/>
		<Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="Established" Value="true"/>
	</RequirementArguments>
	<GameModifiers>
		<Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
	</GameModifiers>
</GameData>
It's not clear whether the requirement set needs to be an "Owner" or a "Subject" so you may have to change OwnerRequirementSetId to SubjectRequirementSetId and the OwnerStackLimit to SubjectStackLimit.

The reason for the Stack Limit is so that multiple civs all placing their Amani in the same city does not have any possibility of crazy stacking. I suspect the Stack Limit will not be needed but it's probably better to add ensurance.

The only outstanding issue logic-wise is whether or not the game will understand that for the city a judgement against the player type needs to be made. It might be necessary to change to an "All Players Attach Modifier" for the primary modifier listed in table GameModifiers and then apply an "Attach to All Player Cities" from that modifier.

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

I have not tested this in any way though it seems logical that it ought to work. Tho sometimes "logical" and "works" are !=.

Btw for this case I don't see any need to add new DynamicModifiers to the game -- either the ones already provided by Firaxis will work for this or the effect will not work at all unless stemming from a GovernorPromotion. For reference Victor's promotion has no requirments of any kind attached to it for this effect -- the game appears to auto-conflate the need to apply the effect only for the city Victor is in via the fact the source of the modifier is table GovernorPromotionModifiers.
 
Okay, so this is what I did. I used the following code:
Code:
<Modifiers>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_INNER_DEFENSE" OwnerRequirementSetId="SM_AMBASSADOR_REQS" OwnerStackLimit="1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS" OwnerRequirementSetId="SM_AMBASSADOR_REQS" OwnerStackLimit="1"/>
    </Modifiers>
    <ModifierArguments>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" Name="Amount" Value="50"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Name="Amount" Value="50"/>
    </ModifierArguments>
    <ModifierStrings>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Context="Preview" Text="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER_PREV"/>
    </ModifierStrings>
    <RequirementSets>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementId="SM_PLAYER_IS_CITY_STATE"/>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI"/>
    </RequirementSetRequirements>
    <Requirements>
        <Row RequirementId="SM_PLAYER_IS_CITY_STATE" RequirementType="REQUIREMENT_PLAYER_IS_MINOR"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" RequirementType="REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE"/>
    </Requirements>
    <RequirementArguments>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="GovernorPromotionType" Value="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="Established" Value="true"/>
    </RequirementArguments>
    <GameModifiers>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
    </GameModifiers>
    <GovernorPromotionModifiers>
This did not work, so I changed the Modifiers table to contain "Subject" rather than "Owner":
Code:
<Modifiers>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_INNER_DEFENSE" SubjectRequirementSetId="SM_AMBASSADOR_REQS" SubjectStackLimit="1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS" SubjectRequirementSetId="SM_AMBASSADOR_REQS" SubjectStackLimit="1"/>
    </Modifiers>
This also did not work.
I'm sort of confused by what you mean when you say "It might be necessary to change to an "All Players Attach Modifier" for the primary modifier listed in table GameModifiers and then apply an "Attach to All Player Cities" from that modifier." What does that mean?
 
In order to test the method I proposed you need to use the ModifierType I specified.

This modifier attaches a second modifier that is specified in table ModifierArguments to all cities:
Code:
<Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
This is that second modifier
Code:
		<Row>
			<ModifierId>SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER</ModifierId>
			<ModifierType>MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS</ModifierType>
			<OwnerRequirementSetId>SM_CITY_HAS_AMBASSADOR</OwnerRequirementSetId>
			<OwnerStackLimit>1</OwnerStackLimit>
		</Row>
It's effect is only applied to an individual city. You cannot have a modifier in this part of the logic that would attempt to make an effect on all cities for either a single player or for all players as you are attempting here
Code:
 ModifierType="SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS"
Player cities in the plural will never satisfy the requirement -- only a single city can do so. This will be true even if the player is a city state. In order to get this to work at all the active effect has to be applied to and against a single city, which is what MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS does for Victor. It is applied against the city he is in -- one city at a time only.

By adding the RequirementSet for SM_CITY_HAS_AMBASSADOR the effect is then further trimmed down to only that single city if and only if the requirements are met that the city is owned by a City-State and that Amani is present in the city and that she has earned the required GovernorPromotion.

You do not need the ModifierType "SM_MODIFIER_PLAYER_CITIES_ADJUST_CITY_COMBAT_BONUS". Nor do I think this is being helpful to you at all.

ModifierTypes "MODIFIER_ALL_CITIES_ATTACH_MODIFIER" and "MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS" already exist as part of the game and if they cannot be made to work because the game simply will not "understand" what you are attempting to do, then I do not see it as being at all likely that creating a new DynamicModifier with a new CollectionType will gain any ground.
 
First off, my apologies. When I was comparing our code, I didn't catch the difference between the ModifierTypes. My bad.
This is the code I used:
Code:
<Modifiers>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" ModifierType="MODIFIER_CITY_ADJUST_INNER_DEFENSE" OwnerRequirementSetId="SM_AMBASSADOR_REQS" OwnerStackLimit="1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" ModifierType="MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS" OwnerRequirementSetId="SM_AMBASSADOR_REQS" OwnerStackLimit="1"/>
    </Modifiers>
    <ModifierArguments>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1_MODIFIER" Name="Amount" Value="50"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2" Name="ModifierId" Value="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Name="Amount" Value="50"/>
    </ModifierArguments>
    <ModifierStrings>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER" Context="Preview" Text="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2_MODIFIER_PREV"/>
    </ModifierStrings>
    <RequirementSets>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementId="SM_PLAYER_IS_CITY_STATE"/>
        <Row RequirementSetId="SM_AMBASSADOR_REQS" RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI"/>
    </RequirementSetRequirements>
    <Requirements>
        <Row RequirementId="SM_PLAYER_IS_CITY_STATE" RequirementType="REQUIREMENT_PLAYER_IS_MINOR"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" RequirementType="REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE"/>
    </Requirements>
    <RequirementArguments>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="GovernorPromotionType" Value="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/>
        <Row RequirementId="SM_REQUIREMENT_CITY_HAS_AFFLUENT_AMANI" Name="Established" Value="true"/>
    </RequirementArguments>
    <GameModifiers>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1"/>
        <Row ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
    </GameModifiers>
    <GovernorPromotionModifiers>
        <!-- <Delete GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE"/> -->
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE" ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS1"/>
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE" ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
    </GovernorPromotionModifiers>
This did not work so I changed "OwnerRequirementSetId" to "SubjectRequirementSetId" and changed "OwnerStackLimit" to "SubjectStackLimit".
This did not work either.
I also checked the Database.log after each try and nothing popped up.
Lastly, I just tried copy/paste your code (just in case I missed something) while also including an addition to the GovernorPromotionModifiers table to attach SM_DEFENSE_CITY_STATE_COMBAT_BONUS2 to Amani's promotion.
Code:
<GovernorPromotionModifiers>
        <Row GovernorPromotionType="GOVERNOR_PROMOTION_AMBASSADOR_AFFLUENCE" ModifierId="SM_DEFENSE_CITY_STATE_COMBAT_BONUS2"/>
    </GovernorPromotionModifiers>
This did not work.
I again changed "OwnerRequirementSetId" to "SubjectRequirementSetId" and "OwnerStackLimit" to "SubjectStackLimit".
Still isn't working.
Is there something else I'm missing? T~T

EDIT: I didn't do what you said here "The only outstanding issue logic-wise is whether or not the game will understand that for the city a judgement against the player type needs to be made. It might be necessary to change to an "All Players Attach Modifier" for the primary modifier listed in table GameModifiers and then apply an "Attach to All Player Cities" from that modifier."

I'm just not sure what this means.
 
Last edited:
If I get time this weekend I'll do a more deep dive into this to determine if it is the way the modifiers are being assigned and constructed or whether the game simply will not do this via a limit on only applying in a City State when Amani is present and has the needed promotion.
 
If I get time this weekend I'll do a more deep dive into this to determine if it is the way the modifiers are being assigned and constructed or whether the game simply will not do this via a limit on only applying in a City State when Amani is present and has the needed promotion.
Okay. Thank you so much for all of your help.
 
So far nothing I have tried has succeeded. I can see in file GameEffects.log a modifier and its effects being attached to a city-state city, and then it gets de-attached.

There seems so far no method that wants to work to limit the effect to only a city state that has Amani. The only things that seem to work is "any city Amani is placed in" or "nothing". I suspect the issue is either in the way Governors are handled internally by the game, or in the way the ModifierType MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS used by Victor is implemented in the game's source code. No other modifier provided by Firaxis uses this ModifierType. Nor does any other ModifierType use the EffectType of EFFECT_ADJUST_CITY_COMBAT_BONUS.
 
So far nothing I have tried has succeeded. I can see in file GameEffects.log a modifier and its effects being attached to a city-state city, and then it gets de-attached.

There seems so far no method that wants to work to limit the effect to only a city state that has Amani. The only things that seem to work is "any city Amani is placed in" or "nothing". I suspect the issue is either in the way Governors are handled internally by the game, or in the way the ModifierType MODIFIER_CITY_ADJUST_CITY_COMBAT_BONUS used by Victor is implemented in the game's source code. No other modifier provided by Firaxis uses this ModifierType. Nor does any other ModifierType use the EffectType of EFFECT_ADJUST_CITY_COMBAT_BONUS.
Okay, thank you so much for testing this. At least the ambiguity of whether or not it works is solved. I figured it would be a good promotion because its annoying when other Civs attack your City-States >.<
 
Top Bottom