1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

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

Discussion in 'Civ5 - Creation & Customization' started by ww2commander, Dec 30, 2011.

  1. ww2commander

    ww2commander Chieftain

    Joined:
    Aug 23, 2003
    Messages:
    1,242
    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?
     
  2. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,124
    Location:
    Aotearoa
    Have you tried using just XML?
     
  3. ww2commander

    ww2commander Chieftain

    Joined:
    Aug 23, 2003
    Messages:
    1,242
    Location:
    Australia
    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.
     
  4. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,124
    Location:
    Aotearoa
    I wouldn't know, I've only ever dealt with XML.
     

Share This Page