Can Quests have "prereq"?


I am trying to create an item that would spawn monsters near the player, and the only way i can think of doing this is making  a quest that triggers every turn, under a prereq that the player is wielding the said item.

Is this possible?

Or is there a simpler way, like making monster spawning modifier into the ring?

11,515 views 5 replies
Reply #1 Top

So, you are trying to spawn a monster when a player has an item in their inventory? Is this item usable or is it like a bear skin?

You can make a usable item to create a monster, but then I've never tried to give a player an item when using an item, I'm sure that is possible, and thus, you can have the player use an item which summons a creature and gives that item back to the player.

You could get a quest that will trigger when a player reaches a certain resource level and thus, the item could give the player that resource when equipped. The player would then lose the resource when it's de-equipped (I think). Thus, every time the player is wearing the item the quest triggers, and ever time the player is not wearing the ring nothing happens.

Not exactly sure what the end goal is so, I can only tell you this much about it.

Reply #2 Top

Quoting parrottmath, reply 1

You could get a quest that will trigger when a player reaches a certain resource level .

Something like this?

<TriggerType>PlayerMana</TriggerType>
<TriggerData>1200</TriggerData>

Would the correct string be PlayerMana, PlayerGold, etc?

Reply #3 Top

Just

Mana

or

Gold

for the tags. The quest editor I made has those tags listed in the internal names window

Reply #4 Top

Quoting parrottmath, reply 3
...

Sorry for the late reply, what you suggested about the resources seems like it would work, thank you very much!

Reply #5 Top

Quoting parrottmath, reply 3

Just

Mana

or

Gold

for the tags. The quest editor I made has those tags listed in the internal names window

 

Code: xml
  1. &lt;ResourceTypes&gt;
  2.     &lt;ResourceType InternalName="SacrificeCasts"&gt;
  3.         &lt;DisplayName&gt;Sacrifice Casts&lt;/DisplayName&gt;
  4.         &lt;Type&gt;SacrificeCasts&lt;/Type&gt;
  5.         &lt;Description&gt;The number of Sacrifices cast by Piatra.&lt;/Description&gt;
  6.         &lt;IconColor&gt;0,0,0&lt;/IconColor&gt;
  7.         &lt;Icon&gt;Gfx//Icons//Mana_32.png&lt;/Icon&gt;
  8.         &lt;ClothIcon&gt;gfx\\TacticalIcons\\Res_Crystal.png&lt;/ClothIcon&gt;
  9.         &lt;HideInHiergamenon&gt;1&lt;/HideInHiergamenon&gt;
  10.         &lt;ModelColor&gt;0,0,0&lt;/ModelColor&gt;
  11.         &lt;Worth&gt;1&lt;/Worth&gt;
  12.         &lt;Global&gt;1&lt;/Global&gt;
  13.         &lt;Rarity&gt;0.0&lt;/Rarity&gt;
  14.         &lt;Shared&gt;0&lt;/Shared&gt;
  15.         &lt;TradedByCaravans&gt;0&lt;/TradedByCaravans&gt;
  16.         &lt;ShownInGlobalDisplay&gt;0&lt;/ShownInGlobalDisplay&gt;
  17.         &lt;Medallions InternalName="Population_Res_Medallions"&gt;
  18.             &lt;All&gt;Res_Ores_Plains.png&lt;/All&gt;
  19.         &lt;/Medallions&gt;
  20.     &lt;/ResourceType&gt;
  21. &lt;/ResourceTypes&gt;

Code: xml
  1. &lt;Spells&gt;
  2.     &lt;SpellDef InternalName="DarkRitesFoulRitual"&gt;
  3.         &lt;DisplayName&gt;Foul Ritual&lt;/DisplayName&gt;
  4.         &lt;Description&gt;Sacrifices a Champion to attract another one to your cause, at level 1/3/3/5 depending on times cast (Spell only works 4 times, 5th time gives no new Champion).&lt;/Description&gt;
  5.         &lt;Image&gt;S_StealSpirit_Painting.png&lt;/Image&gt;
  6.         &lt;IconFG&gt;S_StealSpirit_Icon.png&lt;/IconFG&gt;
  7.         &lt;AutoUnlock&gt;1&lt;/AutoUnlock&gt;
  8.         &lt;Cooldown&gt;1&lt;/Cooldown&gt;
  9.         &lt;SpellBookSortCategory&gt;Unit&lt;/SpellBookSortCategory&gt;
  10.         &lt;SpellBookSortSubCategory&gt;Other&lt;/SpellBookSortSubCategory&gt;
  11.         &lt;SpellType&gt;Strategic&lt;/SpellType&gt;
  12.         &lt;SpellClass&gt;Defensive&lt;/SpellClass&gt;
  13.         &lt;SpellSubClass&gt;Other&lt;/SpellSubClass&gt;
  14.         &lt;SpellTargetType&gt;FriendlyChampion&lt;/SpellTargetType&gt;
  15.         &lt;CasterMustBeSov&gt;1&lt;/CasterMustBeSov&gt;
  16.         &lt;Prereq&gt;
  17.             &lt;Type&gt;AbilityBonusOption&lt;/Type&gt;
  18.             &lt;Attribute&gt;DarkRites&lt;/Attribute&gt;
  19.             &lt;Target&gt;Player&lt;/Target&gt;
  20.         &lt;/Prereq&gt;
  21.         &lt;SpellResourceCost&gt;
  22.             &lt;Resource&gt;Mana&lt;/Resource&gt;
  23.             &lt;Amount&gt;10&lt;/Amount&gt;
  24.         &lt;/SpellResourceCost&gt;
  25.         &lt;GameModifier&gt;
  26.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  27.             &lt;Attribute&gt;PermanentDeath&lt;/Attribute&gt;
  28.         &lt;/GameModifier&gt;
  29.         &lt;GameModifier&gt;
  30.             &lt;ModType&gt;Unit&lt;/ModType&gt;
  31.             &lt;Attribute&gt;CurHealth&lt;/Attribute&gt;
  32.             &lt;Calculate InternalName="Calc" ValueOwner="TargetUnit"&gt;
  33.                 &lt;Expression&gt;&lt;![CDATA[[Unit_GetHPCurrent] * -1]]&gt;&lt;/Expression&gt;
  34.             &lt;/Calculate&gt;
  35.             &lt;Calculate InternalName="Value"&gt;
  36.                 &lt;Expression&gt;&lt;![CDATA[[Calc]]]&gt;&lt;/Expression&gt;
  37.             &lt;/Calculate&gt;
  38.         &lt;/GameModifier&gt;
  39.         &lt;GameModifier&gt;
  40.             &lt;ModType&gt;Resource&lt;/ModType&gt;
  41.             &lt;Attribute&gt;SacrificeCasts&lt;/Attribute&gt;
  42.             &lt;Value&gt;1&lt;/Value&gt;
  43.         &lt;/GameModifier&gt;
  44.         &lt;AIData AIPersonality="AI_General"&gt;
  45.             &lt;AIPriority&gt;0&lt;/AIPriority&gt;
  46.         &lt;/AIData&gt;
  47.         &lt;HitSoundFX&gt;Spell_StealSpirit_01&lt;/HitSoundFX&gt;
  48.         &lt;SpellDefEffect&gt;
  49.             &lt;EffectName&gt;S_StealSpirit_Particle&lt;/EffectName&gt;
  50.             &lt;LocalPosition&gt;0,0,0&lt;/LocalPosition&gt;
  51.             &lt;EffectScale&gt;1&lt;/EffectScale&gt;
  52.             &lt;SnapToTerrain&gt;1&lt;/SnapToTerrain&gt;
  53.         &lt;/SpellDefEffect&gt;
  54.     &lt;/SpellDef&gt;
  55. &lt;/Spells&gt;

Code: xml
  1. &lt;Quests&gt;
  2.     &lt;QuestDef InternalName="GameEvent_FoulRitual_1"&gt;
  3.         &lt;DisplayName&gt;Champions Available&lt;/DisplayName&gt;
  4.         &lt;QuestClass&gt;Minor&lt;/QuestClass&gt;
  5.         &lt;Repeatable&gt;0&lt;/Repeatable&gt;
  6.         &lt;TriggerType&gt;FactionResourceLevel&lt;/TriggerType&gt;
  7.         &lt;TriggerStringData&gt;SacrificeCasts&lt;/TriggerStringData&gt;
  8.         &lt;TriggerData&gt;1&lt;/TriggerData&gt;
  9.         &lt;DoNotDisplayStartPopup&gt;1&lt;/DoNotDisplayStartPopup&gt;
  10.         &lt;!--&lt;Description&gt;Your fame has grown far and wide, attracting Legendary Heroes to your cause.  But only one will join your service.&lt;/Description&gt;--&gt;
  11.         &lt;!--&lt;FullscreenMovie&gt;Movies\Minicut_Event_TheRevelry.bik&lt;/FullscreenMovie&gt;--&gt;
  12.         &lt;Treasure&gt;
  13.             &lt;GameModifier InternalName="Reward1"&gt;
  14.                 &lt;ModType&gt;Player&lt;/ModType&gt;
  15.                 &lt;Attribute&gt;RecruitFreeChampion&lt;/Attribute&gt;
  16.                 &lt;Value&gt;1&lt;/Value&gt;
  17.             &lt;/GameModifier&gt;
  18.         &lt;/Treasure&gt;
  19.         &lt;QuestObjectiveDef&gt;
  20.             &lt;ObjectiveID&gt;0&lt;/ObjectiveID&gt;
  21.             &lt;QuestEnd&gt;1&lt;/QuestEnd&gt;
  22.         &lt;/QuestObjectiveDef&gt;
  23.     &lt;/QuestDef&gt;
  24. &lt;/Quests&gt;

Here's an example of a system that uses a ResourceType-Spell-Quest combination to trigger.