Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Last active September 5, 2024 10:38
Show Gist options
  • Save KageDesu/7e2900af1ff113a5a91734d62f9123d6 to your computer and use it in GitHub Desktop.
Save KageDesu/7e2900af1ff113a5a91734d62f9123d6 to your computer and use it in GitHub Desktop.
Simple Quests System Plugin Guide

Simple Quest System Plugin Guide

Overview

This plugin introduces a simple quest journal and task tracking system, similar to the one found in The Elder Scrolls V: Skyrim. It allows developers to create quests, track their progress, and manage quest-related tasks within RPG Maker MZ.

Script Calls

Opening the Quest Journal

To open the quest journal, use the following script call:

SQSM.OpenQuestJournal();

Managing Quests

Adding a Quest

To add a quest to the journal, use the following script call. Replace ID with the quest's unique identifier (as a string):

SQSM.AddQuest("ID");

Displaying Quest Descriptions

To show a specific description for a quest, use:

SQSM.ShowDescriptionForQuest("ID", INDEX);
  • ID: The quest identifier.
  • INDEX: The index of the description to show (the first description is shown by default).

Note: First description is shown by default.

Displaying Quest Tasks

To show a specific task for a quest, use:

SQSM.ShowTaskForQuest("ID", INDEX);
  • INDEX: The index of the task to show (the first task is shown by default).

Note: First task is shown by default.

To show all tasks for a specific quest, use:

SQSM.ShowAllTasksForQuest("ID");

Completing and Failing Tasks/Quests

Completing a Task

To mark a specific task as completed:

SQSM.CompleteTaskForQuest("ID", INDEX);

Failing a Task

To mark a specific task as failed:

SQSM.FailTaskForQuest("ID", INDEX);

Completing a Quest

To mark an entire quest as completed:

SQSM.CompleteQuest("ID");

Failing a Quest

To mark an entire quest as failed:

SQSM.FailQuest("ID");

Resetting a Quest

To remove a quest from the journal and reset its progress:

SQSM.ResetQuest("ID");

Activating/Deactivating Quests

To activate or deactivate quest tracking on the map:

SQSM.SetActiveQuest("ID", true);  // Activate
SQSM.SetActiveQuest("ID", false); // Deactivate

Quest Status Checks

The following script calls return a boolean (true or false) based on the status of the quest:

Checking if a Quest is Completed

SQSM.isQuestComplete("ID");

Checking if a Quest is Failed

SQSM.isQuestFailed("ID");

Checking if a Quest is Visible in the Journal

SQSM.isQuestVisible("ID");

Checking if a Quest is Active (Tracked)

SQSM.isQuestActive("ID");

Task Status Checks

These script calls check the status of individual tasks within a quest:

  • Task Completion:
    SQSM.isQuestTaskComplete("ID", taskIndex);
  • Task Visibility:
    SQSM.isQuestTaskVisible("ID", taskIndex);
  • Task Failure:
    SQSM.isQuestTaskFailed("ID", taskIndex);

Note: Task indices start from 1.

Map Quest List Management

Refreshing the Map Quest List

To refresh the quest tasks displayed on the map:

SQSM.RefreshMapQuestsList();

Displaying/Hiding the Map Quest List

To manage the visibility of the map quest list:

  • Show the list:
    SQSM.ShowMapQuestsList();
  • Hide the list:
    SQSM.HideMapQuestsList();

Opening/Closing the Map Quest List

Note: This script calls works only for Deprecated Map Quest List.

To manually open or close the quest task window on the map:

  • Open the window:
    SQSM.OpenMapQuestsList();
  • Close the window:
    SQSM.CloseMapQuestsList();
    This is the same as pressing the "X" button on the window.

Customization

The visual style of the quest journal and map quest list can be customized via the plugin parameters. Ensure the necessary image files are included in your project directory under img\pSQSystem.

Note: Don't forget to copy these images into your deployed project.

Modify the visual appearance of plugin by exploring the data\PKD_SimpleQuestsSystem folder.

Plugin Commands

This plugin does not include any plugin commands.

How to activate the possibility of fail for tasks and quests

Failed Group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment