How to add new quest
Files needed:
assets/gameplay/quests.json
Quest JSON structure:
{
"id": "quest_unique_ID",
"title": "quest.language.key.name",
"money": 0,
"reward": [],
"map_spot_id": null
}
money = reward money that will be added to player after quest completed
reward = list of items IDs that will be added to player
map_spot_id = cut-off feature, always set to null
You can create new quest by adding new structure with unique ID to the quests file.
{
"id": "my_mod_quest",
"title": "my.mod.quest.name",
"money": 1500,
"reward": ["medkit","medkit","antirad","ammo_ak"],
"map_spot_id": null
}
Now you can add this quest in assets/scripts/p_game.gd file with GameManager:
GameManager.AddQuestJson("my_mod_quest")
And complete it with GameManager:
GameManager.CompleteQuest("my_mod_quest")
How it looks like in the game:


Last updated