Skip to content

[Server Hosting] Quest Configuration

Steve edited this page Mar 18, 2023 · 77 revisions

File Information:

You can name a quest configuration file to what ever you want as long as it has the .json file extention and is placed in the quest configurations folder it will get loaded by the quest system.

Configuration Parameters:

"ConfigVersion"

Integer.

Current config file version. NEVER CHANGE THIS UNLESS YOU KNOW WHAT YOU ARE DOING!

"ID"

Integer.

Unique quest ID. Make sure this ID is different for every single quest.

"Type"

Integer.

Quest type from ExpansionQuestType enumeration. Only use type 1 for all quest.

NORMAL = 1

"Title"

String.

Quest title.

"Descriptions"

Array.

Should have only max. 3 entries in the array! Each index has its own use in the system.

0 - Description on getting quest.
1 - Description while quest is active.
2 - Description when take in quest.

"ObjectiveText"

String.

Short objective desctiption text.

"FollowUpQuest"

Integer.

Follow-up Quest ID. If this quest has a follow quest you need to add the quest ID of the follow-up quest here so it will be automaticaly shared to the player when he completes the pre-quest.

"IsAchivement"

Bolean.

Quest is a achiment quest and gets added to new players when they join the server for the first time automatically.

"Repeatable"

Bolean.

Quest is a repeatable quest.

"IsDailyQuest"

Bolean.

Quest is daylie quest and has a daylie reset.

"IsWeeklyQuest"

Bolean.

Quest is a weekly quest and has a weekly cooldown.

"CancelQuestOnPlayerDeath"

Bolean.

Quest will be cancled if the quest player (or one of his group members when its a group quest) dies.

"Autocomplete"

Bolean.

Quest will be autocompleted when all quest ojectives are completed.

"IsGroupQuest"

Bolean.

Quest is a group quest.

"ObjectSetFileName"

String.

Can be used to spawn a set of objects in when a quest player starts the certain quest. Add the file name of the .map file that will get loaded without the .map extention.

The .map file need to be located in the mission directory at: MISSION.MAPNAME/expansion/quests/objects.

"Objectives"

Array<ExpansionQuestObjectiveConfigBase>.

Quest objectives that the player needs to complete to complete the whole quest and to get the quest rewards if there is a reward defined. Take a look at the objectives configuration page for further information.

{
    "ConfigVersion": 18,
    "ID": 2,
    "ObjectiveType": 5
}
  • "ConfigVersion" Integer. Same configuration version as used in the quest objective configuration files.
  • "ID" Integer. Objective ID from the objective configuration.
  • "ObjectiveType" Integer. Objective Type from the objective configuration.
TARGET = 2
TRAVEL = 3
COLLECT = 4
DELIVERY = 5
TREASUREHUNT = 6
AIPATROL = 7
AICAMP = 8
AIVIP = 9
ACTION = 10
  • "ObjectiveText" String. Objective text. Mainly used for marker text labels if the Expansion Navigation mod is also loaded.
  • "TimeLimit" Integer. Time in seconds the player has to complete the objective once the objective is active before the quest is failed and cancled.

"QuestItems"

Array<ExpansionQuestItemConfig>.

Quest items that the player will recive when starting the quest. These items get deleted from the quest player/s when the quest is cancled/completed or the player logs out/server restarts. If the player reconnects the items get added back to the quest players as long as the quest is not completed.

{
    "ClassName": "SledgeHammer",
    "Amount": 1
}
  • "ClassName" String. Class name of the quest item.
  • "Amount" Integer. How many units/items the player should get of the item.

"Rewards"

Array<ExpansionQuestRewardConfig>.

Quest rewards that the player will revice when turning in the quest and all objectives are completed.

{
  "ClassName": "TaloonBag_Blue",
  "Amount": 1,
  "Attachments": [],
  "HealthPercent": 100
}
  • "ClassName" String. Class name of the reward item.
  • "Amount" Integer. How many units/items the player should get of the item.
  • "Attachments" Array. Attachments that will be applied to the main reward item given.
  • "HealthPercent" Integer. The health of the reward item the player will get. Damage is also applied to the attachments when not 100.

"NeedToSelectReward"

Boolean.

If enabled and there is multiple rewards for the quest in the Rewards array the player need to select one reward when he turns-in the quest from the given rewards.

"RewardsForGroupOwnerOnly"

Boolean.

If enabled and the quest is a group quest only the group owner (quest owner) will recive the rewards added to the Rewards array.

"QuestGiverIDs"

Array.

Unique quest NPC IDs from the quest NPC configuration of the NPCs that will head out the quest.

"QuestTurnInIDs"

Array.

Unique quest NPC IDs from the quest NPC configuration of the NPCs that will turn-in the quest when completed.

"QuestColor"

Integer. Main color of the quest that will be used to display it in the menus and quest HUD.

"ReputationReward"

Integer.

Only used if the Hardline mod is loaded and the "UseReputation" setting in the HardlineSettings.JSON is enabled. Reputation reward the quest players will recive on quest completion.

"ReputationRequirement"

Integer.

Only used if the Hardline mod is loaded and the "UseReputation" setting in the HardlineSettings.JSON is enabled. Reputation points needed to see and accept the quest next to other requirements like completed pre-quests.

"PreQuestIDs"

Array.

Pre-Quest Quest IDs. If this quest requires other quests to be completed before it can be displayed/accepted add the quest IDs of the quests that have to be completed first here.

"RequiredFaction"

String.

Only used if the AI mod is loaded. Name of the Expansion-AI faction the player need to be in to see/accept/complete this quest.

"FactionReward"

String.

Only used if the AI mod is loaded. Name of the Expansion-AI faction the player will join as a reward for completing this quest.

"PlayerNeedQuestItems"

Boolean.

Controls if the quest will be canceled if the quest players are missing one of the quest items on relog/reconnection.

"DeleteQuestItems"

Boolean.

Controls if the quest items will be deleted when the quest is completed or not. They still always get deleted when the quest is canceled!


Example configuration JSON file:

{
    "ConfigVersion": 14,
    "ID": 1,
    "Type": 1,
    "Title": "The Survivors",
    "Descriptions": [
        "As you approach the camp, a few guards steps forward, one of them is blocking your path. He looks you up and down with suspicion and says, \"Hold it right there, stranger. This camp is for survivors only. We don't need any troublemakers or bandits causing problems.\" You explain that you're not here to harm anyone and that you are just looking for help. The guard's expression softens slightly, but he still seems wary. \"Fine. But don't try anything funny. I'll let you in, but you'll need to talk to John. He's in charge around here and if he vouches for you, you can stay. If not, we'll show you the door. Got it?\" The guard steps aside and lets you pass, but he keeps a close eye on you as you make your way to John's location. You can't help but feel a bit uneasy as you navigate the unfamiliar camp.",
        "Talk to John, i have nothing else to say to you..",
        "As you enter the small building you spot a guy standing near a barrel with a fire warming himself up. Is this John?"
    ],
    "ObjectiveText": "Talk to John.",
    "FollowUpQuest": 4,
    "IsAchivement": 0,
    "Repeatable": 0,
    "IsDailyQuest": 0,
    "IsWeeklyQuest": 0,
    "CancelQuestOnPlayerDeath": 0,
    "Autocomplete": 0,
    "IsGroupQuest": 0,
    "ObjectSetFileName": "",
    "Objectives": [
        {
            "ConfigVersion": 18,
            "ID": 3,
            "ObjectiveType": 3
        }
    ],
    "QuestItems": [],
    "Rewards": [],
    "NeedToSelectReward": 0,
    "RewardsForGroupOwnerOnly": 1,
    "QuestGiverIDs": [
        1
    ],
    "QuestTurnInIDs": [
        2
    ],
    "QuestColor": -8464673,
    "ReputationReward": 0,
    "ReputationRequirement": -1,
    "PreQuestIDs": [],
    "RequiredFaction": "",
    "FactionReward": "",
    "PlayerNeedQuestItems": 1,
    "DeleteQuestItems": 1
}

Special Quest Configurations:

There is certain different quest configurations that change the behavior or handling of the quest with different results.

Auto-Start Quest

A Auto-start quest will get added to the player on first server connection.

Need to have the following parameter values to work as intended:

"QuestGiverIDs": [], //! Make sure the quest has no "QuestGiverIDs" in the array!
"IsAchivement": 0, //! Make sure the quest is not flagged as achivement quest!
"IsGroupQuest": 0, //! Make sure the quest is not flagged as group quest!
"PreQuestIDs": [] //! Make sure the quest has no "PreQuestIDs" in the array!

Achievement Quest

A Achievement quest will get added to the player on first server connection but the difference here is that the player will never be notified about this quest except from when he complets the quest (all quest objectives completed).

Need to have the following parameter values to work as intended:

"QuestGiverIDs": [], //! Make sure the quest has no quest giver IDs!
"IsAchivement": 1, //! Make sure the quest is flagged as achivement quest!
"Autocomplete": 1, //! Make sure the quest is auto-completed when all quest objectives are completed!
"IsGroupQuest": 0, //! Make sure the quest is not flagged as group quest!
"PreQuestIDs": [] //! Make sure the quest has no "PreQuestIDs" in the array!

Daily Quest

Daily quests can be completed once per day and then get set on a cooldown until the servers daily quest reset happens on the next day. The servers daily reset time is controlled by the quest settings [LINK TO SETTING]. Need to have the following parameter values to work as intended:

"Repeatable": 1, //! Make sure the quest is repeatable!
"IsDailyQuest": 1,
"IsWeeklyQuest": 0, //! Make sure its only a daily or weekly quest!

Weekly Quest

Weekly quests can be completed once per week and then get set on a cooldown until the servers weekly quest reset happens on the next week. The servers weekly reset time and day is controlled by the quest settings [LINK TO SETTING]. Need to have the following parameter values to work as intended:

"Repeatable": 1, //! Make sure the quest is repeatable!
"IsDailyQuest": 0, //! Make sure its only a daily or weekly quest!
"IsWeeklyQuest": 1,
Clone this wiki locally