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

Crashing and Missing Unit Entry

Discussion in 'Civ5 - Creation & Customization' started by Balllistic, Aug 20, 2015.

  1. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    I'm having another problem with my mod that I can't seem to fix. Every time I load it up on Civ 5 and try to play a game with it, it crashes. So, I brought up the logs and removed all the errors I could fix, but its still having the problem.

    The problem looks to be located in the xml logs:
    Code:
    [6287.932] Missing Entry for UNIT_BORDER_PATROL
    It's missing an entry for my unique unit. Here's the rest of the log:
    Spoiler :
    Code:
    [6263.830] **** Validating Game Database *****
    [6265.811] Performing Localization Checks
    [6265.811] Checking Tag Format...
    [6265.811] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
    [6265.811] Validating UnitGameplay2DScripts
    [6265.811] Missing Entry for UNIT_BARBARIAN_HORSEMAN
    [6265.811] **** VALIDATION FAILED *****
    [6265.811] Validation Took 1.991434 seconds
    [6266.138] **** Validating Prefetch Process *****
    [6266.138] **** Validation Success *****
    [6266.138] SetGlobalActionInfo
    [6266.138] 
    -- SQLite Memory Statistics --
    Memory Usage:
    		[Cur]		[Max]
    Malloc:		6404480		75954544
    PageCache:	6		12
    LookAside:	0		0
    Scratch:	0		1
    
    Static Buffer Overflows:
    		[TooLarge]	[NoSpace]
    PageCache:	5982312		63054768
    Scratch:	0		0
    
    Largest Allocations:
    Malloc:		262144
    PageCache:	1172
    Scratch:	6640
    
    Prepared Statements:
    Current:		6
    ------------------------------
    [6266.170] **** Validating Game Database *****
    [6268.135] Performing Localization Checks
    [6268.135] Checking Tag Format...
    [6268.135] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
    [6268.135] Validating UnitGameplay2DScripts
    [6268.135] Missing Entry for UNIT_BARBARIAN_HORSEMAN
    [6268.135] **** VALIDATION FAILED *****
    [6268.135] Validation Took 1.977659 seconds
    [6268.463] **** Validating Prefetch Process *****
    [6268.463] **** Validation Success *****
    [6268.463] SetGlobalActionInfo
    [6268.463] 
    -- SQLite Memory Statistics --
    Memory Usage:
    		[Cur]		[Max]
    Malloc:		6405656		75954544
    PageCache:	6		12
    LookAside:	0		0
    Scratch:	0		1
    
    Static Buffer Overflows:
    		[TooLarge]	[NoSpace]
    PageCache:	5983488		63054768
    Scratch:	0		0
    
    Largest Allocations:
    Malloc:		262144
    PageCache:	1172
    Scratch:	6640
    
    Prepared Statements:
    Current:		6
    ------------------------------
    [6285.919] **** Validating Game Database *****
    [6287.916] Performing Localization Checks
    [6287.916] Checking Tag Format...
    [6287.916] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
    [6287.932] Validating UnitGameplay2DScripts
    [6287.932] Missing Entry for UNIT_BARBARIAN_HORSEMAN
    [6287.932] Missing Entry for UNIT_BORDER_PATROL
    [6287.932] **** VALIDATION FAILED *****
    [6287.932] Validation Took 2.006080 seconds
    [6288.259] **** Validating Prefetch Process *****
    [6288.259] **** Validation Success *****
    [6288.259] SetGlobalActionInfo
    [6288.259] 
    -- SQLite Memory Statistics --
    Memory Usage:
    		[Cur]		[Max]
    Malloc:		6428944		75954544
    PageCache:	7		13
    LookAside:	0		0
    Scratch:	0		1
    
    Static Buffer Overflows:
    		[TooLarge]	[NoSpace]
    PageCache:	6002304		63054768
    Scratch:	0		0
    
    Largest Allocations:
    Malloc:		262144
    PageCache:	1172
    Scratch:	6640
    
    Prepared Statements:
    Current:		8
    ------------------------------


    This is the unit code:
    Spoiler :
    Code:
    <GameData>
    	<Units>
    		<Row>
    			<Class>UNITCLASS_INFANTRY</Class>
    			<Type>UNIT_BORDER_PATROL</Type>
    			<PrereqTech>TECH_REPLACEABLE_PARTS</PrereqTech>
    			<Combat>65</Combat>
    			<Cost>450</Cost>
    			<Moves>4</Moves>
    			<CombatClass>UNITCOMBAT_GUN</CombatClass>
    			<Domain>DOMAIN_LAND</Domain>
    			<DefaultUnitAI>UNITAI_DEFENSE</DefaultUnitAI>
    			<Description>TXT_KEY_UNIT_BORDER_PATROL</Description>
    			<Civilopedia>TXT_KEY_CIV5_BORDERPATROL</Civilopedia>
    			<Strategy>TXT_KEY_UNIT_BORDER_PATROL_STRATEGY</Strategy>
    			<Help>TXT_KEY_UNIT_HELP_BORDER_PATROL</Help>
    			<MilitarySupport>true</MilitarySupport>
    			<MilitaryProduction>true</MilitaryProduction>
    			<Pillage>true</Pillage>
    			<ObsoleteTech>TECH_MOBILE_TACTICS</ObsoleteTech>
    			<GoodyHutUpgradeUnitClass>UNITCLASS_MECHANIZED_INFANTRY</GoodyHutUpgradeUnitClass>
    			<AdvancedStartCost>40</AdvancedStartCost>
    			<XPValueAttack>2</XPValueAttack>
    			<XPValueDefense>5</XPValueDefense>
    			<Conscription>6</Conscription>
    			<UnitArtInfo>ART_DEF_UNIT_INFANTRY</UnitArtInfo>
    			<UnitFlagIconOffset>55</UnitFlagIconOffset>
    			<IconAtlas>UNIT_ATLAS_2</IconAtlas>
    			<PortraitIndex>11</PortraitIndex>
    		</Row>
    	</Units>
    	<Unit_FreePromotions>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<PromotionType>PROMOTION_COVER_2</PromotionType>
    		</Row>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<PromotionType>PROMOTION_EXTRA_SIGHT_I</PromotionType>
    		</Row>
    	</Unit_FreePromotions>
    	<Unit_AITypes>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<UnitAIType>UNITAI_ATTACK</UnitAIType>
    		</Row>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<UnitAIType>UNITAI_DEFENSE</UnitAIType>
    		</Row>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<UnitAIType>UNITAI_EXPLORE</UnitAIType>
    		</Row>
    	</Unit_AITypes>
    	<Unit_ClassUpgrades>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<UnitClassType>UNITCLASS_INFANTRY</UnitClassType>
    		</Row>
    	</Unit_ClassUpgrades>
    	<Unit_Flavors>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<FlavorType>FLAVOR_RECON</FlavorType>
    			<Flavor>1</Flavor>
    		</Row>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<FlavorType>FLAVOR_OFFENSE</FlavorType>
    			<Flavor>2</Flavor>
    		</Row>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<FlavorType>FLAVOR_DEFENSE</FlavorType>
    			<Flavor>2</Flavor>
    		</Row>
    	</Unit_Flavors>
    </GameData>
    


    Can anyone find a problem? I also attached the whole mod to the post if you want to look at it.
     
  2. DarkScythe

    DarkScythe Hunkalicious Holo

    Joined:
    May 6, 2014
    Messages:
    804
    Loads fine for me. Ensure that your mod is the only one loaded when testing to rule out conflicts. That error you're seeing in the log is harmless, though if you want to fix it, you'll need a define an entry for the unit's UnitGameplay2DScripts sound.

    Here is an example from my Civ's Guild Merchant definitions:
    Code:
    	<!-- Define Unit's selection sounds to remove errors -->
    	<UnitGameplay2DScripts>
    		<Row>
    			<UnitType>UNIT_GUILD_MERCHANT</UnitType>
    			<SelectionSound>AS2D_BUILD_UNIT</SelectionSound>
    			<FirstSelectionSound>AS2D_BUILD_UNIT</FirstSelectionSound>
    		</Row>
    	</UnitGameplay2DScripts>
    Again, it's not critical (because the game's stock Barbarian Horsemen are also missing this entry) so it won't cause a crash. I also don't know what sound Infantry are set to use, but whatever works, I suppose.

    Edit:
    More information would be helpful. When are you crashing?

    From the looks of it, if you are crashing when entering the Renaissance Era, you will crash because your Civ has no Spy names defined.
    Otherwise, you also have no Religion defined, although I'm not sure if this causes a crash.

    I imagine you're following Kael's guide, or something. It's a great resource, but unfortunately is heavily outdated because it was created prior to the release of BNW, so at best it serves as a guide rather than a walkthrough because it's missing some of the stuff BNW requires.
     
  3. Balllistic

    Balllistic Chieftain

    Joined:
    Aug 19, 2015
    Messages:
    14
    Location:
    NC, USA
    Alright, it seems to be working now. I found out I was starting in the modern era, once I set it back to starting in the ancient era it worked.
     
  4. DarkScythe

    DarkScythe Hunkalicious Holo

    Joined:
    May 6, 2014
    Messages:
    804
    That just means you were crashing due to the lack of Spy names. You'll need to add those or else you'll crash anytime you hit or exceed the Renaissance era.
     
  5. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    7,139
    Location:
    Illinois, USA
    Also:
    Code:
    	<Unit_ClassUpgrades>
    		<Row>
    			<UnitType>UNIT_BORDER_PATROL</UnitType>
    			<UnitClassType>UNITCLASS_INFANTRY</UnitClassType>
    		</Row>
    	</Unit_ClassUpgrades>
    
    and
    Code:
    <GameData>
    	<Units>
    		<Row>
    			<Class>UNITCLASS_INFANTRY</Class>
    			<Type>UNIT_BORDER_PATROL</Type>
    
    Will cause something "interesting" behavior at some point.
     

Share This Page