TheyKeepOnRisin
Chieftain
Hello all, hoping to get some help with modding.
I've been reading through some of the tutorials here, and its a bit of a mess now that G&K has changed build requirements, and I have failed to accomplish my goal. So anyone who can help, I would much appreciate!
MY GOAL
Currently I'm trying to make a mod that adds an additional unique unit for Japan, replacing the Composite Bowman. I have Danrell's CIV5 Ancient Unit Pack for Japan, and have extracted the models for the Archer and loaded them into my project.
(this has all the necessary art files, and they are just fantastic! Thanks Danrell will give much credit of course).
SO FAR
I want to get the unit to show up in the game as an additional before I put the replacement into effect. I have created a .SQL file and added the following lines to it as suggested in a tutorial:
This is the entire content of my code.
Afterwards, I set the project base to OnModActivated - UpdateDatabase.
I build the project, start Civs with the mod enabled.
RESULT
Game completely ignores the unit, it is not listed in research or build menus. Using IGE doesn't even have the unit listed. This is probably not surprising to experienced modders, but I have no idea what else I need to add to get this working unit to even be listed.
IN CONCLUSION
Please help
I am tech savvy individual with modding experience and plenty of C++ and JASS under my belt, but without a point of reference, I've got no idea how to proceed. Are .XML files necessary with G&K? The biggest help would be a link of another mod that adds an additional unit for G&K for me to dissect. I can provide the project files if necessary, and I know I can master this.. I just need a little help getting started is all 
Moderator Action: Moved to appropriate forum.
I've been reading through some of the tutorials here, and its a bit of a mess now that G&K has changed build requirements, and I have failed to accomplish my goal. So anyone who can help, I would much appreciate!
MY GOAL
Currently I'm trying to make a mod that adds an additional unique unit for Japan, replacing the Composite Bowman. I have Danrell's CIV5 Ancient Unit Pack for Japan, and have extracted the models for the Archer and loaded them into my project.
(this has all the necessary art files, and they are just fantastic! Thanks Danrell will give much credit of course).
SO FAR
I want to get the unit to show up in the game as an additional before I put the replacement into effect. I have created a .SQL file and added the following lines to it as suggested in a tutorial:
Spoiler :
This is the entire content of my code.
Code:
-- Insert SQL Rules Here -- JAPANESE_ARCHER
INSERT INTO "UnitClasses" ('Type', 'Description', 'MaxGlobalInstances', 'MaxTeamInstances', 'MaxPlayerInstances', 'InstanceCostModifier', 'DefaultUnit' )
SELECT ("UNITCLASS_JAPANESE_ARCHER"), "Description", "MaxGlobalInstances", "MaxTeamInstances", "MaxPlayerInstances", "InstanceCostModifier", "DefaultUnit"
FROM "UnitClasses" WHERE (Type = "UNITCLASS_COMPOSITE_BOWMAN");
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 ("UNIT_JAPANESE_ARCHER"), ("Shashu"), "Civilopedia", "Strategy", "Help", "Requirements",
"Combat", (25), (250), "Moves", "Immobile", (5), "BaseSightRange", ("UNITCLASS_JAPANESE_ARCHER"), "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",
("ART_DEF_UNIT_JAPANESE_ARCHER"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
FROM "Units" WHERE (Type = "UNIT_COMPOSITE_BOWMAN");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
SELECT ("UNIT_JAPANESE_ARCHER"), "UnitAIType"
FROM "Unit_AITypes" WHERE (UnitType = "UNIT_COMPOSITE_BOWMAN");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
SELECT ("UNIT_JAPANESE_ARCHER"), "UnitClassType"
FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_COMPOSITE_BOWMAN");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
SELECT ("UNIT_JAPANESE_ARCHER"), "FlavorType", "Flavor"
FROM "Unit_Flavors" WHERE (UnitType = "UNIT_COMPOSITE_BOWMAN");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
SELECT ("UNIT_JAPANESE_ARCHER"), "PromotionType"
FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_COMPOSITE_BOWMAN");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
SELECT ("UNIT_JAPANESE_ARCHER"), "ResourceType", "Cost"
FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_COMPOSITE_BOWMAN");
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
SELECT ("ART_DEF_UNIT_JAPANESE_ARCHER"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_COMPOSITE_BOWMAN");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
SELECT ("ART_DEF_UNIT_JAPANESE_ARCHER"), ("ART_DEF_UNIT_MEMBER_JAPANESE_ARCHER"), "NumMembers"
FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_COMPOSITE_BOWMAN");
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_JAPANESE_ARCHER"), "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_COMPOSITE_BOWMAN");
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_JAPANESE_ARCHER"), "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_COMPOSITE_BOWMAN");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
SELECT ("ART_DEF_UNIT_MEMBER_JAPANESE_ARCHER"), "Scale", "ZOffset", "Domain",
("Archer_Japan.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_COMPOSITE_BOWMAN");
----
Afterwards, I set the project base to OnModActivated - UpdateDatabase.
I build the project, start Civs with the mod enabled.
RESULT
Game completely ignores the unit, it is not listed in research or build menus. Using IGE doesn't even have the unit listed. This is probably not surprising to experienced modders, but I have no idea what else I need to add to get this working unit to even be listed.
IN CONCLUSION
Please help


Moderator Action: Moved to appropriate forum.