#==============================================================================
# Quest Journal - local quest data addon
#------------------------------------------------------------------------------
# Author: Timtrack
# date: 05/01/2026
# Requires: modern algebra's Quest Journal for VX Ace 1.03
#==============================================================================
$imported ||= {}
$imported["TIM-MA_QuestJournal-LocalData-addon"] = true
#==============================================================================
# Description: add new entries to the quest objects, given s a BASIC_DATA_TYPES:
# q[:icons][s] = icon_id
# will change the icon displayed with the basic type, if none is specified,
# ICONS[s] will be used instead.
# q[:vocab][s] = "text"
# will change the name if the data displayed, if none is specified, VOCAB[s]
# will be used instead.
#
# Examples
# q[:icons][:location] = 3
# q[:icons][:client] = 18
# q[:vocab][:location] = "Town"
#==============================================================================
# Installation: put this script below the original script, you may put it above
# or below your quest list script.
#
# In method self.setup_quest(quest_id) from QuestData (where you list your
# quests), replace the first line which should be:
# q = { objectives: [] }
# with:
# q = { objectives: [], icons: {}, vocab: {} }
#
# You may then simply edit your quest list script to add entries such as
# q[:icons][x] or q[:vocab][x]
#==============================================================================
# Term of use: free for commercial and free games
#==============================================================================
#==============================================================================
# Game_Quest
#==============================================================================
class Game_Quest
attr_reader :icons, :vocab
#--------------------------------------------------------------------------
# alias method: data_symbol_array
#--------------------------------------------------------------------------
alias tim_qlocal_data_symbol_array data_symbol_array
def data_symbol_array
tim_qlocal_data_symbol_array + [:icons, :vocab]
end
#--------------------------------------------------------------------------
# alias method: default_value_for
#--------------------------------------------------------------------------
alias tim_qlocal_default_value_for default_value_for
def default_value_for(method)
case method
when :icons, :vocab then {} #hash table
else
tim_qlocal_default_value_for(method)
end
end
end #Game_Quest
#==============================================================================
# Window_QuestData
#==============================================================================
class Window_QuestData < Window_Selectable
#--------------------------------------------------------------------------
# new method: quest_icon -> get icon associated with data if in quest obj,
# else, return the default icon
#--------------------------------------------------------------------------
def quest_icon(data_type)
@quest.icons[data_type] || QuestData::ICONS[data_type]
end
#--------------------------------------------------------------------------
# new method: quest_vocab -> same idea as quest_icon but for the text
#--------------------------------------------------------------------------
def quest_vocab(data_type)
@quest.vocab[data_type] || QuestData::VOCAB[data_type]
end
#--------------------------------------------------------------------------
# overwrite methods: draw_x for x in QuestData::BASIC_DATA_TYPES
#--------------------------------------------------------------------------
QuestData::BASIC_DATA_TYPES.each do |data_type|
define_method(:"draw_#{data_type}") {
draw_basic_data(@draw_y, quest_icon(data_type), quest_vocab(data_type),
@quest.send(data_type))
}
end
end #Window_QuestData