1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Need help with custom civilization mod

Discussion in 'Mod Creation Help' started by SwimHero, May 5, 2018.

  1. SwimHero

    SwimHero Chieftain

    Joined:
    May 5, 2018
    Messages:
    7
    Gender:
    Male
    I just started working on this mod a few days ago using Toussaint's template and I'm having difficulty with the units and buildings. The art, icons and text are working fine and I can see them in the leader select screen perfectly. However, I am unable to launch the game. I'm sure it has something to do with my unit.artdef, because I have no idea what I am doing there. Any help would be super appreciated.
     

    Attached Files:

  2. Philasimes

    Philasimes Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    19
    Gender:
    Male
    Location:
    Switzerland
    Could you please provide the database.log file which you will find in in the folder documents/my games/sid meier's civilization VI/Logs? After you launch the game with the mod enabled and it crashes, just open the database.log file and tell us what it says inside. Artdefs files will most certainly not cause you're game to crash, they're just for cosmetics, so you will probably have some error in your code.
     
  3. SwimHero

    SwimHero Chieftain

    Joined:
    May 5, 2018
    Messages:
    7
    Gender:
    Male
    [842018.379] [Localization]: StartupErrorMessages.xml
    [842018.379] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
    [842022.795] [Localization]: Validating Foreign Key Constraints...
    [842022.795] [Localization]: Passed Validation.
    [842022.864] [Configuration]: Validating Foreign Key Constraints...
    [842022.865] [Configuration]: Passed Validation.
    [842034.942] [FullTextSearch]: Initializing FullTextSearch
    [842035.774] [Gameplay]: Validating Foreign Key Constraints...
    [842035.786] [Gameplay]: Passed Validation.
    [842036.563] [Configuration] ERROR: no such table: Types
    [842036.563] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [842036.563] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
    [842036.573] [Configuration] ERROR: no such table: Types
    [842036.573] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [842036.573] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
    [842036.573] [Configuration]: Validating Foreign Key Constraints...
    [842036.573] [Configuration]: Passed Validation.
    [842054.298] [FullTextSearch]: FTS - Creating Context
    [842058.541] [FullTextSearch]: FTS - Creating Context
    [842062.298] [Configuration]: Validating Foreign Key Constraints...
    [842062.298] [Configuration]: Passed Validation.
    [842064.076] [Configuration] ERROR: no such table: Types
    [842064.076] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [842064.076] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
    [842064.077] [Configuration] ERROR: no such table: Types
    [842064.077] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [842064.077] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
    [842064.077] [Configuration]: Validating Foreign Key Constraints...
    [842064.077] [Configuration]: Passed Validation.
    [842072.123] [Gameplay] ERROR: FOREIGN KEY constraint failed
    [842072.123] [Gameplay] ERROR: FOREIGN KEY constraint failed
    [842072.123] [Gameplay]: Validating Foreign Key Constraints...
    [842072.125] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_WAKANDAN_RESEARCH_FACILITY" does not exist in Traits
    [842072.133] [Gameplay] ERROR: Invalid Reference on Traits.TraitType - "TRAIT_CIVILIZATION_WAKANDAN_FIGHTER" does not exist in Types
    [842072.133] [Gameplay] ERROR: Invalid Reference on Traits.TraitType - "TRAIT_CIVILIZATION_WAKANDAN_RESEARCH_FACILITY" does not exist in Types
    [842072.133] [Gameplay] ERROR: Invalid Reference on Traits.TraitType - "TRAIT_CIVILIZATION_WAKANDAN_WARRIOR" does not exist in Types
    [842072.134] [Gameplay] ERROR: Invalid Reference on Units.UnitType - "UNIT_WAKADAN_FIGHTER" does not exist in Types
    [842072.135] [Gameplay] ERROR: Invalid Reference on UnitAiInfos.UnitType - "UNIT_WAKANDAN_FIGHTER" does not exist in Units
    [842072.135] [Gameplay] ERROR: Invalid Reference on UnitAiInfos.UnitType - "UNIT_WAKANDAN_FIGHTER" does not exist in Units
    [842072.135] [Gameplay] ERROR: Invalid Reference on UnitReplaces.CivUniqueUnitType - "UNIT_WAKANDAN_FIGHTER" does not exist in Units
    [842072.135] [Gameplay]: Failed Validation.
    [842073.561] [Configuration] ERROR: no such table: Types
    [842073.561] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [842073.561] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
    [842073.562] [Configuration] ERROR: no such table: Types
    [842073.562] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [842073.562] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
    [842073.842] [Configuration]: Validating Foreign Key Constraints...
    [842073.842] [Configuration]: Passed Validation.
    [842074.215] [FullTextSearch]: FTS - Creating Context
     
  4. Philasimes

    Philasimes Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    19
    Gender:
    Male
    Location:
    Switzerland
    So, you've got quite a few errors.

    ERROR: no such table: Types
    [842036.563] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);

    This just means that the game is trying to update the database but it cannot find any table called 'Types'. Most likely that's because you're trying to load the file into front-end where it does not need to be loaded.

    ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_WAKANDAN_RESEARCH_FACILITY" does not exist in Traits

    These types of errors usually occur because you forgot to link the actual trait with the type (look at the database and look for the table called types. there you will see a types and kind, you need to make sure that you're telling the game that the buildingtrait is a type kind= trait). For that I would recommend you look at other mods that have used XML as a basis and look at exactly what they have done. Unfortunately I've made the experience that the template doesn't work too well if you're just starting out.
     
  5. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,755
    Location:
    Illinois, USA
    copy/paste really is your friend:
    Code:
    <GameData>
    	<Types>
    		<Row Type="UNIT_WAKANDAN_FIGHTER" Kind="KIND_UNIT"/>
    	</Types>
    	<Units>
    		<Row UnitType="UNIT_WAKADAN_FIGHTER"  .....
    And
    Spoiler :
    Code:
    INSERT INTO Types	
    		(Type,													Kind)
    VALUES	('TRAIT_CIVILIZATION_TEMP_CIV_TRAIT',						'KIND_TRAIT'),
    	('TRAIT_CIVILIZATION_BUILDING_WAKANDAN_RESEARCH_FACILITY',				'KIND_TRAIT'),
    	('TRAIT_CIVILIZATION_UNIT_WAKANDAN_WARRIOR',				'KIND_TRAIT'),
    	('TRAIT_CIVILIZATION_UNIT_WAKANDAN_FIGHTER',				'KIND_TRAIT');
    --------------------------------------------------------------------------------------------------------------------------			
    -- Traits			
    --------------------------------------------------------------------------------------------------------------------------				
    INSERT INTO Traits				
    		(TraitType,													Name,													Description)
    VALUES	('TRAIT_CIVILIZATION_TEMP_CIV_TRAIT',						'LOC_TRAIT_CIVILIZATION_TEMP_CIV_TRAIT_NAME',					'LOC_TRAIT_CIVILIZATION_TEMP_CIV_TRAIT_DESCRIPTION'),
    	('TRAIT_CIVILIZATION_WAKANDAN_RESEARCH_FACILITY',				'LOC_TRAIT_CIVILIZATION_WAKANDAN_RESEARCH_FACILITY_NAME',			'LOC_TRAIT_CIVILIZATION_WAKANDAN_RESEARCH_FACILITY_DESCRIPTION'),
    	('TRAIT_CIVILIZATION_WAKANDAN_WARRIOR',				'LOC_WAKANDAN_WARRIOR_NAME',								'LOC_WAKANDAN_WARRIOR_DESCRIPTION'),			
    	('TRAIT_CIVILIZATION_WAKANDAN_FIGHTER',				'LOC_WAKANDAN_FIGHTER_NAME',								'LOC_WAKANDAN_FIGHTER_DESCRIPTION');
     
  6. SwimHero

    SwimHero Chieftain

    Joined:
    May 5, 2018
    Messages:
    7
    Gender:
    Male
    [1017850.962] [Localization]: StartupErrorMessages.xml
    [1017850.962] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
    [1017854.643] [Localization]: Validating Foreign Key Constraints...
    [1017854.644] [Localization]: Passed Validation.
    [1017854.650] [Configuration]: Validating Foreign Key Constraints...
    [1017854.651] [Configuration]: Passed Validation.
    [1017866.294] [FullTextSearch]: Initializing FullTextSearch
    [1017866.600] [Gameplay]: Validating Foreign Key Constraints...
    [1017866.612] [Gameplay]: Passed Validation.
    [1017867.125] [Configuration]: Validating Foreign Key Constraints...
    [1017867.125] [Configuration]: Passed Validation.
    [1017887.040] [FullTextSearch]: FTS - Creating Context
    [1017892.789] [FullTextSearch]: FTS - Creating Context
    [1017895.777] [Configuration]: Validating Foreign Key Constraints...
    [1017895.777] [Configuration]: Passed Validation.
    [1017896.482] [Configuration]: Validating Foreign Key Constraints...
    [1017896.482] [Configuration]: Passed Validation.
    [1017903.599] [Gameplay] ERROR: near "(": syntax error
    [1017903.601] [Gameplay] ERROR: no such table: Building_Prereqs
    [1017903.601] [Gameplay]: In Query - insert into Building_Prereqs('PrereqBuilding', 'Building') values (?, ?);
    [1017903.601] [Gameplay]: In XMLSerializer while updating table Building_Prereqs from file Template_Buildings.xml.
    [1017903.625] [Gameplay] ERROR: FOREIGN KEY constraint failed
    [1017903.625] [Gameplay] ERROR: FOREIGN KEY constraint failed
    [1017903.625] [Gameplay]: Validating Foreign Key Constraints...
    [1017903.626] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_TEMP_SHURI_LAB" does not exist in Traits
    [1017903.635] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_TEMP_DORA_MILAJE" does not exist in Traits
    [1017903.636] [Gameplay]: Failed Validation.

    [1017905.319] [Configuration]: Validating Foreign Key Constraints...
    [1017905.320] [Configuration]: Passed Validation.
    [1017905.705] [FullTextSearch]: FTS - Creating Context



    I still do not understand how to fix this problem with the traits
     
  7. SwimHero

    SwimHero Chieftain

    Joined:
    May 5, 2018
    Messages:
    7
    Gender:
    Male
    When I take the Template_Buildings.xml and Template_Units.xml out of the in-game actions the game starts fine. Except my custom unit and building are not in the game.
     
  8. SwimHero

    SwimHero Chieftain

    Joined:
    May 5, 2018
    Messages:
    7
    Gender:
    Male
    [1022248.809] [Localization]: StartupErrorMessages.xml
    [1022248.809] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
    [1022252.620] [Localization]: Validating Foreign Key Constraints...
    [1022252.621] [Localization]: Passed Validation.
    [1022252.627] [Configuration]: Validating Foreign Key Constraints...
    [1022252.628] [Configuration]: Passed Validation.
    [1022264.301] [FullTextSearch]: Initializing FullTextSearch
    [1022264.591] [Gameplay]: Validating Foreign Key Constraints...
    [1022264.602] [Gameplay]: Passed Validation.
    [1022265.164] [Configuration] ERROR: no such table: Types
    [1022265.164] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [1022265.164] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
    [1022265.168] [Configuration] ERROR: no such table: Types
    [1022265.168] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
    [1022265.168] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
    [1022265.168] [Configuration]: Validating Foreign Key Constraints...
    [1022265.168] [Configuration]: Passed Validation.
    [1022282.596] [FullTextSearch]: FTS - Creating Context
    [1022290.066] [Gameplay] ERROR: near "(": syntax error
    [1022290.091] [Gameplay]: Validating Foreign Key Constraints...
    [1022290.102] [Gameplay]: Passed Validation.
    [1022294.574] [FullTextSearch]: FTS - Creating Context
    [1022294.735] [FullTextSearch]: FTS - Creating Context
    [1022295.234] [FullTextSearch]: FTS - Creating Context
     
  9. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,755
    Location:
    Illinois, USA
    <BuildingPrereqs> is the correct name of the table.

    And one of your SQL files has a fatal syntax error: could be just about anything, but often people have ";" when they need "," (or the other way around) or they omit a comma seperator between column-datas.
     
  10. SwimHero

    SwimHero Chieftain

    Joined:
    May 5, 2018
    Messages:
    7
    Gender:
    Male
    You were right, I was missing a semicolon in the game defines. That seemed to fix all my problems.

    I am still having trouble figuring out how to edit the unit.artdef for my unique unit. I’m trying to borrow the existing model from the spearman unit for my unique unit, but I don’t know how to do that
     
  11. Zobtzler

    Zobtzler Chieftain

    Joined:
    Oct 21, 2017
    Messages:
    93
    Location:
    Sweden

Share This Page