New Leader missing civilization traits

Imnimo

Chieftain
Joined
Dec 3, 2017
Messages
33
I'm trying to add a new leader for an existing Civ, and I'm having trouble setting up the existing traits. Following the tutorial here:


I'm working on editing the Players table, and have this line:

Code:
INSERT INTO Players   
        (CivilizationType,                        Portrait,                                PortraitBackground,                            LeaderType,                        LeaderName,                                    LeaderIcon,                                LeaderAbilityName,                                LeaderAbilityDescription,                                    LeaderAbilityIcon,                        CivilizationName,                            CivilizationIcon,                        CivilizationAbilityName,                        CivilizationAbilityDescription,                                CivilizationAbilityIcon)
VALUES    ('CIVILIZATION_GERMANY',            'LEADER_LEADER_CUSTOM_NEUTRAL.dds',        'LEADER_JOHN_CURTIN_BACKGROUND',        'LEADER_NEM_FERDINAND_II',        'LOC_LEADER_NEM_FERDINAND_II',        'ICON_LEADER_NEM_FERDINAND_II',        'LOC_TRAIT_LEADER_NEM_EDICT_OF_RESTITUTION',    'LOC_TRAIT_LEADER_NEM_EDICT_OF_RESTITUION_DESCRIPTION',        'ICON_LEADER_NEM_FERDINAND_II',        'LOC_CIVILIZATION_GERMANY_NAME',        'ICON_CIVILIZATION_GERMANY',        'LOC_TRAIT_CIVILIZATION_IMPERIAL_FREE_CITIES_NAME',        'LOC_TRAIT_CIVILIZATION_IMPERIAL_FREE_CITIES_DESCRIPTION',                'ICON_CIVILIZATION_GERMANY');

When I load up a game as this leader, I only have the one trait, Imperial Free Cities. It's not clear to me how to also add the other default German traits, U-Boats and Hansas. Following the example I saw in some other mods, I tried adding them via the PlayerItems table:

Code:
INSERT INTO PlayerItems   
        (CivilizationType,                    LeaderType,                    Type,                            Icon,                                Name,                                          Description,                                    SortIndex)
VALUES    ('CIVILIZATION_GERMANY,        'LEADER_NEM_FERDINAND_II',    'UNIT_GERMAN_UBOAT',                'ICON_UNIT_GERMAN_UBOAT',        'LOC_UNIT_GERMAN_UBOAT_NAME',            'LOC_UNIT_GERMAN_UBOAT_DESCRIPTION',            30);

INSERT INTO PlayerItems   
        (CivilizationType,                    LeaderType,                    Type,                            Icon,                                Name,                                          Description,                                    SortIndex)
VALUES    ('CIVILIZATION_GERMANY,        'LEADER_NEM_FERDINAND_II',    'DISTRICT_HANSA',                'ICON_DISTRICT_HANSA',        'LOC_DISTRICT_HANSA_NAME',            'LOC_DISTRICT_HANSA_DESCRIPTION',            30);

But this didn't seem to work. How do I go about setting up a new leader which keeps all of the base Civ's traits?
 
Tables 'Players' and 'PlayerItems' are only for the game set-up screens, must be loaded in an action that is activated in the <FrontEndActions>, and have no actual effect on gameplay.

JFD has a couple of extra leaders for russia. You may want to download his Elizabeth of Russia mod and look in file RussiaElisabeth_GameDefines.sql for defining the in-game data for adding a new leader for an existing civilization. Where he is doing this to assign new leader-traits to his additional leaders you may need instead to simply give your leader the same traits as LEADER_BARBAROSSA is given in the game's Leaders.xml file in addition to anything extra you want to give the new leader.
Code:
INSERT INTO LeaderTraits	
	(LeaderType,			TraitType)
VALUES	('LEADER_JFD_ELISABETH',	'TRAIT_LEADER_JFD_COURT_MASQUERADES'),
	('LEADER_JFD_ELISABETH',	'TRAIT_LEADER_BUILDING_JFD_ART_INSTITUTE'),	
	('LEADER_PETER_GREAT',		'TRAIT_LEADER_UNIT_JFD_PREOBRAZHENSKY');
 
Tables 'Players' and 'PlayerItems' are only for the game set-up screens, must be loaded in an action that is activated in the <FrontEndActions>, and have no actual effect on gameplay.

JFD has a couple of extra leaders for russia. You may want to download his Elizabeth of Russia mod and look in file RussiaElisabeth_GameDefines.sql for defining the in-game data for adding a new leader for an existing civilization. Where he is doing this to assign new leader-traits to his additional leaders you may need instead to simply give your leader the same traits as LEADER_BARBAROSSA is given in the game's Leaders.xml file in addition to anything extra you want to give the new leader.
Code:
INSERT INTO LeaderTraits   
    (LeaderType,            TraitType)
VALUES    ('LEADER_JFD_ELISABETH',    'TRAIT_LEADER_JFD_COURT_MASQUERADES'),
    ('LEADER_JFD_ELISABETH',    'TRAIT_LEADER_BUILDING_JFD_ART_INSTITUTE'),   
    ('LEADER_PETER_GREAT',        'TRAIT_LEADER_UNIT_JFD_PREOBRAZHENSKY');

The only trait that Barbarossa has in Leaders.xml is:

Code:
        <Row LeaderType="LEADER_BARBAROSSA" TraitType="TRAIT_LEADER_HOLY_ROMAN_EMPEROR"/>

However, in Civilizations.xml, Germany has the traits I'm missing:

Code:
        <Row CivilizationType="CIVILIZATION_GERMANY" TraitType="TRAIT_CIVILIZATION_IMPERIAL_FREE_CITIES"/>
        <Row CivilizationType="CIVILIZATION_GERMANY" TraitType="TRAIT_CIVILIZATION_DISTRICT_HANSA"/>
        <Row CivilizationType="CIVILIZATION_GERMANY" TraitType="TRAIT_CIVILIZATION_UNIT_GERMAN_UBOAT"/>

I tried adding the traits to both my leader and to Germany, and now I see the traits when I'm at the loading screen, but I don't see the traits on the leader selection screen. Do you know if there's a special place I have to reference the traits to get them to show up when you're selecting a leader? Maybe something in FrontEnd?
 
Back
Top Bottom