[SOLVED]How does the oligarchy combat bonus only buff melee units?

Mettpawwz

Chieftain
Joined
Feb 4, 2017
Messages
73
The oligarchy combat bonus gives +4 strength to melee units (which after testing actually includes anti-cavalry units like spearmen, not sure about cavalry, but probably. It definitely does not buff ranged units like archers.) but after looking at the SQL tables I can't actually see how this is accomplished in the base game.

It uses a 2part modifier:

1) ModifierId OLIGARCHY_MELEE is of ModifierType MODIFIER_PLAYER_UNITS_GRANT_ABILITY. The ability granted in the ModifierArguments is ABILITY_OLIGARCHY_MELEE_BUFF, which has a ModifierId of,
2) OLIGARCHY_MELEE_BUFF, which is of ModifierType MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH, and which adjusts Amount by 4 in its ModifierArguments.

Neither of these 2 Modifiers have an OwnerRequirementSetId or SubjectRequirementSetId, and they have no arguments specifiying what unit the bonus is applied to.

So how would I go about, for example, causing oligarchy to only give PROMOTION_CLASS_RANGED units +4 combat strength?

I screenshotted an inner join showing all the relevant table columns in case my explanation is confusing.

http://imgur.com/a/OyMJ1

Thanks in advance.
 
Last edited:
There's a separate table, I can't recall the name of it off-hand and don't have access to my PC atm, but it assigns abilities to units based on their type. This table contains many abilities that are set to "inactive". But when you grant an ability to all units using the modifier, it essentially "turns on" any inactive abilities, but only for the units that actually have the ability.

Edit: The TypeTags table is what I was thinking of, as LeeS posted. Notice how it's set to Inactive=True on the UnitAbilities table. Oligarchy essentially just turns it on.
 
Last edited:
C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data\UnitAbilities.xml
Code:
<Types>
	<Row Type="ABILITY_OLIGARCHY_MELEE_BUFF" Kind="KIND_ABILITY"/>
</Types>
<TypeTags>
	<Row Type="ABILITY_OLIGARCHY_MELEE_BUFF" Tag="CLASS_MELEE"/>
	<Row Type="ABILITY_OLIGARCHY_MELEE_BUFF" Tag="CLASS_ANTI_CAVALRY"/>
</TypeTags>
<UnitAbilities>
	<Row UnitAbilityType="ABILITY_OLIGARCHY_MELEE_BUFF" Name="LOC_ABILITY_OLIGARCHY_MELEE_BUFF_NAME" Description="LOC_ABILITY_OLIGARCHY_MELEE_BUFF_DESCRIPTION" Inactive="true"/>
</UnitAbilities>
<UnitAbilityModifiers>
	<Row>
		<UnitAbilityType>ABILITY_OLIGARCHY_MELEE_BUFF</UnitAbilityType>
		<ModifierId>OLIGARCHY_MELEE_BUFF</ModifierId>
	</Row>
</UnitAbilityModifiers>
<ModifierStrings>
	<Row ModifierId="OLIGARCHY_MELEE_BUFF" Context="Preview" Text="LOC_ABILITY_OLIGARCHY_MELEE_BUFF_MODIFIER_DESCRIPTION"/>
</ModifierStrings>
The relevant part would appear to be table <TypeTags> where the ability is assigned to the unit "combat classes".
 
Back
Top Bottom