Help edit vanilla Unique Units with .sql

Discussion in 'Civ5 - Creation & Customization' started by d0minus, Dec 19, 2014.

  1. d0minus

    d0minus Chieftain

    Joined:
    Oct 3, 2013
    Messages:
    50
    Hello everyone Im trying adjusting UUs' whitout excess Im using bellow command ,which work with rest.
    Spoiler :
    INSERT INTO (Type, Description, Civilopedia, Strategy, Help, Requirements, Combat, RangedCombat, Cost, Moves, Immobile, Range, BaseSightRange, Class, 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, 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 ('UNIT_GREEK_HOPLITE'), Description, Civilopedia, Strategy, Help, Requirements,
    Combat, RangedCombat, Cost, 99, Immobile, Range, BaseSightRange, ('UNITCLASS_SPEARMAN'), 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, CombatLimit, RangeAttackOnlyInDomain, RangeAttackIgnoreLOS, RangedCombatLimit, XPValueAttack, XPValueDefense, SpecialCargo, DomainCargo, Conscription, ExtraMaintenanceCost, NoMaintenance, Unhappiness,
    ('ART_DEF_UNIT_U_GREEK_HOPLITE'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
    UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
    FROM Units WHERE (Type = 'UNIT_GREEK_HOPLITE');
    INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
    VALUES ('UNIT_GREEK_HOPLITE', 'PROMOTION_BLITZ')
    FROM Unit_FreePromotions WHERE (Type = 'UNIT_GREEK_HOPLITE');

    If anyone could :help: would be great!:goodjob:
    thanx in advance
     
  2. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,074
    Location:
    America
    Moderator Action: Moved to the Main Creation & Customization forum, that's where questions go. ;)
     
  3. Artisanix

    Artisanix Warlord

    Joined:
    Oct 6, 2013
    Messages:
    104
    What you have here is the code that just adds new unit. INSERT is a query that adds new data to the tables. And if you want to change already existing values you need to use UPDATE query.

    So this many lines long first INSERT command in you code should be replaced by this:
    Code:
    UPDATE Units
    SET Moves=99
    WHERE Type='UNIT_GREEK_HOPLITE';
    If you have more than one value to update, you just list them after SET separated by the comas.

    And your code that is supposed to add blitz promotion has incorrect syntax, you need to remove FROM line from there. FROM is used for SELECT queries not for INSERT.
     
  4. d0minus

    d0minus Chieftain

    Joined:
    Oct 3, 2013
    Messages:
    50
    once again :thanx: Artisanix
     

Share This Page