设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 827|回复: 5
打印 上一主题 下一主题

[已经解决] 请问图标应该怎么设置

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
237 小时
注册时间
2014-9-14
帖子
38
跳转到指定楼层
1
发表于 2015-4-18 13:22:35 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
直接复制的脚本 但是我这边不显示

这是别人的
这个图标在哪里设置?
  1. #==============================================================================

  2. $imported ||= {}
  3. $imported[:"MA_QuestJournal_1.0"] = true

  4. #==============================================================================
  5. # *** QuestData
  6. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7. #  This module contains all the configuration data for the quest journal
  8. #==============================================================================

  9. module QuestData
  10.   #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  11.   #  BEGIN Editable Region A
  12.   #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  13.   #  MENU_ACCESS - If true, you can access the quest journal through a command
  14.   # in the menu. If false, there will be no such command.
  15.   MENU_ACCESS = true
  16.   #  MENU_INDEX - If MENU_ACCESS is true, this determines where it appears
  17.   MENU_INDEX = 4
  18.   #  MAP_ACCESS - If true, this allows you to access the quest journal by
  19.   # pressing a key on the map.
  20.   MAP_ACCESS = true
  21.   #  MAP_BUTTON - If MAP_ACCESS is true, this determines which button calls the
  22.   # Quest Journal
  23.   MAP_BUTTON = :L
  24.   #  OPEN_TO_LAST_REVEALED_QUEST - If true, then the first time you open the
  25.   # quest journal after revealing a new quest, it will open to the new quest.
  26.   OPEN_TO_LAST_REVEALED_QUEST = true
  27.   #  OPEN_TO_LAST_CHANGED_QUEST - If true, then the Quest Journal will open to
  28.   # the last quest whose objective status has changed.
  29.   OPEN_TO_LAST_CHANGED_QUEST = false
  30.   #  LIST_WINDOW_WIDTH - The width, in pixels, of the List Window
  31.   LIST_WINDOW_WIDTH = 192
  32.   #  BASIC_DATA_TYPES  - This lets you set up additional types of data. Just
  33.   # include an identifying signal in the Array. Then, you will need to give
  34.   # each signal an icon (in the ICONS hash at line 322) and a signal text (in
  35.   # the VOCAB array at line 333, though it can be an empty string). Then, you
  36.   # can set the data itself when setting up quests by simply adding a:
  37.   #    q[:symbol] = ""
  38.   # line to the quest. You will also need to include the data type somewhere in
  39.   # the DATA_LAYOUT at line 306. As an example of this, I have included :client
  40.   # and :location by default. You can CTRL+F for anything in this section with
  41.   # one of those symbols (excluding :) and you will there need to add something
  42.   # for any new data types you add.
  43.   BASIC_DATA_TYPES = [:client, :location]
  44.   #  BASIC_DATA_WIDTH - This determines how much room, in pixels, is given to  
  45.   # any basic data types you set up in the data window.
  46.   BASIC_DATA_WIDTH = 240
  47.   #  CONCURRENT_ACTIVITY - If true, then when in the Quest Journal scene, you
  48.   # can switch categories or scroll down the quest list at the same time. If
  49.   # false, you will first need to select a category before you can start
  50.   # scrolling through the quest list.
  51.   CONCURRENT_ACTIVITY = true
  52.   #  HIDE_CATEGORY_CURSOR - If true, then the Category Window will not have a
  53.   # cursor and will instead just highlight the currently selected category.
  54.   # This is best when CONCURRENT_ACTIVITY is true.
  55.   HIDE_CATEGORY_CURSOR = true
  56.   #  SHOW_QUEST_ICONS - If true, then the icon you choose for each quest will
  57.   # be displayed to the left of its name in the Quest List window
  58.   SHOW_QUEST_ICONS = false#true
  59.   #  MANUAL_REVEAL - If false, then quests will be revealed the moment you
  60.   # first reveal, complete, or fail an objective. If this is true, you will
  61.   # need to specifically reveal each quest via a separate script call:
  62.   #    reveal_quest(quest_id)
  63.   MANUAL_REVEAL = false
  64.   #  DATA_LAYOUT - This controls the way that the quest window lays out all of
  65.   # the relevant data. If you set one of the entries to be an array, then any
  66.   # of the commands there will be drawn at the same y. With exception to :line,
  67.   # none of the commands will be drawn if the quest is not set to have that
  68.   # particular data. The symbols are:
  69.   #    :line        - Draws a horizontal line across the window.
  70.   #    :name        - Draws the name of the quest
  71.   #    :level       - Draws the level of the quest
  72.   #    :banner      - Draws the banner for the quest
  73.   #    :client      - Draws the client set in the quest   (basic data)
  74.   #    :location    - Draws the location set in the quest (basic data)
  75.   #    :description - Draws the quest's description
  76.   #    :objectives  - Draws all the quest's objectives that have been revealed
  77.   #    :rewards     - Draws whatever rewards have been set
  78.   #
  79.   # You will also need to add an entry for any new BASIC_DATA that you place
  80.   # in BASIC_DATA_TYPES at line 264.
  81.   #
  82.   # Remember to place a comma after each entry. Also note that this is only the
  83.   # default layout. You can set a different layout for any quest, and when
  84.   # viewing that quest, it will be the custom layout that is shown.
  85.   DATA_LAYOUT = [
  86.     [:line, :name, :level],
  87.     :banner,
  88.     :client,
  89.     :location,
  90.     :description,
  91.     :objectives,
  92.     [:line, :rewards],
  93.     :line,
  94.   ] # <= Do not touch.
  95.   #  ICONS - This is where you setup many of the icons used in the script. The
  96.   # purpose of each is listed next to it. Also, if you make any custom
  97.   # categories, you NEED to give them an icon by placing a line like the
  98.   # others. So, if the new custom category is :romance then you would need to
  99.   # set it like this:
  100.   #    romance:     107,
  101.   ICONS = {
  102.     all:         226, # The icon for the All Quests category
  103.     active:      236, # The icon for the Active Quests category
  104.     complete:    238, # The icon for the Complete Quests category
  105.     failed:      227, # The icon for the Failed Quests category
  106.     client:      121, # The icon for client data. If none wanted, set to 0
  107.     location:    231, # The icon for location data. If none wanted, set to 0
  108.     reward_gold: 361, # The icon for gold rewards. If none wanted, set to 0
  109.     reward_exp:  117, # The icon for exp rewards. If none wanted, set to 0
  110.   } # <= Do not touch.
  111.   #  VOCAB - This lets you choose some of the words used in the quest scene
  112.   VOCAB = {
  113.     # menu_label:  The command name in the menu if MENU_ACCESS is true
  114.     menu_label:       "手册",
  115.     # scene_label: The label at the top of the scene. If empty, no window
  116.     scene_label:      " ",
  117.     # description: The heading to identify the description
  118.     description:      "委托描述",
  119.     # objectives: The heading to identify the objectives
  120.     objectives:       "记录",
  121.     # objective_bullet: The bullet which shows up to the left of every
  122.     #  objective. If %d is included, it shows the objective's ID.
  123.     objective_bullet: "·",
  124.     # rewards: The heading to identify the rewards.
  125.     rewards:          "委托奖励",
  126.     # reward_amount: For item rewards, this is the text to show the amount.
  127.     #  It should include %d to show the amount.
  128.     reward_amount:    "x%d",
  129.     # reward_gold: Text to identify gold rewards
  130.     reward_gold:      "Giro",
  131.     # reward_exp: Text to identify exp rewards
  132.     reward_exp:       "经验",
  133.     # level: If LEVEL_ICON is 0, this is the text which precedes the level
  134.     level:            "等级: ",
  135.     # location: The text label for quest location
  136.     location:         "",
  137.     # location: The text label for quest client
  138.     client:           "",
  139.   } # <= Do not touch.
  140.   #  CATEGORIES - This array allows you to set which categories are available
  141.   # in the Quest scene. The default categories are :all, :active, :complete,
  142.   # and :failed, and their names are self-explanatory. You can add custom
  143.   # categories as well, but note that you will need to make sure that each new
  144.   # category has an icon set in the ICONS hash, as well as a label set in the
  145.   # CATEGORY_VOCAB hash (if you are using SHOW_CATEGORY_LABEL). It is also
  146.   # advisable to give it a sort type, unless you are fine with it being sorted
  147.   # by ID, as is default.
  148.   CATEGORIES = [:all, :active, :complete, :failed]
  149.   #  SHOW_CATEGORY_LABEL - This allows you to choose whether to show the name
  150.   # of the currently selected category. If true, it will choose the name out
  151.   # of the CATEGORY_VOCAB hash.
  152.   SHOW_CATEGORY_LABEL = true
  153.   #  CATEGORY_LABEL_IN_SAME_WINDOW - If SHOW_CATEGORY_LABEL is true, then this
  154.   # options lets you choose whether the label is shown in the same window as
  155.   # the category icons or in a separate window below. true = same window.
  156.   CATEGORY_LABEL_IN_SAME_WINDOW = true
  157.   #  CATEGORY_VOCAB - If SHOW_CATEGORY_LABEL is true, this hash lets you set the
  158.   # label for each category. For any custom categories you create, you will
  159.   # need to add a line for each below and in the same format:
  160.   #    :category => "Label",
  161.   # Don't forget to add the comma at the end of each line.
  162.   CATEGORY_VOCAB = {
  163.     :all =>      "全部委托",      # The label for the :all category
  164.     :active =>   "进行中",   # The label for the :active category
  165.     :complete => "已完成", # The label for the :complete category
  166.     :failed =>   "已过期",   # The label for the :failed category
  167.   } # <= Do not touch.
  168.   #  SORT_TYPE - This hash allows you to choose how each category is sorted.
  169.   # For each category, default or custom, you can set a different sort method
  170.   # There are seven options to choose from:
  171.   #    :id - The quests are sorted from lowest to highest ID
  172.   #    :alphabet - The quests are sorted in alphabetical order
  173.   #    :level - The quests are sorted from the lowest to highest level
  174.   #    :reveal - The quests are sorted from most recently revealed on.
  175.   #            Every time a new quest is revealed, it will be at the top.
  176.   #    :change - The quests are sorted from the one whose status most recently
  177.   #            changed on. So, every time an objective is modified, that quest
  178.   #            will be thrown to the top.
  179.   #    :complete - The quests are sorted from the most recently completed on.
  180.   #            Every time a quest is completed, it will be thrown to the top.
  181.   #    :failed - The quests are sorted from the most recently failed on.
  182.   #            Every time a quest is failed, it will be thrown to the top.
  183.   #
  184.   # Additionally, you can put _r at the end of any of the sort options and it
  185.   # will reverse the order. So, for instance, if the sort method for a category
  186.   # is :alphabet_r, then the quests will show up from Z-A
  187.   SORT_TYPE = {
  188.     :all =>      :id,       # Sort type for the All Quests category
  189.     :active =>   :change,   # Sort type for the Active Quests category
  190.     :complete => :complete, # Sort type for the Complete Quests category
  191.     :failed =>   :failed,   # Sort type for the Failed Quests category
  192.   } # <= Do not touch.
  193.   #  WINDOWSKIN - The windowskin for each window in the Quest scene. It must
  194.   # refer to a graphic in the System folder of Graphics. If set to false, then
  195.   # it will use whatever windowskin is default. If you are using a script which
  196.   # lets the player choose the windowskin, false is the recommended value.
  197.   WINDOWSKIN = false
  198.   #  WINDOW_TONE - The tone for each window. It must be an array in the form:
  199.   #      WINDOW_TONE = [red, green, blue, gray]
  200.   # gray can be excluded, but the other three must be present. If you set this
  201.   # value to false, then the windows will have whatever tone is default.
  202.   WINDOW_TONE = false
  203.   #  WINDOW_OPACITY - The opacity of the windows in the Quest scene. If set to
  204.   # false, it will use the default opacity for windows.
  205.   WINDOW_OPACITY = false
  206.   #  BG_PICTURE - This is a string referring to a picture in the Picture folder
  207.   # of Graphics. If set to "", then there will be no picture. Otherwise, it
  208.   # will display the selected picture below the windows but above the map in
  209.   # the Quest scene.
  210.   BG_PICTURE = "task_back"
  211.   #  BG_OPACITY - This allows you to set the opacity of the background picture,
  212.   # if you have selected one.
  213.   BG_OPACITY = 255
  214.   #  BG_BLEND_TYPE - This allows you to set the blend type of the background
  215.   # picture, if you have selected one.
  216.   BG_BLEND_TYPE = 0
  217.   #  DESCRIPTION_IN_BOX - This is a graphical option, and it allows you to
  218.   # choose whether the description should be shown in a box.
  219.   DESCRIPTION_IN_BOX = true
  220.   #  LEVEL_ICON - This sets how levels are shown. If set to an integer, then it
  221.   # will draw the same icon numerous times up to the level of the quest. Ie. If
  222.   # the level's quest is 1, then the icon will only be drawn once, but if the
  223.   # level's quest is 4, it will be drawn 4 times. LEVEL_ICONS_SPACE determines
  224.   # the space between them. If you set LEVEL_ICON to 0, however, then it will
  225.   # instead draw a signal for the level, corresponding to that index in the
  226.   # LEVEL_SIGNALS array. If the LEVEL_SIGNALS array is empty, then it will just
  227.   # draw the integer for the level. Finally, LEVEL_ICON can also be an array of
  228.   # integers, in which case the level will be represented only by the icon set
  229.   # which corresponds to it in the array.
  230.   LEVEL_ICON = 125
  231.   #  LEVEL_ICONS_SPACE - If LEVEL_ICON is an integer, this is the amount of
  232.   # space between each time the icon is drawn.
  233.   LEVEL_ICONS_SPACE = 16
  234.   #  LEVEL_SIGNALS - If LEVEL_ICON is 0, this allows you to set what string
  235.   # should be the signal for each level. If this array is empty, then it will
  236.   # just draw the level integer. Ie. if the Quest is Level 4, it will draw 4.
  237.   LEVEL_SIGNALS = ["F", "E", "D", "C", "B", "A", "S"]
  238.   #  COLOURS - This lets you change the colour for various aspects of the
  239.   # quest scene. Each can be set in one of three ways:
  240.   #    :symbol - If you use a symbol, the colour will be the result of calling
  241.   #      the method of the same name. For instance, if you set something to
  242.   #      :system_color, it will set the colour to the result of the Window_Base
  243.   #      system_color method.
  244.   #    Integer - If you set the colour to an integer, then it will take its
  245.   #      colour from the windowskin palette, just like using \c[x] in messages.
  246.   #    Array - You can also set the rgba values directly with an array in the
  247.   #      format: [red, green, blue, alpha]. alpha can be excluded, but you must
  248.   #      have values for red, green, and blue.
  249.   COLOURS = {
  250.     # active: This sets the colour for active quests in the list and the name
  251.     #  of the active quest when shown in the data window.
  252.     active:           :normal_color,
  253.     # complete: This sets the colour for complete quests in the list and the
  254.     #  name of the complete quest when shown in the data window.
  255.     complete:         4,
  256.     # failed: This sets the colour for failed quests in the list and the name
  257.     #  of the failed quest when shown in the data window.
  258.     failed:           8,
  259.     # line:  This sets the colour for lines or boxes drawn in the quest scene
  260.     line:             :normal_color,
  261.     # line_shadow:  This sets the colour of the shadow for lines or boxes drawn
  262.     #  in the quest scene
  263.     line_shadow: [0, 0, 0, 128],
  264.     # scene_label: This sets the colour for the scene label, if shown
  265.     scene_label:      6,#:system_color,
  266.     # category_label: This sets the colour for the category label, if shown
  267.     category_label:   :normal_color,
  268.     # level_signal: This sets the colour for the level signal, if shown
  269.     level_signal:     :normal_color,
  270.     # objective_bullet: This sets the colour for objectives; if set to
  271.     #  :maqj_objective_color, it will reflect the completion status of the
  272.     #  objective, but you can change it to something else if you prefer
  273.     objective_bullet: :maqj_objective_color,
  274.     # reward_amount: The colour of the item amount, when shown
  275.     reward_amount:    :normal_color,
  276.     # heading: The colour of any headings in the script, like "Description"
  277.     heading:          6,#:system_color,
  278.     # basic_label: For basic data, like client, the colour of the label
  279.     basic_label:      6,#:system_color,
  280.     # basic_value: For basic data, like client, the colour of the value
  281.     basic_value:      :normal_color,
  282.   } # <= Do not touch.
  283.   #  HEADING_ALIGN - This sets the alignment for the aspects listed. 0 is Left;
  284.   # 1 is Centre; 2 is Right
  285.   HEADING_ALIGN = {
  286.     description: 0, # Alignment for the Description heading
  287.     objectives:  0, # Alignment for the Objectives heading
  288.     rewards:     1, # Alignment for the Rewards heading
  289.     level:       2  # Alignment when showing the level
  290.   } # <= Do not touch.
  291.   #````````````````````````````````````````````````````````````````````````````
  292.   #    Font Aspects
  293.   #
  294.   #  All of the following options (FONTNAMES, FONTSIZES, FONTBOLDS, and
  295.   # FONTITALICS) allow you to alter the fonts used for various aspects of the
  296.   # scene. The only one listed there by default is normal:, which is the
  297.   # font used by default for the entire scene. However, you can change the  
  298.   # fonts for almost any aspect - all you need to do is add a line like so:
  299.   #
  300.   #    description: value,
  301.   #
  302.   # and that will change that font aspect when drawing the description. The
  303.   # following symbols are available for changing:
  304.   #
  305.   #   normal:         The default font used for every part of the scene
  306.   #   list:           The font used in the List Window
  307.   #   scene_label:    The font used when drawing the Scene Label, if shown
  308.   #   category_label: The font used when drawing the Category Label, if shown
  309.   #   heading:        The font used when drawing any headings, like "Description"
  310.   #   name:           The font used when drawing the quest name in data window
  311.   #   description:    The font used when drawing the Description
  312.   #   objectives:     The font used when drawing the objectives
  313.   #   rewards:        The font used when drawing the rewards
  314.   #   client:         The font used when drawing the client
  315.   #   location:       The font used when drawing the location
  316.   #
  317.   # For any of them, you need to set a value. What the value can be depends
  318.   # on which font aspect you are changing and is described below, but for any
  319.   # of them setting it to the false will mean it will simply use the default
  320.   #
  321.   # For any that you add, remember that you must put a comma after the value.
  322.   #````````````````````````````````````````````````````````````````````````````
  323.   #  FONTNAMES - Here you can change the font used for any of the various
  324.   # options. It can take any of the following types of values:
  325.   #     false    - The default font will be used
  326.   #     "String" - The font with the name "String" will be used.
  327.   #     [Array]  - The array must be in the form: ["String1", "String2", ...]
  328.   #               The font used will be the first one in the array that the
  329.   #               player has installed.
  330.   #
  331.   #  EXAMPLES:
  332.   #
  333.   #    normal:      false,
  334.   #      The font used for unaltered aspects of the scene is the default font
  335.   #    scene_label: "Algerian",
  336.   #      The font used for the Scene Label will be Algerian.
  337.   #    description: ["Cambria", "Times New Roman"],
  338.   #      The font used when drawing the description will be Cambria if the
  339.   #      player has Cambria installed. If the player does not have Cambria
  340.   #      installed, then the font used will be Times New Roman
  341.   FONTNAMES = {
  342.     normal: false, # normal: the default font name
  343.   } # <= Do not touch.
  344.   #  FONTSIZES - Here you can change the size of the font. There are two types
  345.   # of values you can set:
  346.   #    false   - The default fontsize will be used
  347.   #    Integer - The fontsize will be equal to the value of the Integer.
  348.   #  
  349.   # For everything but the label windows, this shouldn't exceed 24, since that
  350.   # is the line_height. However, for scene_label: and category_label:, the size
  351.   # of the window will be adjusted to whatever size you set the font.
  352.   FONTSIZES = {
  353.     normal:         false, # normal: default font size
  354.     scene_label:    16,#28,    # scene_label: fontsize for the Scene Label window
  355.     category_label: 16,#24,    # category_label: fontsize for Category Label window
  356.   } # <= Do not touch.
  357.   #  FONTBOLDS - Here you can set whether the font will be bolded. You can set
  358.   # it to either false, in which case it will not be bolded, or true, in which
  359.   # case it will be bolded.
  360.   FONTBOLDS = {
  361.     scene_label:  true, # scene_label: whether font is bold for Scene Label
  362.     heading:      true, # heading: whether font is bold for the headings
  363.     level_signal: true, # level_signal: whether font is bold for level
  364.   } # <= Do not touch.
  365.   #  FONTITALICS - Here you can set whether the font will be italicized. You
  366.   # can set it to either false, in which case it will not be italicized, or
  367.   # true, in which case it will be italicized.
  368.   FONTITALICS = {
  369.   }
  370.   #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  371.   #  END Editable Region A
  372.   #//////////////////////////////////////////////////////////////////////////
  373.   CATEGORIES = [:all] if !CATEGORIES || CATEGORIES.empty?
  374.   VOCAB.default = ""
  375.   ICONS.default = 0
  376.   CATEGORY_VOCAB.default = ""
  377.   SORT_TYPE.default = :id
  378.   COLOURS.default = :normal_color
  379.   HEADING_ALIGN.default = 0
  380.   FONTNAMES.default = false
  381.   FONTSIZES.default = false
  382.   FONTBOLDS.default = false
  383.   FONTITALICS.default = false
  384.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  385.   # * Setup Quest
  386.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  387.   def self.setup_quest(quest_id)
  388.     q = { objectives: [] }
  389.       q[:name]              = MissionInfo::AllMission[quest_id + 1]["name"]
  390.       q[:level]             = MissionInfo::AllMission[quest_id + 1]["level"]
  391.       q[:icon_index]        = MissionInfo::AllMission[quest_id + 1]["icon_index"]
  392.       q[:description]       = MissionInfo::AllMission[quest_id + 1]["description"]
  393.       for i in 0..15
  394.         obj_name = "objectives" + i.to_s
  395.         q[:objectives][i]     = MissionInfo::AllMission[quest_id + 1][obj_name]
  396.       end
  397.       q[:prime_objectives]  = MissionInfo::AllMission[quest_id + 1]["prime_objectives"]
  398.       q[:custom_categories] = MissionInfo::AllMission[quest_id + 1]["custom_categories"]
  399.       q[:banner]            = MissionInfo::AllMission[quest_id + 1]["banner"]
  400.       q[:banner_hue]        = MissionInfo::AllMission[quest_id + 1]["banner_hue"]
  401.       q[:client]            = MissionInfo::AllMission[quest_id + 1]["client"]
  402.       q[:location]          = MissionInfo::AllMission[quest_id + 1]["location"]
  403.       q[:common_event_id]   = MissionInfo::AllMission[quest_id + 1]["common_event_id"]
  404.       q[:rewards]           = MissionInfo::AllMission[quest_id + 1]["rewards"]
  405.       q[:layout]            = MissionInfo::AllMission[quest_id + 1]["layout"]
  406.     q
  407.   end
  408. end

  409. #==============================================================================
  410. # *** DataManager
  411. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  412. #  Summary of Changes:
  413. #    aliased method - self.extract_save_contents
  414. #==============================================================================

  415. class << DataManager
  416.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  417.   # * Extract Save Contents
  418.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  419.   alias maqj_extractsavecons_2kw5 extract_save_contents
  420.   def extract_save_contents(*args, &block)
  421.     maqj_extractsavecons_2kw5(*args, &block) # Call Original Method
  422.     if $game_party.quests.nil?
  423.       $game_party.init_maqj_data
  424.       $game_system.init_maqj_data
  425.     end
  426.   end
  427. end

  428. #==============================================================================
  429. # ** MAQJ_SortedArray
  430. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  431. #  This module mixes in to an array to maintain the sorted order when inserting
  432. #==============================================================================

  433. module MAQJ_SortedArray
  434.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435.   # * Insert to Array
  436.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  437.   def maqj_insert_sort(el, &block)
  438.     index = bsearch_index(el, 0, size, &block)
  439.     index ? insert(index, el) : push(el)
  440.   end
  441.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  442.   # * Retrieve Index from Binary Search
  443.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  444.   def bsearch_index(el, b = 0, e = size, &block)
  445.     return bsearch_index(el, b, e) { |a,b| a <=> b } if block.nil?
  446.     return b if b == e # Return the discovered insertion index
  447.     return if b > e
  448.     m = (b + e) / 2    # Get Middle
  449.     block.call(el, self[m]) > 0 ? b = m + 1 : e = m
  450.     bsearch_index(el, b, e, &block)
  451.   end
  452. end

  453. #==============================================================================
  454. # ** Game_Quest
  455. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  456. #  This class holds all instance data for a quest
  457. #==============================================================================

  458. class Game_Quest
  459.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  460.   # * Public Instance Variables
  461.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  462.   attr_reader   :id                  # Unique identifier for this quest
  463.   attr_reader   :name                # The name to be shown for the quest
  464.   attr_reader   :level               # The level of difficulty of the quest
  465.   attr_reader   :objectives          # An array of objective strings
  466.   attr_reader   :prime_objectives    # An array of crucial objective IDs
  467.   attr_reader   :revealed_objectives # An array of revealed objective IDs
  468.   attr_reader   :complete_objectives # An array of completed objective IDs
  469.   attr_reader   :failed_objectives   # An array of failed objective IDs
  470.   attr_reader   :custom_categories   # An array of category symbols
  471.   attr_accessor :icon_index          # Icon associated with this quest
  472.   attr_accessor :common_event_id     # ID of common event to call upon complete
  473.   attr_accessor :description         # The description for the quest
  474.   attr_accessor :banner              # Picture shown to represent the quest
  475.   attr_accessor :banner_hue          # The hue of the banner
  476.   attr_accessor :layout              # The layout of this quest in scene
  477.   attr_accessor :rewards             # An array of rewards to show
  478.   attr_accessor :reward_given        # Boolean tracking if quest was rewarded
  479.   attr_accessor :concealed           # Whether or not the quest is visible
  480.   attr_accessor :manual_status       # Quest status if not using prime objectives
  481.   QuestData::BASIC_DATA_TYPES.each { |data_type| attr_accessor(data_type) }
  482.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  483.   # * Object Initialization
  484.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  485.   def initialize(quest_id)
  486.     @id = quest_id
  487.     @concealed = default_value_for(:concealed)
  488.     @reward_given = default_value_for(:reward_given)
  489.     reset
  490.   end
  491.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  492.   # * Reset
  493.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  494.   def reset
  495.     data = QuestData.setup_quest(@id)
  496.     data_symbol_array.each { |meth| instance_variable_set(:"@#{meth}",
  497.       data[meth] ? data[meth] : default_value_for(meth)) }
  498.     @revealed_objectives = [].send(:extend, MAQJ_SortedArray)
  499.     @complete_objectives = [].send(:extend, MAQJ_SortedArray)
  500.     @failed_objectives =   [].send(:extend, MAQJ_SortedArray)
  501.     @manual_status = default_value_for(:manual_status)
  502.   end
  503.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  504.   # * Data Symbol Array
  505.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  506.   def data_symbol_array
  507.     [:name, :level, :objectives, :prime_objectives, :custom_categories,
  508.       :icon_index, :description, :banner, :banner_hue, :common_event_id,
  509.       :layout, :rewards] + QuestData::BASIC_DATA_TYPES
  510.   end
  511.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  512.   # * Default Value
  513.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  514.   def default_value_for(method)
  515.     case method
  516.     when :name then "??????"
  517.     when :description, :banner then ""
  518.     when :level, :banner_hue, :icon_index, :common_event_id then 0
  519.     when :objectives, :rewards, :custom_categories then []
  520.     when :prime_objectives then Array.new(objectives.size) { |x| x }
  521.     when :concealed then QuestData::MANUAL_REVEAL
  522.     when :manual_status then :active
  523.     when :layout, :reward_given then false
  524.     else ""
  525.     end
  526.   end
  527.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  528.   # * Reveal/Conceal Objective
  529.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  530.   def reveal_objective(*obj)
  531.     valid_obj = obj.select {|x| x < objectives.size && !@revealed_objectives.include?(x) }
  532.     valid_obj.each {|i| @revealed_objectives.maqj_insert_sort(i) }
  533.     quest_status_changed unless valid_obj.empty?
  534.   end
  535.   def conceal_objective(*obj)
  536.     quest_status_changed unless (obj & @revealed_objectives).empty?
  537.     obj.each { |obj_id| @revealed_objectives.delete(obj_id) }
  538.   end
  539.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  540.   # * Complete/Uncomplete Objective
  541.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  542.   def complete_objective(*obj)
  543.     valid_obj = obj.select {|x| x < objectives.size && !@complete_objectives.include?(x) }
  544.     reveal_objective(*valid_obj)
  545.     unfail_objective(*valid_obj)
  546.     was_complete = status?(:complete)
  547.     valid_obj.each {|i| @complete_objectives.maqj_insert_sort(i) }
  548.     quest_status_changed unless valid_obj.empty?
  549.     # If just completed
  550.     if status?(:complete) && !was_complete
  551.       $game_temp.reserve_common_event(common_event_id)
  552.       $game_party.quests.add_to_sort_array(:complete, @id)
  553.     end
  554.   end
  555.   def uncomplete_objective(*obj)
  556.     quest_status_changed unless (obj & @complete_objectives).empty?
  557.     obj.each { |obj_id| @complete_objectives.delete(obj_id) }
  558.   end
  559.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  560.   # * Fail/Unfail Objective
  561.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  562.   def fail_objective(*obj)
  563.     valid_obj = obj.select {|x| x < objectives.size && !@failed_objectives.include?(x) }
  564.     reveal_objective(*valid_obj)
  565.     uncomplete_objective(*valid_obj)
  566.     was_failed = status?(:failed)
  567.     valid_obj.each {|i| @failed_objectives.maqj_insert_sort(i) }
  568.     quest_status_changed unless valid_obj.empty?
  569.     $game_party.quests.add_to_sort_array(:failed, @id) if status?(:failed) && !was_failed
  570.   end
  571.   def unfail_objective(*obj)
  572.     quest_status_changed unless (obj & @failed_objectives).empty?
  573.     obj.each { |obj_id| @failed_objectives.delete(obj_id) }
  574.   end
  575.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  576.   # * Updates when the quest status has been changed
  577.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  578.   def quest_status_changed
  579.     $game_party.quests.add_to_sort_array(:change, @id)
  580.     $game_system.last_quest_id = @id if QuestData::OPEN_TO_LAST_CHANGED_QUEST
  581.   end
  582.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  583.   # * Objective Status?
  584.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  585.   def objective_status?(status_check, *obj)
  586.     return false if obj.empty?
  587.     case status_check
  588.     when :failed   then !(obj & @failed_objectives).empty?
  589.     when :complete then obj.size == (obj & @complete_objectives).size
  590.     when :revealed then obj.size == (obj & @revealed_objectives).size
  591.     when :active then objective_status?(:revealed, *obj) &&
  592.       !objective_status?(:complete, *obj) && !objective_status?(:failed, *obj)
  593.     end
  594.   end
  595.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  596.   # * Status?
  597.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  598.   def status?(status_check)
  599.     case status_check
  600.     when :failed  
  601.       @prime_objectives.empty? ? @manual_status == :failed :
  602.         !(@failed_objectives & @prime_objectives).empty?
  603.     when :complete
  604.       @prime_objectives.empty? ? @manual_status == :complete : !status?(:failed) &&
  605.         ((@prime_objectives & @complete_objectives) == @prime_objectives)
  606.     when :active then !concealed && !status?(:complete) && !status?(:failed)
  607.     when :reward then @reward_given
  608.     end
  609.   end
  610.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  611.   # * Set Name
  612.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  613.   def name=(new_name)
  614.     @name = new_name
  615.     $game_party.quests.add_to_sort_array(:alphabet, @id) if $game_party &&
  616.       $game_party.quests
  617.   end
  618.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  619.   # * Set Level
  620.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  621.   def level=(new_lvl)
  622.     @level = new_lvl
  623.     $game_party.quests.add_to_sort_array(:level, @id) if $game_party &&
  624.       $game_party.quests
  625.   end
  626. end

  627. #==============================================================================
  628. # ** Game_Quests
  629. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  630. #  This is a wrapper for an array holding Game_Quest objects
  631. #==============================================================================

  632. class Game_Quests
  633.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  634.   # * Object Initialization
  635.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  636.   def initialize
  637.     @data = {}
  638.     @sort_arrays = {
  639.       reveal: [], change: [], complete: [], failed: [],
  640.       id:       [].send(:extend, MAQJ_SortedArray),
  641.       alphabet: [].send(:extend, MAQJ_SortedArray),
  642.       level:    [].send(:extend, MAQJ_SortedArray)
  643.     }
  644.   end
  645.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646.   # * Get Quest
  647.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  648.   def [](quest_id)
  649.     reset_quest(quest_id) if !@data[quest_id]
  650.     @data[quest_id]
  651.   end
  652.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  653.   # * Set Quest <- Not sure when this would ever be useful.
  654.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  655.   def []=(quest_id, value)
  656.     @data[quest_id] = value
  657.   end
  658.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  659.   # * List
  660.   #    list_type : the type of list to return
  661.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  662.   def list(list_type = :all, sort_type = $game_system.quest_sort_type[list_type])
  663.     sort_type_s = sort_type.to_s
  664.     reverse = !(sort_type_s.sub!(/_r$/, "")).nil?
  665.     sort_type = sort_type_s.to_sym
  666.     list = @sort_arrays[sort_type].select { |quest_id| include?(quest_id, list_type) }
  667.     list.reverse! if reverse
  668.     list.collect { |quest_id| @data[quest_id] }
  669.   end
  670.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  671.   # * Include?
  672.   #    determines whether to include a particular quest depending on list type
  673.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  674.   def include?(quest_id, list_type = :all)
  675.     return false if !revealed?(quest_id)
  676.     case list_type
  677.     when :all then true
  678.     when :complete, :failed, :active then @data[quest_id].status?(list_type)
  679.     else
  680.       @data[quest_id].custom_categories.include?(list_type)
  681.     end
  682.   end
  683.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  684.   # * Revealed?
  685.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  686.   def revealed?(quest_id)
  687.     (!@data[quest_id].nil? && !@data[quest_id].concealed)
  688.   end
  689.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  690.   # * Setup Quest
  691.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  692.   def setup_quest(quest_id)
  693.     return if @data[quest_id]
  694.     @data[quest_id] = Game_Quest.new(quest_id)
  695.     # Open to this quest next time the QJ is opened
  696.     $game_system.last_quest_id = quest_id if QuestData::OPEN_TO_LAST_REVEALED_QUEST
  697.     # Save sorting order in separate arrays to avoid re-sorting every time
  698.     @sort_arrays.keys.each { |sym| add_to_sort_array(sym, quest_id) }
  699.   end
  700.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  701.   # * Delete Quest
  702.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  703.   def delete_quest(quest_id)
  704.     @data.delete(quest_id)
  705.     @sort_arrays.values.each { |ary| ary.delete(quest_id) }
  706.   end
  707.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  708.   # * Reset Quest
  709.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  710.   def reset_quest(quest_id)
  711.     delete_quest(quest_id)
  712.     setup_quest(quest_id)
  713.   end
  714.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  715.   # * Add to Sorted Array
  716.   #    sort_type : array to alter
  717.   #    quest_id  : ID of the quest to add.
  718.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  719.   def add_to_sort_array(sort_type, quest_id)
  720.     @sort_arrays[sort_type].delete(quest_id) # Make sure always unique
  721.     case sort_type
  722.     when :reveal, :change, :complete, :failed
  723.       @sort_arrays[sort_type].unshift(quest_id)
  724.     when :id
  725.       @sort_arrays[sort_type].maqj_insert_sort(quest_id)
  726.     when :alphabet
  727.       @sort_arrays[sort_type].maqj_insert_sort(quest_id) { |a, b| @data[a].name.downcase <=> @data[b].name.downcase }
  728.     when :level
  729.       @sort_arrays[sort_type].maqj_insert_sort(quest_id) { |a, b| @data[a].level <=> self[b].level }
  730.     end
  731.   end
  732.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  733.   # * Find Location
  734.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  735.   def find_location(quest_id, cat = nil)
  736.     if revealed?(quest_id)
  737.       categories = $game_system.quest_categories.dup
  738.       # If cat specified, check in that category first.
  739.       if cat && categories.include?(cat)
  740.         categories.delete(cat)
  741.         categories.unshift(cat)
  742.       end
  743.       for category in categories # Check all categories
  744.         index = list(category).index(@data[quest_id])
  745.         return category, index if index != nil
  746.       end
  747.     end
  748.     return nil, nil
  749.   end
  750.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  751.   # * Clear
  752.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  753.   def clear
  754.     @data.clear
  755.   end
  756. end

  757. #==============================================================================
  758. # ** Game System
  759. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  760. #  Summary of Changes:
  761. #    new attr_accessor - quest_menu_access; quest_map_access; quest_sort_type;
  762. #      quest_bg_picture; quest_bg_opacity; quest_windowskin;
  763. #      quest_window_opacity; quest_access_disabled; last_quest_cat;
  764. #      last_quest_id
  765. #    aliased methods - initialize
  766. #    new methods - init_maqj_data
  767. #==============================================================================

  768. class Game_System
  769.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  770.   # * Public Instance Variables
  771.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  772.   attr_reader   :quest_menu_access     # Whether the scene is called from menu
  773.   attr_accessor :quest_map_access      # Whether the scene is called from map
  774.   attr_accessor :quest_sort_type       # The sort types for each category
  775.   attr_accessor :quest_bg_picture      # The filename of the background picture
  776.   attr_accessor :quest_bg_opacity      # The opacity of the background picture
  777.   attr_accessor :quest_bg_blend_type   # The blend type of the background pic
  778.   attr_accessor :quest_windowskin      # The windowskin used for the scene
  779.   attr_accessor :quest_window_tone     # The tone of windows in the scene
  780.   attr_accessor :quest_window_opacity  # The opacity of windows in the scene
  781.   attr_accessor :quest_access_disabled # Whether access to Quests is disabled
  782.   attr_accessor :quest_categories      # The categories to show in the scene
  783.   attr_accessor :quest_scene_label     # The label to show in the scene
  784.   attr_accessor :last_quest_cat        # The category to open to
  785.   attr_accessor :last_quest_id         # The ID to open to
  786.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  787.   # * Object Initialization
  788.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  789.   alias maqj_initialze_2cy9 initialize
  790.   def initialize(*args, &block)
  791.     maqj_initialze_2cy9(*args, &block)
  792.     init_maqj_data
  793.   end
  794.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  795.   # * Initialize Quest Data
  796.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  797.   def init_maqj_data
  798.     # Initialize new variables
  799.     self.quest_menu_access = QuestData::MENU_ACCESS
  800.     @quest_map_access = QuestData::MAP_ACCESS
  801.     @quest_sort_type = QuestData::SORT_TYPE
  802.     @quest_bg_picture = QuestData::BG_PICTURE
  803.     @quest_bg_opacity = QuestData::BG_OPACITY
  804.     @quest_bg_blend_type = QuestData::BG_BLEND_TYPE
  805.     @quest_windowskin = QuestData::WINDOWSKIN
  806.     @quest_window_tone = QuestData::WINDOW_TONE
  807.     @quest_window_opacity = QuestData::WINDOW_OPACITY
  808.     @quest_access_disabled = false
  809.     @quest_categories = QuestData::CATEGORIES
  810.     @quest_scene_label = QuestData::VOCAB[:scene_label]
  811.     @last_quest_cat = @quest_categories[0]
  812.     @last_quest_id = 0
  813.   end
  814.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  815.   # * Set Quest Menu Access
  816.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  817.   def quest_menu_access=(boolean)
  818.     @quest_menu_access = boolean
  819.     maic_inserted_menu_commands.delete(:quest_journal)
  820.     maic_inserted_menu_commands.push(:quest_journal) if @quest_menu_access
  821.     maic_inserted_menu_commands.sort!
  822.   end
  823. end

  824. #==============================================================================
  825. # ** Game_Party
  826. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  827. #  Summary of Changes:
  828. #    new attr_reader - quests
  829. #    aliased method - initialize
  830. #    new method - init_maqj_data
  831. #==============================================================================

  832. class Game_Party
  833.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  834.   # * Public Instance Variables
  835.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  836.   attr_reader :quests
  837.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  838.   # * Object Initialization
  839.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  840.   alias maqj_intiaze_2si9 initialize
  841.   def initialize(*args, &block)
  842.     maqj_intiaze_2si9(*args, &block) # Call Original Method
  843.     init_maqj_data
  844.   end
  845.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  846.   # * Initialize Quests
  847.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  848.   def init_maqj_data
  849.     @quests = Game_Quests.new # Initialize @quests
  850.   end
  851. end

  852. #==============================================================================
  853. # ** Game_Interpreter
  854. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  855. #  Summary of Changes:
  856. #    new methods - change_quest_access; change_quest_background;
  857. #      change_quest_windows; setup_quest; delete_quest; reset_quest; quest;
  858. #      reveal_quest; conceal_quest; manually_complete_quest;
  859. #      manually_fail_quest; reveal_objective; conceal_objective;
  860. #      complete_objective; uncomplete_objective; fail_objective;
  861. #      unfail_objective; quest_revealed?; quest_complete?; quest_active?;
  862. #      quest_failed?; objective_complete?; objective_active?;
  863. #      objective_failed?; distribute_quest_rewards; distribute_quest_reward;
  864. #      call_quest_journal
  865. #==============================================================================

  866. class Game_Interpreter
  867.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  868.   # * Change Quest Access
  869.   #    sym : symbol representing what aspect of access is being changed
  870.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  871.   def change_quest_access(sym)
  872.     case sym
  873.     when :enable then $game_system.quest_access_disabled = false
  874.     when :disable then $game_system.quest_access_disabled = true
  875.     when :enable_menu then $game_system.quest_menu_access = true
  876.     when :disable_menu then $game_system.quest_menu_access = false
  877.     when :enable_map then $game_system.quest_map_access = true
  878.     when :disable_map then $game_system.quest_map_access = false
  879.     end
  880.   end
  881.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  882.   # * Change Quest Background
  883.   #    picture : picture to show in the scene's background
  884.   #    opacity : opacity of the picture shown in the scene's background
  885.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  886.   def change_quest_background(picture, opacity = $game_system.quest_bg_opacity,
  887.       blend_type = $game_system.quest_bg_blend_type)
  888.     $game_system.quest_bg_picture = picture
  889.     $game_system.quest_bg_opacity = opacity
  890.     $game_system.quest_bg_blend_type = blend_type
  891.   end
  892.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  893.   # * Change Quest Windows
  894.   #    skin    : windowskin name to use in the scene
  895.   #    tone    : tone for the windowskin
  896.   #    opacity : opacity of windows in the scene
  897.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  898.   def change_quest_windows(skin, tone = $game_system.quest_window_tone,
  899.       opacity = $game_system.quest_window_opacity)
  900.     $game_system.quest_windowskin = skin
  901.     $game_system.quest_window_tone = tone
  902.     $game_system.quest_window_opacity = opacity
  903.   end
  904.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  905.   # * Setup/Delete/Reset Quest
  906.   #    quest_id : ID of the quest to be setup or deleted or reset
  907.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  908.   [:setup_quest, :delete_quest, :reset_quest].each { |method|
  909.     define_method(:"quest_#{method}") do |quest_id|
  910.       $game_party.quests.send(method, quest_id)
  911.     end
  912.   }
  913.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  914.   # * Retrieve Quest
  915.   #    quest_id : ID of the quest to retrieve
  916.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  917.   def quest(quest_id);         $game_party.quests[quest_id];      end
  918.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  919.   # * Reveal/Conceal Quest
  920.   #    quest_id : ID of the quest to be revealed or concealed
  921.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  922.   def reveal_quest(quest_id);  quest(quest_id).concealed = false; end
  923.   def conceal_quest(quest_id); quest(quest_id).concealed = true;  end
  924.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  925.   # * Manually Complete/Fail Quest
  926.   #    quest_id : ID of the quest to be revealed or concealed
  927.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  928.   def manually_complete_quest(quest_id)
  929.     quest(quest_id).prime_objectives.clear
  930.     quest(quest_id).manual_status = :complete
  931.   end
  932.   def manually_fail_quest(quest_id)
  933.     quest(quest_id).prime_objectives.clear
  934.     quest(quest_id).manual_status = :failed
  935.   end
  936.   def manually_activate_quest(quest_id)
  937.     quest(quest_id).manual_status = :active
  938.   end
  939.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  940.   # * Reveal/Complete/Fail/Conceal/Uncomplete/Unfail Objective
  941.   #    quest_id : ID of the quest whose objectives will be modified
  942.   #    *obj     : IDs of objectives to reveal or complete or fail (or opposite)
  943.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  944.   [:reveal_objective, :complete_objective, :fail_objective, :conceal_objective,
  945.   :uncomplete_objective, :unfail_objective].each { |method|
  946.     define_method(method) do |quest_id, *obj|
  947.       quest(quest_id).send(method, *obj)
  948.     end
  949.   }
  950.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  951.   # * Quest Revealed?
  952.   #    quest_id : ID of the quest you are checking is revealed
  953.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  954.   def quest_revealed?(quest_id)
  955.     $game_party.quests.revealed?(quest_id)
  956.   end
  957.   [:complete, :failed, :active].each { |method|
  958.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  959.     # * Quest Complete/Failed/Active?
  960.     #    quest_id : ID of the quest whose completion status is being checked
  961.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  962.     define_method(:"quest_#{method}?") do |quest_id|
  963.       quest_revealed?(quest_id) && quest(quest_id).status?(method)
  964.     end
  965.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  966.     # * Objective Complete/Failed/Active?
  967.     #    quest_id : ID of the quest whose objectives are being checked
  968.     #    *obj     : IDs of objectives to check completion status
  969.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  970.     define_method(:"objective_#{method}?") do |quest_id, *obj|
  971.       quest_revealed?(quest_id) && quest(quest_id).objective_status?(method, *obj)
  972.     end
  973.   }
  974.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  975.   # * Objective Revealed?
  976.   #    quest_id : ID of the quest you are checking is revealed
  977.   #    *obj     : IDs of objectives to check completion status
  978.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  979.   def objective_revealed?(quest_id, *obj)
  980.     quest_revealed?(quest_id) && quest(quest_id).objective_status?(:revealed, *obj)
  981.   end
  982.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  983.   # * Quest Rewarded?
  984.   #    quest_id : ID of the quest you are checking is revealed
  985.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  986.   def quest_rewarded?(quest_id)
  987.     quest_revealed?(quest_id) && quest(quest_id).status?(:reward)
  988.   end
  989.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  990.   # * Change Reward Status
  991.   #    quest_id : ID of the quest you are checking is revealed
  992.   #    value    : true or false
  993.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  994.   def change_reward_status(quest_id, value = true)
  995.     quest(quest_id).reward_given = value
  996.   end
  997.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  998.   # * Distribute Rewards
  999.   #    quest_id : ID of the quest whose rewards are to be distributed
  1000.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1001.   def distribute_quest_rewards(quest_id)
  1002.     if quest_revealed?(quest_id) && !quest_rewarded?(quest_id)
  1003.       params = @params.dup
  1004.       change_reward_status(quest_id, true)
  1005.       quest(quest_id).rewards.each { |reward| distribute_quest_reward(reward) }
  1006.       @params = params
  1007.       true
  1008.     else
  1009.       false
  1010.     end
  1011.   end
  1012.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1013.   # * Distribute Reward
  1014.   #    reward : an array identifying the reward
  1015.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1016.   def distribute_quest_reward(reward)
  1017.     @params = [reward[1], 0, 0, (reward[2] ? reward[2] : 1)]
  1018.     case reward[0]
  1019.     when :item, 0 then   command_126 # Item
  1020.     when :weapon, 1 then command_127 # Weapon
  1021.     when :armor, 2 then  command_128 # Armor
  1022.     when :gold, 3   # Gold
  1023.       @params = [0, 0, reward[1] ? reward[1] : 0]
  1024.       command_125
  1025.     when :exp, 4    # Exp
  1026.       @params = [0, 0, 0, 0, reward[1] ? reward[1] : 0, true]
  1027.       command_315
  1028.     end
  1029.   end
  1030.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1031.   # * Call Quest Journal
  1032.   #    quest_id : ID of the quest to open the journal to
  1033.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1034.   def call_quest_journal(quest_id = nil)
  1035.     return if $game_party.in_battle
  1036.     $game_system.last_quest_id = quest_id if quest_id
  1037.     SceneManager.call(Scene_Quest)
  1038.     Fiber.yield
  1039.   end
  1040. end

  1041. unless $imported[:"MA_ParagraphFormat_1.0"]
  1042. #==============================================================================
  1043. # ** MA_Window_ParagraphFormat
  1044. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1045. #  This module inserts into Window_Base and provides a method to format the
  1046. # strings so as to go to the next line if it exceeds a set limit. This is
  1047. # designed to work with draw_text_ex, and a string formatted by this method
  1048. # should go through that, not draw_text.
  1049. #==============================================================================

  1050. module MA_Window_ParagraphFormat
  1051.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1052.   # * Calc Line Width
  1053.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1054.   def mapf_calc_line_width(line, tw = 0, contents_dummy = false)
  1055.     return tw if line.nil?
  1056.     line = line.clone
  1057.     unless contents_dummy
  1058.       real_contents = contents # Preserve Real Contents
  1059.       # Create a dummy contents
  1060.       self.contents = Bitmap.new(contents_width, 24)
  1061.       reset_font_settings
  1062.     end
  1063.     pos = {x: 0, y: 0, new_x: 0, height: calc_line_height(line)}
  1064.     while line[/^(.*?)\e(.*)/]
  1065.       tw += text_size($1).width
  1066.       line = $2
  1067.       # Remove all ancillaries to the code, like parameters
  1068.       code = obtain_escape_code(line)
  1069.       # If direct setting of x, reset tw.
  1070.       tw = 0 if ($imported[:ATS_SpecialMessageCodes] && code.upcase == 'X') ||
  1071.         ($imported["YEA-MessageSystem"] && code.upcase == 'PX')
  1072.       #  If I need to do something special on the basis that it is testing,
  1073.       # alias process_escape_character and differentiate using @atsf_testing
  1074.       process_escape_character(code, line, pos)
  1075.     end
  1076.     #  Add width of remaining text, as well as the value of pos[:x] under the
  1077.     # assumption that any additions to it are because the special code is
  1078.     # replaced by something which requires space (like icons)
  1079.     tw += text_size(line).width + pos[:x]
  1080.     unless contents_dummy
  1081.       contents.dispose # Dispose dummy contents
  1082.       self.contents = real_contents # Restore real contents
  1083.     end
  1084.     return tw
  1085.   end
  1086.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1087.   # * Format Paragraph
  1088.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1089.   def mapf_format_paragraph(text, max_width = contents_width)
  1090.     text = text.clone
  1091.     #  Create a Dummy Contents - I wanted to boost compatibility by using the
  1092.     # default process method for escape codes. It may have the opposite effect,
  1093.     # for some :(
  1094.     real_contents = contents # Preserve Real Contents
  1095.     self.contents = Bitmap.new(contents_width, 24)
  1096.     reset_font_settings
  1097.     paragraph = ""
  1098.     while !text.empty?
  1099.       text.lstrip!
  1100.       oline, nline, tw = mapf_format_by_line(text.clone, max_width)
  1101.       # Replace old line with the new one
  1102.       text.sub!(/#{Regexp.escape(oline)}/m, nline)
  1103.       paragraph += text.slice!(/.*?(\n|$)/)
  1104.     end
  1105.     contents.dispose # Dispose dummy contents
  1106.     self.contents = real_contents # Restore real contents
  1107.     return paragraph
  1108.   end
  1109.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1110.   # * Format By Line
  1111.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1112.   def mapf_format_by_line(text, max_width = contents_width)
  1113.     oline, nline, tw = "", "", 0
  1114.     loop do
  1115.       #  Format each word until reach the width limit
  1116.       oline, nline, tw, done = mapf_format_by_word(text, nline, tw, max_width)
  1117.       return oline, nline, tw if done
  1118.     end
  1119.   end
  1120.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1121.   # * Format By Word
  1122.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1123.   def mapf_format_by_word(text, line, tw, max_width)
  1124.     return line, line, tw, true if text.nil? || text.empty?
  1125.     # Extract next word
  1126.     if text.sub!(/(\s*)([^\s\n\f]*)([\n\f]?)/, "") != nil
  1127.       prespace, word, line_end = $1, $2, $3
  1128.       ntw = mapf_calc_line_width(word, tw, true)
  1129.       pw = contents.text_size(prespace).width
  1130.       if (pw + ntw >= max_width)
  1131.         # Insert
  1132.         if line.empty?
  1133.           # If one word takes entire line
  1134.           return prespace + word, word + "\n", ntw, true
  1135.         else
  1136.           return line + prespace + word, line + "\n" + word, tw, true
  1137.         end
  1138.       else
  1139.         line += prespace + word
  1140.         tw = pw + ntw
  1141.         # If the line is force ended, then end
  1142.         return line, line, tw, true if !line_end.empty?
  1143.       end
  1144.     else
  1145.       return line, line, tw, true
  1146.     end
  1147.     return line, line, tw, false
  1148.   end
  1149. end

  1150. class Window_Base
  1151.   include MA_Window_ParagraphFormat
  1152. end

  1153. $imported[:"MA_ParagraphFormat_1.0"] = true
  1154. end

  1155. #==============================================================================
  1156. # *** MAQJ Window_QuestBase
  1157. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1158. #  This module mixes in with all quest windows
  1159. #==============================================================================

  1160. module MAQJ_Window_QuestBase
  1161.   attr_reader :maqj_objective_color
  1162.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1163.   # * Object Initialization
  1164.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1165.   def initialize(*args, &block)
  1166.     super(*args, &block)
  1167.     reset_font_settings
  1168.     set_data_font(:normal)
  1169.     @maqj_default_font = contents.font.dup
  1170.     # Change the windowskin, tone if they are set to be changed
  1171.     self.windowskin = Cache.system($game_system.quest_windowskin) if $game_system.quest_windowskin
  1172.     self.opacity = $game_system.quest_window_opacity if $game_system.quest_window_opacity
  1173.     self.opacity = 0 ####SR
  1174.   end
  1175.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1176.   # * Reset Font Settings
  1177.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1178.   def reset_font_settings(*args, &block)
  1179.     super(*args, &block)
  1180.     set_data_font(@maqj_font_data_type) if @maqj_font_data_type
  1181.   end
  1182.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1183.   # * Set Data Font
  1184.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1185.   def set_data_font(data_type)
  1186.     @maqj_default_font = contents.font.dup unless @maqj_default_font
  1187.     contents.font.name = QuestData::FONTNAMES[data_type] ?
  1188.       QuestData::FONTNAMES[data_type] : @maqj_default_font.name
  1189.     contents.font.size = QuestData::FONTSIZES[data_type] ?
  1190.       QuestData::FONTSIZES[data_type] : @maqj_default_font.size
  1191.     contents.font.bold = QuestData::FONTBOLDS.keys.include?(data_type) ?
  1192.       QuestData::FONTBOLDS[data_type] : @maqj_default_font.bold
  1193.     contents.font.italic = QuestData::FONTITALICS.keys.include?(data_type) ?
  1194.       QuestData::FONTITALICS[data_type] : @maqj_default_font.italic
  1195.     case data_type
  1196.     when :objectives then change_color(@maqj_objective_color) if @maqj_objective_color
  1197.     when :name then change_color(quest_name_colour(@quest)) if @quest
  1198.     else
  1199.       change_color(text_color(QuestData::COLOURS[data_type])) if QuestData::COLOURS.keys.include?(data_type)
  1200.     end
  1201.   end
  1202.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1203.   # * Draw Horizontal Line
  1204.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1205.   def draw_horizontal_line(y, h = 2)
  1206.     contents.fill_rect(0, y, contents_width, h, text_color(QuestData::COLOURS[:line]))
  1207.     contents.fill_rect(0, y + h, contents_width, [h / 2, 1].max, text_color(QuestData::COLOURS[:line_shadow]))
  1208.   end
  1209.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1210.   # * MA Text Color
  1211.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1212.   def text_color(param)
  1213.     begin
  1214.       colour = case param
  1215.       when Integer then super(param) rescue normal_color
  1216.       when Symbol then send(param) rescue normal_color
  1217.       when Array then Color.new(*param) rescue normal_color
  1218.       else
  1219.         normal_color
  1220.       end
  1221.     end
  1222.     colour.is_a?(Color) ? colour : normal_color
  1223.   end
  1224.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1225.   # * Quest Name Colour
  1226.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1227.   def quest_name_colour(quest = @quest)
  1228.     return if !quest
  1229.     quest = $game_party.quests[quest] if quest.is_a?(Integer)
  1230.     s = [:failed, :complete, :active].find { |status| quest.status?(status) }
  1231.     text_color(QuestData::COLOURS[s])
  1232.   end
  1233.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1234.   # * Quest Objective Colour
  1235.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1236.   def quest_objective_colour(quest, obj_id)
  1237.     return if !quest
  1238.     quest = $game_party.quests[quest] if quest.is_a?(Integer)
  1239.     s = [:failed, :complete, :active].find { |status| quest.objective_status?(status, obj_id) }
  1240.     text_color(QuestData::COLOURS[s])
  1241.   end
  1242.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1243.   # * Update Tone
  1244.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1245.   def update_tone
  1246.     $game_system.quest_window_tone ?
  1247.       self.tone.set(*$game_system.quest_window_tone) : super
  1248.   end
  1249. end

  1250. unless $imported[:"MA_IconHorzCommand_1.0"]
  1251. #==============================================================================
  1252. # ** Window_MA_IconHorzCommand
  1253. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1254. #  This window is a base window to show a horizontal command window populated
  1255. # with icons.
  1256. #==============================================================================

  1257. class Window_MA_IconHorzCommand < Window_HorzCommand
  1258.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1259.   # * Public Instance Variable
  1260.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1261.   attr_reader   :observing_procs
  1262.   attr_accessor :cursor_hide
  1263.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1264.   # * Object Initialization
  1265.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1266.   def initialize(*args, &block)
  1267.     @observing_procs = {}
  1268.     super(*args, &block)
  1269.   end
  1270.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1271.   # * Column Max
  1272.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1273.   def col_max; [(width - standard_padding) / (24 + spacing), item_max].min; end
  1274.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1275.   # * Item
  1276.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1277.   def item
  1278.     @list[index] ? @list[index][:symbol] : nil
  1279.   end
  1280.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1281.   # * Enabled? / Current Item Enabled?
  1282.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1283.   def enable?(index); self.index == index; end
  1284.   def current_item_enabled?; !current_data.nil?; end
  1285.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1286.   # * Draw Item
  1287.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1288.   def draw_item(index)
  1289.     rect = item_rect(index)
  1290.     contents.clear_rect(rect)
  1291.     draw_icon(@list[index][:ext], rect.x + ((rect.width - 24) / 2), rect.y, enable?(index))
  1292.   end
  1293.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1294.   # * Set Index
  1295.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1296.   def index=(index)
  1297.     old_index = self.index
  1298.     super(index)
  1299.     draw_item(old_index)
  1300.     draw_item(self.index)
  1301.   end
  1302.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1303.   # * Frame Update
  1304.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1305.   def update
  1306.     super
  1307.     @observing_procs.values.each { |block| block.call(item) }
  1308.   end
  1309.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1310.   # * Add/Remove Observing Window
  1311.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1312.   def add_observing_proc(id, &block)
  1313.     @observing_procs[id] = block
  1314.     update
  1315.   end
  1316.   def remove_observing_proc(id)     ; @observing_procs.delete(id) ; end
  1317.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1318.   # * Update Cursor
  1319.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1320.   def update_cursor
  1321.     super
  1322.     cursor_rect.empty if @cursor_hide
  1323.   end
  1324. end
  1325. $imported[:"MA_IconHorzCommand_1.0"] = true
  1326. end

  1327. #==============================================================================
  1328. # ** Window_QuestCategory
  1329. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1330. #  This window allows the player to switch between quest categories.
  1331. #==============================================================================

  1332. class Window_QuestCategory < Window_MA_IconHorzCommand
  1333.   include MAQJ_Window_QuestBase
  1334.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1335.   # * Object Initialization
  1336.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1337.   def initialize(x, y, categories = $game_system.quest_categories)
  1338.     @cursor_hide = QuestData::HIDE_CATEGORY_CURSOR
  1339.     @categories = categories
  1340.     super(x, y)
  1341.     #self.opacity = 0 ####SR
  1342.   end
  1343.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1344.   # * Window Width
  1345.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1346.   def window_width; QuestData::LIST_WINDOW_WIDTH; end
  1347.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1348.   # * Category=
  1349.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1350.   def category=(category)
  1351.     self.index = @categories.index(category) if @categories.include?(category)
  1352.   end
  1353.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1354.   # * Make Command List
  1355.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1356.   def make_command_list
  1357.     @categories.each { |cat|
  1358.       add_command("", cat, false, QuestData::ICONS[cat]) }
  1359.   end
  1360. end

  1361. #==============================================================================
  1362. # ** Window QuestLabel
  1363. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1364. #  This window simply shows a label for the Quests scene
  1365. #==============================================================================

  1366. class Window_QuestLabel < Window_Base
  1367.   include MAQJ_Window_QuestBase
  1368.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1369.   # * Object Initialization
  1370.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1371.   def initialize(x, y, label = "")
  1372.     super(x, y, window_width, window_height)
  1373.     #self.opacity = 0 ####SR
  1374.     refresh(label)
  1375.   end
  1376.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1377.   # * Reset Font Settings
  1378.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1379.   def reset_font_settings; set_data_font(:scene_label); end
  1380.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1381.   # * Window Attributes
  1382.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1383.   def window_width
  1384.     w = ($game_system.quest_categories.size > 1 || QuestData::SHOW_CATEGORY_LABEL) ?
  1385.       Graphics.width - QuestData::LIST_WINDOW_WIDTH : QuestData::LIST_WINDOW_WIDTH
  1386.   end
  1387.   def window_height; line_height + (standard_padding*2); end
  1388.   def line_height(*args)
  1389.     line_h = super(*args)
  1390.     QuestData::FONTSIZES[:scene_label] ?
  1391.       [QuestData::FONTSIZES[:scene_label], line_h].max : line_h
  1392.   end
  1393.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1394.   # * Refresh
  1395.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1396.   def refresh(label = @label)
  1397.     @label = label.is_a?(String) ? convert_escape_characters(label) : ""
  1398.     contents.clear
  1399.     reset_font_settings
  1400.     tw = mapf_calc_line_width(@label)
  1401.     draw_text_ex((contents_width - tw) / 2, 0, @label)
  1402.   end
  1403. end

  1404. #==============================================================================
  1405. # ** Window QuestLabel
  1406. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1407. #  This window simply shows a label for category currently selected
  1408. #==============================================================================

  1409. class Window_QuestCategoryLabel < Window_QuestLabel
  1410.   include MAQJ_Window_QuestBase
  1411.   #
  1412.   def initialize(x, y, label = "")
  1413.     super(x, y, label)
  1414.     #self.opacity = 0 ####SR
  1415.   end
  1416.   #
  1417.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1418.   # * Reset Font Settings
  1419.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1420.   def reset_font_settings; set_data_font(:category_label); end
  1421.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1422.   # * Window Attributes
  1423.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1424.   def window_width; QuestData::LIST_WINDOW_WIDTH; end
  1425.   def line_height(*args)
  1426.     line_h = super(*args)
  1427.     QuestData::FONTSIZES[:category_label] ?
  1428.       [QuestData::FONTSIZES[:category_label], line_h].max : line_h
  1429.   end
  1430.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1431.   # * Set Category
  1432.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1433.   def category=(category)
  1434.     return if @category == category
  1435.     @category = category
  1436.     refresh(QuestData::CATEGORY_VOCAB[category])
  1437.   end
  1438. end

  1439. #==============================================================================
  1440. # ** Window_QuestCategoryDummy
  1441. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1442. #  This window shows up behind the category and category label window
  1443. #==============================================================================

  1444. class Window_QuestCategoryDummy < Window_Base
  1445.   include MAQJ_Window_QuestBase
  1446. end

  1447. #==============================================================================
  1448. # ** Window_QuestList
  1449. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1450. #  This window shows all quests in a selected category.
  1451. #==============================================================================

  1452. class Window_QuestList < Window_Selectable
  1453.   include MAQJ_Window_QuestBase
  1454.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1455.   # * Object Initialization
  1456.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1457.   def initialize(x, y, width, height)
  1458.     super
  1459.     @data = []
  1460.     self.index = 0
  1461.     self.opacity = 0 #####SR2
  1462.     activate
  1463.   end
  1464.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1465.   # * Set Category
  1466.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1467.   def category=(category)
  1468.     return if @category == category
  1469.     @category = category
  1470.     refresh
  1471.     self.index = 0
  1472.     update_help if @help_window
  1473.   end
  1474.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1475.   # * Get Quest
  1476.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1477.   def item; @data && index >= 0 ? @data[index] : nil; end
  1478.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1479.   # * Column/Item Max
  1480.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1481.   def col_max; 1; end
  1482.   def item_max; @data ? @data.size : 1; end
  1483.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1484.   # * Whether it should be drawn enabled
  1485.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1486.   def enable?(item); true; end
  1487.   def current_item_enabled?
  1488.     (@help_window && @help_window.maqj_visible_height < @help_window.contents_height)
  1489.   end
  1490.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1491.   # * Make Item List
  1492.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1493.   def make_item_list
  1494.     @data = @category ? $game_party.quests.list(@category) : []
  1495.   end
  1496.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1497.   # * Draw Item
  1498.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1499.   def draw_item(index)
  1500.     quest = @data[index]
  1501.     if quest
  1502.       rect = item_rect_for_text(index)
  1503.       if QuestData::SHOW_QUEST_ICONS
  1504.         draw_icon(quest.icon_index, rect.x, rect.y, enable?(quest))
  1505.         rect.x += 24
  1506.         rect.width -= 24
  1507.       end
  1508.       change_color(quest_name_colour(quest), enable?(quest))
  1509.       draw_text(rect, quest.name)
  1510.     end
  1511.   end
  1512.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1513.   # * Refresh
  1514.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1515.   def refresh
  1516.     make_item_list
  1517.     create_contents
  1518.     set_data_font(:list)
  1519.     draw_all_items
  1520.   end
  1521.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1522.   # * Update Help
  1523.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1524.   def update_help
  1525.     @help_window.quest = item
  1526.   end
  1527. end

  1528. #==============================================================================
  1529. # ** Window_QuestData
  1530. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1531. #  This window shows all quest data
  1532. #==============================================================================

  1533. class Window_QuestData < Window_Selectable
  1534.   include MAQJ_Window_QuestBase
  1535.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1536.   # * Object Initialization
  1537.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1538.   def initialize(x, y, w, h, layout = QuestData::DATA_LAYOUT)
  1539.     @dest_scroll_oy = 0
  1540.     super(x, y, w, h)
  1541.     @dest_scroll_oy = self.oy
  1542.     self.layout = layout
  1543.     self.opacity = 0 #####SR2
  1544.   end
  1545.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1546.   # * Contents Height
  1547.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1548.   alias maqj_visible_height contents_height
  1549.   def contents_height
  1550.     @q_contents_height ? [@q_contents_height, maqj_visible_height].max : maqj_visible_height
  1551.   end
  1552.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1553.   # * Calculate Contents Height
  1554.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1555.   def calc_contents_height
  1556.     @q_contents_height = 0
  1557.     @layout.each { |dt| @q_contents_height += data_height(dt) } if @quest
  1558.   end
  1559.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1560.   # * Draw Data?
  1561.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1562.   def draw_data?(data_type)
  1563.     case data_type
  1564.     when :line then true
  1565.     when :level then @quest.level > 0
  1566.     when :objectives then [email protected]_objectives.empty?
  1567.     when Array then (data_type - [:line]).any? { |dt| draw_data?(dt) }
  1568.     else [email protected](data_type).empty? # :description, :name, etc...
  1569.     end
  1570.   end
  1571.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1572.   # * Get Data Height
  1573.   #    This method calculates the height required for a specified element of
  1574.   #   the current quest. This is to calculate the needed space in contents,
  1575.   #   as well as advance the @draw_y variable.
  1576.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1577.   def data_height(data_type)
  1578.     return 0 unless draw_data?(data_type)
  1579.     return line_height if QuestData::BASIC_DATA_TYPES.include?(data_type)
  1580.     @maqj_font_data_type = data_type
  1581.     reset_font_settings
  1582.     return case data_type
  1583.     when :line, :level, :name then line_height
  1584.     when :banner
  1585.       bmp = Cache.picture(@quest.banner)
  1586.       hght = bmp.rect.height
  1587.       bmp.dispose
  1588.       hght
  1589.     when :description
  1590.       buff = description_x*2
  1591.       paragraph = mapf_format_paragraph(@quest.description, contents_width - buff)
  1592.       line_num = paragraph.scan(/\n/).size + 1
  1593.       line_num += (QuestData::DESCRIPTION_IN_BOX ? 2 :
  1594.         !QuestData::VOCAB[:description].empty? ? 1 : 0)
  1595.       line_num*line_height
  1596.     when :objectives
  1597.       objectives = @quest.revealed_objectives.collect { |obj_id|
  1598.         @quest.objectives[obj_id] }
  1599.       line_num = QuestData::VOCAB[:objectives].empty? ? 0 : 1
  1600.       buff = (objective_x*2) + text_size(QuestData::VOCAB[:objective_bullet]).width
  1601.       objectives.each { |obj|
  1602.         paragraph = mapf_format_paragraph(obj, contents_width - buff)
  1603.         line_num += paragraph.scan(/\n/).size + 1 }
  1604.       line_num*line_height
  1605.     when :rewards
  1606.       line_num = QuestData::VOCAB[:rewards].empty? ? 0 : 1
  1607.       (line_num + @quest.rewards.size)*line_height
  1608.     when Array then data_height(data_type.max_by { |dt| data_height(dt) })
  1609.     else 0
  1610.     end
  1611.   end
  1612.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1613.   # * Set Quest
  1614.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1615.   def quest=(value)
  1616.     return if @quest == value
  1617.     @quest = value
  1618.     @layout = (@quest && @quest.layout) ? @quest.layout : @default_layout
  1619.     refresh
  1620.   end
  1621.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1622.   # * Set Layout
  1623.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1624.   def layout=(value)
  1625.     return if @default_layout == value && @layout == value
  1626.     @default_layout = value
  1627.     @layout = value
  1628.     refresh
  1629.   end
  1630.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1631.   # * Refresh
  1632.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1633.   def refresh
  1634.     contents.clear
  1635.     calc_contents_height
  1636.     create_contents
  1637.     return unless @quest && @layout
  1638.     self.oy = 0
  1639.     @dest_scroll_oy = 0
  1640.     #  The basic idea here is that each draw_ method will rely on and advance
  1641.     # the @draw_y variable. Where they are an array, the elements will be
  1642.     # drawn at the same @draw_y.
  1643.     @draw_y = 0
  1644.     @layout.each {|dt|
  1645.       next unless draw_data?(dt)
  1646.       dt.is_a?(Array) ? draw_data_array(dt) : draw_data(dt)
  1647.     }
  1648.   end
  1649.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1650.   # * Draw Data
  1651.   #    data_type : the data block to draw next
  1652.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1653.   def draw_data(data_type)
  1654.     @maqj_font_data_type = data_type
  1655.     reset_font_settings
  1656.     send(:"draw_#{data_type}") if self.class.method_defined?(:"draw_#{data_type}")
  1657.     @draw_y += data_height(data_type)
  1658.   end
  1659.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1660.   # * Draw Data Array
  1661.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1662.   def draw_data_array(layout_array)
  1663.     y, max_y = @draw_y, @draw_y
  1664.     # Draw each data aspect at the same starting @draw_y
  1665.     layout_array.each { |dt|
  1666.       @draw_y = y
  1667.       draw_data(dt)
  1668.       max_y = @draw_y if @draw_y > max_y
  1669.     }
  1670.     @draw_y = max_y
  1671.   end
  1672.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1673.   # * Draw Line
  1674.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1675.   def draw_line; draw_horizontal_line(@draw_y + (line_height / 2) - 1, 2); end
  1676.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1677.   # * Draw Name
  1678.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1679.   def draw_name
  1680.     set_data_font(:name)
  1681.     clear_and_draw_text(0, @draw_y, contents_width, line_height, @quest.name, 1)
  1682.   end
  1683.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1684.   # * Draw Level
  1685.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1686.   def draw_level
  1687.     case QuestData::LEVEL_ICON
  1688.     when Array then QuestData::LEVEL_ICON.empty? ? draw_level_text : draw_level_array
  1689.     when 0 then draw_level_text
  1690.     else
  1691.       draw_level_stacked
  1692.     end
  1693.   end
  1694.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1695.   # * Draw Stacked Level
  1696.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1697.   def draw_level_stacked(icon_index = QuestData::LEVEL_ICON)
  1698.     align = QuestData::HEADING_ALIGN[:level]
  1699.     es = QuestData::LEVEL_ICONS_SPACE*(@quest.level - 1)
  1700.     x = align == 2 ? contents_width - 24 : align == 1 ?
  1701.       (contents_width - 24 - (es)) / 2 : es
  1702.     @quest.level.times do
  1703.       draw_icon(icon_index, x, @draw_y)
  1704.       x -= QuestData::LEVEL_ICONS_SPACE
  1705.     end
  1706.   end
  1707.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1708.   # * Draw Array Level
  1709.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1710.   def draw_level_array(icon_index = QuestData::LEVEL_ICON)
  1711.     return if icon_index.empty?
  1712.     icon_index = icon_index[@quest.level - 1] ? icon_index[@quest.level - 1] : icon_index[-1]
  1713.     align = QuestData::HEADING_ALIGN[:level]
  1714.     x = align == 2 ? contents_width - 24 : align == 1 ? (contents_width-24)/2 : 0
  1715.     draw_icon(icon_index, x, @draw_y)
  1716.   end
  1717.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1718.   # * Draw Text Level
  1719.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1720.   def draw_level_text
  1721.     reset_font_settings
  1722.     level = QuestData::LEVEL_SIGNALS && QuestData::LEVEL_SIGNALS[@quest.level - 1] ?
  1723.       QuestData::LEVEL_SIGNALS[@quest.level - 1] : @quest.level.to_s
  1724.     align = QuestData::HEADING_ALIGN[:level]
  1725.     tw = text_size(QuestData::VOCAB[:level]).width + 4
  1726.     tw2 = text_size(level).width + 2
  1727.     space = contents_width - tw - tw2
  1728.     x = align == 2 ? space : align == 1 ? space / 2 : 0
  1729.     clear_and_draw_text(x, @draw_y, tw, line_height, QuestData::VOCAB[:level])
  1730.     set_data_font(:level_signal)
  1731.     clear_and_draw_text(x + tw, @draw_y, tw2, line_height, level, 2)
  1732.   end
  1733.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1734.   # * Draw Banner
  1735.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1736.   def draw_banner
  1737.     bmp = Cache.picture(@quest.banner) # Get Picture
  1738.     # Shift the hue if requested
  1739.     bmp.hue_change(@quest.banner_hue) unless @quest.banner_hue == 0
  1740.     x = (contents_width - bmp.rect.width) / 2
  1741.     if x < 0 # Stretch horizontally if the banner is too wide
  1742.       dest_rect = bmp.rect.dup
  1743.       dest_rect.width = contents_width
  1744.       contents.stretch_blt(dest_rect, bmp, bmp.rect)
  1745.     else
  1746.       contents.blt(x, @draw_y, bmp, bmp.rect)
  1747.     end
  1748.     bmp.dispose
  1749.   end
  1750.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1751.   # * Draw Description
  1752.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1753.   def draw_description
  1754.     buff = description_x*2
  1755.     paragraph = mapf_format_paragraph(@quest.description, contents_width - buff)
  1756.     y = @draw_y
  1757.     # Draw Rect
  1758.     draw_box(paragraph.scan(/\n/).size + 1) if QuestData::DESCRIPTION_IN_BOX
  1759.     # Draw Description Label
  1760.     draw_heading(:description, y) unless QuestData::VOCAB[:description].empty?
  1761.     # Draw Description
  1762.     y += line_height if !QuestData::VOCAB[:description].empty? || QuestData::DESCRIPTION_IN_BOX
  1763.     draw_text_ex(description_x, y, paragraph)
  1764.   end
  1765.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1766.   # * Draw Objectives
  1767.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1768.   def draw_objectives
  1769.     y = @draw_y
  1770.     unless QuestData::VOCAB[:objectives].empty?
  1771.       draw_heading(:objectives, y)
  1772.       y += line_height
  1773.     end
  1774.     @quest.revealed_objectives.each { |obj_id| y = draw_objective(obj_id, y) }
  1775.   end
  1776.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1777.   # * Draw Objective
  1778.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1779.   def draw_objective(obj_id, y)
  1780.     bullet = QuestData::VOCAB[:objective_bullet]
  1781.     bullet_tw = text_size(bullet).width + 2
  1782.     buff = (objective_x*2) + bullet_tw
  1783.     paragraph = mapf_format_paragraph(@quest.objectives[obj_id], contents_width - buff)
  1784.     line_num = 1 + paragraph.scan(/\n/).size
  1785.     # Since draw_text_ex resets the font, set colour here
  1786.     @maqj_objective_color = quest_objective_colour(@quest, obj_id)
  1787.     change_color(text_color(QuestData::COLOURS[:objective_bullet]))
  1788.     draw_text(objective_x, y, bullet_tw, line_height, sprintf(bullet, obj_id + 1))
  1789.     draw_text_ex(objective_x + bullet_tw, y, paragraph)
  1790.     @maqj_objective_color = false
  1791.     y += (line_num*line_height)
  1792.   end
  1793.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1794.   # * Draw Rewards
  1795.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1796.   def draw_rewards
  1797.     y = @draw_y
  1798.     unless QuestData::VOCAB[:rewards].empty?
  1799.       draw_heading(:rewards, y)
  1800.       y += line_height
  1801.     end
  1802.     for i in [email protected] do draw_reward(i, y + i*line_height) end
  1803.   end
  1804.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1805.   # * Draw Reward
  1806.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1807.   def draw_reward(r_id, y)
  1808.     reward = @quest.rewards[r_id]
  1809.     case reward[0]
  1810.     when :item, 0   # Item
  1811.       draw_item_reward(y, $data_items[reward[1]], reward[2] ? reward[2] : 1)
  1812.     when :weapon, 1 # Weapon
  1813.       draw_item_reward(y, $data_weapons[reward[1]], reward[2] ? reward[2] : 1)
  1814.     when :armor, 2  # Armor
  1815.       draw_item_reward(y, $data_armors[reward[1]], reward[2] ? reward[2] : 1)
  1816.     when :gold, 3   # Gold
  1817.       draw_basic_data(y, QuestData::ICONS[:reward_gold],
  1818.         QuestData::VOCAB[:reward_gold], (reward[1] ? reward[1] : 0).to_s)
  1819.     when :exp, 4    # Exp
  1820.       draw_basic_data(y, QuestData::ICONS[:reward_exp],
  1821.         QuestData::VOCAB[:reward_exp], (reward[1] ? reward[1] : 0).to_s)
  1822.     when :string, 5 # String
  1823.       draw_basic_data(y, reward[1] ? reward[1] : 0, reward[3] ? reward[3] : "",
  1824.         reward[2] ? reward[2] : "")
  1825.     end
  1826.   end
  1827.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1828.   # * Draw Item Reward
  1829.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1830.   def draw_item_reward(y, item, amount = 1)
  1831.     w = contents_width
  1832.     w = QuestData::BASIC_DATA_WIDTH if QuestData::BASIC_DATA_WIDTH.between?(1, w)
  1833.     x = (contents_width - w) / 2
  1834.     draw_item_name(item, x, y, true, w - 40)
  1835.     if amount > 1
  1836.       change_color(text_color(QuestData::COLOURS[:reward_amount]))
  1837.       draw_text(x + w - 40, y, 40, line_height, sprintf(QuestData::VOCAB[:reward_amount], amount), 2)
  1838.     end
  1839.   end
  1840.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1841.   # * Draw Basic Data Methods
  1842.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1843.   QuestData::BASIC_DATA_TYPES.each { |data_type|
  1844.     define_method(:"draw_#{data_type}") {
  1845.       draw_basic_data(@draw_y, QuestData::ICONS[data_type],
  1846.         QuestData::VOCAB[data_type], @quest.send(data_type))
  1847.     }
  1848.   }
  1849.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1850.   # * Draw Basic Data
  1851.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1852.   def draw_basic_data(y, icon_index, vocab, value)
  1853.     w = contents_width
  1854.     w = QuestData::BASIC_DATA_WIDTH if QuestData::BASIC_DATA_WIDTH.between?(1, w)
  1855.     x = (contents_width - w) / 2
  1856.     unless icon_index == 0
  1857.       draw_icon(icon_index, x, y)
  1858.       x += 24
  1859.       w -= 24
  1860.     end
  1861.     tw = text_size(vocab).width
  1862.     #change_color(text_color(QuestData::COLOURS[:basic_label]))
  1863.     draw_text(x, y, tw + 16, line_height, vocab)
  1864.     change_color(text_color(QuestData::COLOURS[:basic_value]))
  1865.     draw_text(x + tw, y, w - tw, line_height, value, 2)
  1866.   end
  1867.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1868.   # * Draw Heading
  1869.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1870.   def draw_heading(data_type, y)
  1871.     set_data_font(:heading)
  1872.     clear_and_draw_text(40, y, contents_width - 80, line_height,
  1873.       QuestData::VOCAB[data_type], QuestData::HEADING_ALIGN[data_type])
  1874.     reset_font_settings
  1875.   end
  1876.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1877.   # * Clear and Draw Text
  1878.   #    Clear the field before drawing the text
  1879.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1880.   def clear_and_draw_text(*args)
  1881.     rect = []
  1882.     while !args[0].is_a?(String) do rect.push(args.shift) end
  1883.     rect[0].is_a?(Rect) ? rect = rect[0] : rect = Rect.new(*rect)
  1884.     align = args[1] ? args[1] : 0
  1885.     ts = text_size(args[0])
  1886.     ts.width = [ts.width + 4, rect.width].min
  1887.     align == 1 ? ts.x = rect.x + ((rect.width - ts.width) / 2) :
  1888.       align == 2 ? ts.x = rect.x + rect.width - ts.width : ts.x = rect.x
  1889.     ts.y = rect.y
  1890.     contents.clear_rect(ts)
  1891.     ts.x += 2
  1892.     draw_text(ts, args[0], align)
  1893.   end
  1894.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1895.   # * Draw Description Box
  1896.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1897.   def draw_box(line_num)
  1898.     return if line_num < 1
  1899.     x = (line_height / 2) - 1
  1900.     y = @draw_y + (line_height / 2) - 1
  1901.     w = contents_width - 2*x
  1902.     h = (1 + line_num)*line_height
  1903.     draw_rect_outline_with_shadow(x, y, w, h)
  1904.   end
  1905.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1906.   # * Draw Rect Outline
  1907.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1908.   def draw_rect_outline(x, y, w, h, colour)
  1909.     # Horizontal Lines
  1910.     contents.fill_rect(x, y, w, 2, colour)
  1911.     contents.fill_rect(x, y + h - 2, w, 2, colour)
  1912.     # Vertical Lines
  1913.     contents.fill_rect(x, y, 2, h, colour)
  1914.     contents.fill_rect(x + w - 2, y, 2, h, colour)
  1915.   end
  1916.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1917.   # * Draw Rect Outline with Shadow
  1918.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1919.   def draw_rect_outline_with_shadow(x, y, w, h)
  1920.     draw_rect_outline(x + 1, y + 1, w, h, text_color(QuestData::COLOURS[:line_shadow]))
  1921.     draw_rect_outline(x, y, w, h, text_color(QuestData::COLOURS[:line]))
  1922.   end
  1923.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1924.   # * Objective/Description X
  1925.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1926.   def objective_x; line_height / 2; end
  1927.   def description_x; QuestData::DESCRIPTION_IN_BOX ? line_height : (line_height/2); end
  1928.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1929.   # * Update
  1930.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1931.   def update(*args, &block)
  1932.     super(*args, &block)
  1933.     if open? && active && @dest_scroll_oy == self.oy
  1934.       scroll_down if Input.press?(:DOWN)
  1935.       scroll_up if Input.press?(:UP)
  1936.     end
  1937.     if self.oy != @dest_scroll_oy
  1938.       mod = (@dest_scroll_oy <=> self.oy)
  1939.       self.oy += 3*mod
  1940.       self.oy = @dest_scroll_oy if (@dest_scroll_oy <=> self.oy) != mod
  1941.     end
  1942.   end
  1943.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1944.   # * Scroll Down
  1945.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1946.   def scroll_down(*args, &block)
  1947.     max_oy = contents_height - maqj_visible_height
  1948.     dest = ((@dest_scroll_oy / line_height) + 1)*line_height
  1949.     @dest_scroll_oy = [dest, max_oy].min
  1950.   end
  1951.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1952.   # * Scroll Up
  1953.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1954.   def scroll_up(*args, &block)
  1955.     dest = ((@dest_scroll_oy / line_height) - 1)*line_height
  1956.     @dest_scroll_oy = [dest, 0].max
  1957.   end
  1958. end

  1959. #==============================================================================
  1960. # ** Scene_Quest
  1961. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1962. #  This class handles processing for the Quest scene
  1963. #==============================================================================

  1964. class Scene_Quest < Scene_MenuBase
  1965.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1966.   # * Start Scene Processing
  1967.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1968.   def start
  1969.     super
  1970.     @init_category, @init_quest_index = $game_party.quests.find_location($game_system.last_quest_id, $game_system.last_quest_cat)
  1971.     create_maqj_picture unless $game_system.quest_bg_picture.empty?
  1972.     create_all_windows
  1973.     adjust_window_positions
  1974.   end
  1975.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1976.   # * Terminate Scene
  1977.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1978.   def terminate
  1979.     $game_system.quest_categories = QuestData::CATEGORIES
  1980.     $game_system.quest_scene_label = QuestData::VOCAB[:scene_label]
  1981.     $game_system.last_quest_id = @quest_list_window.item ? @quest_list_window.item.id : 0
  1982.     $game_system.last_quest_cat = @quest_category_window.item
  1983.     super
  1984.     dispose_maqj_picture
  1985.   end
  1986.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1987.   # * Create Background Picture
  1988.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1989.   def create_maqj_picture
  1990.     @maqj_picture_sprite = Sprite.new
  1991.     @maqj_picture_sprite.bitmap = Cache.picture($game_system.quest_bg_picture)
  1992.     @maqj_picture_sprite.opacity = $game_system.quest_bg_opacity
  1993.     @maqj_picture_sprite.blend_type = $game_system.quest_bg_blend_type
  1994.     @maqj_picture_sprite.z = @background_sprite.z + 1 if @background_sprite
  1995.   end
  1996.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1997.   # * Create All Windows
  1998.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1999.   def create_all_windows
  2000.     create_quest_label_window unless $game_system.quest_scene_label.empty?
  2001.     create_quest_category_window if $game_system.quest_categories.size > 1
  2002.     create_quest_category_label_window if QuestData::SHOW_CATEGORY_LABEL
  2003.     create_dummy_category_window if QuestData::CATEGORY_LABEL_IN_SAME_WINDOW &&
  2004.       @quest_category_window && @quest_category_label_window
  2005.     create_quest_list_window
  2006.     create_quest_data_window
  2007.   end
  2008.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009.   # * Create QuestLabel Window
  2010.   #    This window shows the name of the scene
  2011.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2012.   def create_quest_label_window
  2013.     @quest_label_window = Window_QuestLabel.new(0, 0, $game_system.quest_scene_label)
  2014.   end
  2015.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2016.   # * Create QuestCategory Window
  2017.   #    This window allows the player to switch categories.
  2018.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2019.   def create_quest_category_window
  2020.     @quest_category_window = Window_QuestCategory.new(0, 0, $game_system.quest_categories)
  2021.     @quest_category_window.category = @init_category if @init_category
  2022.     @quest_category_window.set_handler(:cancel, method(:on_category_cancel))
  2023.     @quest_category_window.set_handler(:ok, method(:on_category_ok))
  2024.   end
  2025.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2026.   # * Create QuestCategoryLabel Window
  2027.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2028.   def create_quest_category_label_window
  2029.     if @quest_category_window
  2030.       @quest_category_label_window = Window_QuestCategoryLabel.new(0, @quest_category_window.height)
  2031.       @quest_category_window.add_observing_proc(:label) { |category|
  2032.         @quest_category_label_window.category = category }
  2033.     else
  2034.       @quest_category_label_window = Window_QuestCategoryLabel.new(0, 0)
  2035.       @quest_category_label_window.category = $game_system.quest_categories ? $game_system.quest_categories[0] : :all
  2036.     end
  2037.   end
  2038.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2039.   # * Create Dummy Category Label Window
  2040.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2041.   def create_dummy_category_window
  2042.     @quest_category_label_window.y -= 12
  2043.     @quest_category_label_window.opacity = 0
  2044.     @quest_category_window.opacity = 0
  2045.     w = [@quest_category_window.width, @quest_category_label_window.width].max
  2046.     h = @quest_category_window.height + @quest_category_label_window.height - 12
  2047.     @category_dummy_window = Window_QuestCategoryDummy.new(0, 0, w, h)
  2048.     @category_dummy_window.z = [@quest_category_window.z, @quest_category_label_window.z].min - 1
  2049.     # Draw Horz Line
  2050.     @category_dummy_window.draw_horizontal_line(@quest_category_window.height - @quest_category_window.padding - 7, 2)
  2051.   end
  2052.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2053.   # * Create QuestList Window
  2054.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2055.   def create_quest_list_window
  2056.     if @category_dummy_window
  2057.       y = @category_dummy_window.height
  2058.     else
  2059.       y = @quest_category_window ? @quest_category_window.height : 0
  2060.       y += @quest_category_label_window ? @quest_category_label_window.height : 0
  2061.       y = @quest_label_window.height if y == 0
  2062.     end
  2063.     @quest_list_window = Window_QuestList.new(0, y, QuestData::LIST_WINDOW_WIDTH,
  2064.       Graphics.height - y)
  2065.     @quest_list_window.set_handler(:ok, method(:on_list_ok))
  2066.     if !QuestData::CONCURRENT_ACTIVITY
  2067.       @quest_list_window.deactivate
  2068.       @quest_list_window.set_handler(:cancel, method(:on_list_cancel))
  2069.     end
  2070.     if @quest_category_window
  2071.       @quest_category_window.add_observing_proc(:list) { |category|
  2072.         @quest_list_window.category = category }
  2073.     else
  2074.       @quest_list_window.category = $game_system.quest_categories[0]
  2075.     end
  2076.     @quest_list_window.index = @init_quest_index if @init_quest_index
  2077.   end
  2078.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2079.   # * Create QuestData Window
  2080.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2081.   def create_quest_data_window
  2082.     x = @quest_list_window.width
  2083.     y = (@quest_label_window && (@quest_category_window ||
  2084.       @quest_category_label_window)) ? @quest_label_window.height : 0
  2085.     @quest_data_window = Window_QuestData.new(x, y, Graphics.width - x,
  2086.       Graphics.height - y)
  2087.     @quest_list_window.help_window = @quest_data_window
  2088.     @quest_data_window.quest = @quest_list_window.item
  2089.     @quest_data_window.set_handler(:ok, method(:on_data_ok))
  2090.     @quest_data_window.set_handler(:cancel, method(:on_data_cancel))
  2091.   end
  2092.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2093.   # * Dispose Background Picture
  2094.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2095.   def dispose_maqj_picture
  2096.     @maqj_picture_sprite.dispose if @maqj_picture_sprite
  2097.   end
  2098.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2099.   # * Adjust Window Positions
  2100.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2101.   def adjust_window_positions
  2102.     if @quest_label_window && (@quest_category_window || @quest_category_label_window)
  2103.       @quest_label_window.x = QuestData::LIST_WINDOW_WIDTH
  2104.     end
  2105.   end
  2106.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2107.   # * Category OK
  2108.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2109.   def on_category_ok; @quest_list_window.activate; end
  2110.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2111.   # * Category Cancel
  2112.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2113.   def on_category_cancel; return_scene; end
  2114.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2115.   # * List OK
  2116.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2117.   def on_list_ok
  2118.     @quest_category_window.deactivate
  2119.     @quest_data_window.activate
  2120.   end
  2121.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2122.   # * List Cancel
  2123.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2124.   def on_list_cancel; @quest_category_window.activate; end
  2125.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2126.   # * Data OK
  2127.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2128.   def on_data_ok; on_data_cancel; end
  2129.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2130.   # * Data Cancel
  2131.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2132.   def on_data_cancel
  2133.     @quest_list_window.activate
  2134.     @quest_category_window.activate if QuestData::CONCURRENT_ACTIVITY
  2135.   end
  2136.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2137.   # * Update All Windows
  2138.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2139.   def update_all_windows(*args, &block)
  2140.     # To accomodate for concurrent activity, must deactivate category
  2141.     @quest_category_window.deactivate if QuestData::CONCURRENT_ACTIVITY &&
  2142.       @quest_list_window.active && Input.trigger?(:C)
  2143.     super(*args, &block)
  2144.     @quest_category_window.activate if QuestData::CONCURRENT_ACTIVITY &&
  2145.       @quest_list_window.active
  2146.   end
  2147. end

  2148. #==============================================================================
  2149. # ** Scene_Map
  2150. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2151. #  Summary of Changes:
  2152. #    aliased method - update_scene
  2153. #    new methods - update_call_quest_journal; call_quest_journal
  2154. #==============================================================================

  2155. class Scene_Map
  2156.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2157.   # * Update Scene
  2158.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2159.   alias maqj_updascne_9kh4 update_scene
  2160.   def update_scene(*args, &block)
  2161.     maqj_updascne_9kh4(*args, &block)
  2162.     update_call_quest_journal if $game_system.quest_map_access && !scene_changing?
  2163.   end
  2164.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2165.   # * Update Call Quest Journal
  2166.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2167.   def update_call_quest_journal
  2168.     if $game_map.interpreter.running?
  2169.       @quest_journal_calling = false
  2170.     else
  2171.       if Input.trigger?(QuestData::MAP_BUTTON)
  2172.         $game_system.quest_access_disabled || $game_party.quests.list.empty? ?
  2173.           Sound.play_buzzer : @quest_journal_calling = true
  2174.       end
  2175.       call_quest_journal if @quest_journal_calling && !$game_player.moving?
  2176.     end
  2177.   end
  2178.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2179.   # * Call Quest Journal
  2180.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2181.   def call_quest_journal
  2182.     @quest_journal_calling = false
  2183.     Sound.play_ok
  2184.     SceneManager.call(Scene_Quest)
  2185.   end
  2186. end

  2187. # Menu Access
  2188. if !$imported[:MA_InsertCommand]
  2189. # Initialize the Insertion Hash
  2190. MA_COMMAND_INSERTS = {}
  2191. MA_InsertableMenuCommand = Struct.new(:name, :index, :enable, :scene, :other)

  2192. #==============================================================================
  2193. # ** Game_System
  2194. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2195. #  Summary of Changes:
  2196. #    new public instance variable - maic_menu_commands
  2197. #    aliased method - initialize
  2198. #==============================================================================

  2199. class Game_System
  2200.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2201.   # * Inserted Menu Commands
  2202.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2203.   def maic_inserted_menu_commands
  2204.     # Lazy Instantiation so that old save files are not corrupted
  2205.     if !@maic_inserted_menu_commands
  2206.       @maic_inserted_menu_commands = MA_COMMAND_INSERTS.keys
  2207.       # Sort by index
  2208.       @maic_inserted_menu_commands.sort! { |a, b| MA_COMMAND_INSERTS[a].index <=> MA_COMMAND_INSERTS[b].index }
  2209.     end
  2210.     @maic_inserted_menu_commands
  2211.   end
  2212. end

  2213. #==============================================================================
  2214. # ** Window_MenuCommand
  2215. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2216. #  Summary of Changes:
  2217. #    aliased method - make_command_list; maic_insert_command
  2218. #==============================================================================

  2219. class Window_MenuCommand
  2220.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2221.   # * Make Command List
  2222.   #``````````````````````````````````````````````````````````````````````````
  2223.   #  I alias this method instead of add_original_commands because I need to
  2224.   # have all commands created before I can insert at the correct index
  2225.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2226.   alias maic_mkcmmndl_6yd2 make_command_list
  2227.   def make_command_list(*args, &block)
  2228.     maic_mkcmmndl_6yd2(*args, &block) # Run Original Method
  2229.     # Insert new commands
  2230.     $game_system.maic_inserted_menu_commands.each { |sym| maic_insert_command(sym) }
  2231.   end
  2232.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2233.   # * Insert Command
  2234.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2235.   def maic_insert_command(symbol)
  2236.     command = MA_COMMAND_INSERTS[symbol]
  2237.     # Get the command name
  2238.     name = command.name.is_a?(Symbol) ? eval(command.name.to_s) : command.name
  2239.     # Check whether enabled
  2240.     enabled = case command.enable
  2241.     when Integer then command.enable == 0 ? true : $game_switches[command.enable]
  2242.     when String then eval(command.enable)
  2243.     when Symbol then self.send(command.enable)
  2244.     else
  2245.       enabled = true
  2246.     end
  2247.     # Add the command to the list
  2248.     add_command(name, symbol, enabled)
  2249.     added = @list.pop
  2250.     @list.insert([command.index, @list.size].min, added) # Insert at specific index
  2251.   end
  2252. end

  2253. #==============================================================================
  2254. # ** Scene_Menu
  2255. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2256. #  Summary of Changes:
  2257. #    aliased method - create_command_window; on_personal_ok
  2258. #    new methods - maic_set_insert_handler; maic_command_insert
  2259. #==============================================================================

  2260. class Scene_Menu
  2261.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2262.   # * Create Command Window
  2263.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2264.   alias maic_createcndwin_3ey7 create_command_window
  2265.   def create_command_window(*args, &block)
  2266.     maic_createcndwin_3ey7(*args, &block) # Run Original Method
  2267.     # Add handlers for all custom commands
  2268.     $game_system.maic_inserted_menu_commands.each { |symbol| maic_set_insert_handler(symbol) }
  2269.   end
  2270.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2271.   # * Set Inserted Handler
  2272.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2273.   def maic_set_insert_handler(symbol)
  2274.     other = MA_COMMAND_INSERTS[symbol].other
  2275.     handler = case other
  2276.     when Symbol then method(other)
  2277.     when String then lambda { eval(other) }
  2278.     when TrueClass then method(:command_personal)
  2279.     else
  2280.       handler = method(:maic_command_insert)
  2281.     end
  2282.     @command_window.set_handler(symbol, handler)
  2283.   end
  2284.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2285.   # * Custom Command
  2286.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2287.   def maic_command_insert
  2288.     SceneManager.call(Kernel.const_get(MA_COMMAND_INSERTS[@command_window.current_symbol].scene))
  2289.   end
  2290.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2291.   # * Personal OK
  2292.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2293.   alias maic_onpok_3ek9 on_personal_ok
  2294.   def on_personal_ok(*args, &block)
  2295.     if $game_system.maic_inserted_menu_commands.include?(@command_window.current_symbol)
  2296.       maic_command_insert
  2297.     else
  2298.       maic_onpok_3ek9(*args, &block) # Run Original Method
  2299.     end
  2300.   end
  2301. end

  2302. $imported[:MA_InsertCommand] = true
  2303. end

  2304. MA_COMMAND_INSERTS[:quest_journal] =
  2305.   MA_InsertableMenuCommand.new(QuestData::VOCAB[:menu_label], QuestData::MENU_INDEX,
  2306.   "!$game_system.quest_access_disabled && !$game_party.quests.list.empty?",
  2307.   :Scene_Quest, false)
复制代码
在哪里设置?  

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10074
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

2
发表于 2015-4-18 13:46:45 | 只看该作者
目测这个脚本没有这个功能,大概是另一个脚本为选项添加了图标,去对应的脚本里设置
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
237 小时
注册时间
2014-9-14
帖子
38
3
 楼主| 发表于 2015-4-18 13:58:17 | 只看该作者
VIPArcher 发表于 2015-4-18 13:46
目测这个脚本没有这个功能,大概是另一个脚本为选项添加了图标,去对应的脚本里设置 ...

。。我是脚本白痴 求教如何修改或添加
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10074
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

4
发表于 2015-4-18 14:02:28 | 只看该作者
本帖最后由 VIPArcher 于 2015-4-18 23:20 编辑
jiazaixime 发表于 2015-4-18 13:58
。。我是脚本白痴 求教如何修改或添加


你又没给工程/范例/脚本,鬼知道该怎么做啊。

这里的7楼有个脚本可以做到类似的事。你自己看着办吧。
https://rpg.blue/forum.php?mod=r ... 781&pid=2493209

RUBY 代码复制
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Command Window Icons v1.00
  4. # -- Last Updated: 2011.12.11
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-CommandWindowIcons"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2011.12.11 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # Here's a script that allows you to allocate icons to each of your commands
  22. # provided that the text for the command matches the icon in the script. There
  23. # are, however, some scripts that this won't be compatible with and it's due
  24. # to them using unique way of drawing out their commands. This script does not
  25. # maintain compatibility for those specific scripts.
  26. #
  27. #==============================================================================
  28. # ▼ Instructions
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # To install this script, open up your script editor and copy/paste this script
  31. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  32. #
  33. # Go to the module and match the text under ICON_HASH with a proper Icon ID.
  34. # You can find an icon's ID by opening up the icon select window in the RPG
  35. # Maker VX Ace database and look in the lower left corner.
  36. #
  37. #==============================================================================
  38. # ▼ Compatibility
  39. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  40. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  41. # it will run with RPG Maker VX without adjusting.
  42. #
  43. #==============================================================================
  44.  
  45. module YEA
  46.   module COMMAND_WINDOW_ICONS
  47.  
  48.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  49.     # - Icon Hash -
  50.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  51.     # This hash controls all of the icon data for what's used with each text
  52.     # item. Any text items without icons won't display icons. The text has to
  53.     # match with the hash (case sensitive) to display icons.
  54.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  55.     ICON_HASH ={
  56.     # Matching Text   => Icon ID,
  57.       "开始"      => 224,    # Title scene.
  58.       "继续"      => 230,    # Title scene.
  59.       "退出"      => 368,    # Title scene. Game End scene.
  60.       "消除"      => 265,    # Title scene. Game End scene.
  61.       "周目"      => 243,    # Title scene. Game End scene.
  62.  
  63.       "战斗"         => 386,    # Battle scene.
  64.       "撤退"        => 328,    # Battle scene.
  65.       "进攻"        => 116,    # Battle scene.
  66.       "防御"        => 506,    # Battle scene.
  67.       "自动"        => 248,    # Battle scene.
  68.       "候补"        => 355,    # Battle scene.
  69.  
  70.  
  71.       "特技"         => 128,    # Skill scene. Battle scene.
  72.       "魔法"         => 136,    # Skill scene. Battle scene.
  73.  
  74.       "物品"         => 260,    # Menu scene. Item scene. Battle scene.
  75.       "职业"         => 238,
  76.       "图片收集"     => 729,# Menu scene. Item scene. Battle scene.
  77.       "队伍变更"     => 352,    # Menu scene. Item scene. Battle scene.
  78.       "睡眠"        => 6,    # Menu scene. Item scene. Battle scene.
  79.       "合成"        => 217,    # Menu scene. Item scene. Battle scene.
  80.       "淫语朗诵"    => 122,    # Menu scene. Item scene. Battle scene.
  81.       "技能"        => 143,    # Menu scene.
  82.       "装备"        => 111,    # Menu scene.
  83.       "整队"        => 11,    # Menu scene.
  84.       "技能升级"         => 115,    # Menu scene.
  85.       "伙伴"        => 165,    # Menu scene.
  86.       "状态"        => 121,    # Menu scene.
  87.       "情报"        =>  12,    # Menu scene.
  88.       "学习技能"        =>  232,    # Menu scene.
  89.       "性格"        =>  176,    # Menu scene.
  90.       "商店"        =>  165,    # Menu scene.
  91.       "设置"        =>  226,    # Menu scene.
  92.       "物品图鉴"        =>  231,    # Menu scene.
  93.       "异事录"        =>  728,    # Menu scene.
  94.       "任务确认"        =>  235,    # Menu scene.
  95.       "声音控制"        =>  4,    # Menu scene.
  96.       "传送"        =>  215,    # Menu scene.
  97.       "魔法世界"        =>  519,    # Menu scene.
  98.       "事件商店"        =>  241,    # Menu scene.
  99.       "证件"        =>  230,    # Menu scene.
  100.       "存档"          => 286,    # Menu scene.
  101.       "结束冒险"         => 368,    # Menu scene.
  102.       "援护"        => 338,    # Menu scene.
  103.  
  104.       "装备变更"         => 202,    # Equip scene.
  105.       "最强装备"         => 1,    # Equip scene.
  106.       "全部卸下"         => 337,    # Equip scene.
  107.  
  108.       "主要职业"         => 233,    # Class scene.
  109.       "次要职业"         => 234,    # Class scene.
  110.  
  111.       "交换"         => 377,    # Party scene.
  112.       "离队"     => 378,    # Party scene.
  113.       "还原"         => 379,    # Party scene.
  114.       "完成"         => 380,    # Party scene.
  115.  
  116.       "武器"         => 386,    # Item scene.
  117.       "防具"        => 436,    # Item scene.
  118.       "贵重物品"     => 243,    # Item scene.
  119.  
  120.       "再次挑战"      => 172,    # Title scene. Game End scene.
  121.       "回到标题"      => 224,    # Game End scene.
  122.       "取消"        => 119,    # Game End scene.
  123.     } # Do not remove this.
  124.  
  125.   end # COMMAND_WINDOW_ICONS
  126. end # YEA
  127.  
  128. #==============================================================================
  129. # ▼ Editting anything past this point may potentially result in causing
  130. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  131. # halitosis so edit at your own risk.
  132. #==============================================================================
  133.  
  134. #==============================================================================
  135. # ■ Window_Command
  136. #==============================================================================
  137.  
  138. class Window_Command < Window_Selectable
  139.  
  140.   #--------------------------------------------------------------------------
  141.   # new method: use_icon?
  142.   #--------------------------------------------------------------------------
  143.   def use_icon?(text)
  144.     return YEA::COMMAND_WINDOW_ICONS::ICON_HASH.include?(text)
  145.   end
  146.  
  147.   #--------------------------------------------------------------------------
  148.   # new method: command_icon
  149.   #--------------------------------------------------------------------------
  150.   def command_icon(text)
  151.     return YEA::COMMAND_WINDOW_ICONS::ICON_HASH[text]
  152.   end
  153.  
  154.   #--------------------------------------------------------------------------
  155.   # overwrite method: draw_item
  156.   #--------------------------------------------------------------------------
  157.   def draw_item(index)
  158.     enabled = command_enabled?(index)
  159.     change_color(normal_color, enabled)
  160.     rect = item_rect_for_text(index)
  161.     text = command_name(index)
  162.     if use_icon?(text)
  163.       draw_icon_text(rect.clone, text, alignment, enabled)
  164.     else
  165.       draw_text(rect, text, alignment)
  166.     end
  167.   end
  168.  
  169.   #--------------------------------------------------------------------------
  170.   # new method: draw_icon_text
  171.   #--------------------------------------------------------------------------
  172.   def draw_icon_text(rect, text, alignment, enabled)
  173.     cw = text_size(text).width
  174.     icon = command_icon(text)
  175.     draw_icon(icon, rect.x, rect.y, enabled)
  176.     rect.x += 24
  177.     rect.width -= 24
  178.     draw_text(rect, text, alignment)
  179.   end
  180.  
  181. end # Window_Command
  182.  
  183. #==============================================================================
  184. #
  185. # ▼ End of File
  186. #
  187. #==============================================================================

点评

终于可以咯! 太感谢了  发表于 2015-4-19 08:55
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

5
发表于 2015-4-18 14:27:15 | 只看该作者
把你的容错脚本删了看报错少文件的位置就知道是在哪里改了
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
237 小时
注册时间
2014-9-14
帖子
38
6
 楼主| 发表于 2015-4-18 14:37:17 | 只看该作者
VIPArcher 发表于 2015-4-18 14:02
你又没给工程/范例/脚本,鬼知道该怎么做啊。

这里的7楼有个脚本可以做到类似的事。你自己看着办 ...

_(:з」∠)_ 为什么用你那个之后没反应
是我用错方法了吗 还是说要加在某个脚本中

点评

我那个贴子里的那个脚本不完整。。。  发表于 2015-4-18 23:19
你复制过来的脚本里应该有个在指令前设置图标的脚本,如果没有...(─.─|||,百度下 超级整合90 里边有个设置图标的脚本。  发表于 2015-4-18 21:25
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-16 13:34

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表