Pax Nova

Pax Nova

Not enough ratings
Modding Quests in Pax Nova
By vaaish
This guide will explain how Pax Nova structures quests and how to build your own.
   
Award
Favorite
Favorited
Unfavorite
Getting Started
Quests are different from events in that quests do not provide instant resolution. Instead they require a player to do some action over time, whether that's search for a ship or declare war or build a city. They can also chain together to tell a story as players unlock the next step in the quest. Quests can be triggered from events, artifacts, or other quests. Pax Nova has only a single quest type which makes these much easier to manage than events. When building quests, all you need to worry about is making sure you use the <quest> tag and that your ID is the next number in sequence starting with the last quest in your quest.xml file. For references, the highest ID in the default modding docs is 21 so your quests need to start with 22.

Important Rules
  • If a variable, such as UnlockQuestID, has no limit, the value should be set to -1.

  • QuestID must be sequential with no gaps between IDs starting with 22. Do not skip numbers.

  • Files included in your mod entirely replace the base game. The files provided by Grey Wolf contain all of the content in the base Pax Nova game. You should add any additions to these files at the end of these files and provide an ID for each entry that is in sequence with what's already in the file. If you remove entries, such as factions or the main quest, from your mod files it will not fall back to the base game and they will not exist when you use your mod.
Code Structure of Quests
Quests are broken down into three parts that define the quest. The first part is the quest container that includes the information about the quest like the name, type, description, objectives, and rewards. The second section contains a list of objectives the player needs to accomplish to complete the quest and how long they have to complete each objective. The final section defines what kind of reward the player will get from successfully completing the quest.

Quest Container
<Quest> <ID></ID> <QuestName></QuestName> <QuestDetails></QuestDetails> <QuestCompletedText></QuestCompletedText> <QuestTextElements /> <QuestStatus></QuestStatus> <QuestType></QuestType> <QuestObjectives> Insert Quest Objectives items here </QuestObjectives> <QuestRewards> Insert Quest Rewards items here </QuestRewards> <UnlockQuestID></UnlockQuestID> <QuestStart></QuestStart> <QuestIconID></QuestIconID> </Quest>

Quest Objective
<QuestObjective> <ObjectiveText></ObjectiveText> <ObjectiveObjectID></ObjectiveObjectID> <ObjectiveType></ObjectiveType> <ObjectiveQuantity></ObjectiveQuantity> <ObjectiveProgress></ObjectiveProgress> <ObjectiveShowText /> <ObjectiveStatus>InProgress</ObjectiveStatus> <TurnsToEnd></TurnsToEnd> <Timer>0</Timer> </QuestObjective>

Quest Reward
<QuestReward> <RewardTypee></RewardTypee> <RewardQuantity></RewardQuantity> <RewardText></RewardText> </QuestReward>

Quest Tag Definitions
<ID></ID>
The ID used to reference the quest when triggering it from an event or another quest. This must be sequential. The base game ends with 21 so your quests must start with 22.

<QuestName></QuestName>
The text that displays as the quest name in game. The region for the quest name doesn't expand so it's best to limit your name to around 35 characters or it will break outside this region.

<QuestDetails></QuestDetails>
This is the text that displays telling the story behind the quest when you receive it. May contain variable codes (#EMBER#, etc.) found in MiscText.xml.

<QuestCompletedText></QuestCompletedText>
This is the text that displays when you have successfully completed the quest. It replaces the QuestDetails text. May contain variable codes (#EMBER#, etc.) found in MiscText.xml.

<QuestTextElements />
Unknown. This is not used by any default quests.

<QuestStatus></QuestStatus>
Unknown, but is always set to "Complete". The docs simply say the status of the quest.

<QuestType></QuestType>
This determines whether the game lists the quest as a Side Quest or a Main Quest. Valid options here are MainQuest or SideQuest. Unless you plan to replace the main campaign in Pax Nova, your quests should be SideQuest.

<QuestObjectives></QuestObjectives>
A list of items for each objective the player has to complete to finish the quest. There's enough space here for three objectives. More than that will overflow the container.

<QuestRewards></QuestRewards>
A list of items for each reward the player will receive when finishing the quest.

<UnlockQuestID></UnlockQuestID>
If there is a series of quests, the ID of the next quest in the series goes here. If the quest is stand alone, put -1 here.

<QuestStart></QuestStart>
The documentation isn't too clear here, but based on the values, this seems to tell the game to look for a city, nest, or other element to use in the quest. For example, Chapter II sets this to ReturnCapital.

<QuestIconID></QuestIconID>
This is the ID of the art used for the quest. See the list of quest art ID's earlier in this guide. I'm not sure that new art can be referenced here, but if so, these should be 410x910px PNGs.

Quest Objective Tag Definitions
<ObjectiveText></ObjectiveText>
This is the text that appears with the a checkbox in the quest objectives box. May contain variable codes (#EMBER#, etc.) found in MiscText.xml.

<ObjectiveObjectID></ObjectiveObjectID>
This is used to indicate which item needs to be used. For example, if your objective is to use an artifact, the ID of the artifact you need to use goes here. There are several ID's in the default quests that I can't confirm such as researching special projects.

<ObjectiveType></ObjectiveType>
This uses an option selected from the objective type list earlier in this guide. It tells the game what you are trying to accomplish.

<ObjectiveQuantity></ObjectiveQuantity>
This is how much of the option selected is needed to complete the quest. For example, using ReachCityLevel and giving this a value of 10 would require the player to get the selected city to level 10.

<ObjectiveProgress></ObjectiveProgress>
Unknown, but is always set to zero. It may allow you to start an objective part way completed.

<ObjectiveShowText />
Unknown and not used in any default quests.

<ObjectiveStatus></ObjectiveStatus>
This is the status of the objective. It's always set to InProgress.

<TurnsToEnd></TurnsToEnd>
This is how long the player has to complete the objective. If you put 10 here, the player will have 10 turns to complete the task.

<Timer></Timer>
Unknown. This is not used in the default quests.

Quest Reward Tag Definitions
<RewardTypee></RewardTypee>
This tells the game what to give the player. Select an option from the RewardTypee list earlier in this guide.

<RewardQuantity></RewardQuantity>
This is how much of the reward type you will receive. If you chose influence earlier and set this to 10, you'd get 10 influence when the quest is completed.

<RewardText></RewardText>
This is the text displayed in the reward box. May contain variable codes (#EMBER#, etc.) found in MiscText.xml.
ObjectiveType Options
These options represent the thing the player has to do to complete the quest. For example, when a side quest objective is to build a new city or end a war. Some of these objectives are used for the Pax Nova main quest. I'm uncertain if main quest options like FinishAPath can be used for side quest. The ObjectiveQuantity tag sets the value of the ObjectiveType needed to complete the quest. In cases where you are declaring war or getting a seal, the value is usually 1.

Valid Options
Cities
ReachCityLevel
AvoidCityPolution

Diplomacy
IncreaseRankInstitute
DeclareWar
SignPeace
GetASeal

Faction
ReachMilitaryPower
BuildNewCity
ResearchProject

Planet
DestroyUnit
SearchItem

Main Quest
BuyCitadelItem
UseArtifact
ReachRift
FinishAPath
RewardTypee Options
These items represent the kind of reward the player receives for successfully completing the quest. This may not be an exhaustive list since this was pulled from the sample quest file and doesn't include the ability to give the player strategic resources or credits. The amount the reward adds is found in the RewardedQuantity tag.

Valid Options
Path
Gaia
Bliss
Ember
Enlightment

Diplomacy
Influence

Resources
Aether

Main Quest
WinQuestVictory
QuestStart Options
This set of options seem to be used for checking status before triggering a quest or finding a particular point of interest to use as the objective for things like DestroyUnit. Certain options appear to be for the main quest only and are unlikely to work for generic quests. The "none" option is used if no option is needed.

Valid Options
Cities
ReturnCapital

Diplomacy
ReturnPlayerAtWar

Empty Option
None

Point of Interest
RetrieveNearbyNest
ReturnSpaceShipwreck
ReturnOutOfWorldRuins

Research
AddSpecialProject

Main Quest
ActivateRift
CheckPaths
GenerateArchive
GenerateGuardian
GenerateSpectreShip
ReturnCitadel
Quest Images
This section provides a list of the quest images that exist and the ID to reference them in your quest. Having a visual reference makes it easier than just guessing which image you'll get or trying to remember what another event used.

Adding Your Own Images
There's no way to add your own quest images right now. Hopefully that will change in the future. If it does here is the information for creating your own images:

Size: 410x910px
Format: PNG

Note: If your image is not the correct size, the game will place the image in the quest container top left corner and crop the parts of the image that don't fit.

Default Images
QuestIconID: 0


QuestIconID: 1

QuestIconID: 2

QuestIconID: 3

QuestIconID: 4

QuestIconID: 5

QuestIconID: 6

QuestIconID: 7

QuestIconID: 8

QuestIconID: 9

QuestIconID: 10

QuestIconID: 11

QuestIconID: 12

QuestIconID: 13

QuestIconID: 14, 17

QuestIconID: 15

QuestIconID: 20

QuestIconID: 22

QuestIconID: 23

QuestIconID: 24
Example Quest
Taking all of the parts from earlier in the guide, here's a simple example of a quest that gives the player the objective to declare war on a faction. It's placed inside the quests container after the last quest in the list and is give the ID of 22 which is one higher than the last quest in the quests.xml file. Now all that's left is to trigger this quest using an event, artifact, or another quest:

<Quest> <ID>22</ID> <QuestName>My Awesome Quest</QuestName> <QuestDetails>Life is hard so this quest isn't. Declare war on another faction within 10 turns to win the prize.</QuestDetails> <QuestCompletedText>Congrats, you win!</QuestCompletedText> <QuestTextElements /> <QuestStatus>Complete</QuestStatus> <QuestType>SideQuest</QuestType> <QuestObjectives> <QuestObjective> <ObjectiveText>Declare war against any faction within #TIMER</ObjectiveText> <ObjectiveObjectID>0</ObjectiveObjectID> <ObjectiveType>DeclareWar</ObjectiveType> <ObjectiveQuantity>1</ObjectiveQuantity> <ObjectiveProgress>0</ObjectiveProgress> <ObjectiveShowText /> <ObjectiveStatus>InProgress</ObjectiveStatus> <TurnsToEnd>10</TurnsToEnd> <Timer>0</Timer> </QuestObjective> </QuestObjectives> <QuestRewards> <QuestReward> <RewardTypee>Ember</RewardTypee> <RewardQuantity>10</RewardQuantity> <RewardText>Advances #EMBER# by #QUANTITY</RewardText> </QuestReward> </QuestRewards> <UnlockQuestID>-1</UnlockQuestID> <QuestStart>None</QuestStart> <QuestIconID>11</QuestIconID> </Quest>
1 Comments
Opus Magno 21 Jul, 2020 @ 10:41am 
Nice!!!