
Yesterday, I wrote the general outline of how to make a quest.
Today, we’ll get into the nitty gritty:
My QuestPackage has these objects in it:
- The Quest Definition
- The Quest Location
- The Goodie Hut (Quest Destination)
- Tile Design of the Location
- Tile Design of the Destination (the goodie hut)
Items 4 and 5 are generated by the tile editor in the workshop, I just pasted them in.
The Quest Definition
I. Quest Definition
a. Display Name
b. Repeatable (will it be spawned multiple times? 1 yes, 0 no)
c. TriggerChance (% odds that it will be triggered when the trigger condition is met)
d. Image (PNG of the image)
e. QuestClass (Minor or Major. Completing a Major quest ends the game)
f. TriggerType (What causes this quest to occur, we support the Location as well as other triggers such as population, turns, etc. This can be used to create random events which we’ll talk about in the future)
g. TriggerOrigin (where does the event occur?)
h. SpawnRating (how advances is the quest on a scale from 1 to 10)
i. Description
j. ShortTextAccept
k. ShortTextDeny
l. RewardText (dialog title for your reward)
m. RewardImage (picture of what you’re getting)
n. SuccessText (text that comes up when the quest is complete)
o. GameModifier (message the game to do something)
i. ModType (with the corresponding Attribute options)
1. GiveItem (attribute is name of item)
2. Unit (StrVal provides the key and if necessary <Value> provides the amount)
a. TransferUnitStat
b. StealUnitStat
c. Lifesteal
d. IncreaseDecreaseUnitStats
e. AdjustUnitStat
f. AdjustCasterUnitStat
g. UnlockUnitAbility
h. CharmTarget
i. CurHealth
j. CurMana
k. ManaBurn
l. GiveExperience
m. UnitJoinArmy
n. TargetMovesBack
o. SummonUnit (UnitClass provides class name, StrVal provides title)
3. Player
a. Treasury
b. SpellPointBonus
c. AbilityBonus
d. EssenceBonusForAllChampions
e. UnlockResource
f. UnlockImprovement
g. UnlockTech
h. UnlockUnitAction
i. UnlockCityAction
j. UnlockSpellbook
k. UnlockDiplomacyWndAbility
l. RaiseResourceCap
m. UpgradeCityWalls
n. ExposeCity
o. ExposeSovereign
p. ExposeGoodieHut
q. SpawnQuestLocations
r. UpdateSpawnRating
i. NPC
ii. CREATURE
iii. QUEST
iv. GOODIEHUT
v. CRYSTAL
vi. FOOD
vii. METAL
viii. SHARD
ix. GOLD
s. UpdateRecruitables
i. SPIDERS
ii. SHRILLS
iii. DRATH
iv. DARKLINGS
v. UMBERDROTHS
vi. DROTA
vii. DRAGONS
viii. DEMONS
t. MarriageProposal
4. Map
a. TransportUnit
b. PlaceEnvironment
c. PlaceTerrain
d. GreaterRaiseLand
e. RaiseLand
f. LowerLand
g. SetEnvironment
h. ReviveLand
i. DestroyObjects
j. RandomTerraform
k. SummonUnit
l. CreateGoodieHut
m. CreateResourceHoard
n. CreateWorldProp
o. Reveal
p. BlockTile
5. City
a. SummonRandomGuardian
b. PlaceEnvironmentOnCity
p. QuestObjectiveDef
i. ObjectiveID (defining its numerical ID)
ii. NextObjectiveID (telling it where to go next or -1 if this ends the quest)
iii. Description
iv. GameModifier
v. QuestConditionDef (what determines whether this quest is complete?)
1. Class (Success of Failure)
2. Type (what type of condition is it)
a. ClearGoodieHut (TextData then used to say which goodiehut)
b. KillMonster (TextData used to identify which monster)
c. UnitKilled
d. BuildImprovement
e. ReturnItemToCapital
f. ReturnItemToQuestLocation
g. CheckForItem
h. ReturnItemToOriginCity
i. UnitLevelUp
j. UnitEntersOriginCity
3. Faction (if applicable)
4. Flag (AllConditionsMet forces all conditions to be met for it to be a successful quest, RevealTarget is useful for showing the player where the target is)
QuestLocationType
This is used to define the tile that will be used as the quest location. You can (and probably should) use existing quest location types.
GoodieHutType
This is used if you want your quest to spawn a goodie hut to send the player to. You could always just do the “bring me 5 wolf pelts back to me and I’ll give you gold” type quest instead and make sure you are spawning wolves that have the item WolfPelt as their treasure.
Download
To download the full quest here it is:
http://dl.dropbox.com/u/8051911/Quest_UrgentMessage.zip
You will need to unzip the XML file into your elemental\data\english\core quests directory
(in the future, I have put in the request that a packaged quest can just go into the user’s quest directory)
Other Notes
The hardest thing about making quests right now is the difficulty in testing them. One typo in a quest can make it just not work. This is why I’m lobbying internally (or externally) to get a quest editor made that eases this but will require more documentation. As you can see from above, the quest system is powerful but we’ve only scratched the surface so far.