UpdateDatabase not loading

KnelRivendare

Warlord
Joined
Jan 13, 2012
Messages
271
hey could any modder pls take a quick look into this and tell me why it is not working :ö

Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 2/23/2012 3:42:59 PM -->
<!-- GameData -->
<UnitClasses>
<Row>
<Type>UNITCLASS_RAILROAD_ARTILLERY</Type>
<Description>TXT_KEY_UNIT_RAILROAD_ARTILLERY</Description>
<DefaultUnit>UNIT_RAILROAD_ARTILLERY</DefaultUnit>
</Row>
</UnitClasses>
<Units>
<Row>
<Class>UNITCLASS_RAILROAD_ARTILLERY</Class>
<Type>UNIT_RAILROAD_ARTILLERY</Type>
<PrereqTech>TECH_RAILROAD</PrereqTech>
<Combat>30</Combat>
<RangedCombat>50</RangedCombat>
<Cost>600</Cost>
<Moves>1</Moves>
<Range>4</Range>
<CombatClass>UNITCOMBAT_SIEGE</CombatClass>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_CITY_BOMBARD</DefaultUnitAI>
<Description>TXT_KEY_UNIT_RAILROAD_ARTILLERY</Description>
<Civilopedia>TXT_KEY_CIV5_INDUSTRIAL_RAILROAD_ARTILLERY_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_RAILROAD_ARTILLERY_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HELP_RAILROAD_ARTILLERY</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>true</Pillage>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<Mechanized>true</Mechanized>
<AdvancedStartCost>40</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<UnitArtInfo>ART_DEF_UNIT_RAILROAD_ARTILLERY</UnitArtInfo>
<UnitFlagIconOffset>56</UnitFlagIconOffset>
<IconAtlas>UNIT_ATLAS_2</IconAtlas>
<PortraitIndex>12</PortraitIndex>
<MoveRate>ARTILLERY</MoveRate>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<PromotionType>PROMOTION_INDIRECT_FIRE</PromotionType>
</Row>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<PromotionType>PROMOTION_ONLY_DEFENSIVE</PromotionType>
</Row>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<PromotionType>PROMOTION_CITY_SIEGE</PromotionType>
</Row>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<PromotionType>PROMOTION_NO_DEFENSIVE_BONUSES</PromotionType>
</Row>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<PromotionType>PROMOTION_MUST_SET_UP</PromotionType>
</Row>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<PromotionType>PROMOTION_SIGHT_PENALTY</PromotionType>
</Row>
</Unit_FreePromotions>
<Unit_Flavors>
<Row>
<UnitType>UNIT_RAILROAD_ARTILLERY</UnitType>
<FlavorType>FLAVOR_ATTACK</FlavorType>
<Flavor>10</Flavor>
</Row>
</Unit_Flavors>
<Language_en_US>
<Row Tag="TXT_KEY_UNIT_RAILROAD_ARTILLERY">
<Text>Railroad Artillery</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_HELP_RAILROAD_ARTILLERY">
<Text>Railroad Artillery</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_INDUSTRIAL_RAILROAD_ARTILLERY_TEXT">
<Text>Railroad Artillery</Text>
</Row>
<Row Tag="TXT_KEY_UNIT_RAILROAD_ARTILLERY_STRATEGY">
<Text>Railroad Artillery</Text>
</Row>
</Language_en_US>

Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 2/23/2012 8:37:55 PM -->
<!-- GameData -->
<UnitArtInfos>
<UnitArtInfo>
<Type>ART_DEF_UNIT_RAILROAD_ARTILLERY</Type>
<DamageStates>1</DamageStates>
<UnitMemberArt>
<MemberType>ART_DEF_UNIT_MEMBER_RAILROAD_ARTILLERY</MemberType>
<MemberCount>1</MemberCount>
</UnitMemberArt>
</UnitArtInfo>
</UnitArtInfos>

Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 2/23/2012 8:50:43 PM -->
<UnitMemberArtInfo>
<Type>ART_DEF_UNIT_MEMBER_RAILROAD_ARTILLERY</Type>
<fScale>0.08</fScale>
<Granny>Railroad_Artillery.fxsxml</Granny>
<Combat>
<Defaults>ART_DEF_TEMPLATE_BASE</Defaults>
<bReformBeforeCombat>1</bReformBeforeCombat>
<bHasShortRangedAttack>1</bHasShortRangedAttack>
<bHasLongRangedAttack>1</bHasLongRangedAttack>
<bHasStationaryMelee>1</bHasStationaryMelee>
<Weapon>
<fVisKillStrengthMin>25.0</fVisKillStrengthMin>
<fVisKillStrengthMax>50.0</fVisKillStrengthMax>
<fProjectileSpeed>7.0</fProjectileSpeed>
<HitEffect>ART_DEF_VEFFECT_ARTILLERY_IMPACT_$(TERRAIN)</HitEffect>
<WeaponTypeTag>EXPLOSIVE</WeaponTypeTag>
<WeaponTypeSoundOverrideTag>EXPLOSION20POUND</WeaponTypeSoundOverrideTag>
</Weapon>
</Combat>
<MaterialTypeTag>METAL</MaterialTypeTag>
<MaterialTypeSoundOverrideTag>METALSM</MaterialTypeSoundOverrideTag>

</UnitMemberArtInfo>






ofc i set it all as OnModActivated and UpdateOnDatabase +Reload Unit System

followed kaels guide and for me it looks right, i can activate it in modbrowser but it just doesnt show up at all ingame

thanks in advance for any help
 
OK, there's actually a few issues.

First: Unfortunately, you can't use separate files for art defines.

You need to take a complete copy of Civ5ArtDefines_Units.xml and Civ5ArtDefines_UnitMembers.xml from the FPK's, and add the appropriate entries to the end of those files. Then add those files to the mod. Don't change the filenames. You need not use UpdateDatabase for these files, but you must set Import into VFS to "true" in the files' properties.

Be aware that the last mod to include those art defines files overwrites the others in the VFS (virtual file system), so if you use another mod that adds units, you'll want to make sure you add the entries from those mods to your art defines files as well, and then make sure that your mod is activated after those ones.

Second: You do need to use UpdateDatabase for your Units.xml, but VFS should not be set to true. You should also generally use a filename that is less likely to conflict with another mod. I don't think it matters if you don't have VFS set to true, but better safe than sorry.

Third: One more issue: the entries for FileName in the Actions and Content tabs use UNIX style paths, so use forward slashes instead of backslashes (i.e., XML/Units.xml).

Good luck!
 
I think you need to update ModBuddy...

I suppose you can accomplish the same thing by editing the .modinfo file. OTOH, I think everything will be imported into the VFS if the import part of the file entry doesn't exist. Have you tried to build and enable the mod now?
 
Back
Top Bottom