I was experimenting with wanting to create (or change) attributes of the weapons in the game. Here is how to create a NEW weapon to add to your game. NOTE: XML files are only read at the start of a new game so this item will NOT show up in your current game.
1. Custom Items should go in your User game directory. In my system (Win7) this is Documents\My Games\Elemental\Items
2. Create a new file using NOTEPAD. You will ultimately want to call this file CompoundBow.xml.
3. I used the Cedar Longbow as a template. In my case, I just wanted a more powerful bow in the game and the Cedar Longbow was a good start. The template for the Cedar Longbow can be found in the CoreWeapons.xml file which you will find in the Program Files\Elemental\Data\English directory. When you open this file up in Notepad, you will find templates for all different style of weapons. If you use the Find function, look for LongBow and you will find the start of the template section.
4. Copy the section from <GameItemType Internal='Cedar_Longbow"> to </GameItemType> (some 40ish amount of lines)
5. Paste this into Notepad that you have your CompoundBow.xml ready to go. All you need to add is a couple more lines:
At the top add:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<GameItemTypes>
And at the end add:
</GameItemTypes>
So your file should look like this:
Code: xml
- <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
- <!-- ************************************* -->
- <!-- ** Compound Bow ** -->
- <!-- ************************************* -->
- <GameItemTypes>
- <GameItemType InternalName="Weapon_CompoundLongbow">
- <DisplayName>Compound Longbow</DisplayName>
- <Description>A heavy bow, made of recurved oak.</Description>
- <!-- Equipment Type -->
- <Type>Weapon</Type>
- <Type>Defense</Type>
- <CanBeEquipped>1</CanBeEquipped>
- <IsAvailableForSovereignCustomization>false</IsAvailableForSovereignCustomization>
- <ShopValue>182</ShopValue>
- <WeaponType>Bow</WeaponType>
- <!-- Equipment Graphics -->
- <IconFile>Archer_Bow_Icon.png</IconFile>
- <TintR>0</TintR>
- <TintG>0</TintG>
- <TintB>0</TintB>
- <GameItemTypeModel>
- <Attachment>hand_Left_Lcf</Attachment>
- <ModelFile>Gfx\HKB\Items\Archer_Bow.hkb</ModelFile>
- <Texture_All>Gfx\HKB\Items\K_Female_Armor_Archer_Texture_01.png</Texture_All>
- </GameItemTypeModel>
- <!-- SFX -->
- <EquipSFX>Equip_BowandArrow_01</EquipSFX>
- <EquipSFX>Equip_BowandArrow_02</EquipSFX>
- <EquipSFX>Equip_BowandArrow_03</EquipSFX>
- <AttackSFX>Hit_Arrow1</AttackSFX>
- <AttackSFX>Hit_Arrow2</AttackSFX>
- <!-- Equipment Production Requirements -->
- <AdditionalTrainingTurns>5</AdditionalTrainingTurns>
- <ProductionRequirement>
- <Type>Resource</Type>
- <Attribute>Gold</Attribute>
- <Value>4.0</Value>
- </ProductionRequirement>
- <ProductionRequirement>
- <Type>Resource</Type>
- <Attribute>Materials</Attribute>
- <Value>3.0</Value>
- </ProductionRequirement>
- <!-- Equipment Prerequisites -->
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Advanced_Archery_Amarian</Attribute>
- <Value>0</Value>
- </Prereq>
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Weapons_Of_Piercing_Trogs</Attribute>
- <Value>0</Value>
- </Prereq>
- <!-- Equipment Modifiers -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Attack</StrVal>
- <Value>9.0</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_CombatSpeed</StrVal>
- <Value>0</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>UnlockRangedAction</Attribute>
- <StrVal>BasicBowAttack</StrVal>
- </GameModifier>
- <TacticalRange>9</TacticalRange>
- </GameItemType>
- </GameItemTypes>
Again, save this in your ITEMS directory and when you start a new game, this weapon will appear once you meet the required Prereqs. Note: You can, of course, change these values to whatever you wish. This was done for demostration purposes only.
Hope this helps someone.