This is it. But not perfect (yet...)
#=============================================================================
# Quest Log Screen
#-----------------------------------------------------------------------------
# ** Version 2.0
# ** Original by Sthrattoff
#=============================================================================
# Description :
# This script enables the ability to show current active quest.
# Features :
# SIMPLIFIED! Now the script is just about 300 lines length.
# Unlimited amount of quest can be added.
# Still use variable to mark quest's progress.
# Limitation :
# Only can store up to 12 progress per quest.
# History :
# Version 1.0 : Initial release.
# Version 1.2 : Add "Types" features.
# Version 2.0 : Changes in programming style and infinite quest support.
# Instruction
# Just put this script above main.
# Configuration :
# To add quest, use Call Script command and type this :
# $names.push "quest name" for the quest's name
# $types.push "quest type" for the quest's type (main or sidequest or something)
# $descriptionm.push "quest description line m" for the quest's description. m is the line
# number (1-5)
# $objectivesm.push "quest objectives m" for the quest's objectives. m is the objective
# number (1-12)
# $var_ID.push value for the quest's game variable marker ID
# To end a quest, set the marker variable's value to 12
# Credits
# See the header + Blizzard and Enterbrain
#=============================================================================
class Scene_Quest
$names = []
$types = []
$description0 = []
$description1 = []
$description2 = []
$description3 = []
$description4 = []
$objectives0 = []
$objectives1 = []
$objectives2 = []
$objectives3 = []
$objectives4 = []
$objectives5 = []
$objectives6 = []
$objectives7 = []
$objectives8 = []
$objectives9 = []
$objectives10 = []
$objectives11 = []
$var_ID = []
def initialize
$names.compact
end
def main
@quest_list = Window_Command.new(160, $names)
@quest_window = Window_Quest.new
@quest_window.x = 160
Graphics.transition
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.freeze
@quest_list.dispose
@quest_window.dispose
end
def update
@quest_list.update
@quest_window.update
if @quest_list.active
update_quest
return
end
end
def update_quest
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(2)
return
end
quest = @quest_list.index
preview(quest)
end
def preview(x)
$preview_name = $names[x]
$preview_type = $types[x]
$preview_description0 = $description0[x]
$preview_description1 = $description1[x]
$preview_description2 = $description2[x]
$preview_description3 = $description3[x]
$preview_description4 = $description4[x]
$preview_objectives0 = $objectives0[x]
$preview_objectives1 = $objectives1[x]
$preview_objectives2 = $objectives2[x]
$preview_objectives3 = $objectives3[x]
$preview_objectives4 = $objectives4[x]
$preview_objectives5 = $objectives5[x]
$preview_objectives6 = $objectives6[x]
$preview_objectives7 = $objectives7[x]
$preview_objectives8 = $objectives8[x]
$preview_objectives9 = $objectives9[x]
$preview_objectives10 = $objectives10[x]
$preview_objectives11 = $objectives11[x]
$preview_variable = $var_ID[x]
return
end
end
class Window_Quest < Window_Base
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 32, self.width - 32, 32, $preview_type.to_s, 1)
self.contents.draw_text(0, 224, self.width - 32, 32, "Objectives", 1) if $types.size != 0
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, self.width - 32, 32, $preview_name.to_s, 1)
self.contents.draw_text(0, 64, self.width - 32, 32 * 5, $preview_description0.to_s)
self.contents.draw_text(0, 96, self.width - 32, 32 * 5, $preview_description1.to_s)
self.contents.draw_text(0, 128, self.width - 32, 32 * 5, $preview_description2.to_s)
self.contents.draw_text(0, 160, self.width - 32, 32 * 5, $preview_description3.to_s)
self.contents.draw_text(0, 192, self.width - 32, 32 * 5, $preview_description4.to_s)
case $game_variables[$preview_variable.to_i]
when 0
self.contents.font.color = normal_color
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s) if $types.size != 0
when 1
self.contents.font.color = normal_color
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 2
self.contents.font.color = normal_color
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 3
self.contents.font.color = normal_color
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 4
self.contents.font.color = normal_color
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 5
self.contents.font.color = normal_color
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 6
self.contents.font.color = normal_color
self.contents.draw_text(240, 256, self.width / 2, 32, "•" + $preview_objectives6.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 7
self.contents.font_color = normal_color
self.contents.draw_text(240, 288, self.width / 2, 32, "•" + $preview_objectives7.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(240, 256, self.width / 2, 32, "•" + $preview_objectives6.to_s)
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 8
self.contents.font.color = normal_color
self.contents.draw_text(240, 320, self.width / 2, 32, "•" + $preview_objectives8.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(240, 288, self.width / 2, 32, "•" + $preview_objectives7.to_s)
self.contents.draw_text(240, 256, self.width / 2, 32, "•" + $preview_objectives6.to_s)
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 9
self.contents.font.color = normal_color
self.contents.draw_text(240, 352, self.width / 2, 32, "•" + $preview_objectives9.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(240, 320, self.width / 2, 32, "•" + $preview_objectives8.to_s)
self.contents.draw_text(240, 288, self.width / 2, 32, "•" + $preview_objectives7.to_s)
self.contents.draw_text(240, 256, self.width / 2, 32, "•" + $preview_objectives6.to_s)
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 10
self.contents.font.color = normal_color
self.contents.draw_text(240, 384, self.width / 2, 32, "•" + $preview_objectives10.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(240, 352, self.width / 2, 32, "•" + $preview_objectives9.to_s)
self.contents.draw_text(240, 320, self.width / 2, 32, "•" + $preview_objectives8.to_s)
self.contents.draw_text(240, 288, self.width / 2, 32, "•" + $preview_objectives7.to_s)
self.contents.draw_text(240, 256, self.width / 2, 32, "•" + $preview_objectives6.to_s)
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
when 11
self.contents.font.color = normal_color
self.contents.draw_text(240, 416, self.width / 2, 32, "•" + $preview_objectives11.to_s)
self.contents.font.color = disabled_color
self.contents.draw_text(240, 384, self.width / 2, 32, "•" + $preview_objectives10.to_s)
self.contents.draw_text(240, 352, self.width / 2, 32, "•" + $preview_objectives9.to_s)
self.contents.draw_text(240, 320, self.width / 2, 32, "•" + $preview_objectives8.to_s)
self.contents.draw_text(240, 288, self.width / 2, 32, "•" + $preview_objectives7.to_s)
self.contents.draw_text(240, 256, self.width / 2, 32, "•" + $preview_objectives6.to_s)
self.contents.draw_text(0, 416, self.width / 2, 32, "•" + $preview_objectives5.to_s)
self.contents.draw_text(0, 384, self.width / 2, 32, "•" + $preview_objectives4.to_s)
self.contents.draw_text(0, 352, self.width / 2, 32, "•" + $preview_objectives3.to_s)
self.contents.draw_text(0, 320, self.width / 2, 32, "•" + $preview_objectives2.to_s)
self.contents.draw_text(0, 288, self.width / 2, 32, "•" + $preview_objectives1.to_s)
self.contents.draw_text(0, 256, self.width / 2, 32, "•" + $preview_objectives0.to_s)
end
end
def update
refresh
end
end