Leader Not Working with China

SlySlySly

Warlord
Joined
Feb 8, 2017
Messages
293
Location
Denver
Hey! I've been trying to get my pretty much finished leader to work with China as well as his modded civilization. I don't know what I did wrong can someone take a look at the files quickly for me?
 

Attachments

  • Han Civ.zip
    66.3 KB · Views: 127
How does it not work? Any log errors?
I'm getting an error in database where it says:
"[3255970.960] [Gameplay] ERROR: Invalid Reference on HistoricalAgendas.LeaderType - "LEADER_HAN_WUDI_CHINA" does not exist in Leaders"
Spoiler Code for historical agendas :

INSERT INTO HistoricalAgendas
(LeaderType, AgendaType )
VALUES ('LEADER_HAN_WUDI_CHINA', 'AGENDA_HAN_WUDI_CHINA' );

Spoiler where I add the leader :

INSERT INTO Types
(Type, Kind )
VALUES ('LEADER_HAN_WUDI_CHINA', 'KIND_LEADER' );
 
If this is the code you are using to add your leader into the game, then you aren't adding a leader to the game, you are adding a type to the game:
Code:
INSERT INTO Types
(Type, Kind )
VALUES ('LEADER_HAN_WUDI_CHINA', 'KIND_LEADER' );
A Type is not a Leader, even though you have to specify that the type is a "KIND_LEADER"

You have to add the new Leader to the <Leaders> table.

Code:
<GameInfo>
        ……………..
	<Types>
               …………………….
		<Row Type="LEADER_CATHERINE_DE_MEDICI" Kind="KIND_LEADER"/>
               …………………….
	</Types>
	<Leaders>
		  ………………...
		<Row LeaderType="LEADER_CATHERINE_DE_MEDICI" Name="LOC_LEADER_CATHERINE_DE_MEDICI_NAME" Sex="Female" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
		  ………………...
	</Leaders>
	<LeaderQuotes>
		…………………………….
		<Row LeaderType="LEADER_CATHERINE_DE_MEDICI" Quote="LOC_PEDIA_LEADERS_PAGE_LEADER_CATHERINE_DE_MEDICI_QUOTE" QuoteAudio="Play_FRAN_CA_MISC_PEP_TALK_D_2"/>
		…………………………….
	</LeaderQuotes>
      …. etc …..

</GameInfo>
 
If this is the code you are using to add your leader into the game, then you aren't adding a leader to the game, you are adding a type to the game:
Code:
INSERT INTO Types
(Type, Kind )
VALUES ('LEADER_HAN_WUDI_CHINA', 'KIND_LEADER' );
A Type is not a Leader, even though you have to specify that the type is a "KIND_LEADER"

You have to add the new Leader to the <Leaders> table.

Code:
<GameInfo>
        ……………..
    <Types>
               …………………….
        <Row Type="LEADER_CATHERINE_DE_MEDICI" Kind="KIND_LEADER"/>
               …………………….
    </Types>
    <Leaders>
          ………………...
        <Row LeaderType="LEADER_CATHERINE_DE_MEDICI" Name="LOC_LEADER_CATHERINE_DE_MEDICI_NAME" Sex="Female" InheritFrom="LEADER_DEFAULT" SceneLayers="4"/>
          ………………...
    </Leaders>
    <LeaderQuotes>
        …………………………….
        <Row LeaderType="LEADER_CATHERINE_DE_MEDICI" Quote="LOC_PEDIA_LEADERS_PAGE_LEADER_CATHERINE_DE_MEDICI_QUOTE" QuoteAudio="Play_FRAN_CA_MISC_PEP_TALK_D_2"/>
        …………………………….
    </LeaderQuotes>
      …. etc …..

</GameInfo>
I'm assuming it was something else then because I guess I did have that stuff in my code as well.
Spoiler Leader inserting :

INSERT INTO Leaders
(LeaderType, Name, InheritFrom, SceneLayers, Sex )
VALUES ('LEADER_HAN_WUDI_CHINA', 'LOC_LEADER_HAN_WUDI_CHINA_NAME', 'LEADER_DEFAULT', 4, 'Male' );

I also have the config file, could this be part of the problem?
Code:
INSERT INTO Players(Domain, CivilizationType, CivilizationName, CivilizationIcon, CivilizationAbilityName, CivilizationAbilityDescription, CivilizationAbilityIcon, LeaderType, LeaderName, LeaderIcon, LeaderAbilityName, LeaderAbilityDescription, LeaderAbilityIcon)
VALUES(   
        -- Civilization
        'Players:Expansion2_Players', -- Domain
        'CIVILIZATION_CHINA', -- CivilizationType
        'LOC_CIVILIZATION_CHINA_NAME', -- CivilizationName
        'ICON_CIVILIZATION_CHINA', -- CivilizationIcon
        'LOC_TRAIT_CIVILIZATION_DYNASTIC_CYCLE_NAME', -- CivilizationAbilityName
        'LOC_TRAIT_CIVILIZATION_DYNASTIC_CYCLE_EXPANSION2_DESCRIPTION', -- CivilizationAbilityDescription
        'ICON_CIVILIZATION_CHINA', -- CivilizationAbilityIcon
        
        -- Leader
        'LEADER_HAN_WUDI_CHINA', -- LeaderType
        'LOC_LEADER_HAN_WUDI_CHINA_NAME', -- LeaderName
        'ICON_LEADER_QIN', -- LeaderIcon (Portrait)
        'LOC_TRAIT_LEADER_HAN_WUDI_CHINA_UA_NAME', -- LeaderAbilityName
        'LOC_TRAIT_LEADER_HAN_WUDI_CHINA_UA_DESCRIPTION', -- LeaderAbilityDescription
        'ICON_LEADER_QIN' -- LeaderAbilityIcon
        );


INSERT INTO PlayerItems(Domain, CivilizationType, LeaderType, Type, Icon, Name, Description, SortIndex    )
VALUES('Players:Expansion2_Players',    'CIVILIZATION_CHINA',    'LEADER_HAN_WUDI_CHINA',    'UNIT_CHINESE_CROUCHING_TIGER',        'ICON_UNIT_CHINESE_CROUCHING_TIGER',        'LOC_UNIT_CHINESE_CROUCHING_TIGER_NAME',        'LOC_UNIT_CHINESE_CROUCHING_TIGER_DESCRIPTION',        10            ),
        ('Players:Expansion2_Players',    'CIVILIZATION_CHINA',    'LEADER_HAN_WUDI_CHINA',    'IMPROVEMENT_GREAT_WALL',    'ICON_IMPROVEMENT_GREAT_WALL',    'LOC_IMPROVEMENT_GREAT_WALL_NAME',    'LOC_IMPROVEMENT_GREAT_WALL_EXPANSION2_DESCRIPTION',    20            );
 
Top Bottom