Custom Leader Ability Applies To ALL Civs

Discussion in 'Mod Creation Help' started by stickmanstan15, Apr 15, 2022.

  1. stickmanstan15

    stickmanstan15 Chieftain

    Joined:
    Aug 22, 2014
    Messages:
    3
    I made a custom civ and a custom leader for it, and the leader ability spawns a free melee unit every time the player builds a camp or a pasture. It actually worked pretty well, until we found out that this bonus applies to every leader. The ability is not exclusive to my custom leader and I don't understand why.

    I've gone through and changed names, values, added requirements; nothing seems to be working.
    Anyone have any suggestions?

    Code:
    INSERT INTO    Types
            (Type,                                                    Kind            )
    VALUES    ('TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC',            'KIND_TRAIT'    );
    
    INSERT INTO    Traits
            (TraitType,                                        Name,                                                    Description                                                    )
    VALUES    ('TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC',    'LOC_TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC_NAME',    'LOC_TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC_DESCRIPTION'    );
            
    INSERT INTO    LeaderTraits
            (LeaderType,                TraitType                                    )
    VALUES    ('LEADER_SS_DR_EGGMAN',    'TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC'    );
    
    -- Modifiers
    
    INSERT INTO TraitModifiers
            (TraitType,                                        ModifierId                                    )
    VALUES    ('TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC',    'TRAIT_LEADER_SS_DR_EGGMAN_CAMP_GRANT_MELEE'        ),
            ('TRAIT_LEADER_GENUINE_GENIUS_MEGALOMANIAC',    'TRAIT_LEADER_SS_DR_EGGMAN_PASTURE_GRANT_MELEE'        );
    
    INSERT INTO Modifiers
            (ModifierId,                                            ModifierType,                                                RunOnce,     Permanent)
    VALUES    ('TRAIT_LEADER_SS_DR_EGGMAN_CAMP_GRANT_MELEE',        'MODIFIER_PLAYER_CITY_GRANT_UNIT_BY_CLASS_IN_NEAREST_CITY',        1,            1),
            ('TRAIT_PLAYER_PASTURE_GRANT_MELEE',                    'MODIFIER_PLAYER_CITY_GRANT_UNIT_BY_CLASS_IN_NEAREST_CITY',        1,            1);
    
    -- ModifierArguments
    
    INSERT INTO ModifierArguments
            (ModifierId,                                Name,                            Value                    )
    VALUES    ('TRAIT_LEADER_SS_DR_EGGMAN_CAMP_GRANT_MELEE',        'ImprovementType',                'IMPROVEMENT_CAMP'        ),
            ('TRAIT_LEADER_SS_DR_EGGMAN_CAMP_GRANT_MELEE',        'UnitPromotionClassType',        'PROMOTION_CLASS_MELEE'    ),
            ('TRAIT_LEADER_SS_DR_EGGMAN_CAMP_GRANT_MELEE',        'Amount',                        1                        ),
            ('TRAIT_LEADER_SS_DR_EGGMAN_PASTURE_GRANT_MELEE',        'ImprovementType',                'IMPROVEMENT_PASTURE'    ),
            ('TRAIT_LEADER_SS_DR_EGGMAN_PASTURE_GRANT_MELEE',        'UnitPromotionClassType',        'PROMOTION_CLASS_MELEE' ),
            ('TRAIT_LEADER_SS_DR_EGGMAN_PASTURE_GRANT_MELEE',        'Amount',                        1                        );
    
     
  2. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,547
    Location:
    Portugal

Share This Page