cohka cohka

Modding questions/help thread

Modding questions/help thread

Figured we needed a thread for questions that didn't need to take up valuable room from talented mod'rs.

1,922,824 views 844 replies
Reply #326 Top

Quoting Dumhed, reply 325

Thanks abob101 for the earlier feedback.  I sometimes have a hard time using the right query in the search to find what I need.  

 

New Question:

Is there any way to create a randomized result in unit recruitment?  Let's say for example I have 4 elementals that can be trained... is it possible for the city to recruit elemental (general), and only after recruitment find out which of the 4 you got?

Check out summon skeleton. It summons one of 3 skeleton types, but randomized.

Reply #327 Top

Quoting davrovana, reply 326


Quoting Dumhed, reply 325
Thanks abob101 for the earlier feedback.  I sometimes have a hard time using the right query in the search to find what I need.  

 

New Question:

Is there any way to create a randomized result in unit recruitment?  Let's say for example I have 4 elementals that can be trained... is it possible for the city to recruit elemental (general), and only after recruitment find out which of the 4 you got?

Check out summon skeleton. It summons one of 3 skeleton types, but randomized.

 

Yeah, I could use that if it were spell casting rather than the regular "Train" unit, which I'm trying to do.  

I suppose aside from creating a spell, I could create a building which, when created, summons the unit.  

Reply #328 Top

 

Question.

Hi,

Just starting out modding LH, and I'm trying to add a new faction with new racial/blood. What files do I need to include in my mod folder to get the new racial to work? Also, are there any guides or tutorials out there on how to add a new racial, add new traits etc? Thanks.

I've taken a look at both DSraider's "Additional Faction Traits and Races" and Attackdrone's "Fervor" Mods (which are both great by the way), but there's so many files I can't really make heads or tails of it, so any advice would be great. Thanks.

All the Best,

Reply #329 Top

Quoting Earth, reply 328

  ...so many files I can't really make heads or tails of it, so any advice would be great. Thanks.

I am still learning myself, but I am pretty sure reading through files that work is the best modding education. I am making a custom blood-trait faction myself, the faction mods of others are showing me what I need to know.

Look for the <RaceConfig> and <RaceType> tags. If you're looking at DsRaider's mod, they're in "Add_RaceTypes" and "Add_Factions"

Reply #330 Top

Quoting Dumhed, reply 325
Thanks abob101 for the earlier feedback.  I sometimes have a hard time using the right query in the search to find what I need.

No prob.  I've asked similar questions to yours in the past so I happened to know there was some info there.  Let us know if you got get that stuff working.

 

 

Quoting Dumhed, reply 325
Is there any way to create a randomized result in unit recruitment?  Let's say for example I have 4 elementals that can be trained... is it possible for the city to recruit elemental (general), and only after recruitment find out which of the 4 you got?

Not really possible with trained units.  I think a Spell (as already mentioned) is about the only thing that has a random effect. 

Reply #331 Top

Quoting Earth, reply 328
Just starting out modding LH, and I'm trying to add a new faction with new racial/blood. What files do I need to include in my mod folder to get the new racial to work? Also, are there any guides or tutorials out there on how to add a new racial, add new traits etc? Thanks.

A new blood is quite a bit of work because you have to create a heap of new units to go with it.  You create the units and given them your new blood ability.

I'd suggest start out by trying to create a faction ability, that's quite a simple thing to do.  Then work up from there.

 

You could try searching the FE Modding forum (as opposed to this one the LH Modding forum), there is a few threads talking about how to create a new blood trait etc... 99% of it will be the same in LH.

Reply #332 Top

Quoting Earth, reply 328
Just starting out modding LH, and I'm trying to add a new faction with new racial/blood. What files do I need to include in my mod folder to get the new racial to work? Also, are there any guides or tutorials out there on how to add a new racial, add new traits etc? Thanks.

You need:

1. The new blood ability. Look in CoreAbilities for examples.

3. A New Race. Look in CoreRacetypes for examples.  I suggest using an existing modeltype as this will be much easier. Modeltypes are what determine what clothes and hair your units can have and what their armor looks like.

2. A new Faction. Use the faction editor ans select your new race.

4. New starting units for that race that have that blood ability. Look in CoreUnits for examples.

5. Go back and edit your faction to give it the starting units.

Reply #333 Top

Thanks davrovana, abob101 and DsRaider, all very helpful advice. That check list will be invaluable.

I think so far I have done part of step 1 on your list DsRaider, so quite a way to go. But after seeing what you and Attackdrone have achieved, I definitely think it's worth it.

All the Best,

 

Reply #334 Top

sorry if this has been already asked/answered somewhere else and i missed it but i m looking for the following:

i d love a mod that increases the number of soldiers in a unit ONLY IN LOOKS:

what i mean is that a regular unit with 3 soldiers would still be 3 soldier for the purpose of attack/defense/hitpoints etc. but look as if it had 6 soldiers. 4 soldiers would look as if they were 8, 5 = 10 and 6 = 12.

And no, getting drunk to see everything twice isnt an option ;)

reason being that i m no fan of the small scale battles but i also understand that simply changing it so that units come with 6 soldiers by default would overthrow balance completely.

is this possible (perhaps is there already a SMALL mod that doest it - i m not interested in complete overhauls at the moment ) or is the graphical representation always tied to the stats of the unit ?

thanks in advance !

 

 

 

Reply #335 Top


The files you are looking for are the UnitGroupingTypes.xml and possibly the CoreFormations.xml

I do believe however that the graphical representation is tied to the number of units.

Reply #336 Top

How do you edit an existing item?  For example, if I wanted to add 3 maximum lightning damage to the Blessed Hammer, reduce Physical Attack by 1, and an OnHit effect of 8 Lightning Damage against units with an IsUndead unitstat, how would I change the code so that the +10 Physical Attack vs. Undead no longer applies?  I know how to add elemental damage and defendable elemental damage OnHit to a weapon (because Heavenfall has already provided an example), but how do I remove the old +10 Physical Attack bonus against Undead?

Reply #337 Top

GameItemTypes are largely overwritten when you define it. Just copy the whole item into a mod file and remove the XML for the damage bonus.

Reply #338 Top

EDIT: Actually the first one doesn't work properly, as it does extra damage to non-undead units.

 

Would this work for the MeleeAppliesSpell?

 

<GameModifier>

  <ModType>Unit</ModType>
  <Attribute>DefendableDamage</Attribute>
  <AttackStat>UnitStat_Attack_Lightning</AttackStat>
  <Calculate InternalName="Calc" ValueOwner="TargetUnit">
  <Expression><![CDATA[[UnitStat_BG_IsUndead]]></Expression>
    <Calculate InternalName="Calc2" ValueOwner="CastingUnit">
    <Expression><![CDATA[[UnitStat_BG_IsUndead]]></Expression>
    <Calculate InternalName="Calc3" ValueOwner="TargetUnit">
    <Expression><![CDATA[[Calc2]] > [CDATA[Calc]]]></Expression>
    <Calculate InternalName="Value">
    <Expression><![CDATA[[Calc3] * 8]></Expression>
    </Calculate>

</GameModifier>

 

It sometimes seems to do more than 8 Damage though, with no known resistances or weaknesses to Lightning.

 

Would this work?

 

<GameModifier>

  <ModType>Unit</ModType>
  <Attribute>DefendableDamage</Attribute>
  <AttackStat>UnitStat_Attack_Lightning</AttackStat>
    <Calculate InternalName="Calc" ValueOwner="TargetUnit">
    <Expression><![CDATA[[UnitStat_BG_IsUndead]]></Expression>
    <Calculate InternalName="Value">
    <Expression><8></Expression>
    </Calculate>
  <vsHigher>1</vsHigher> 

</GameModifier>

 

Or is the <vsHigher> only for use when you don't do any calculations?

Reply #339 Top

Just how do you do a comparison between two Calc values and use the true/false to determine whether the amount used for the Value is 0 (previous statement false) or 1 (previous statement true) times the number?

Reply #340 Top

In fact vshigher and vslower should not be used in effect modifiers at all. The code isn't there in the background to do the proper checks. > and < are not accepted operators in a calculation except in AIPRIORITY.

The good news is you don't actually need to do a comparison when you are using calculations in spelldefs. In other words,

 

<GameModifier>

  <ModType>Unit</ModType>
  <Attribute>DefendableDamage</Attribute>
  <AttackStat>UnitStat_Attack_Lightning</AttackStat>
  <Calculate InternalName="Calc" ValueOwner="TargetUnit">
  <Expression><![CDATA[[UnitStat_BG_IsUndead]]></Expression>
    <Calculate InternalName="Value">
    <Expression><![CDATA[[Calc] * 8]]></Expression>
    </Calculate>
</GameModifier>

Note that since you are using Defendabledamage, assuming target has no lightning resistance, your actual damage will range from 4-8.

 

Reply #342 Top

There's no good way to do that.

 

Reply #344 Top

Yes, but you can't link it to lightning resistance because lightning resistance can be positive or negative.

Reply #345 Top

EDIT: Actually, I'll make it fire damage instead (the most resisted element) so it has a minimal effect on other non-undead attacks.  Even though the fire skeletons are immune to it, they can still be hit by the regular damage.  Banshees are not immune to Fire Damage though.

Yes, that would be fine.  There is lightning attack added to the base attack so that Banshees have a chance of getting hit (and then having CurrHealth decreased).

Question 1: What does DefendableDamage do?

Question 2: How do I subtract from an enemy's current health, and still check first if they are Undead and the wielder is not?

Reply #346 Top

1) deals a normal attack, it is therefore subject to defense, randomization of damage, and resistance modifications

2) Haven't tried to do this, maybe you can play around with the calculations. I don't know.

Reply #347 Top

Is it possible to create an AI only Sovereign that shows up in random games? (Or at least selectable) I've been pondering making a dangerous sovereign/race to fight against ;)

Reply #348 Top

Thanks very much for all your help Heavenfall!  After lots of trial and error I've worked out how to give the bonus damage if the enemy is Undead and the attacker is not (by editing the Sov file to give him the Undead unitstat -  I also had to delete the Blessed Hammer definition from your Library files).  I would also assume now that when you just put a TargetUnit UnitStat you are actually either testing if the UnitStat is positive, or testing that the unit stat is equal to itself, or is equal to 1 (one of those possibilities I think).

Anyway, this is my full code for doing 10 damage to Undead with a regular attack with the Blessed Hammer as long as the user is not Undead.  And it affects Banshees as long as at least 1 of the 3 fire damage for the weapon hits the banshee (even though it would avoid all the Physical Attack).

It should also allow people to make a number of conditions for whatever you are trying to do.  Since only one 0 has to be in there for the whole expression to be 0, you can easily make as many conditions as you like that all have to be true to affect the GameModifier Attribute.

Btw: do you think it needs to cost more than 120?

Code: xml
  1. &lt;GameItemTypes&gt;
  2. &lt;GameItemType InternalName="Warhammer_Blessed"&gt;
  3. &lt;DisplayName&gt;Blessed Hammer&lt;/DisplayName&gt;
  4. &lt;Description&gt;It is a grave marker with a handle, a deadly reminder that the dead should remain so.&lt;/Description&gt;
  5. &lt;Type&gt;Weapon&lt;/Type&gt;
  6. &lt;WeaponType&gt;Blunt&lt;/WeaponType&gt;
  7. &lt;WeaponUpgradeType&gt;Blunt&lt;/WeaponUpgradeType&gt;
  8. &lt;CanBeEquipped&gt;1&lt;/CanBeEquipped&gt;
  9. &lt;ShopValue&gt;120&lt;/ShopValue&gt;
  10. &lt;GameModifier&gt;
  11. &lt;ModType&gt;Unit&lt;/ModType&gt;
  12. &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  13. &lt;StrVal&gt;UnitStat_Attack_Pierce&lt;/StrVal&gt;
  14. &lt;Value&gt;13&lt;/Value&gt;
  15. &lt;/GameModifier&gt;
  16. &lt;GameModifier&gt;
  17. &lt;ModType&gt;Unit&lt;/ModType&gt;
  18. &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  19. &lt;StrVal&gt;UnitStat_Attack_Fire&lt;/StrVal&gt;
  20. &lt;Value&gt;3&lt;/Value&gt;
  21. &lt;/GameModifier&gt;
  22. &lt;GameModifier&gt;
  23. &lt;ModType&gt;Unit&lt;/ModType&gt;
  24. &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  25. &lt;StrVal&gt;UnitStat_CombatSpeed&lt;/StrVal&gt;
  26. &lt;Value&gt;-4&lt;/Value&gt;
  27. &lt;/GameModifier&gt;
  28. &lt;GameModifier&gt;
  29. &lt;ModType&gt;Unit&lt;/ModType&gt;
  30. &lt;Attribute&gt;AdjustUnitStat&lt;/Attribute&gt;
  31. &lt;StrVal&gt;UnitStat_BashChance&lt;/StrVal&gt;
  32. &lt;Value&gt;100&lt;/Value&gt;
  33. &lt;Provides&gt;Bash- Has a chance equal to the damage done of knocking the victim prone&lt;/Provides&gt;
  34. &lt;/GameModifier&gt;
  35. &lt;GameModifier&gt;
  36. &lt;ModType&gt;Unit&lt;/ModType&gt;
  37. &lt;Attribute&gt;UnlockCombatAbility&lt;/Attribute&gt;
  38. &lt;StrVal&gt;CrushingBlow&lt;/StrVal&gt;
  39. &lt;Provides&gt;Crushing Blow- +100% Attack, but you lose your next action&lt;/Provides&gt;
  40. &lt;/GameModifier&gt;
  41. &lt;GameModifier&gt;
  42. &lt;ModType&gt;Unit&lt;/ModType&gt;
  43. &lt;Attribute&gt;MeleeAppliesSpell&lt;/Attribute&gt;
  44. &lt;StrVal&gt;BlessedHammerUndead&lt;/StrVal&gt;
  45. &lt;Provides&gt;+10 Undefendable Damage on any successful hit on Undead unless the user is Undead. Includes Banshees if base fire attack hits.&lt;/Provides&gt;
  46. &lt;/GameModifier&gt;
  47. &lt;IsAvailableForSovereignCustomization&gt;0&lt;/IsAvailableForSovereignCustomization&gt;
  48. &lt;Likelihood&gt;400&lt;/Likelihood&gt;
  49. &lt;RarityDisplay&gt;Common&lt;/RarityDisplay&gt;
  50. &lt;HeroOnly&gt;1&lt;/HeroOnly&gt;
  51. &lt;IsAvailableForUnitDesign&gt;0&lt;/IsAvailableForUnitDesign&gt;
  52. &lt;AIData AIPersonality="AI_General"&gt;
  53. &lt;AIPrefType&gt;AIPrefType_BLUNT&lt;/AIPrefType&gt;
  54. &lt;AIPriority&gt;240&lt;/AIPriority&gt;
  55. &lt;/AIData&gt;
  56. &lt;ArtDef&gt;Warhammer_Blessed_ArtDef&lt;/ArtDef&gt;
  57. &lt;GameItemTypeArtDef InternalName="Warhammer_Blessed_ArtDef"&gt;
  58. &lt;GameItemTypeModelPack InternalName="Warhammer_Blessed_Default"&gt;
  59. &lt;IconFile&gt;BlessedHammer_Icon.png&lt;/IconFile&gt;
  60. &lt;TintR&gt;0&lt;/TintR&gt;
  61. &lt;TintG&gt;0&lt;/TintG&gt;
  62. &lt;TintB&gt;0&lt;/TintB&gt;
  63. &lt;AttackSFX&gt;Hit_Warhammer_01&lt;/AttackSFX&gt;
  64. &lt;AttackSFX&gt;Hit_Warhammer_02&lt;/AttackSFX&gt;
  65. &lt;AttackSFX&gt;Hit_Warhammer_03&lt;/AttackSFX&gt;
  66. &lt;EquipSFX&gt;Equip_WoodenItem_01&lt;/EquipSFX&gt;
  67. &lt;EquipSFX&gt;Equip_WoodenItem_02&lt;/EquipSFX&gt;
  68. &lt;EquipSFX&gt;Equip_WoodenItem_03&lt;/EquipSFX&gt;
  69. &lt;SupportedUnitModelType&gt;AmarianFemale&lt;/SupportedUnitModelType&gt;
  70. &lt;SupportedUnitModelType&gt;AmarianMale&lt;/SupportedUnitModelType&gt;
  71. &lt;SupportedUnitModelType&gt;DarklingMale&lt;/SupportedUnitModelType&gt;
  72. &lt;SupportedUnitModelType&gt;EmpireFemale&lt;/SupportedUnitModelType&gt;
  73. &lt;SupportedUnitModelType&gt;EmpireMale&lt;/SupportedUnitModelType&gt;
  74. &lt;SupportedUnitModelType&gt;FallenFemale&lt;/SupportedUnitModelType&gt;
  75. &lt;SupportedUnitModelType&gt;FallenMale&lt;/SupportedUnitModelType&gt;
  76. &lt;SupportedUnitModelType&gt;HenchmanMale&lt;/SupportedUnitModelType&gt;
  77. &lt;SupportedUnitModelType&gt;IroneerFemale&lt;/SupportedUnitModelType&gt;
  78. &lt;SupportedUnitModelType&gt;IroneerMale&lt;/SupportedUnitModelType&gt;
  79. &lt;SupportedUnitModelType&gt;IronGolem&lt;/SupportedUnitModelType&gt;
  80. &lt;SupportedUnitModelType&gt;JuggernautMale&lt;/SupportedUnitModelType&gt;
  81. &lt;SupportedUnitModelType&gt;KingdomFemale&lt;/SupportedUnitModelType&gt;
  82. &lt;SupportedUnitModelType&gt;KingdomMale&lt;/SupportedUnitModelType&gt;
  83. &lt;SupportedUnitModelType&gt;MancerFemale&lt;/SupportedUnitModelType&gt;
  84. &lt;SupportedUnitModelType&gt;MancerMale&lt;/SupportedUnitModelType&gt;
  85. &lt;SupportedUnitModelType&gt;QuendarFemale&lt;/SupportedUnitModelType&gt;
  86. &lt;SupportedUnitModelType&gt;QuendarMale&lt;/SupportedUnitModelType&gt;
  87. &lt;SupportedUnitModelType&gt;SlaveMale&lt;/SupportedUnitModelType&gt;
  88. &lt;SupportedUnitModelType&gt;TarthanFemale&lt;/SupportedUnitModelType&gt;
  89. &lt;SupportedUnitModelType&gt;TarthanMale&lt;/SupportedUnitModelType&gt;
  90. &lt;SupportedUnitModelType&gt;UrxenFemale&lt;/SupportedUnitModelType&gt;
  91. &lt;SupportedUnitModelType&gt;UrxenMale&lt;/SupportedUnitModelType&gt;
  92. &lt;SupportedUnitModelType&gt;WraithFemale&lt;/SupportedUnitModelType&gt;
  93. &lt;SupportedUnitModelType&gt;WraithMale&lt;/SupportedUnitModelType&gt;
  94. &lt;GameItemTypeModel&gt;
  95. &lt;ModelFile&gt;gfx/hkb/Weapons/W_Hammer_Doom_01.hkb&lt;/ModelFile&gt;
  96. &lt;Texture_All&gt;gfx/hkb/Weapons/FE_Weapons_01.png&lt;/Texture_All&gt;
  97. &lt;Attachment&gt;hand_right_Lcf&lt;/Attachment&gt;
  98. &lt;Color_Metal&gt;50,50,78&lt;/Color_Metal&gt;
  99. &lt;/GameItemTypeModel&gt;
  100. &lt;/GameItemTypeModelPack&gt;
  101. &lt;/GameItemTypeArtDef&gt;
  102. &lt;/GameItemType&gt;
  103. &lt;/GameItemTypes&gt;
  104.  
  105. &lt;Spells&gt;
  106. &lt;SpellDef InternalName="BlessedHammerUndead"&gt;
  107. &lt;DisplayName&gt;BlessedHammerUndead&lt;/DisplayName&gt;
  108. &lt;Description&gt;Does 10 fire damage (+5 per death and fire shard) to target unit. If the unit is killed an inferno is left in their tile.&lt;/Description&gt;
  109. &lt;Image&gt;T_Soulburning_Painting.png&lt;/Image&gt;
  110. &lt;IconFG&gt;T_Soulburning_Icon.png&lt;/IconFG&gt;
  111. &lt;IconBG&gt;T_Soulburning_Icon_BG.png&lt;/IconBG&gt;
  112. &lt;IconColor&gt;255,103,2&lt;/IconColor&gt;
  113. &lt;HideInHiergamenon&gt;1&lt;/HideInHiergamenon&gt;
  114. &lt;IsCastable&gt;0&lt;/IsCastable&gt;
  115. &lt;SpellType&gt;Tactical&lt;/SpellType&gt;
  116. &lt;SpellClass&gt;Offensive&lt;/SpellClass&gt;
  117. &lt;SpellSubClass&gt;Damage&lt;/SpellSubClass&gt;
  118. &lt;SpellTargetType&gt;EnemyUnit&lt;/SpellTargetType&gt;
  119. &lt;Radius&gt;0&lt;/Radius&gt;
  120. &lt;GameModifier&gt;
  121. &lt;ModType&gt;Unit&lt;/ModType&gt;
  122. &lt;Attribute&gt;CurHealth&lt;/Attribute&gt;
  123. &lt;Calculate InternalName="Calc" ValueOwner="TargetUnit"&gt;
  124. &lt;Expression&gt;&lt;![CDATA[[UnitStat_BG_IsUndead] &gt; 0]]&gt;&lt;/Expression&gt;
  125. &lt;/Calculate&gt;
  126. &lt;Calculate InternalName="Calc2" ValueOwner="CastingUnit"&gt;
  127. &lt;Expression&gt;&lt;![CDATA[[UnitStat_BG_IsUndead] &lt; 1]]&gt;&lt;/Expression&gt;
  128. &lt;/Calculate&gt;
  129. &lt;Calculate InternalName="Calc3"&gt;
  130. &lt;Expression&gt;&lt;![CDATA[[Calc] * [Calc2]]]&gt;&lt;/Expression&gt;
  131. &lt;/Calculate&gt;
  132. &lt;Calculate InternalName="Calc4"&gt;
  133. &lt;Expression&gt;&lt;![CDATA[[Calc3] &gt; 0]]&gt;&lt;/Expression&gt;
  134. &lt;/Calculate&gt;
  135. &lt;Calculate InternalName="Value"&gt;
  136. &lt;Expression&gt;&lt;![CDATA[[Calc4] * -10]]&gt;&lt;/Expression&gt;
  137. &lt;/Calculate&gt;
  138. &lt;/GameModifier&gt;
  139. &lt;HitSoundFX&gt;Spell_Chaos_01&lt;/HitSoundFX&gt;
  140. &lt;SpellDefEffect&gt;
  141. &lt;EffectName&gt;T_Chaos_Particle&lt;/EffectName&gt;
  142. &lt;LocalPosition&gt;0,0,0&lt;/LocalPosition&gt;
  143. &lt;EffectScale&gt;1&lt;/EffectScale&gt;
  144. &lt;EffectDelay&gt;0&lt;/EffectDelay&gt;
  145. &lt;SnapToTerrain&gt;1&lt;/SnapToTerrain&gt;
  146. &lt;/SpellDefEffect&gt;
  147. &lt;AIData AIPersonality="AI_General"&gt;
  148. &lt;AIPriority&gt;40&lt;/AIPriority&gt;
  149. &lt;/AIData&gt;
  150. &lt;/SpellDef&gt;
  151. &lt;/Spells&gt;

Reply #349 Top

I'm trying to make this quest offer me two different rewards. I can't seem to get it to work however as it doesn't give me the resources. Your supposed to go to the starting inn then go to the tower and defeat the guardians. Somewhere along the way you are supposed to be offered a choice between getting crystals or metal but it never gives me the resources. Any help would be appreciated as Quests are not my strongest area.

 

Code: xml
  1.     &lt;QuestDef InternalName="Quest_SecTower"&gt;
  2.         &lt;DisplayName&gt;Where Fire meets Water&lt;/DisplayName&gt;
  3.         &lt;Description&gt;While stopping at a local pub to get a drink you catch up on the latest gossip. Most of it is the usual country stuff but one tale catches your attention.
  4.         Apparently some travelers crossing the desert to the soouth swear they saw a ancient tower rising from the sand where there had only been dunes before. The say it was huge beyond belief and decorated in a unknown style. You decide to check it out, something about the description seems familiar anyway...&lt;/Description&gt;
  5.         &lt;IsStartingPointQuest&gt;0&lt;/IsStartingPointQuest&gt;
  6.         &lt;ShortTextAccept&gt;Check it out&lt;/ShortTextAccept&gt;
  7.         &lt;RewardText&gt;Random Magic Item&lt;/RewardText&gt;
  8.         &lt;RewardImage&gt;Question_Mark_Icon.png&lt;/RewardImage&gt;
  9.         &lt;SuccessText&gt;After the battle you feel magic flow through the key into you. You then mkae your way out of the tower as it collapses around you.&lt;/SuccessText&gt;
  10.         &lt;QuestClass&gt;Minor&lt;/QuestClass&gt;
  11.         &lt;AllowQuestRejection&gt;0&lt;/AllowQuestRejection&gt;        
  12.         &lt;Repeatable&gt;1&lt;/Repeatable&gt;
  13.         &lt;TriggerType&gt;QuestLocation&lt;/TriggerType&gt;
  14.         &lt;TriggerOrigin&gt;EventLocation&lt;/TriggerOrigin&gt;
  15.         &lt;SpawnRating&gt;3&lt;/SpawnRating&gt;
  16.         &lt;Image&gt;TombDesert_Medallion.png&lt;/Image&gt;
  17.         &lt;PrefQuestLoc&gt;QuestLoc_Inn1&lt;/PrefQuestLoc&gt;
  18.         &lt;Treasure&gt;
  19.             &lt;GameModifier InternalName="Reward3"&gt;
  20.                 &lt;ModType&gt;Unit&lt;/ModType&gt;
  21.                 &lt;Attribute&gt;GiveExperience&lt;/Attribute&gt;
  22.                 &lt;Value&gt;9&lt;/Value&gt;
  23.             &lt;/GameModifier&gt;
  24.         &lt;/Treasure&gt;    
  25.         &lt;QuestObjectiveDef&gt;
  26.             &lt;ObjectiveID&gt;0&lt;/ObjectiveID&gt;
  27.             &lt;NextObjectiveID&gt;1&lt;/NextObjectiveID&gt;
  28.             &lt;Description&gt;Track down the tower.&lt;/Description&gt;
  29.             &lt;Treasure&gt;
  30.                 &lt;GameModifier&gt;
  31.                     &lt;ModType&gt;Map&lt;/ModType&gt;
  32.                     &lt;Attribute&gt;CreateGoodieHut&lt;/Attribute&gt;
  33.                     &lt;StrVal&gt;Dread Tower&lt;/StrVal&gt;
  34.                     &lt;Unitclass&gt;GH_HugeTower1&lt;/Unitclass&gt;
  35.                     &lt;OverrideX&gt;57&lt;/OverrideX&gt;
  36.                     &lt;OverrideY&gt;38&lt;/OverrideY&gt;
  37.                 &lt;/GameModifier&gt;
  38.             &lt;/Treasure&gt;
  39.             &lt;QuestConditionDef&gt;
  40.                 &lt;Objective&gt;
  41.                     &lt;Icon&gt;Mana_32.png&lt;/Icon&gt;
  42.                     &lt;Text&gt;Enter the Tower.&lt;/Text&gt;
  43.                     &lt;IsOptional&gt;0&lt;/IsOptional&gt;
  44.                 &lt;/Objective&gt;
  45.                 &lt;Class&gt;Success&lt;/Class&gt;
  46.                 &lt;Type&gt;ClearGoodieHut&lt;/Type&gt;
  47.                 &lt;TextData&gt;GH_HugeTower1&lt;/TextData&gt;
  48.                 &lt;Flag&gt;RevealTarget&lt;/Flag&gt;
  49.             &lt;/QuestConditionDef&gt;
  50.             &lt;ChoiceText&gt;You see the tower jutting out of the sands before you. It is a awesome sight. Clearly it is old beyond knowing. You approach and enter the tower. Inside it is dark and cavernous.
  51.             You see a door before you with two figures standing behind it. Before you on a table is two keys. One marked with the water rune and the other with fire. Which key should you use to open the door?&lt;/ChoiceText&gt;
  52.             &lt;ChoiceMedallion&gt;K_Adventure.png&lt;/ChoiceMedallion&gt;
  53.             &lt;ChoiceMedallionFrame&gt;Medallion_Frame_17.png&lt;/ChoiceMedallionFrame&gt;
  54.             &lt;QuestChoiceDef&gt;
  55.                 &lt;Description&gt;Use the Water Key. (Unlock Water Magic)&lt;/Description&gt;
  56.                 &lt;NextObjectiveID&gt;1&lt;/NextObjectiveID&gt;
  57.                 &lt;Encounter&gt;
  58.                     &lt;Liklihood&gt;100&lt;/Liklihood&gt;
  59.                     &lt;BattleIdentifier&gt;Twins&lt;/BattleIdentifier&gt;
  60.                     &lt;WillRespawn&gt;0&lt;/WillRespawn&gt;
  61.                     &lt;WanderingRadius&gt;0&lt;/WanderingRadius&gt;
  62.                     &lt;UnitInstance&gt;
  63.                         &lt;UnitType&gt;Secrets_ColdElemental&lt;/UnitType&gt;
  64.                         &lt;Level&gt;7&lt;/Level&gt;
  65.                     &lt;/UnitInstance&gt;
  66.                     &lt;UnitInstance&gt;
  67.                         &lt;UnitType&gt;Secrets_FlameElemental&lt;/UnitType&gt;
  68.                         &lt;Level&gt;7&lt;/Level&gt;
  69.                     &lt;/UnitInstance&gt;
  70.                 &lt;/Encounter&gt;
  71.             &lt;Treasure&gt;
  72.                 &lt;GameModifier&gt;
  73.                     &lt;ModType&gt;Player&lt;/ModType&gt;
  74.                     &lt;Attribute&gt;Metal&lt;/Attribute&gt;
  75.                     &lt;Value&gt;10000&lt;/Value&gt;
  76.                 &lt;/GameModifier&gt;
  77.             &lt;/Treasure&gt;    
  78.             &lt;/QuestChoiceDef&gt;
  79.             &lt;QuestChoiceDef&gt;
  80.                 &lt;Description&gt;Use the Fire Key. (Unlock Fire Magic)&lt;/Description&gt;
  81.                 &lt;NextObjectiveID&gt;2&lt;/NextObjectiveID&gt;
  82.                 &lt;Encounter&gt;
  83.                     &lt;Liklihood&gt;100&lt;/Liklihood&gt;
  84.                     &lt;BattleIdentifier&gt;Twins&lt;/BattleIdentifier&gt;
  85.                     &lt;WillRespawn&gt;0&lt;/WillRespawn&gt;
  86.                     &lt;WanderingRadius&gt;0&lt;/WanderingRadius&gt;
  87.                     &lt;UnitInstance&gt;
  88.                         &lt;UnitType&gt;Secrets_ColdElemental&lt;/UnitType&gt;
  89.                         &lt;Level&gt;7&lt;/Level&gt;
  90.                     &lt;/UnitInstance&gt;
  91.                     &lt;UnitInstance&gt;
  92.                         &lt;UnitType&gt;Secrets_FlameElemental&lt;/UnitType&gt;
  93.                         &lt;Level&gt;7&lt;/Level&gt;
  94.                     &lt;/UnitInstance&gt;
  95.                 &lt;/Encounter&gt;
  96.            &lt;Treasure&gt;
  97.                 &lt;GameModifier&gt;
  98.                     &lt;ModType&gt;Player&lt;/ModType&gt;
  99.                     &lt;Attribute&gt;RefinedCrystal&lt;/Attribute&gt;
  100.                     &lt;Value&gt;10000&lt;/Value&gt;
  101.                 &lt;/GameModifier&gt;
  102.             &lt;/Treasure&gt;                    
  103.             &lt;/QuestChoiceDef&gt;            
  104.             &lt;QuestChoiceDef&gt;
  105.                 &lt;Description&gt;Flee the tower and come back later.&lt;/Description&gt;
  106.                 &lt;NextObjectiveID&gt;0&lt;/NextObjectiveID&gt;
  107.                 &lt;PopupMessage&gt;The figures do not chase you.&lt;/PopupMessage&gt;
  108.             &lt;/QuestChoiceDef&gt;
  109.         &lt;/QuestObjectiveDef&gt;
  110.         &lt;QuestObjectiveDef&gt;
  111.             &lt;ObjectiveID&gt;1&lt;/ObjectiveID&gt;
  112.             &lt;QuestEnd&gt;1&lt;/QuestEnd&gt;
  113.             &lt;PopupObjectiveMsg&gt;0&lt;/PopupObjectiveMsg&gt;            
  114.             &lt;QuestConditionDef&gt;        
  115.                 &lt;Objective&gt;
  116.                     &lt;Icon&gt;Mana_32.png&lt;/Icon&gt;
  117.                     &lt;Text&gt;Explore the tower.&lt;/Text&gt;
  118.                     &lt;IsOptional&gt;0&lt;/IsOptional&gt;
  119.                 &lt;/Objective&gt;
  120.                 &lt;Class&gt;Success&lt;/Class&gt;
  121.                 &lt;Type&gt;BattleFinished&lt;/Type&gt;
  122.                 &lt;TextData&gt;Twins&lt;/TextData&gt;
  123.                 &lt;MoreTextData&gt;Victory&lt;/MoreTextData&gt;
  124.             &lt;/QuestConditionDef&gt;
  125.         &lt;/QuestObjectiveDef&gt;    
  126.     &lt;/QuestDef&gt;   

Reply #350 Top

After plopping this into my quest editor, you will find that your mod types for your treasure should be

<GameModifier>
    <ModType>Resource</ModType>
    <Attribute>RefinedCrystal</Attribute>
    <Value>10000</Value>
</GameModifier>

I do recommend that you try out my editor when creating quests. It might save you some time and avoid these little errors. (The editor will pretty much let you create any quest you like)