Issue: SPECIALUNIT_FIGHTER causing issue when adding new air units to mod

ww2commander

Emperor
Joined
Aug 23, 2003
Messages
1,243
Location
Australia
Thought I would post this here in the hope someone knows why this may be occurring.

I have spent the last two days trying to troubleshoot why any new air units with the <Special> tag set to SPECIALUNIT_FIGHTER refuse to work in my mod. When I remove this tag and set it to null the unit appears in the pedia and in game....strange.

Here are some things to note:
1. Did not remove any vanilla units
2. Did not touch specialunits xml
3. No UnitClasses removed
4. No spelling mistakes...unit works if I set the special tag to null!
5. Cleared cache

EDIT: Forgot to mention I am doing this via SQL.
Spoiler :

INSERT INTO "Units" (Class, Type, Description, Civilopedia, Strategy, Help, Requirements, Moves, Combat, RangedCombat, Cost, Immobile, Range, BaseSightRange, Special, Capture, CombatClass, Domain, CivilianAttackPriority, DefaultUnitAI, Food, NoBadGoodies, RivalTerritory, MilitarySupport, MilitaryProduction, Pillage, Found, FoundAbroad, CultureBombRadius, GoldenAgeTurns, IgnoreBuildingDefense, PrereqResources, Mechanized, Suicide, CaptureWhileEmbarked, PrereqTech, ObsoleteTech, GoodyHutUpgradeUnitClass, HurryCostModifier, AdvancedStartCost, MinAreaSize, AirUnitCap, NukeDamageLevel, WorkRate , NumFreeTechs, RushBuilding, BaseHurry, HurryMultiplier, BaseGold, NumGoldPerEra, SpreadReligion, IsReligious, CombatLimit, RangeAttackOnlyInDomain, RangeAttackIgnoreLOS, RangedCombatLimit, XPValueAttack, XPValueDefense, SpecialCargo, DomainCargo, Conscription, ExtraMaintenanceCost, NoMaintenance, Unhappiness, UnitArtInfo, UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate, UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas)
SELECT 'UNITCLASS_EARLY_FIGHTER','UNIT_I_16','TXT_KEY_UNIT_I_16','TXT_KEY_PEDIA_UNIT_I_16','TXT_KEY_STRATEGY_UNIT_I_16','TXT_KEY_STRATEGY_UNIT_I_16',NULL,2,0,30,340,0,10,2,NULL,NULL,'UNITCOMBAT_FIGHTER','DOMAIN_AIR',NULL,'UNITAI_DEFENSE_AIR',0,0,0,1,1,0,0,0,0,0,1,0,1,0,0,NULL,NULL,NULL,0,50,-1,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,100,3,2,NULL,NULL,0,0,0,0,'ART_DEF_UNIT_I_16',0,0,NULL,NULL,NULL,0,0,1,'AIR_REBASE',0,0,'UNIT_ATLAS_2','UNIT_FLAG_ATLAS';


Does anyone know if there is something hardcoded around this special tag that may cause the game to ignore units when using this tag?
 
Would it make a difference given that XML is converted into SQL when the game loads anyway?

The reason for using SQL is that I am adding a huge amount of units and typing out the XML entries would be tedious.

My hunch is that the tag mentioned seems to break things if not 'managed' correctly.
 
Top Bottom