Need help with my code

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,396
Location
Denmark
Hi

I'd like to tweak Moksha's (The Cardinal's) Grand Inquisitor promotion so that it gives +5 combat strength to religious units trained in the city.

\Skodkim
 
Last edited:
OK, I'm gonna ask for a little help here and keep my fingers crossed :) I made my attempt for a code that would do the trick and it works in the sense that I eliminated all errors from the log files. Problem is that there's no effect from having the governor with the promotion in town when I purchase religious units. They have exactly the same religious combat strength as before :cry:

If anyone one could tell me what I'm doing wrong here I would be very grateful (I'm not unfamiliar to civ modding but there's just so many modifiers and requirements in Civ6 that I don't know hat well yet).

The code:

Spoiler :

DELETE FROM GovernorPromotionModifiers WHERE GovernorPromotionType = 'GOVERNOR_PROMOTION_CARDINAL_GRAND_INQUISITOR';
DELETE FROM Modifiers WHERE ModifierId = 'CARDINAL_GRAND_INQUISITOR_COMBAT';
DELETE FROM ModifierArguments WHERE ModifierId = 'CARDINAL_GRAND_INQUISITOR_COMBAT';

INSERT INTO Types
(Type, Kind)
VALUES
('ABILITY_GRAND_INQUISITOR_BUFF', 'KIND_ABILITY');

INSERT INTO TypeTags
(Type, Tag)
VALUES
('ABILITY_GRAND_INQUISITOR_BUFF', 'CLASS_RELIGIOUS'),
('ABILITY_GRAND_INQUISITOR_BUFF', 'CLASS_INQUISITOR');

INSERT INTO UnitAbilities
(UnitAbilityType, Name, Description, Inactive, ShowFloatTextWhenEarned)
VALUES
('ABILITY_GRAND_INQUISITOR_BUFF', 'LOC_ABILITY_GRAND_INQUISITOR_BUFF_NAME', 'LOC_ABILITY_GRAND_INQUISITOR_BUFF_DESCRIPTION', '1', '0');

INSERT INTO UnitAbilityModifiers
(UnitAbilityType, ModifierId)
VALUES
('ABILITY_GRAND_INQUISITOR_BUFF', 'GRAND_INQUISITOR_BUFF');

INSERT INTO GovernorPromotionModifiers
(GovernorPromotionType, ModifierId)
VALUES
('GOVERNOR_PROMOTION_CARDINAL_GRAND_INQUISITOR', 'GRAND_INQUISITOR_BONUS');

INSERT INTO Modifiers
(ModifierId, ModifierType)
VALUES
('GRAND_INQUISITOR_BUFF', 'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH'),
('GRAND_INQUISITOR_BONUS', 'MODIFIER_PLAYER_CITY_GRANT_ABILITY');

INSERT INTO ModifierArguments
(ModifierId, Name, Value)
VALUES
('GRAND_INQUISITOR_BUFF', 'Amount', '5'),
('GRAND_INQUISITOR_BONUS', 'AbilityType', 'ABILITY_GRAND_INQUISITOR_BUFF');

INSERT INTO ModifierStrings
(ModifierId, Context, Text)
VALUES
('GRAND_INQUISITOR_BUFF', 'Preview', 'LOC_ABILITY_GRAND_INQUISITOR_BUFF_DESCRIPTION'),
('GRAND_INQUISITOR_BONUS', 'Preview', 'LOC_ABILITY_GRAND_INQUISITOR_BUFF_NAME');


\Skodkim
 
OMG it works just like intended :) I just forgot that the combat bonus doesn't show up until you move the mouse over an AI religious unit :)

\Skodkim
 
Top Bottom