Skip to content

guillaumearm/SPT_CustomQuests

Repository files navigation

Custom Quests

Easy quests creation tool for SPT

Using Custom Quests Editor will help you A LOT to create and edit json quests files.

API Documentation - How to create quests (manually)

Description

This mod allow to add your own quests easily with a single json file (per quest).

Features

Usage

Place your json files in the quests directory.

Sub-directories can be used to organize your quest files.

So these are valid:

  • quests/my_first_quest.json
  • quests/my_quests/my_first_quest.json

Please read the usage manual to get more infos on how to create your own quests.

Check the examples can help too.

You can rename the folder examples.disabled in examples to try out the examples ;-)

Global configuration

  • enabled: allow to enable or not CustomQuests mod
  • debug: more verbose console
  • quest_directory: The directory with custom quests
  • limit_repeated_quest: The maximum number of time you can repeat a quest during the same game session (default to 1000). Please see API Documentation - How to create quests for more details
  • at_start.disable_all_vanilla_quests: Disable all vanilla quests (this will unlock Jaeger without editing your profile)
  • at_start.wipe_enabled_custom_quests_state_from_all_profiles: wipe all enabled custom quests from all profiles

Resources

Modding API

Since 2.2.0, you can inject custom quests dynamically from other mods.

In the delayedLoad method:

const myExampleQuest = {
  id: "trap_quest_example_1_with_api",
  trader_id: "mechanic",
  name: "My first quest",
  description: "My first quest description",
  success_message: "My success message",
};

// call this in `delayedLoad` method
const injectQuests = (logger: ILogger) => {
  if (!globalThis.CustomQuestsAPI) {
    logger.error(`CustomQuestsAPI not found, are you sure a version of CustomQuests >= 2.2.0 is installed ?`);
    return;
  }

  globalThis.CustomQuestsAPI.load([myExampleQuest]);
}

Typescript support

The CustomQuestsAPI.load method take an array of StoryItem in parameter.

Check the CustomQuestsAPI type definition for more details.

Planned features

  • New mission type: SurviveRaid
  • More rewards: unlock traders and maps (with Path To Tarkov compat)
  • Unlock barters reward
  • More kill targets: bosses, raiders, rogues.
  • Failure quests: this allow to create several path in your story
  • Rewards on fail
  • Custom quest image
  • Mission type Kill improvements: limbs restrictions​
  • Mission type Kill improvements: weapon attachments restrictions
  • Mission type Kill improvements: weared equipment restrictions
  • Mission type Kill improvements: range restrictions, physical effects restrictions
  • Mission type Kill improvements: kill at certain time of the day (or night)
  • New mission type: WeaponAssembly (allow to create gunsmith missions)
  • New mission type: TraderLoyalty
  • New mission type: Skill

If you have some ideas to improve the mod, you can create an issue on github (or comment on the hub) ;-)

The original README

The original readme file is available on github.