relic not being granted

Contravity

Chieftain
Joined
Apr 26, 2021
Messages
8
I've been testing out a series of various changes to eventually put into small themed mods for the community. In this particular mod for beliefs, a pantheon to grant a relic is not granting the relic for some reason. I've confirmed the basic code structure against existing Firaxis code that works and other mods that work and they all agree that this should also work...but it doesn't. I already tried creating a whole new belief instead of modifying an existing belief and I've tried adding a RelicSource in the ModifierArguments, but no change in behavior. There are no errors in the logs. This is really simple code and I'm baffled on this. Am I missing something?

SQL:
-------------------------------
-- Religious Idols
-- Contravity: gain +1 relic (original belief migrated to Unearthed Offerings)
-------------------------------
INSERT INTO Types
        (Type,                                Kind)
VALUES
        ('RELIGIOUS_IDOLS_GRANT_RELIC_EF',    'KIND_MODIFIER');

UPDATE Beliefs
Set Description = 'LOC_BELIEF_RELIGIOUS_IDOLS_EF_DESCRIPTION'
Where BeliefType = 'BELIEF_RELIGIOUS_IDOLS';

DELETE FROM BeliefModifiers WHERE ModifierId = 'RELIGIOUS_IDOLS_BONUS_MINE_FAITH';
DELETE FROM BeliefModifiers WHERE ModifierId = 'RELIGIOUS_IDOLS_LUXURY_MINE_FAITH';
INSERT INTO BeliefModifiers
        (BeliefType,                ModifierId)
VALUES
        ('BELIEF_RELIGIOUS_IDOLS',    'RELIGIOUS_IDOLS_GRANT_RELIC_EF');

INSERT INTO Modifiers
        (ModifierId,                        ModifierType,                    RunOnce,    Permanent)
VALUES
        ('RELIGIOUS_IDOLS_GRANT_RELIC_EF',    'MODIFIER_PLAYER_GRANT_RELIC',    1,            1);

INSERT INTO ModifierArguments
        (ModifierId,                        Name,        Value)
VALUES
        ('RELIGIOUS_IDOLS_GRANT_RELIC_EF',    'Amount',    1);
 
SOLVED

It has been solved for a while now, but I forgot to update the thread. Posting solution if anyone cares...

SQL:
-------------------------------
-- Religious Idols
-- Contravity: +1 relic and +1 relic slot in palace
    -- credit to SailorCat's Relic Plus mod for how to get the relic to be granted
-------------------------------
INSERT INTO Types
        (Type,                                        Kind)
VALUES
        ('RELIGIOUS_IDOLS_GRANT_RELIC_EF',            'KIND_MODIFIER'),
        ('RELIGIOUS_IDOLS_ALL_CITIES_SLOTS_EF',        'KIND_MODIFIER'),
        ('RELIGIOUS_IDOLS_ALL_PLAYERS_RELIC_EF',    'KIND_MODIFIER');

UPDATE Beliefs
Set Description = 'LOC_BELIEF_RELIGIOUS_IDOLS_EF_DESCRIPTION'
Where BeliefType = 'BELIEF_RELIGIOUS_IDOLS';

DELETE FROM BeliefModifiers WHERE ModifierId = 'RELIGIOUS_IDOLS_BONUS_MINE_FAITH';
DELETE FROM BeliefModifiers WHERE ModifierId = 'RELIGIOUS_IDOLS_LUXURY_MINE_FAITH';
INSERT INTO BeliefModifiers
        (BeliefType,                ModifierId)
VALUES
        ('BELIEF_RELIGIOUS_IDOLS',    'RELIGIOUS_IDOLS_GRANT_RELIC_EF'),
        ('BELIEF_RELIGIOUS_IDOLS',    'RELIGIOUS_IDOLS_GRANT_RELICSLOT_EF');

INSERT INTO DynamicModifiers
        (ModifierType,                                CollectionType,                EffectType)
VALUES
        ('RELIGIOUS_IDOLS_ALL_CITIES_SLOTS_EF',        'COLLECTION_ALL_CITIES',    'EFFECT_ADJUST_EXTRA_GREAT_WORK_SLOTS'),
        ('RELIGIOUS_IDOLS_ALL_PLAYERS_RELIC_EF',    'COLLECTION_ALL_PLAYERS',    'EFFECT_GRANT_RELIC');

INSERT INTO Modifiers
        (ModifierId,                            ModifierType,                            SubjectRequirementSetId,                Permanent)
VALUES
        ('RELIGIOUS_IDOLS_GRANT_RELIC_EF',        'RELIGIOUS_IDOLS_ALL_PLAYERS_RELIC_EF',    'PLAYER_HAS_PANTHEON_REQUIREMENTS',        1),
        ('RELIGIOUS_IDOLS_GRANT_RELICSLOT_EF',    'RELIGIOUS_IDOLS_ALL_CITIES_SLOTS_EF',    'CITY_FOLLOWS_PANTHEON_REQUIREMENTS',    1);

INSERT INTO ModifierArguments
        (ModifierId,                            Name,                    Value)
VALUES
        ('RELIGIOUS_IDOLS_GRANT_RELIC_EF',        'Amount',                1),
        ('RELIGIOUS_IDOLS_GRANT_RELICSLOT_EF',    'BuildingType',            'BUILDING_PALACE'),
        ('RELIGIOUS_IDOLS_GRANT_RELICSLOT_EF',    'GreatWorkSlotType',    'GREATWORKSLOT_RELIC'),
        ('RELIGIOUS_IDOLS_GRANT_RELICSLOT_EF',    'Amount',                1);
 
Top Bottom