Startup blank tech-advisor glitch upon startup upon adding mod component

T.c.w7468

...
Joined
Jan 23, 2008
Messages
88
Location
US
Hello!

I have a problem that, upon searching for it, is apparently fairly common, but when I tried looking at other forum entries for my problem, but I found that none of the situations seem to apply to my situation.

I am currently running BTS 3.1.9.0 build 128100 with BUG 4.4 build 2220, BAT (I have no idea what version), BULL 1.2 build 182. Along with these, I have merged this with several other mods, including VD with modern units, most of Civ Gold, scattered civilization, leaderhead, resource, religion, etc modules from across CF, and some personal modifications and additions that I periodically add on to this mod.

I mostly change the XML, the only thing I've changed on python was to adjust some screen panel sizes to accomadate for additional content, and the only thing I have changed in the SDK only involves the appearance of the city bar.

Overall, the mod worked perfectly (as far as I know) until I added a civilisation today, and tested the civilisation.

The error, which you may have seen before, is shown here in pictures (I cannot scroll or otherwise interact with a tech screen, and only a few religious techs are present with no arrows):

Upon loading, before the "Dawn of Man" screen
Spoiler :


After this, the interface disappears until I alt-tab out and in again.

Upon returning to the tech advisor screen I have this:
Spoiler :


I have tried changing the XML several times to isolate the problem, here are my observations that are relevant. The problem seems to be isolated the UU, though I'm not sure if it is the art that's the problem.

  • This error only occurs when playing the new civilisation in question. The game runs fine for other civilisations (as far as I know), including civilisations with UUs from the same unitclass as the affected.
  • This error does not occur if I'm playing a different civ, and this new civilisation is present in the game.
  • The civilisation and all of its components otherwise work perfectly fine, all buttons works, and the art appears properly.
  • The unique building does not seem to be the problem.
  • If I remove the existence of a unique unit for the civilisation, the problem persists.
  • If I apply another civilisation's unique unit to the new civilisation, the problem disappears.
  • If I apply the UU of the new civilisation to an existing civilisation, the problem appears to the host civilisation.
  • If I change the which art is applied to the unit, the problem still persists.
  • I tried grabbing the base UnitInfos code for the UU from different sources to modify, and each time, the problem still presists.
  • I tried renaming the tag for the unit, as well as the art-defines; the problem still persists.
  • I tried changing the name, as well as other attributes of the unit; the problem still exists.
  • I tried moving both the art-defines code and the unit infos code around different modules, as well as in the non-module code, the problem still persists
  • I tried pasting the art of another unit into the unit art defines code, the problem still persists
  • I tried moving the actual art around, changing the code accordingly, the problem still persists.
  • I have tried clearing the xml cache.

This is from the Civ4CivilizationInfos.xml for the new civilisation (I don't think there's a problem in here but anyway):
Spoiler :
Code:
    <CivilizationInfo>
      <Type>CIVILIZATION_CENTRAL_AMERICA</Type>
      <Description>Central American Empire</Description>
      <ShortDescription>Central America</ShortDescription>
      <Adjective>Central American</Adjective>
      <Civilopedia>Central America includes Panama, Nicaragua, Belize, El Salvador, Honduras, and Costa Rica</Civilopedia>
      <DefaultPlayerColor>PLAYERCOLOR_CAMERICA</DefaultPlayerColor>
      <ArtDefineTag>ART_DEF_CIVILIZATION_CA</ArtDefineTag>
      <ArtStyleType>ARTSTYLE_IBERIA</ArtStyleType>
      <UnitArtStyleType>UNIT_ARTSTYLE_CUBAN</UnitArtStyleType>
      <bPlayable>1</bPlayable>
      <bAIPlayable>1</bAIPlayable>
      <Cities>
        <City>Guatemala City</City>
        <City>San Salvador</City>
        <City>San Jose Costa Rica</City>
        <City>Managua</City>
        <City>Tegucigalpa</City>
        <City>Panama City</City>
        <City>Mixco</City>
        <City>Heredia</City>
        <City>Soyapango</City>
        <City>San Pedro Sula</City>
        <City>Leon</City>
        <City>San Miguelito District</City>
        <City>Villa Nueva</City>
        <City>Quetzalentango</City>
        <City>Santa Ana</City>
        <City>San Miguel</City>
        <City>Mejicanos</City>
        <City>Apopa</City>
        <City>Choloma</City>
        <City>La Ceiba</City>
        <City>Masaya</City>
        <City>Matagalpa</City>
        <City>Chinandega</City>      
        <City>Cartago</City>
        <City>Alajuela</City>
        <City>San Miguel Petapa</City>
        <City>Delgado</City>
        <City>Nueva San Salvador</City>
        <City>Ilopango</City>
        <City>Colon</City>
        <City>Cuscatancingo</City>
        <City>Esteli</City>
        <City>Grenada Nicaragua</City>
        <City>Tipitapa</City>
        <City>Jinotega</City>
        <City>Chinandega</City>
        <City>Atlantico Sur</City>
        <City>Atlantico Norte</City>
        <City>Managua Ciudad Sandino</City>
        <City>Tocumen</City>
        <City>David</City>
        <City>Las Cumbres</City>
        <City>Colon</City>
        <City>Atlantico Sur Nueva Guinea</City>
        <City>Escuintla</City>
        <City>San Martin</City>
        <City>El Progreso</City>
        <City>Choluteca</City>
        <City>Comayagua</City>
        <City>Puerto Cortes</City>
        <City>Ahuachapan</City>
        <City>San Marcos</City>
        <City>Usulutan</City>
        <City>San Juan Sacatepequez</City>
        <City>Puntarenas</City>
        <City>San Isidro de El General</City>
        <City>Limon</City>
        <City>Liberia</City>
        <City>Villa Calanes</City>
        <City>Chinautla</City>
        <City>Chimaltenago</City>
        <City>Amatitlan</City>
        <City>Huehuetenango</City>
        <City>Toncatepeque</City>
        <City>Santa Telca</City>
        <City>San Rafael</City>
        <City>La Lima</City>
        <City>Danli</City>
        <City>Siquatepeque</City>
        <City>Esteli</City>
        <City>Grenada Nicaragua</City>
        <City>Tipitapa</City>
        <City>Jinotega</City>
        <City>Chinandega</City>
        <City>Managua Ciudad Sandino</City>
        <City>Atlantico Sur Nueva Guinea</City>
        <City>Atlantico Norte Bilwi</City>
        <City>Atlantico Norte Siuna</City>
        <City>Carazo</City>
        <City>Jinotega</City>
        <City>Matagalpa</City>
        <City>Nueva Segovia</City>
        <City>Atlantico Sur El Rama</City>
        <City>La Chorrera</City>
        <City>Pacora</City>
        <City>Santiago de Veraguas</City>
        <City>Chitre</City>
      </Cities>
      <Buildings>
        <Building>
          <BuildingClassType>BUILDINGCLASS_COLOSSEUM</BuildingClassType>
          <BuildingType>BUILDING_FOOTBALL_STADIUM</BuildingType>
        </Building>
      </Buildings>
      <Units>
        <Unit>
          <UnitClassType>UNITCLASS_MARINE</UnitClassType>
          <UnitType>UNIT_REVOLUTIONARY_MARINE</UnitType>
        </Unit>
      </Units>
      <FreeUnitClasses>
        <FreeUnitClass>
          <UnitClassType>UNITCLASS_SETTLER</UnitClassType>
          <iFreeUnits>1</iFreeUnits>
        </FreeUnitClass>
      </FreeUnitClasses>
      <FreeBuildingClasses>
        <FreeBuildingClass>
          <BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
          <bFreeBuildingClass>1</bFreeBuildingClass>
        </FreeBuildingClass>
      </FreeBuildingClasses>
      <FreeTechs>
        <FreeTech>
          <TechType>TECH_HUNTING</TechType>
          <bFreeTech>1</bFreeTech>
        </FreeTech>
        <FreeTech>
          <TechType>TECH_FISHING</TechType>
          <bFreeTech>1</bFreeTech>
        </FreeTech>
      </FreeTechs>
      <DisableTechs/>
      <InitialCivics>
        <CivicType>CIVIC_DESPOTISM</CivicType>
        <CivicType>CIVIC_BARBARISM</CivicType>
        <CivicType>CIVIC_TRIBALISM</CivicType>
        <CivicType>CIVIC_DECENTRALIZATION</CivicType>
        <CivicType>CIVIC_PAGANISM</CivicType>
      </InitialCivics>
      <Leaders>
        <Leader>
          <LeaderName>LEADER_CHE</LeaderName>
          <bLeaderAvailability>1</bLeaderAvailability>
        </Leader>
      </Leaders>
      <DerivativeCiv>CIVILIZATION_CUBA</DerivativeCiv>
      <CivilizationSelectionSound>AS3D_SPAIN_SELECT</CivilizationSelectionSound>
      <CivilizationActionSound>AS3D_SPAIN_ORDER</CivilizationActionSound>
    </CivilizationInfo>


This is from the Civ4UnitInfos.xml (the name is silly because I changed it several time when troubleshooting, the in-game name is different):
Spoiler :

Code:
		<UnitInfo>
			<Class>UNITCLASS_MARINE</Class>
			<Type>UNIT_REVOLUTIONARY_MARINE</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_GUN</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_UNIT_REVOLUTIONARY_MARINE</Description>
			<Civilopedia>TXT_KEY_UNIT_MODERN_INFANTRY_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_MODERN_INFANTRY_STRATEGY</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			<bNoBadGoodies>0</bNoBadGoodies>
			<bOnlyDefensive>0</bOnlyDefensive>
			<bNoCapture>0</bNoCapture>
			<bQuickCombat>0</bQuickCombat>
			<bRivalTerritory>0</bRivalTerritory>
			<bMilitaryHappiness>1</bMilitaryHappiness>
			<bMilitarySupport>1</bMilitarySupport>
			<bMilitaryProduction>1</bMilitaryProduction>
			<bPillage>1</bPillage>
			<bSpy>0</bSpy>
			<bSabotage>0</bSabotage>
			<bDestroy>0</bDestroy>
			<bStealPlans>0</bStealPlans>
			<bInvestigate>0</bInvestigate>
			<bCounterSpy>0</bCounterSpy>
			<bFound>0</bFound>
			<bGoldenAge>0</bGoldenAge>
			<bInvisible>0</bInvisible>
			<bFirstStrikeImmune>0</bFirstStrikeImmune>
			<bNoDefensiveBonus>0</bNoDefensiveBonus>
			<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
			<bCanMoveImpassable>0</bCanMoveImpassable>
			<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
			<bFlatMovementCost>0</bFlatMovementCost>
			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
			<bNukeImmune>0</bNukeImmune>
			<bPrereqBonuses>0</bPrereqBonuses>
			<bPrereqReligion>0</bPrereqReligion>
			<bMechanized>0</bMechanized>
			<bSuicide>0</bSuicide>
			<bHiddenNationality>0</bHiddenNationality>
			<bAlwaysHostile>0</bAlwaysHostile>
			<UnitClassUpgrades>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_AUTOMATONS</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
			</UnitClassUpgrades>		
			<UnitClassTargets/>
			<UnitCombatTargets/>
			<UnitClassDefenders/>
			<UnitCombatDefenders/>
			<FlankingStrikes/>
			<UnitAIs>
				<UnitAI>
					<UnitAIType>UNITAI_ATTACK</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
				<UnitAI>
					<UnitAIType>UNITAI_ATTACK_CITY</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
				<UnitAI>
					<UnitAIType>UNITAI_RESERVE</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
				<UnitAI>
					<UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
			</UnitAIs>
			<NotUnitAIs/>
			<Builds/>
			<ReligionSpreads/>
			<CorporationSpreads/>
			<GreatPeoples/>
			<Buildings/>
			<ForceBuildings/>
			<HolyCity>NONE</HolyCity>
			<ReligionType>NONE</ReligionType>
			<StateReligion>NONE</StateReligion>
			<PrereqReligion>NONE</PrereqReligion>
			<PrereqCorporation>NONE</PrereqCorporation>
			<PrereqBuilding>NONE</PrereqBuilding>
			<PrereqTech>TECH_COMPOSITES</PrereqTech>
			<TechTypes>
				<PrereqTech>NONE</PrereqTech>
				<PrereqTech>NONE</PrereqTech>
				<PrereqTech>NONE</PrereqTech>
			</TechTypes>
			<BonusType>NONE</BonusType>
			<PrereqBonuses/>
			<ProductionTraits/>
			<Flavors/>
			<iAIWeight>0</iAIWeight>
			<iCost>170</iCost>
			<iHurryCostModifier>0</iHurryCostModifier>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iMinAreaSize>-1</iMinAreaSize>
			<iMoves>1</iMoves>
			<bNoRevealMap>0</bNoRevealMap>
			<iAirRange>0</iAirRange>
			<iAirUnitCap>0</iAirUnitCap>
			<iDropRange>0</iDropRange>
			<iNukeRange>-1</iNukeRange>
			<iWorkRate>0</iWorkRate>
			<iBaseDiscover>0</iBaseDiscover>
			<iDiscoverMultiplier>0</iDiscoverMultiplier>
			<iBaseHurry>0</iBaseHurry>
			<iHurryMultiplier>0</iHurryMultiplier>
			<iBaseTrade>0</iBaseTrade>
			<iTradeMultiplier>0</iTradeMultiplier>
			<iGreatWorkCulture>0</iGreatWorkCulture>
			<iEspionagePoints>0</iEspionagePoints>
			<TerrainImpassables/>
			<FeatureImpassables/>
			<TerrainPassableTechs/>
			<FeaturePassableTechs/>
			<iCombat>24</iCombat>
			<iCombatLimit>100</iCombatLimit>
			<iAirCombat>0</iAirCombat>
			<iAirCombatLimit>0</iAirCombatLimit>
			<iXPValueAttack>4</iXPValueAttack>
			<iXPValueDefense>2</iXPValueDefense>
			<iFirstStrikes>0</iFirstStrikes>
			<iChanceFirstStrikes>1</iChanceFirstStrikes>
			<iInterceptionProbability>0</iInterceptionProbability>
			<iEvasionProbability>0</iEvasionProbability>
			<iWithdrawalProb>0</iWithdrawalProb>
			<iCollateralDamage>0</iCollateralDamage>
			<iCollateralDamageLimit>0</iCollateralDamageLimit>
			<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
			<iCityAttack>0</iCityAttack>
			<iCityDefense>10</iCityDefense>
			<iAnimalCombat>0</iAnimalCombat>
			<iHillsAttack>20</iHillsAttack>
			<iHillsDefense>20</iHillsDefense>
			<TerrainNatives/>
			<FeatureNatives/>
			<TerrainAttacks/>
			<TerrainDefenses/>
			<FeatureAttacks/>
			<FeatureDefenses/>
			<UnitClassAttackMods/>
			<UnitClassDefenseMods/>
			<UnitCombatMods/>
			<UnitCombatCollateralImmunes/>
			<DomainMods/>
			<BonusProductionModifiers/>
			<iBombRate>0</iBombRate>
			<iBombardRate>0</iBombardRate>
			<SpecialCargo>NONE</SpecialCargo>
			<DomainCargo>NONE</DomainCargo>
			<iCargo>0</iCargo>
			<iConscription>7</iConscription>
			<iCultureGarrison>20</iCultureGarrison>
			<iExtraCost>0</iExtraCost>
			<iAsset>5</iAsset>
			<iPower>20</iPower>
			<UnitMeshGroups>
				<iGroupSize>3</iGroupSize>
				<fMaxSpeed>1.75</fMaxSpeed>
				<fPadTime>1</fPadTime>
				<iMeleeWaveSize>3</iMeleeWaveSize>
				<iRangedWaveSize>0</iRangedWaveSize>
				<UnitMeshGroup>
					<iRequired>3</iRequired>
					<EarlyArtDefineTag>ART_DEF_UNIT_REVOLUTIONARY_MARINE</EarlyArtDefineTag>
				</UnitMeshGroup>
			</UnitMeshGroups>
			<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
      <FreePromotions>
        <FreePromotion>
          <PromotionType>PROMOTION_WOODSMAN1</PromotionType>
          <bFreePromotion>1</bFreePromotion>
        </FreePromotion>
      </FreePromotions>
			<LeaderPromotion>NONE</LeaderPromotion>
			<iLeaderExperience>0</iLeaderExperience>
		</UnitInfo>

This is from the Civ4ArtDefines_Unit.xml

Spoiler :
Code:
    <UnitArtInfo>
      <Type>ART_DEF_UNIT_REVOLUTIONARY_MARINE</Type>
      <Button>modules/Custom Civilizations/cuba/ca_marine/Guerilla.dds</Button>
      <fScale>0.44</fScale>
      <fInterfaceScale>1.0</fInterfaceScale>
      <bActAsLand>0</bActAsLand>
      <bActAsAir>0</bActAsAir>
      <NIF>modules/Custom Civilizations/cuba/ca_marine/Marines.nif</NIF>
      <KFM>modules/Custom Civilizations/cuba/ca_marine/Marines.kfm</KFM>
      <SHADERNIF>modules/Custom Civilizations/cuba/ca_marine/Marines_FX.nif</SHADERNIF>
      <ShadowDef>
        <ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
        <ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
        <fShadowScale>1.0</fShadowScale>
      </ShadowDef>
      <fBattleDistance>0.35</fBattleDistance>
      <fRangedDeathTime>0.05</fRangedDeathTime>
      <bActAsRanged>1</bActAsRanged>
      <TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
      <AudioRunSounds>
        <AudioRunTypeLoop/>
        <AudioRunTypeEnd/>
      </AudioRunSounds>
    </UnitArtInfo>

For the actual unit art, I took this skin: http://forums.civfanatics.com/showthread.php?t=161724&highlight=guerilla, and then copied the marine art folder and pasted the skin into the folder.

Can anyone see anything that is wrong? :confused: Please feel free to ask me any other questions that may help solve this. Thank you for your patience!


Pretty girl image for reading all of this:
Spoiler :


edit1: clarification
edit2: added an extra point

I found the problem. Sorry about that.
 
Additional info:

  • I tried creating a clone of another unit from a different unit-class and using that as the UU, and the problem still persists. However, if I use an existing unit (not a clone), the problem no longer persists.
  • Meanwhile, I added another civilization with another unit, and that unit works fine.
  • The problem still persists with any newly written unit I try to make with certain unitclasses, though it goes away with other ones; so far I've tested these: a modern infantry (unitclass_marine), the VD marine (unitclass_marine_ww2), and machine gun unit cause the error, but a cavalry unit does not.

I found the problem. Silly me, urns out it was the same art style problem that I wasn't aware of because the unit artstyle was only used for one other civilisation in my mod (Cuba) and that civilisation has a UU replacment for the cavalry, therefore masking that fact that the cavalry tag used for the artstyle was faulty, and was the reason why everything was fine when I replaced the UU of the civilisation with a cavalry UU.
 
Top Bottom