RPGのクエスト/サイドクエストを追跡するためのシステム – Galv_QuestLog.js

タイトル
A system to track quests/sidequests in your RPG.
作者名
ヘルプ
Galv's Quest Log
----------------------------------------------------------------------------
Another quest log plugin for RPG Maker MV but written in Galv's style. Help
the player keep track of multiple quests and give notification of when
quests are accepted, changed or completed.

MAKING A QUEST
--------------
Quest information is stored in a .txt file in your project, by default:
/data/Quests.txt
Each quest must be set up using tags and data explained below.

<quest i:Quest Name|d|c>
objectiveName,objectiveName,objectiveName,objectiveName,objectiveName
resolution text, resolution text, resolution text
Description text lines here...
Description text lines here...
Description text lines here...
Description text lines here...
</quest>

i = the quest id. This must be a unique number
Quest Name = the text used as the quest's name
d = difficulty value. eg. if a quest has a recommended level.
c = the category id. 0 for first, 1 for second, etc. based on the list of
categories set up in the plugin settings.
-- The second line is used for objective names. If no objectives, leave the
line blank and they won't be displayed in the quest log.
-- The third line is used for resolution texts that can be selected using a
script call and displayed underneath the quest description. This line can
be left blank if not used.
The other lines are used for quest description and can use some formatting
code such as \c[x] and \i[x] to change color or add icons, etc.

View the /data/Quest.txt file in the demo for examples.

MODIFYING QUESTS
----------------
Objectives in a quest or an entire quest's status can be changed via script
calls (further down). This quest log does not automate anything, you will
need to do the script calls manually as quests are completed in your RPG.

QUEST TRACKING
--------------
You can track a quest by calling a script call (further down) with the quest
id. If the quest is already complete or failed, the quest cannot be tracked.
By tracking a quest you can detect from within an evente which quest id is
being tracked and use that in conditional branches to change reactions.

The tracked quest will also appear on the main quest screen when no other
quest is being tracked.

QUEST POPUPS
------------
This plugin doesn't come with quest popup notifications, however if you use
Galv's Timed Message Popup plugin, it will automatically make notifications
using those.
----------------------------------------------------------------------------

----------------------------------------------------------------------------
SCRIPT calls
----------------------------------------------------------------------------

Galv.QUEST.viewLog(); starts the quest log scene manually

Galv.QUEST.catStatus(id,status); id is the index number of the quest
category you set up in the plugin
settings. 0 first, 1 second, etc
status can be true or false to set
if the category is visible or not.
Categories are all true by default

Galv.QUEST.track(id); set which quest is being tracked

Galv.QUEST.activate(id); Add a quest to the Quest log as active
Galv.QUEST.fail(id); Fail a quest in the Quest Log.
Galv.QUEST.complete(id); Complete a quest in the Quest Log

Galv.QUEST.resolution(id,i); set resolution text to resolution index
i = -1 for none, 0 is first resolution

Galv.QUEST.objective(id,objId,status); Change a quest's objective
id = the quest's id
objId = the objective index
(0 is first)
status can be...
-1 or 'hide'
0 or 'activate'
1 or 'complete'
2 or 'fail'
EXAMPLES
Galv.QUEST.objective(3,0,'complete'); complete quest 3's 1st objective
Galv.QUEST.objective(3,0,1); complete quest 3's 1st objective
Galv.QUEST.complete(3); complete quest 3 (not changing any objectives)
Galv.QUEST.objective(1,2,'hide'); hide quest 1's 3rd objective

EXTRA
If you have Galv's Timed Message Popups installed, it will automatically
display popups as quests and objectives are gained, completed or failed.
You can prevent a popup by adding a true argument at the end of the script
call. eg, the following are examples of not displaying popups:
Galv.QUEST.objective(3,0,'complete',true);
Galv.QUEST.fail(2,true);
Galv.QUEST.activate(3,true);

----------------------------------------------------------------------------
SCRIPT for CONTROL VARIABLES
----------------------------------------------------------------------------

Galv.QUEST.status(id) returns 0 incomplete, 1 complete, 2 failed
returns -1 if quest was never activated.

Galv.QUEST.status(id,x) x is the objective number to check status of
(remember 0 is the first objective)
returns same numbers as above

Galv.QUEST.isTracked() returns the id of the tracked quest.
0 if no quest is being tracked.

----------------------------------------------------------------------------
パラメータ
param File
desc The name of your quests txt file (without .txt).
default Quests

param Folder
desc The folder name in your project where the txt file is located.
default data

param Separator Character
desc The character used to separate objective/resolution text.
Default: , (comma)
default ,

param - OPTIONS -
desc
default
param Font Size
desc The font size for quest text in the quest log
Default: 28
default 22

param Categories
desc An ordered list of quest categories separated by commas with | to designate hex color code for each
default Main Quests|#ffcc66,Side Quests|#ffff99,Crafting Quests|#ccccff

param -- ICONS --
desc
default
param Not Complete Icon
desc Icon displayed next to objectives not completed yet
default 163

param Complete Icon
desc Icon displayed next to objectives that are completed
default 164

param Failed Icon
desc Icon displayed next to objectives that were failed
default 162

param Tracked Quest Icon
desc Icon displayed next to currently tracked quest
default 88

param -- VOCAB --
desc
default
param Quest Command
desc Text used for Quest command in menu. Leave blank to not use this.
default Quest Log

param Active Cmd Txt
desc The command to view active quests
default Active

param Completed Cmd Txt
desc The command to view completed quests
default Complete

param Failed Cmd Txt
desc The command to view failed quests. Leave this blank to remove failed quests from menu
default Failed

param Desc Txt
desc The heading above the quest description
default Details

param Objectives Txt
desc The heading above the quest description
default Objectives

param Difficulty Txt
desc The text beside the level/difficulty value of the quest
default Level

param No Tracked Quest
desc Text displayed when no quest is being tracked
default No Quest Selected

param -- EXTRA --
desc The below settings are for Galv's Timed Message Popups
default
param Pop XY
desc The X,Y position for the timed popup
default 20,20

param Pop Time
desc How many frames the popup stays on screen
default 130

param Pop New Quest
desc Text displayed before the name of the quest when it is activated
default New Quest:

param Pop Complete Quest
desc Text displayed before the name of the quest when it is completed
default Quest Completed:

param Pop Fail Quest
desc Text displayed before the name of the quest when it is failed
default Quest Failed:

param Pop New Objective
desc Text displayed before the name of an objective when it is activated
default New Objective:

param Pop Complete Objective
desc Text displayed before the name of an objective when it is completed
default Objective Completed:

param Pop Fail Objective
desc Text displayed before the name of an objective when it is failed
default Objective Failed:

ライセンス表記
Terms of Use
https://galvs-scripts.com/terms-of-use/

紹介ページ https://galvs-scripts.com/category/rmmv-plugins/mv-scenessystems/#post-1867