• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Add a new unit in the game (using SQL)

For Scale, you don't want to enclose the number in quotes.

I'm guessing you forgot to set your svcruiser.dds file to VFS=true [or forgot to include it at all!].

EDIT: Plus, these are the sizes you need for your [portrait] atlases: 45, 64, 80, 128, 256
 
For Scale, you don't want to enclose the number in quotes.

I'm guessing you forgot to set your svcruiser.dds file to VFS=true [or forgot to include it at all!].

I have got the Strategic view to show the icon fine just not the normal world view I get this

Spoiler :
 
Ah, I misunderstood. OK, then see the edit above re:portrait.

[VFS=true for the atlases?]

So its the scale and I have added the other sizes in let me try, All the asset have VFS se to true. The file only came with these .dds files

Spoiler :


So i used the cruiserportrait.dds as the portrait and the cruiserflag.dds as the flag

correct?
 
You'll need to make copies for the various sizes.

Ok thanks I will try that. What about the UNITFLAG??

EDIT - Tried that still got the same problem. What numbers should I have for the UnitFlagOffset and PortraitIndex??
 
Hello, i recently started modding CIV 5. I created a working civ with custom leader and trait, but i have trouble adding a Pz IV tank to be used alongside with the regular tank for my civ. Using SQL i added it to my civ, but i can't build it from my cities and when i try to spawn it using IGE the game crashes:confused:

I am new to and got used to work with XML. So I pretty much have 0 clue where the problem persists.

Any help would be appreciated.

Here is the SQL code for the unit

Spoiler :
INSERT INTO ArtDefine_UnitInfos(Type, DamageStates, Formation)
VALUES ('ART_DEF_UNIT_PZIV_H', 1, 'Vehicle');
INSERT INTO ArtDefine_UnitInfoMemberInfos(UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT_PZIV_H', 'ART_DEF_UNIT_MEMBER_PZIV_H', 3);
INSERT INTO ArtDefine_UnitMemberInfos(Type, Scale, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
VALUES ('ART_DEF_UNIT_MEMBER_PZIV_H', 0.119999997317791, 'PZIV_H.fxsxml', 'METAL', 'METALSM');
INSERT INTO ArtDefine_UnitMemberCombats(UnitMemberType, EnableActions, HasShortRangedAttack, HasStationaryMelee, HasRefaceAfterCombat, ReformBeforeCombat, HasIndependentWeaponFacing)
VALUES ('ART_DEF_UNIT_MEMBER_PZIV_H', 'Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady', 1, 1, 0, 1, 1);
INSERT INTO ArtDefine_UnitMemberCombatWeapons(UnitMemberType, "Index", SubIndex, VisKillStrengthMin, VisKillStrengthMax, HitEffect, WeaponTypeTag, WeaponTypeSoundOverrideTag)
VALUES ('ART_DEF_UNIT_MEMBER_PZIV_H', 0, 0, 25.0, 50.0, 'ART_DEF_VEFFECT_TANK_IMPACT_$(TERRAIN)', 'EXPLOSIVE', 'EXPLOSION6POUND');
INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset)
VALUES ('ART_DEF_UNIT_PZIV_H', 'Unit', 'SV_Tank.dds');

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, 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_PZIV_H'), ('Pz IV ausf. H'), Civilopedia, Strategy, Help, Requirements,
Combat, (70), (350), Moves, Immobile, (6), BaseSightRange, ('UNITCLASS_PZIV_H'), 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_PZIV_H'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
FROM Units WHERE (Type = 'UNIT_TANK');

INSERT INTO Unit_AITypes (UnitType, UnitAIType)
SELECT ('UNIT_PZIV_H'), UnitAIType
FROM Unit_AITypes WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_ClassUpgrades (UnitType, UnitClassType)
SELECT ('UNIT_PZIV_H'), UnitClassType
FROM Unit_ClassUpgrades WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_Flavors (UnitType, FlavorType, Flavor)
SELECT ('UNIT_PZIV_H'), FlavorType, Flavor
FROM Unit_Flavors WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
SELECT ('UNIT_PZIV_H'), PromotionType
FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_ResourceQuantityRequirements (UnitType, ResourceType, Cost)
SELECT ('UNIT_PZIV_H'), ResourceType, Cost
FROM Unit_ResourceQuantityRequirements WHERE (UnitType = 'UNIT_TANK');
 
Where do I put my files in? Can't believe you didn't make a screenshot. I am starting to get :mad: now.
 
Hello, i recently started modding CIV 5. I created a working civ with custom leader and trait, but i have trouble adding a Pz IV tank to be used alongside with the regular tank for my civ. Using SQL i added it to my civ, but i can't build it from my cities and when i try to spawn it using IGE the game crashes:confused:

I am new to and got used to work with XML. So I pretty much have 0 clue where the problem persists.

Any help would be appreciated.

Here is the SQL code for the unit

Spoiler :
INSERT INTO ArtDefine_UnitInfos(Type, DamageStates, Formation)
VALUES ('ART_DEF_UNIT_PZIV_H', 1, 'Vehicle');
INSERT INTO ArtDefine_UnitInfoMemberInfos(UnitInfoType, UnitMemberInfoType, NumMembers)
VALUES ('ART_DEF_UNIT_PZIV_H', 'ART_DEF_UNIT_MEMBER_PZIV_H', 3);
INSERT INTO ArtDefine_UnitMemberInfos(Type, Scale, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
VALUES ('ART_DEF_UNIT_MEMBER_PZIV_H', 0.119999997317791, 'PZIV_H.fxsxml', 'METAL', 'METALSM');
INSERT INTO ArtDefine_UnitMemberCombats(UnitMemberType, EnableActions, HasShortRangedAttack, HasStationaryMelee, HasRefaceAfterCombat, ReformBeforeCombat, HasIndependentWeaponFacing)
VALUES ('ART_DEF_UNIT_MEMBER_PZIV_H', 'Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady', 1, 1, 0, 1, 1);
INSERT INTO ArtDefine_UnitMemberCombatWeapons(UnitMemberType, "Index", SubIndex, VisKillStrengthMin, VisKillStrengthMax, HitEffect, WeaponTypeTag, WeaponTypeSoundOverrideTag)
VALUES ('ART_DEF_UNIT_MEMBER_PZIV_H', 0, 0, 25.0, 50.0, 'ART_DEF_VEFFECT_TANK_IMPACT_$(TERRAIN)', 'EXPLOSIVE', 'EXPLOSION6POUND');
INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset)
VALUES ('ART_DEF_UNIT_PZIV_H', 'Unit', 'SV_Tank.dds');

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, 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_PZIV_H'), ('Pz IV ausf. H'), Civilopedia, Strategy, Help, Requirements,
Combat, (70), (350), Moves, Immobile, (6), BaseSightRange, ('UNITCLASS_PZIV_H'), 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_PZIV_H'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
FROM Units WHERE (Type = 'UNIT_TANK');

INSERT INTO Unit_AITypes (UnitType, UnitAIType)
SELECT ('UNIT_PZIV_H'), UnitAIType
FROM Unit_AITypes WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_ClassUpgrades (UnitType, UnitClassType)
SELECT ('UNIT_PZIV_H'), UnitClassType
FROM Unit_ClassUpgrades WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_Flavors (UnitType, FlavorType, Flavor)
SELECT ('UNIT_PZIV_H'), FlavorType, Flavor
FROM Unit_Flavors WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
SELECT ('UNIT_PZIV_H'), PromotionType
FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_TANK');

INSERT INTO Unit_ResourceQuantityRequirements (UnitType, ResourceType, Cost)
SELECT ('UNIT_PZIV_H'), ResourceType, Cost
FROM Unit_ResourceQuantityRequirements WHERE (UnitType = 'UNIT_TANK');

Uhmm... You made a civ,right? I need some help making a Civilization? Can you help me with the coding?
 
@Liamv3: You haven't given anyone any information with which to help you. Post a new thread in the main Creation & Customization subforum, and attach whatever you have so far. There are lots of people that are happy to help, but you have to meet them halfway.

If you've created a new mod in ModBuddy, it doesn't matter where you put the files. You can create folders, but they're there just to keep things organized.

If you don't know what I'm talking about or where to start, skim through Kael's Guide, which though outdated is an excellent primer on modding for CiV. Once you've got a grasp of things, whoward69's new civ thread should prove very helpful.
 
I need The Dawn of Man stuff and animation. I will make a forum..
That Guide got me to a start. I will try to upload my current building
 
Uhmm... You made a civ,right? I need some help making a Civilization? Can you help me with the coding?

Sorry for the late response, I was away for some time. To anweser you question, yes, i did create my own civ. I used Kael's guide (http://kael.civfanatics.net/files/ModdersGuide.pdf) on how to create a custom civ and came across many problems and errors. In order to solve them, I took many different codes from other custom civs to make it work which resulted into a mess, but its working, well, except adding multiple units.
 
Hi everyone
I tried adding promotion to some of my skins and I partially made. Units like swordsman, longswordsman ect. promotion doesnt take effect...
here 1 my sqls':
Spoiler :
UPDATE Units SET UnitArtInfoCulturalVariation = 1 WHERE Type = 'UNIT_GREAT_WAR_INFANTRY';

-- GREECE WW1 Infantry
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
SELECT ("ART_DEF_UNIT_WW1_INFANTRY_GREECE"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_INFANTRY");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
SELECT ("ART_DEF_UNIT_WW1_INFANTRY_GREECE"), ("ART_DEF_UNIT_MEMBER_WW1_INFANTRY_GREECE"), "NumMembers"
FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_WW1_INFANTRY");
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_WW1_INFANTRY_GREECE"), "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_WW1_INFANTRY");
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_WW1_INFANTRY_GREECE"), "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_WW1_INFANTRY");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
SELECT ("ART_DEF_UNIT_MEMBER_WW1_INFANTRY_GREECE"), "Scale", "ZOffset", "Domain",
("gregw1.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WW1_INFANTRY");
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, 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_WW1_INFANTRY_GREECE'), Description, Civilopedia, Strategy, Help, Requirements,
Combat, RangedCombat, Cost, 99, Immobile, Range, BaseSightRange, ('UNITCLASS_ANTI_WW1_INFANTRY'), 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_WW1_INFANTRY'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
FROM Units WHERE (Type = 'UNIT_GREAT_WAR_INFANTRY');
INSERT INTO Unit_FreePromotions ('UnitType', 'PromotionType')
SELECT ("UNIT_WW1_INFANTRY_GREECE"), ("PROMOTION_BLITZ")
FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_GREAT_WAR_INFANTRY');

any help will be appreciated
thanx
 
@d0minus
Code:
INSERT INTO Unit_FreePromotions ('UnitType', 'PromotionType')
SELECT ("UNIT_WW1_INFANTRY_GREECE"), ("PROMOTION_BLITZ")
FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_GREAT_WAR_INFANTRY');

There's no record with UNIT_GREAT_WAR_INFANTRY value in Unit_FreePromotions table by default, so this query returns nothing. So either you need to have it in your other code elsewhere, or it's simply missing.

If you work with SQL, you may want to download plugin for Firefox - SQLite Manager - to browse through the game's database, check tables and values, and test your queries there for validity. Otherwise it's like taking a blind guess everytime.
 
@d0minus
Code:
INSERT INTO Unit_FreePromotions ('UnitType', 'PromotionType')
SELECT ("UNIT_WW1_INFANTRY_GREECE"), ("PROMOTION_BLITZ")
FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_GREAT_WAR_INFANTRY');

There's no record with UNIT_GREAT_WAR_INFANTRY value in Unit_FreePromotions table by default, so this query returns nothing. So either you need to have it in your other code elsewhere, or it's simply missing.

If you work with SQL, you may want to download plugin for Firefox - SQLite Manager - to browse through the game's database, check tables and values, and test your queries there for validity. Otherwise it's like taking a blind guess everytime.
thanx but u mean I have make another .sql adding values on that table?
Im not sure how... but Im going to check sqlite
 
Not really. Rather you should clearly define what you exactly want to achieve there first ;]

From your code, I assume that you want to create a special unit for Greece with a free promotion. And this unit is supposed to be based on Great War Infrantry.
The point is that G.W.I. has no any free promotions as it is a generic unit. So in this case you can't use SELECT statement because there is no any data for this query to copy from.

And if you want just to assign for your unit the blitz free promotion then this code is enough here:
Code:
INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
VALUES ('UNIT_WW1_INFANTRY_GREECE', 'PROMOTION_BLITZ');


and btw:
You don't have a cleanest code there, which makes it hard to read, not only for others but for you as well. For instance don't use quotes of any kind for table and column names - it's uneccessary. Don't put single values in brackets, etc.

for instance this:
Code:
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
SELECT ("ART_DEF_UNIT_WW1_INFANTRY_GREECE"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_INFANTRY");

can be replaced with this:
Code:
INSERT INTO ArtDefine_UnitInfos (Type, DamageStates, Formation)
SELECT 'ART_DEF_UNIT_WW1_INFANTRY_GREECE', DamageStates, Formation
FROM ArtDefine_UnitInfos
WHERE Type = 'ART_DEF_UNIT_WW1_INFANTRY';

If you have longer SQL code it makes it easier to read, where single quotes are only reserved for text values inserted to/retrived from database.
 
Not really. Rather you should clearly define what you exactly want to achieve there first ;]

From your code, I assume that you want to create a special unit for Greece with a free promotion. And this unit is supposed to be based on Great War Infrantry.
The point is that G.W.I. has no any free promotions as it is a generic unit. So in this case you can't use SELECT statement because there is no any data for this query to copy from.

And if you want just to assign for your unit the blitz free promotion then this code is enough here:
Code:
INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
VALUES ('UNIT_WW1_INFANTRY_GREECE', 'PROMOTION_BLITZ');


and btw:
You don't have a cleanest code there, which makes it hard to read, not only for others but for you as well. For instance don't use quotes of any kind for table and column names - it's uneccessary. Don't put single values in brackets, etc.

for instance this:
Code:
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
SELECT ("ART_DEF_UNIT_WW1_INFANTRY_GREECE"), "DamageStates", "Formation"
FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_INFANTRY");

can be replaced with this:
Code:
INSERT INTO ArtDefine_UnitInfos (Type, DamageStates, Formation)
SELECT 'ART_DEF_UNIT_WW1_INFANTRY_GREECE', DamageStates, Formation
FROM ArtDefine_UnitInfos
WHERE Type = 'ART_DEF_UNIT_WW1_INFANTRY';

If you have longer SQL code it makes it easier to read, where single quotes are only reserved for text values inserted to/retrived from database.

thanx 4 teaching pal, much appreciate it. 1 last question what is happening with unique units r they locked or something, although included on table?
 
Hi everyone!

How replace original workers (workers_euro) with that Andean worker? Suffix _EURO already in unit name. :confused:

Code:
-- AZTEC WORKER
UPDATE Civilizations SET ArtStyleSuffix = "_AZTEC" WHERE Type = 'CIVILIZATION_AZTEC';
UPDATE Units SET UnitArtInfoCulturalVariation = 1 WHERE Type = 'UNIT__WORKER';
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
	SELECT	("ART_DEF_UNIT_WORKER_AZTEC"), "DamageStates", "Formation"
	FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT__WORKER");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
	SELECT	("ART_DEF_UNIT_WORKER_AZTEC"), ("ART_DEF_UNIT_MEMBER_WORKER_AZTEC"), "NumMembers"
	FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT__WORKER");
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_WORKER_AZTEC"), "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_WORKER");
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_WORKER_AZTEC"), "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_WORKER");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
	SELECT	("ART_DEF_UNIT_MEMBER_WORKER_AZTEC"), "Scale", "ZOffset", "Domain", 
			("worker_andes.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WORKER");

Following code does nothing.
 
There doesn't seem to be much posts here lately but I could use some help with a unit of mine.

I'm using danrell's Hospitaller Knight model for a Knight UU for a custom civ I'm making.

All these files were downloaded and I imported them into my mod and set VFS=True for all of them just like the guide says.
Code:
Knight_Hospitaller.blend
Knight_Hospitaller.dds
Knight_Hospitaller.fxsxml
Knight_Hospitaller.gr2
Knight_Hospitaller_gloss.dds
Knight_Hospitaller_Horse.dds
Knight_Hospitaller_Horse_gloss.dds

Then I copied your SQL art defines entry and changed it accordingly to match my unit:

Code:
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
	SELECT	('ART_DEF_UNIT_GURRA_KNIGHT_STJOHN'), DamageStates, Formation
	FROM ArtDefine_UnitInfos WHERE (Type = 'ART_DEF_UNIT_KNIGHT');

INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
	SELECT	('ART_DEF_UNIT_GURRA_KNIGHT_STJOHN'), ('ART_DEF_UNIT_MEMBER_GURRA_KNIGHT_STJOHN'), NumMembers
	FROM ArtDefine_UnitInfoMemberInfos WHERE (UnitInfoType = 'ART_DEF_UNIT_KNIGHT');

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_GURRA_KNIGHT_STJOHN'), 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_KNIGHT');

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_GURRA_KNIGHT_STJOHN'), "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_KNIGHT');

INSERT INTO ArtDefine_UnitMemberInfos (Type, Scale, ZOffset, Domain, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
	SELECT	('ART_DEF_UNIT_MEMBER_GURRA_KNIGHT_STJOHN'), Scale, ZOffset, Domain, ('Knight_Hospitaller.fxsxml'), MaterialTypeTag, MaterialTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberInfos WHERE (Type = 'ART_DEF_UNIT_MEMBER_KNIGHT');

INSERT INTO ArtDefine_StrategicView (StrategicViewType, TileType, Asset )
	SELECT	('ART_DEF_UNIT_GURRA_KNIGHT_STJOHN'), TileType, Asset
	FROM ArtDefine_StrategicView WHERE (StrategicViewType = 'ART_DEF_UNIT_KNIGHT');

But the horse doesn't show up! :confused: The model for the men works just fine but they are walking around on their feet instead of riding a horse. :confused:
Spoiler picture of horseless knights (the ones with a Maltese cross as unit flag) :
2015-06-06_00012.jpg
 
Did you check the box in ModBuddy for "Reload Unit System" ?

Snipped from my Common Novice-Modder Mistakes Thread:

(5) NOT CHECKING THE REQUIRED MODBUDDY CHECK-BOXES

When adding audio files, unit graphics, or stategic-view icons (for units) you need to check certain checkboxes in Modbuddy in order for the game to know that it should, for lack of a better description, "re-initialise" certain game "Systems". Checking the check-boxes tells the game to do so when the mod gets loaded. This is where the checkboxes are located within Modbuddy:

Spoiler :
attachment.php


You will have to scroll down once you select the "MOD Info" tab. Some mod-creators always check the four boxes regardless of whether they are adding an element that will require it: so far as I know there's no downside to this method of dealing with the check-boxes.​
 
Back
Top Bottom