Download of the Quest
First of, you can grab the quest here if you want. Just dump the xml in your \units\ folder.
It's a lvl 1 quest available from Inns.
Foreword and Tools
Now, it took me the better part of yesterday and a good chunk of time today to get it in a state that I'd consider "working". It is by no means pretty, however, or even that exciting.
When I originally set out to make it, I wanted to add some functionality that I ended up dropping (More on that in a bit), simply because I couldn't see a way get it to work, or if it was even possible to do.
There were also considerable time spent hammering my face in the keyboard over issues I could not figure out, only to realize that they were due to pre-set values in other files (More on that later).
A lot of time was also spent looking through Stardock's incoherent XML Quest files, sorry chaps but you could have done that way better. Looking for dependencies and trying to make heads and tails of the various quests. Without any form of reference point, it has been a lot of stabbing in the dark, trying to figure out how the quests are put together, what parameters can be adjusted and so forth. My biggest pet peeve, is that not all quests have comments, and that there is no coherent order in which they are written, some functions come before others in some quests, and after others in other quests. It made it frustratingly more annoying to piece together the Dawn quest. Not to mention, some one-shot quests are simply dumped in the Quest folder or throughout other files, where as I would have expected them all to more consolidated.
Through out this process I also looked around for a better editor for these XML files, as I originally set out I used Notepad, but quickly moved to Notepad++, but I also looked at Eclipse and Visual Studio but came full circle back to Notepad++ as my tool of preference.
Another great program I came across is SadMan Software's Search. It allows you to search through the whole C:\Program Files (x86)\Stardock Games\Elemental\data\English fairly quickly, looking for specific strings of text, it can do "And", "Or", "And Not", and Case Sensitive searches, it has been invaluable in finding specific files and information in them. It's very fast and accurate.
Hopefully my effort can serve as a reference to other aspiring quest makers in the community.
Testing The Quest
As for testing the quest, I used the cheat parameter on the Elemental shortcut.
"C:\Program Files (x86)\Stardock Games\Elemental\Elemental.exe" cheat
This allows you to use various commands in game.
The list I know of
CTRL + M = +1000 to all Resouces
CTRL + S = Autosave
CTRL + B = Completes buildings projects
CTRL + J = Completes units projects
CTRL + D = Converts selected Enemy party
CTRL + C = Copy selected party leaders
CTRL + F = Gives you a spouse and children
CTRL + X = Hide/Show Interface
CTRL + K = Kill selected party
CTRL + P = Level Up Party leaders
CTRL + R = Research Current Tech
CTRL + Q = Research Spells (A Little)
CTRL + E = Research Spells (A Lot)
CTRL + U = Reveal Map
CTRL + Z = Starts/Stops Auto Turn
CTRL + T = Teleports the selected character/unit to the cursor
CTRL + K = Kill selected party
In other to make it easier to test just this quest, without the interference from other quests, I removed Quest_EscortNobleman1.xml, Quest_EscortNoblewoman1.xml, Quest_CommonQuests.xml and Quests_Level1.xml from the \\English\CoreQuests folder. They are all files with level 1 quests in them.
I removed the cache file once removing those.
Core files and Unit folder
Don't edit the core files in the \\data\English folder.
Always copy files to your \\Unit\ folder.
However if for some reason you mess up the core files, you can fix this.
Open Impulse and click Shift+Right Click on Elemental, there is a Verify Installation option. It'll correct your files and re-download them again.
Know also that Elemental makes a binary file once it has parsed all the XML files, this file is found in \\Data. If you delete this cache, Elemental will need to recompile it, however you can get Elemental to do just that by adding /CreateXMLBinary to the shortcut. If you do not have this parameter, starting a game will take considerably longer, as Elemental parses all the XML files.
Remember to move files out of \\Units before doing this, I think it may include them in the cache.
The Dawn Quest XML & Commentary
Code: xml
- <Quests>
- <QuestDef InternalName="Quest_Dawn">
- <DisplayName>Dawn</DisplayName>
- <Description>A young blond woman approaches you. She is about to reveal her name to you, "My Sovereign, my name is B....", but she's interrupted by a nearby
- noise! She quickly explains that she is looking for aid in slaying an unspeakable evil in a nearby nest.</Description>
- <QuestClass>Minor</QuestClass>
- <Repeatable>0</Repeatable>
- <TriggerType>QuestLocation</TriggerType>
- <TriggerOrigin>EventLocation</TriggerOrigin>
- <SpawnRating>1</SpawnRating>
- <TriggerChance>100</TriggerChance>
- <Image>Pub.png</Image>
- <PrefQuestLoc>Quest_Level1_Inn01</PrefQuestLoc>
Right, so first off the QuestDef InternalName as far as I understand, is only to identify this quest, and it should not be the same as an existing quest in the
game. Or if you write multiple quests within the same file, do not lable them the same. Other then that, it could be "HorseWhispere" and it would still work.
The <Quests> tag already defined at the beginning that this is going to be a quest.
DisplayName is the name you see when the quest popups (See Picture #2), this is the actual ingame name of your Quest.
Description as you also see on Picture #2, is the text which appears initially when you trigger the quest.
QuestClass, all quests in game but one is Minor quests. The only major quest that I know of is the MasterQuest, the one for The Forge of the Overlord. If this has
any relevance beyond a simple designation, I do not know.
Repeatable, determines whether you can trigger this quest again or whether it's a one time only. A lot if not all minor quests are repeatable.
TriggerType, I believe this determines whether the quest is triggered off a Quest Location, or whether it's triggered off Capital City population.
TriggerOrigin I believe determines whether the quest is triggered at a Quest Location (NOTE! NOTE NOTABLE LOCATION!), or whether it's a quest that is triggered off
your capital city. There are quests available currently which is based off the population numbers in your capital city. But Stardock has been inconsistent in their
Quest writing, because there is only 1 quest that uses CapitalCity, and that is despite there being 4-5 different quests which is based off CapitalCity population.
SpawnRating I don't really know the effect is of this. It seems to be related to "level" of some kind. Some lvl 5 quests have a rating of 5, some monsters have
rating of 12, and so on. There are even values for -1 for GoodieHuts.
TriggerChance, is the chance of this quest triggering when you go to a quest location. 100 does not mean this will always be the quest, as there are other quests
also with 100.
Image, references the picture in the center of the Quest popup message. I'm not sure if this can search all subfolders or if it draws from a pre-set location, I
chose an image from C:\Program Files (x86)\Stardock Games\Elemental\Gfx\Medallions.
PrefQuestLoc determines what type of Quest location this quest can be triggered at.
Code: xml
- <!-- This objective is to find the nest and move to clear it -->
- <QuestObjectiveDef InternalName="Objective0">
- <ObjectiveID>0</ObjectiveID>
- <NextObjectiveID>1</NextObjectiveID>
- <Description>Find the nearby nest where this unspeakable evil rests!</Description>
QuestObjectiveDef, again this is only a reference point within this quest, not the entirety of all quests. This is important to keep consistent throughout your
quest writing or things don't work.
Likewise with ObjectiveID, this must be consistent throughout. In this case, this is Objective 0, the first one, and thus gets ID0. Next Objective in this quest is
Objective1, and thus ID for next is 1.
Description here is the text you see on picture#3. Notice how it automatically uses the Pub.png image from earlier.
Code: xml
-
- <!-- This is the escort NPC that must be brought to the nest -->
- <GameModifier InternalName="EscortNPC">
- <ModType>Unit</ModType>
- <Attribute>UnitJoinArmy</Attribute>
- <StrVal>EscortDaughter01</StrVal>
- <UnitClass>Unit</UnitClass>
- </GameModifier>
I decided here that the Player should escort the Blond woman in the text to the location with the monsters in it. So this point spawns an Unit, the unit joins the
Players "Army", and the unit type is EscortDaughter01, which is referenced with stats and everything in \\Core Quests\Questunits.xml.
Code: xml
-
- <!-- Clearing this goodie hut with the escort NPC in your army completes this stage -->
- <GameModifier InternalName="CreateGoodieHut">
- <ModType>Map</ModType>
- <Attribute>CreateGoodieHut</Attribute>
- <UnitClass>RatNest</UnitClass>
- <StrVal>Rat Nest</StrVal>
- <Radius>8</Radius>
- </GameModifier>
Here the goodie hut spawns which you must go to next, with the escort NPC. This step actually caused me much headaches, and a considerable time investment. Mostly because I tried to use TerrorizedWorkshop as location, but the TerrorizedWorkshop has some parameters defined that indicates it yields X materials. So when I finally at the of my quest wanted to reward the player, I couldn't figure out why in Mars' name, would it hand out the improper reward.
What I should have done at that point probably, was to duplicate the TerroizedWorkshop, labled it #2, and removed the references to the inate reward. But that's reserved for Dawn Quest 2.0.
Radius here determines Up To, how far away the Rat Nest can spawn from your present location.
Code: xml
- <!-- Success condition -->
- <QuestConditionDef InternalName="Condition1">
- <Description>Escort the woman to the nest.</Description>
- <Class>Success</Class>
- <Type>ClearGoodieHut</Type>
- <TextData>RatNest</TextData>
- <MoreTextData>EscortDaughter01</MoreTextData>
- <Flag>DestroyUnit</Flag>
- <Flag>UnitMustBeEscorted</Flag>
- <Flag>RevealTarget</Flag>
- </QuestConditionDef>
-
- <!-- Failure condition -->
- <QuestConditionDef InternalName="Condition2">
- <Description>Protect the woman.</Description>
- <CompletionText>You failed to protect the woman and she died a most gruesome death. The world will never be the same without
- her.</CompletionText>
- <Class>Failure</Class>
- <Type>UnitKilled</Type>
- <Faction>Player</Faction>
- <TextData>EscortDaughter01</TextData>
- <NumericData>1</NumericData>
- </QuestConditionDef>
Here is defined two conditions. You must either A) Bring the Escort NPC to the Rat Nest, or

Fail, if she dies.
<Flag> is things that happen once the Class/Type paramenters are met, i.e. for Success it's ClearGoodieHut, which means you went to the hut and cleared it, criteria for success is that UnitMustBeEscorted, i.e. the noblewoman, the hut is destroyed, and also RevealTarget I found toggles on/off whether the Rat Nest is shown to the player when you pick up the NobleWoman, see Picture#3.
Code: xml
-
- <!-- nest popup message -->
- <ChoiceText>As you get near the nest, a wave of uncertainty overcomes you. What if you don't return safely from this quest? What will you
- do?</ChoiceText>
- <ChoiceMedallion>Gfx\\Medallions\\CaveGrassland_Medallion.png</ChoiceMedallion>
- <ChoiceMedallionFrame>Gfx\\Medallions\\Medallion_Frame_01.png</ChoiceMedallionFrame>
This is the message that shows when you approach the Rat Nest, see Picture#4.
Code: xml
-
-
- <!-- Choice 0 -->
- <QuestChoiceDef>
- <Description>Enter the nest.</Description>
- <NextObjectiveID>1</NextObjectiveID>
-
- <!-- Create Edward and Bella, first one becomes the leader -->
- <Encounter InternalName="EdwardBella">
- <Liklihood>100</Liklihood>
- <LevelLo>1</LevelLo>
- <LevelHi>5</LevelHi>
- <WillRespawn>0</WillRespawn>
- <WanderingRadius>100</WanderingRadius>
- <UnitInstance>
- <UnitType>Darkling</UnitType>
- <UnitName>Edward</UnitName>
- <Level>5</Level>
- </UnitInstance>
- <UnitInstance>
- <UnitType>Darkling</UnitType>
- <UnitName>Bella</UnitName>
- <Level>5</Level>
- </UnitInstance>
- </Encounter>
- </QuestChoiceDef>
You are presented with two choices when you enter the Rat Nest. Choice 0 or the first one, is "Enter the nest.", which subsequently spawns an encounter.
I didn't mess much with these settings however. I originally thought that LevelLo and LevelHi maybe meant some interval that the monsters in this instance apawned at those levels, but adjusting them did not affect the NPC levels. UnitType determines which type of NPC it is, and UnitName simply names it in the mouseover box.
WanderingRadius I assume, if you flee or lose the fight, they start roaming. Majority of stuff Stardock defined as having 0 radius, or maximum of 4. Which is pratical, so your quest monsters don't roam the world, unless that's what you want them to do.
Code: xml
-
- <!-- Choice 1 -->
- <QuestChoiceDef>
- <Description>You let the woman enter the nest on her own.
- Shortly after you hear a loud scream and something attacks you!</Description>
- <NextObjectiveID>2</NextObjectiveID>
-
- <!-- Create Edward and Bella, first one becomes the leader -->
- <Encounter InternalName="EdwardBella">
- <Liklihood>100</Liklihood>
- <LevelLo>1</LevelLo>
- <LevelHi>5</LevelHi>
- <WillRespawn>0</WillRespawn>
- <WanderingRadius>100</WanderingRadius>
- <UnitInstance>
- <UnitType>Darkling</UnitType>
- <UnitName>Edward</UnitName>
- <Level>5</Level>
- </UnitInstance>
- <UnitInstance>
- <UnitType>Darkling</UnitType>
- <UnitName>Bella</UnitName>
- <Level>5</Level>
- </UnitInstance>
- </Encounter>
- </QuestChoiceDef>
- </QuestObjectiveDef>
Same as first choice really. Originally it was intended as causing the World NPC level to increase, but that was not possible for now. If I figure out how to then that's going to happen in Dawn Quest 2.0.
Code: xml
- <!-- This objective is to kill Edward and Bella -->
- <QuestObjectiveDef InternalName="Objective1">
- <ObjectiveID>1</ObjectiveID>
- <NextObjectiveID>-1</NextObjectiveID>
- <Description>Slay Edward and Bella!</Description>
- <PopupObjectiveMsg>0</PopupObjectiveMsg>
- <QuestConditionDef InternalName="Condition3">
- <Description>Slay Edward and Bella!</Description>
- <Class>Success</Class>
- <Type>KillMonster</Type>
- <TextData>Darkling</TextData>
- <MoreTextData>Edward</MoreTextData>
- <NumericData>1</NumericData>
- <CompletionText>You have saved the world from these abominations. The woman hands you a reward for your effort.</CompletionText>
- <GameModifier InternalName="SuccessReward">
- <ModType>GiveItem</ModType>
- <Attribute>SovereignSword</Attribute>
- </GameModifier>
- </QuestConditionDef>
- </QuestObjectiveDef>
-
- <!-- This objective is to kill Edward and Bella -->
- <QuestObjectiveDef InternalName="Objective2">
- <ObjectiveID>2</ObjectiveID>
- <NextObjectiveID>-1</NextObjectiveID>
- <Description>Slay Edward and Bella!</Description>
- <PopupObjectiveMsg>0</PopupObjectiveMsg>
- <QuestConditionDef InternalName="Condition4">
- <Description>Slay Edward and Bella!</Description>
- <Class>Success</Class>
- <Type>KillMonster</Type>
- <TextData>Darkling</TextData>
- <MoreTextData>Edward</MoreTextData>
- <NumericData>1</NumericData>
- <CompletionText>You have saved the world from these abominations. But the world will forever mourn the loss of
- B.....</CompletionText>
- <GameModifier InternalName="FailReward">
- <ModType>Player</ModType>
- <Attribute>Treasury</Attribute>
- <Value>-10</Value>
- </GameModifier>
- </QuestConditionDef>
- </QuestObjectiveDef>
- </QuestDef>
- </Quests>
Here comes the objectives for the instances spawned, basically to kill the NPCs, more specifically to kill the Darkling labled Edward.
This is also where the reward is handed out, and the last Popup messages, see Picture #7 and #6.
Pretty pictures





