The size now works, so thanks Nutty
!!
Still having probs with the slinger's sound and the Heqetai; will experiment further tomorrow.
!!Still having probs with the slinger's sound and the Heqetai; will experiment further tomorrow.
!!As for the Heqetai, the part you haven't posted is your entries for the Units table. I assume you've made sure UnitArtInfo is set to ART_DEF_UNIT_HEQETAI?
Having successfully implemented a unique skin for a unit, I was wondering now how to make said unit use the sounds of its replacement: the Marine.
You want the UnitGameplay2DScripts table: Set "UnitType" to your unit, "SelectionSound" to AS2D_SELECT_INFANTRY, and "FirstSelectionSound" to AS2D_BIRTH_INFANTRY.
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
SELECT ("ART_DEF_UNIT_ARABIAN_LONGSWORDSMAN"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
SELECT ("ART_DEF_UNIT_ARABIAN_LONGSWORDSMAN"), ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "NumMembers"
FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
SELECT ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius",
"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
SELECT ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
SELECT ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "Scale", "ZOffset", "Domain",
("Longswordsman_Arabia.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_LONGSWORDSMAN");
INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', '[B]FaithCost[/B]', '[B]RequiresFaithPurchaseEnabled[/B]', '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_ARABIAN_LONGSWORDSMAN"), ("Arabian Longswordsman"), "Civilopedia", "Strategy", "Help", "Requirements",
"Combat", "RangedCombat", "Cost", "240", "true", "Moves", "UNITCOMBAT_MELEE", "Immobile", "Range", "BaseSightRange", ("UNITCLASS_LONGSWORDSMAN"), "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_ARABIAN_LONGSWORDSMAN"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
FROM "Units" WHERE (Type = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "UnitAIType"
FROM "Unit_AITypes" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "UnitClassType"
FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "FlavorType", "Flavor"
FROM "Unit_Flavors" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "PromotionType"
FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "ResourceType", "Cost"
FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
VALUES ( 'CIVILIZATION_ARABIA', 'UNITCLASS_LONGSWORDSMAN', 'UNIT_ARABIAN_LONGSWORDSMAN' );
Sorry, I can't help with that, hopefully someone else have the answer.I have a strange problem. I noticed that when I got done with my units and testing them in game, they cannot be purchased with faith.
Hi! I have been doing successful custom units with this tutorial, but now I have a problem. Does anybody know how to add new units which have several (4) different unit members?
INSERT INTO tablename (column1, column2, ...) VALUES ('string1', number, ...);
-- V1
INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT__WARRIOR_SONGHAI', 'ART_DEF_UNIT_MEMBER_WARRIOR_ZULU_IMPI', 3);
-- V2
INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT__WARRIOR_SONGHAI', 'ART_DEF_UNIT_MEMBER_WARRIOR_ZULU_IMPI_V2', 2);
-- V3
INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT__WARRIOR_SONGHAI', 'ART_DEF_UNIT_MEMBER_WARRIOR_ZULU_IMPI_V3', 3);
-- V4
INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT__WARRIOR_SONGHAI', 'ART_DEF_UNIT_MEMBER_WARRIOR_ZULU_IMPI_V4', 2);

You cannot add values, to those values already linked to a unit, you' re replacing. Otherwise, it thinks the unit is unique. That is why my Arabian Longsword was set apart and made into a religious unit.INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
SELECT ("ART_DEF_UNIT_ARABIAN_LONGSWORDSMAN"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
SELECT ("ART_DEF_UNIT_ARABIAN_LONGSWORDSMAN"), ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "NumMembers"
FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
SELECT ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius",
"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
SELECT ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_LONGSWORDSMAN");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
SELECT ("ART_DEF_UNIT_MEMBER_ARABIAN_LONGSWORDSMAN"), "Scale", "ZOffset", "Domain",
("Longswordsman_Arabia.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_LONGSWORDSMAN");
INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'FaithCost', 'RequiresFaithPurchaseEnabled', '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_ARABIAN_LONGSWORDSMAN"), ("Arabian Longswordsman"), "Civilopedia", "Strategy", "Help", "Requirements",
"Combat", "RangedCombat", "Cost", "FaithCost", "RequiresFaithPurchaseEnabled", "Moves", "Immobile", "Range", "BaseSightRange", ("UNITCLASS_LONGSWORDSMAN"), "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_ARABIAN_LONGSWORDSMAN"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
FROM "Units" WHERE (Type = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "UnitAIType"
FROM "Unit_AITypes" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "UnitClassType"
FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "FlavorType", "Flavor"
FROM "Unit_Flavors" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "PromotionType"
FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
SELECT ("UNIT_ARABIAN_LONGSWORDSMAN"), "ResourceType", "Cost"
FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_LONGSWORDSMAN");
INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
VALUES ( 'CIVILIZATION_ARABIA', 'UNITCLASS_LONGSWORDSMAN', 'UNIT_ARABIAN_LONGSWORDSMAN' );

.INSERT INTO ArtDefine_UnitInfos (Type, DamageStates, Formation)
VALUES ('ART_DEF_UNIT_PORTUGUESE_BANDEIRANTE', 1, 'HonorableGunpowder');
you missed the ";" at the end of the first INSERT statement
Edit : and DamageStates have to be defined (when not using the "direct" INSERT syntax, you can't refer to a column name from the SELECT as you've not selected anything), replace it by 1
Code:INSERT INTO ArtDefine_UnitInfos (Type, DamageStates, Formation) VALUES ('ART_DEF_UNIT_PORTUGUESE_BANDEIRANTE', 1, 'HonorableGunpowder');