What happened to the item editor?

Weren't we supposed to have an item editor in the workshop?  I actually see the assets for it (such as the dxpacks) so I'm assuming it wasn't enabled for this version... I hope the day 0 will have it as it was a promised feature.

Also, I've been trying to add new items manually in the XML file and the item won't show up in game.  What I'm trying to do is create a bow that shoots fire arrows. 

Code: xml
  1.         <!-- Equipment Display Name/Description -->
  2.         <GameItemType InternalName="Weapon_CedarShortbow_Fire">
  3.         <DisplayName>Cedar Shortbow with Fire Arrows</DisplayName>
  4.         <Description>A bow of rough cedarwood, strung with milkweed fiber. Equipped with Fire Arrows</Description>
  5.         <!-- Equipment Type -->
  6.         <Type>Weapon</Type>
  7.         <Type>Defense</Type>
  8.         <CanBeEquipped>1</CanBeEquipped>
  9.         <IsAvailableForSovereignCustomization>false</IsAvailableForSovereignCustomization>
  10.         <ShopValue>30</ShopValue>
  11.         <WeaponType>Bow</WeaponType>
  12.         <!-- Equipment Graphics -->
  13.         <IconFile>Archer_Bow_Icon_Fire.png</IconFile>
  14.         <TintR>0</TintR>
  15.         <TintG>0</TintG>
  16.         <TintB>0</TintB>
  17.         <GameItemTypeModel>
  18.             <Attachment>hand_Left_Lcf</Attachment>
  19.             <ModelFile>Gfx\HKB\Items\Archer_Bow.hkb</ModelFile>
  20.             <Texture_All>Gfx\HKB\Items\K_Female_Armor_Archer_Texture_01.png</Texture_All>
  21.         </GameItemTypeModel>
  22.         <!-- SFX -->
  23.         <EquipSFX>Equip_BowandArrow_01</EquipSFX>
  24.         <EquipSFX>Equip_BowandArrow_02</EquipSFX>
  25.         <EquipSFX>Equip_BowandArrow_03</EquipSFX>
  26.         <AttackSFX>Hit_Arrow1</AttackSFX>
  27.         <AttackSFX>Hit_Arrow2</AttackSFX>
  28.         <AdditionalTrainingTurns>3</AdditionalTrainingTurns>
  29.         <!-- Equipment Production Requirements -->
  30.         <ProductionRequirement>
  31.             <Type>Resource</Type>
  32.             <Attribute>Gold</Attribute>
  33.             <Value>3.0</Value>
  34.         </ProductionRequirement>
  35.         <ProductionRequirement>
  36.             <Type>Resource</Type>
  37.             <Attribute>Materials</Attribute>
  38.             <Value>3.0</Value>
  39.         </ProductionRequirement>
  40.         <!-- Equipment Prerequisites -->
  41.         <Prereq>
  42.             <Type>Tech</Type>
  43.             <Attribute>Ranged_Weapons_Amarian</Attribute>
  44.             <Value>0</Value>
  45.         </Prereq>
  46.         <Prereq>
  47.             <Type>Tech</Type>
  48.             <Attribute>Weapons_Of_Piercing_Trogs</Attribute>
  49.             <Value>0</Value>
  50.         </Prereq>
  51.         <!-- Equipment Modifiers -->
  52.         <GameModifier>
  53.             <ModType>Unit</ModType>
  54.             <Attribute>AdjustUnitStat</Attribute>
  55.             <StrVal>UnitStat_Attack</StrVal>
  56.             <Value>3.0</Value>
  57.         </GameModifier>
  58.         <GameModifier>
  59.             <ModType>Unit</ModType>
  60.             <Attribute>AdjustUnitStat</Attribute>
  61.             <StrVal>UnitStat_CombatSpeed</StrVal>
  62.             <Value>-0.5</Value>
  63.         </GameModifier>
  64.         <GameModifier>
  65.             <ModType>Unit</ModType>
  66.             <Attribute>UnlockRangedAction</Attribute>
  67.             <StrVal>BasicBowAttack</StrVal>
  68.         </GameModifier>
  69.         <GameModifier>
  70.             <ModType>Unit</ModType>
  71.             <Attribute>UnlockRangedAction</Attribute>
  72.             <StrVal>FireArrows</StrVal>        
  73.         </GameModifier>
  74.         <TacticalRange>8</TacticalRange>
  75.     </GameItemType>
  76.    

 

I also created an effect in the rangedspells xml:

Code: xml
  1.    
  2.   <!-- ************** -->
  3.     <!-- * Fire Arrows* -->
  4.     <!-- ************** -->
  5.     <SpellDef InternalName="FireArrows">
  6.         <DisplayName>Fire Arrows</DisplayName>
  7.         <Description>Fires a volley of flaming arrows</Description>
  8.         <Image>ArcaneArrow.png</Image>
  9.         <IconFG>Icon_Arrows.png</IconFG>
  10.         <IconBG>Icon_Arrows.png</IconBG>
  11.         <IconColor>32,45,243</IconColor>
  12.         <Radius>0.0</Radius>
  13.         <Range>2.0</Range>
  14.         <ManaCost>0</ManaCost>
  15.         <MoveCost>10</MoveCost>    
  16.         <SpellType>Strategic</SpellType>
  17.         <SpellClass>Offensive</SpellClass>
  18.         <IsRangedAttack>1</IsRangedAttack>
  19.         <SpellTargetType>EnemyUnit</SpellTargetType>
  20.         <ValidTerrainCategory>Land</ValidTerrainCategory>
  21.         <ValidTerrainCategory>Beach</ValidTerrainCategory>
  22.         <ValidTerrainCategory>Forest</ValidTerrainCategory>
  23.         <ValidTerrainCategory>City</ValidTerrainCategory>
  24.         <ValidTerrainCategory>Water</ValidTerrainCategory>
  25.         <ValidTerrainCategory>Cliff</ValidTerrainCategory>
  26.         <ValidTerrainCategory>Mountain</ValidTerrainCategory>
  27.     <GameModifier InternalName="FireArrowDamage01">
  28.       <ModType>Unit</ModType>
  29.       <Attribute>DefendableDamage</Attribute>
  30.       <!-- Use the unit's attack stat to determine damage done by the arrow -->
  31.       <Calculate InternalName = "Value" ValueOwner="CastingUnit">
  32.         <Expression><![CDATA[[UnitStat_Attack]*-1]]></Expression>
  33.       </Calculate>
  34.       <Attribute>CurHealth</Attribute>
  35.       <Value>-2</Value>
  36.       <PerTurn>1</PerTurn>
  37.       <Duration>4</Duration>
  38.     </GameModifier>
  39.     <SpellCastEffectName>Flame_Dart3</SpellCastEffectName>
  40.     <SpellCastEffectScale>0.15</SpellCastEffectScale>
  41.     <SpellCastProjectile>1</SpellCastProjectile>
  42.     <SpellCastProjectileSpeed>800</SpellCastProjectileSpeed>
  43.     <SpellDefEffect>
  44.       <EffectName>Flame_Impact</EffectName>
  45.       <LocalPosition>0,35,0</LocalPosition>
  46.       <EffectScale>1.0</EffectScale>
  47.       <EffectDelay>0.0</EffectDelay>
  48.       <SnapToTerrain>1</SnapToTerrain>
  49.     </SpellDefEffect>
  50.   </SpellDef>


I simply added the lines in (I created a new icon as well)... but when I research the required tech nothing shows up in game, just the original cedar shortbow.  Am I missing something?

6,658 views 6 replies
Reply #1 Top

What is:

Code: xml
  1. <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Prereq</span>&gt;
  2. <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span>Tech<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Type</span><span style="color: #0000ff;">&gt;</span>
  3. <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Attribute</span><span style="color: #0000ff;">&gt;</span>Weapons_Of_Piercing_Trogs<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Attribute</span><span style="color: #0000ff;">&gt;</span>
  4. <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">Value</span><span style="color: #0000ff;">&gt;</span>0<span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">Value</span><span style="color: #0000ff;">&gt;</span>

Also, shouldn't the top value be 1?

That'd be my uneducated guess :P

 

EDIT: In edit mode the above code looks fine... a minute ago it looked like a rainbow. wth.

  1.         <Prereq>
  2.             <Type>Tech</Type>
  3.             <Attribute>Weapons_Of_Piercing_Trogs</Attribute>
  4.             <Value>0</Value>
    Code: xml
Reply #2 Top

I have no idea where you're getting that code from... and what value should be a 1?

Maybe there's some function that makes an item available for unit design.... I don't know yet...

Edit: It looks fine in regular mode to me, check your browser...

Reply #3 Top

Okay I figured out how to get it in game... I made 2 new files, one for the item and one for the fire arrow effect...

Code: xml
  1. &lt;GameItemTypes&gt;
  2. &lt;!-- Equipment Display Name/Description --&gt;
  3.         &lt;GameItemType InternalName="Weapon_CedarShortbow_Fire"&gt;
  4.         &lt;DisplayName&gt;Cedar Shortbow with Fire Arrows&lt;/DisplayName&gt;
  5.         &lt;Description&gt;A bow of rough cedarwood, strung with milkweed fiber. Equipped with Fire Arrows&lt;/Description&gt;
  6.         &lt;!-- Equipment Type --&gt;
  7.         &lt;Type&gt;Weapon&lt;/Type&gt;
  8.         &lt;Type&gt;Defense&lt;/Type&gt;
  9.         &lt;CanBeEquipped&gt;1&lt;/CanBeEquipped&gt;
  10.         &lt;IsAvailableForSovereignCustomization&gt;false&lt;/IsAvailableForSovereignCustomization&gt;
  11.         &lt;ShopValue&gt;30&lt;/ShopValue&gt;
  12.         &lt;WeaponType&gt;Bow&lt;/WeaponType&gt;
  13.         &lt;!-- Equipment Graphics --&gt;
  14.         &lt;IconFile&gt;Archer_Bow_Icon_Fire.png&lt;/IconFile&gt;
  15.         &lt;TintR&gt;0&lt;/TintR&gt;
  16.         &lt;TintG&gt;0&lt;/TintG&gt;
  17.         &lt;TintB&gt;0&lt;/TintB&gt;
  18.         &lt;GameItemTypeModel&gt;
  19.             &lt;Attachment&gt;hand_Left_Lcf&lt;/Attachment&gt;
  20.             &lt;ModelFile&gt;Gfx\HKB\Items\Archer_Bow.hkb&lt;/ModelFile&gt;
  21.             &lt;Texture_All&gt;Gfx\HKB\Items\K_Female_Armor_Archer_Texture_01.png&lt;/Texture_All&gt;
  22.         &lt;/GameItemTypeModel&gt;
  23.         &lt;!-- SFX --&gt;
  24.         &lt;EquipSFX&gt;Equip_BowandArrow_01&lt;/EquipSFX&gt;
  25.         &lt;EquipSFX&gt;Equip_BowandArrow_02&lt;/EquipSFX&gt;
  26.         &lt;EquipSFX&gt;Equip_BowandArrow_03&lt;/EquipSFX&gt;
  27.         &lt;AttackSFX&gt;Hit_Arrow1&lt;/AttackSFX&gt;
  28.         &lt;AttackSFX&gt;Hit_Arrow2&lt;/AttackSFX&gt;
  29.         &lt;AdditionalTrainingTurns&gt;3&lt;/AdditionalTrainingTurns&gt;
  30.         &lt;!-- Equipment Production Requirements --&gt;
  31.         &lt;ProductionRequirement&gt;
  32.             &lt;Type&gt;Resource&lt;/Type&gt;
  33.             &lt;Attribute&gt;Gold&lt;/Attribute&gt;
  34.             &lt;Value&gt;3.0&lt;/Value&gt;
  35.         &lt;/ProductionRequirement&gt;
  36.         &lt;ProductionRequirement&gt;
  37.             &lt;Type&gt;Resource&lt;/Type&gt;
  38.             &lt;Attribute&gt;Materials&lt;/Attribute&gt;
  39.             &lt;Value&gt;3.0&lt;/Value&gt;
  40.         &lt;/ProductionRequirement&gt;
  41.         &lt;!-- Equipment Prerequisites --&gt;
  42.         &lt;Prereq&gt;
  43.             &lt;Type&gt;Tech&lt;/Type&gt;
  44.             &lt;Attribute&gt;Ranged_Weapons_Amarian&lt;/Attribute&gt;
  45.             &lt;Value&gt;0&lt;/Value&gt;
  46.         &lt;/Prereq&gt;
  47.         &lt;Prereq&gt;
  48.             &lt;Type&gt;Tech&lt;/Type&gt;
  49.             &lt;Attribute&gt;Weapons_Of_Piercing_Trogs&lt;/Attribute&gt;
  50.             &lt;Value&gt;0&lt;/Value&gt;
  51.         &lt;/Prereq&gt;
  52.         &lt;!-- Equipment Modifiers --&gt;
  53.         &lt;GameModifier&gt;
  54.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  55.             &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  56.             &lt;StrVal&gt;UnitStat_Attack&lt;/StrVal&gt;
  57.             &lt;Value&gt;3.0&lt;/Value&gt;
  58.         &lt;/GameModifier&gt;
  59.         &lt;GameModifier&gt;
  60.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  61.             &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  62.             &lt;StrVal&gt;UnitStat_CombatSpeed&lt;/StrVal&gt;
  63.             &lt;Value&gt;-0.5&lt;/Value&gt;
  64.         &lt;/GameModifier&gt;
  65.         &lt;GameModifier&gt;
  66.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  67.             &lt;Attribute&gt;UnlockCombatAbility&lt;/Attribute&gt;
  68.             &lt;StrVal&gt;FireArrows&lt;/StrVal&gt;        
  69.         &lt;/GameModifier&gt;        
  70.         &lt;GameModifier&gt;
  71.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  72.             &lt;Attribute&gt;UnlockRangedAction&lt;/Attribute&gt;
  73.             &lt;StrVal&gt;BasicBowAttack&lt;/StrVal&gt;        
  74.         &lt;/GameModifier&gt;
  75.         &lt;TacticalRange&gt;8&lt;/TacticalRange&gt;
  76.     &lt;/GameItemType&gt;
  77. &lt;/GameItemTypes&gt;

 

Code: xml
  1. &lt;Spells&gt;
  2.   &lt;SpellDef InternalName="FireArrows"&gt;
  3.          &lt;DisplayName&gt;Fire Arrows&lt;/DisplayName&gt;
  4.          &lt;Description&gt;Fires a volley of flaming arrows&lt;/Description&gt;
  5.          &lt;Image&gt;ArcaneArrow.png&lt;/Image&gt;
  6.          &lt;IconFG&gt;Icon_Arrows.png&lt;/IconFG&gt;
  7.          &lt;IconBG&gt;Icon_Arrows.png&lt;/IconBG&gt;
  8.          &lt;IconColor&gt;32,45,243&lt;/IconColor&gt;
  9.         &lt;SoundFX&gt;Spell_FireBolt_01&lt;/SoundFX&gt;
  10.         &lt;ManaCost&gt;0&lt;/ManaCost&gt;
  11.         &lt;SpellLevel&gt;1&lt;/SpellLevel&gt;
  12.         &lt;SpellType&gt;Tactical&lt;/SpellType&gt;
  13.         &lt;SpellClass&gt;Offensive&lt;/SpellClass&gt;
  14.         &lt;SpellTargetType&gt;EnemyUnit&lt;/SpellTargetType&gt;
  15.         &lt;GameModifier InternalName="FireArrowDamage01"&gt;
  16.           &lt;ModType&gt;Unit&lt;/ModType&gt;
  17.           &lt;Attribute&gt;DefendableDamage&lt;/Attribute&gt;
  18.           &lt;!-- Use the unit's attack stat to determine damage done by the arrow --&gt;
  19.           &lt;Calculate InternalName = "Value" ValueOwner="CastingUnit"&gt;
  20.             &lt;Expression&gt;&lt;![CDATA[[UnitStat_Attack]*-1]]&gt;&lt;/Expression&gt;
  21.           &lt;/Calculate&gt;
  22.           &lt;Attribute&gt;CurHealth&lt;/Attribute&gt;
  23.           &lt;Value&gt;-2&lt;/Value&gt;
  24.           &lt;PerTurn&gt;1&lt;/PerTurn&gt;
  25.           &lt;Duration&gt;4&lt;/Duration&gt;
  26.         &lt;/GameModifier&gt;
  27.         &lt;SpellCastEffectName&gt;Flame_Dart3&lt;/SpellCastEffectName&gt;
  28.         &lt;SpellCastEffectScale&gt;0.15&lt;/SpellCastEffectScale&gt;
  29.         &lt;SpellCastProjectile&gt;1&lt;/SpellCastProjectile&gt;
  30.         &lt;SpellCastProjectileSpeed&gt;800&lt;/SpellCastProjectileSpeed&gt;
  31.         &lt;SpellDefEffect&gt;
  32.           &lt;EffectName&gt;Flame_Impact&lt;/EffectName&gt;
  33.           &lt;LocalPosition&gt;0,35,0&lt;/LocalPosition&gt;
  34.           &lt;EffectScale&gt;1.0&lt;/EffectScale&gt;
  35.           &lt;EffectDelay&gt;0.0&lt;/EffectDelay&gt;
  36.           &lt;SnapToTerrain&gt;1&lt;/SnapToTerrain&gt;
  37.         &lt;/SpellDefEffect&gt;
  38.       &lt;/SpellDef&gt;
  39.  &lt;/Spells&gt;

 

While that worked, there are 2 issues... first the archer now does a spellcasting animation rather then an arrow shooting animation when using the ability.  I don't know how to change that.  Also, the AI doesn't use it in auto resolve, so I doubt the AI enemy will use it.  Any ideas on that?

Reply #4 Top

Where are you putting your mods now?

Reply #5 Top

The \elemental\mods directory seems to be the place to put the mods...


Enable "Use Mods" in the game options, I think that's required too....

Reply #6 Top

Thanks. I have folders left over from the beta and it was messing things up a bit this morning.