Thanks a lot!
But how to wrote the path (<PortraitIndex> 1 or 2 or 3 or 4... </PortraitIndex>
) for using each unique rifleman icon in the "UNIT_ATLAS_RIFLEMAN"? The <PortraitIndex> is a part of "civ5units".![]()
yes, here's another example from my WWII mod :
Code:
INSERT INTO "Units" ('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', '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 [COLOR="red"]("UNIT_LIGHT_TANK")[/COLOR], [COLOR="red"]("TXT_KEY_UNIT_LIGHT_TANK")[/COLOR], "Civilopedia", "Strategy", [COLOR="Red"]("TXT_KEY_UNIT_HELP_LIGHT_TANK")[/COLOR], "Requirements",
[COLOR="red"](40)[/COLOR], "RangedCombat", [COLOR="red"](300)[/COLOR], [COLOR="red"](5)[/COLOR], "Immobile", "Range", "BaseSightRange", [COLOR="red"]("UNITCLASS_LIGHT_TANK")[/COLOR], "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",
[COLOR="red"]("ART_DEF_UNIT_LIGHT_TANK")[/COLOR], "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
[COLOR="Red"]("1")[/COLOR], [COLOR="red"]("7")[/COLOR], [COLOR="red"]("WW2_UNIT_ICONS")[/COLOR], [COLOR="red"]("WW2_UNIT_FLAGS")[/COLOR]
FROM "Units" WHERE (Type = "UNIT_TANK");
INSERT INTO "Units" (...) list the column that will be filled, SELECT ... FROM "Units" WHERE (Type = "UNIT_TANK") is getting the tank values for those columns, except the entries in parenthesis like ("UNIT_LIGHT_TANK") which are changed values, and you'll see that the last 4 entries corresponding to the 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas' from the insert statement are ("1"), ("7"), ("WW2_UNIT_ICONS"), ("WW2_UNIT_FLAGS"), which are the new unit icon and flags index/atlases from the mod.