Phrases:
The quest text is generated by mixing a combination of different phrases. The text can vary depending on the quest type:
Killing Quest
[Greeting Line] [Monster Name + Distance] [Monster Crime] [Monster Action]
Retrieval Quest
[Greeting Line] [Retrieval Line + Quantity] [Item Name]
Camp Raiding Quest
[Greeting Line] [Camp Name + Distance] [Raze it to the ground!]
Greeting lines, retrieval lines, monster crimes and monster actions can be added and edited in the 'QuestGen Phrases' trigger. Adding the following:
-
Set QuestGenGreetingLines[7] = Good to see you, friend!
and setting the greeting count to 8:
-
Set QuestGenGreetingCount = 8
would add the phrase "Good to see you, friend!" to the greeting database. Most other phrases types can be changed in the same way.
The retrieval lines are slightly more complicated, and require a # symbol to indicate the quantity of items to collect. For example:
-
Set QuestGenRetrievalLines[0] = I need you to gather # units of
could say "I need you to gather 3 units of Shimmerweed" in-game.
Creeps/Monsters:
Monster spawns can be adjusted in the "QuestGen Monsters" trigger. For normal kill quests, each monster comes in two parts: The unit-type of the monster and the name of the monster used in the quest text. Since there is allways multiple monsters spawned together, a "Wolf" unit for example could be named "a pack of Wolves". Remember to use the cases shown in the templates when adding new monsters. Bases are very similar, except each monster type is accompanied by two types of building that will likewise be spawned.
For retrieval quests, only the item-type needs to be set for it to work in-game.
Rewards
Quest rewards are probability based: each item type is accompanied by an 'Item Percent' variable. This number states the % chance of each item being given for a medium difficulty quest against level 5 creeps. As difficulty or creep level increase, the chance of each reward spawning also increases. Likewise, easier quests will have far less chance of spawning an item. If there are many high-probability items, then it is likely that a quest will give multiple rewards at once.
The experience payout of a quest can be tweaked by changing 'QuestGenXpFactor' in the rewards trigger. The xp payout is multiplied by the xp factor, so a factor or 0.5 will give half as much xp as a factor of 1.0.
Quest Vendors
A quest vendor can be made by simply adding any unit to the 'QuestGenQuestGivers' unit group as follows:
-
Unit Group - Add Footman 0010 <gen> to QuestGenQuestGivers
Now quests can be given whenever a unit is ordered to right-click the vendor and is both within 200 range and is allied with the vendor. The diffculty of the quests can be changed using custom values:
Custom value of 0: The vendor will give random difficulty quests.
Custom value of 1: The vendor will give easy difficulty quests. (levels 1-4)
Custom value of 2: The vendor will give medium difficulty quests. (levels 5-7)
Custom value of 3: The vendor will give hard difficulty quests. (levels 7-10)