[Solved] Civ and leader icons not appearing in game.

FryAmTheiMan

Chieftain
Joined
Oct 27, 2018
Messages
2
I am working on my first mod and have managed to get it to work, but I cannot figure out why the leader and civ icons and background aren't appearing in game, despite the unit and district icons showing up just fine. They all appear during the civ select screen while creating a game, only the unit and district icons are showing up in the actual game. The only thing which I can think of that could be related to it is an error I am seeing in the database and modding logs, but I can't seem to find what the problem is.

Modding log is giving the error:
Code:
[3019935.954] UpdateDatabase - Loading Core/Leader/Ashe_Config.sql
[3019935.954] Warning: UpdateDatabase - Error Loading SQL.

Database log is giving the error:
Code:
[3019935.954] [Gameplay] ERROR: no such table: Players

Code:
-- Ashe_Config
-----------------------------------------------
-- Players
-----------------------------------------------

INSERT INTO Players 
        (CivilizationType, CivilizationName, CivilizationIcon, CivilizationAbilityName, CivilizationAbilityDescription, CivilizationAbilityIcon, LeaderType, LeaderName, LeaderIcon, LeaderAbilityName, LeaderAbilityDescription, LeaderAbilityIcon, Portrait, PortraitBackground)
VALUES    (
        -- Civilization
        'CIVILIZATION_FRYAMTHEIMAN_DALMASCA', -- CivilizationType
        'LOC_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_NAME', -- CivilizationName
        'ICON_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_CUSTOM', -- CivilizationIcon
        'LOC_TRAIT_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_UA_NAME', -- CivilizationAbilityName
        'LOC_TRAIT_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_UA_DESCRIPTION', -- CivilizationAbilityDescription
        'ICON_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_CUSTOM', -- CivilizationAbilityIcon

        -- Leader
        'LEADER_FRYAMTHEIMAN_ASHE', -- LeaderType
        'LOC_LEADER_FRYAMTHEIMAN_ASHE_NAME', -- LeaderName
        'ICON_LEADER_FRYAMTHEIMAN_ASHE_CUSTOM', -- LeaderIcon
        'LOC_TRAIT_LEADER_FRYAMTHEIMAN_ASHE_UA_NAME', -- LeaderAbilityName
        'LOC_TRAIT_LEADER_FRYAMTHEIMAN_ASHE_UA_DESCRIPTION', -- LeaderAbilityDescription
        'ICON_LEADER_FRYAMTHEIMAN_ASHE', -- LeaderAbilityIcon
        'LEADER_LEADER_CUSTOM_NEUTRAL', -- Portrait
        'LEADER_LEADER_CUSTOM_BACKGROUND' -- PortraitBackground
        );

--Rise and Fall
INSERT INTO Players 
        (Domain, CivilizationType, CivilizationName, CivilizationIcon, CivilizationAbilityName, CivilizationAbilityDescription, CivilizationAbilityIcon, LeaderType, LeaderName, LeaderIcon, LeaderAbilityName, LeaderAbilityDescription, LeaderAbilityIcon, Portrait, PortraitBackground)
VALUES    (
        -- Civilization
        'Players:Expansion1_Players', -- Domain
        'CIVILIZATION_FRYAMTHEIMAN_DALMASCA', -- CivilizationType
        'LOC_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_NAME', -- CivilizationName
        'ICON_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_CUSTOM', -- CivilizationIcon
        'LOC_TRAIT_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_UA_NAME', -- CivilizationAbilityName
        'LOC_TRAIT_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_UA_DESCRIPTION', -- CivilizationAbilityDescription
        'ICON_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_CUSTOM', -- CivilizationAbilityIcon

        -- Leader
        'LEADER_FRYAMTHEIMAN_ASHE', -- LeaderType
        'LOC_LEADER_FRYAMTHEIMAN_ASHE_NAME', -- LeaderName
        'ICON_LEADER_FRYAMTHEIMAN_ASHE_CUSTOM', -- LeaderIcon
        'LOC_TRAIT_LEADER_FRYAMTHEIMAN_ASHE_UA_NAME', -- LeaderAbilityName
        'LOC_TRAIT_LEADER_FRYAMTHEIMAN_ASHE_UA_DESCRIPTION', -- LeaderAbilityDescription
        'ICON_LEADER_FRYAMTHEIMAN_ASHE', -- LeaderAbilityIcon
        'LEADER_LEADER_CUSTOM_NEUTRAL', -- Portrait
        'LEADER_LEADER_CUSTOM_BACKGROUND' -- PortraitBackground
        );

-----------------------------------------------
-- PlayerItems
-----------------------------------------------

INSERT INTO PlayerItems
        (Domain,                         CivilizationType,                         LeaderType,                     Type,                                     Icon,                                         Name,                                                 Description,                                             SortIndex    )
VALUES     ('Players:Expansion1_Players',    'CIVILIZATION_FRYAMTHEIMAN_DALMASCA',    'LEADER_FRYAMTHEIMAN_ASHE',    'UNIT_FRYAMTHEIMAN_DALMASCA_UU',        'ICON_UNIT_FRYAMTHEIMAN_DALMASCA_UU',            'LOC_UNIT_FRYAMTHEIMAN_DALMASCA_UU_NAME',            'LOC_UNIT_FRYAMTHEIMAN_DALMASCA_UU_DESCRIPTION',        10            ),
        ('Players:Expansion1_Players',    'CIVILIZATION_FRYAMTHEIMAN_DALMASCA', 'LEADER_FRYAMTHEIMAN_ASHE',     'DISTRICT_FRYAMTHEIMAN_DALMASCA_UD',    'ICON_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD',        'LOC_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD_NAME',     'LOC_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD_DESCRIPTION',         20            );

I'll attach copies of the logs and mod in case they are needed. If it helps, I am using a sort of Frankenstein of Keniisu's template (tutorial and template at
Link to video.) and Toussaint10362's template found here.

This is my first effort at coding of any kind, so I apologize if the problem is obvious.
 

Attachments

From your modinfo file:
Code:
    <UpdateDatabase id="NewAction">
      <File>Core/Leader/Ashe_Agenda.sql</File>
      <File>Core/Leader/Ashe_Leader.sql</File>
      <File>Core/Leader/Ashe_UA.sql</File>
      <File>Core/Leader/Ashe_Config.sql</File>
    </UpdateDatabase>
  </InGameActions>
You are attempting to load a file whose code belongs only in <FrontEndActions> into <InGameActions>.

No XML or SQL "code" file that is loaded into the FrontEnd Database under an UpdateDatabase type of action should also be loaded into the InGame Database, and vice versa. By "code" I mean anything that is being loaded via an UpdateDatabase type of action. It's OK to load files Ashe_Text.sql and Ashe_Icons.xml under both FrontEndActions and InGameActions, but not any of your other files because the tables that are used in the UpdateDatabase actions are not the same between the InGameActions and FrontEndActions. Hence the database.log error you are getting.

If memory serves correctly, a violation of this sort can also cause the game to not read anything from within the same Action, so your error could be "taking out" files Ashe_Agenda.sql, Ashe_Leader.sql, and Ashe_UA.sql along with the Ashe_Config.sql file.

FrontEndActions only apply up to the point where you click the "Start Game" button after selecting your leader; afterwards everything in the InGameActions applies, so anything that successfully got loaded in the Front End (ie, pre-game set up menus) side no longer matters. Everything can be working perfectly in the Front End and yet everything on the In Game side can be completely borked and broken.
 
Your main problem is here:
Code:
	<IconDefinitions>
		<!--Leader Icons-->
		<Row Name="ICON_LEADER_FRYAMTHEIMAN_ASHE_CUSTOM" Atlas="ICON_ATLAS_LEADER_CUSTOM" Index="0"/>

		<!--Civilization Icons-->
		<Row Name="ICON_CIVILIZATION_FRYAMTHEIMAN_DALMASCA_CUSTOM" Atlas="ICON_ATLAS_CIV_CUSTOM" Index="0"/>
		
		<!--District Icons-->
		<Row Name="ICON_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD" Atlas="ICON_ATLAS_DISTRICT_CUSTOM" Index="0"/>
		
		<!--Unit Icons-->
		<Row Name="ICON_UNIT_FRYAMTHEIMAN_DALMASCA_UU" Atlas="ICON_ATLAS_UU_CUSTOM" Index="0"/>

		<!--Building Icons-->
		<Row Name="ICON_BUILDING_FRYAMTHEIMAN_CUSTOM" Atlas="ICON_ATLAS_CIVICS" Index="29"/>

	</IconDefinitions>
While the use of "_CUSTOM" works in the Frontend because you are specifically telling the game which Icon Name to use in Tables "Players" and "PlayerItems", this does not work on the In-Game side because of the way Icon "Names" are used In-Game.

The game engine auto-matches everything after "ICON_" to a Leader Tagname within table Leaders. But your leader is not named LEADER_FRYAMTHEIMAN_ASHE_CUSTOM. It is named LEADER_FRYAMTHEIMAN_ASHE. So your designation of the icon must be ICON_LEADER_FRYAMTHEIMAN_ASHE. The same requirement applies on the In-Game side to the Tag & Icon name of your civilization. The same also applies on the In-Game side to a Building.

Simply eliminate the "_CUSTOM" everywhere (in both your Icon XML file and your Config SQL file) and it should work fine. I have already tested under the Vanilla "Ruleset" and everything is OK, though your civ's icon is a little hard to see in the Opening Leader-Screen because it is so "dim-white" I think.

Also, to make everything work properly for both R&F and Vanilla you really ought to have:
Code:
--Vanilla
INSERT INTO PlayerItems
	(CivilizationType, 			LeaderType, 			Type, 					Icon, 						Name, 						Description, 							SortIndex)
VALUES 	('CIVILIZATION_FRYAMTHEIMAN_DALMASCA',	'LEADER_FRYAMTHEIMAN_ASHE',	'UNIT_FRYAMTHEIMAN_DALMASCA_UU',	'ICON_UNIT_FRYAMTHEIMAN_DALMASCA_UU',		'LOC_UNIT_FRYAMTHEIMAN_DALMASCA_UU_NAME',	'LOC_UNIT_FRYAMTHEIMAN_DALMASCA_UU_DESCRIPTION',		10),
	('CIVILIZATION_FRYAMTHEIMAN_DALMASCA',	'LEADER_FRYAMTHEIMAN_ASHE', 	'DISTRICT_FRYAMTHEIMAN_DALMASCA_UD',	'ICON_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD',	'LOC_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD_NAME', 	'LOC_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD_DESCRIPTION', 		20);

--Rise and Fall
INSERT INTO PlayerItems
	(Domain, 			CivilizationType, 			LeaderType, 			Type, 					Icon, 						Name, 						Description, 							SortIndex)
VALUES 	('Players:Expansion1_Players',	'CIVILIZATION_FRYAMTHEIMAN_DALMASCA',	'LEADER_FRYAMTHEIMAN_ASHE',	'UNIT_FRYAMTHEIMAN_DALMASCA_UU',	'ICON_UNIT_FRYAMTHEIMAN_DALMASCA_UU',		'LOC_UNIT_FRYAMTHEIMAN_DALMASCA_UU_NAME',	'LOC_UNIT_FRYAMTHEIMAN_DALMASCA_UU_DESCRIPTION',		10),
	('Players:Expansion1_Players',	'CIVILIZATION_FRYAMTHEIMAN_DALMASCA',	'LEADER_FRYAMTHEIMAN_ASHE', 	'DISTRICT_FRYAMTHEIMAN_DALMASCA_UD',	'ICON_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD',	'LOC_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD_NAME', 	'LOC_DISTRICT_FRYAMTHEIMAN_DALMASCA_UD_DESCRIPTION', 		20);
You don't need to designate the "Domain" for Vanilla since if you omit it the default "Standard Players" (ie, Vanilla players) is used.
 
Back
Top Bottom