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

Dec 30, 2011, 08:42 PM
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.

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)

Does anyone know if there is something hardcoded around this special tag that may cause the game to ignore units when using this tag?

Dec 30, 2011, 09:06 PM
Have you tried using just XML?

Dec 30, 2011, 11:25 PM
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.

Dec 30, 2011, 11:34 PM
I wouldn't know, I've only ever dealt with XML.