Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
=================================
Monster Catalogue
Version: 1.1
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Description:
This script creates a scene that you can call which shows data on any and
# all monsters you have collected. You can change the exact point at which
# data will show up. By default, the script will show only ?????? for any
# monsters not yet fought, but once they are first encountered by the
player
# then the monster's name, battler, and stats will show up. There are
options
# to change that though. For instance, you could make it so that only the
# and to show the stats you will need to use a special analyze item, which
# skill's notebox.
Additionally, you can give the enemies species and use different
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Instructions:
Paste this script into its own slot in the Script Editor, above Main but
# below Materials.
This script can be mostly plug & play, but there are a few configuration
The most important options are from lines 102-263, and I explain what
# each option does in a comment directly preceding it, so I will ask you to
#````````````````````````````````````````````````````````````````````````````
``
Catalogue scene. You can use \N to go to the next line, and you can
also use any normal message codes like \c[n], \v[n], etc... If you do
not want to give monsters descriptions, you can turn the window off by
\species[id] - This allows you to give each enemy a species, which will be
#
shown by its icon and text directly below the monster's name in the
data
window. You set up the species in the :species array at line 187.
in the catalogue. It is useful for dummy monsters or, for instance, boss
monsters. You can hide or reveal a monster using the following codes in
hide_monster(id)
reveal_monster(id)
you can then add to your monster catalogue to make navigation easier.
\icon[index] - This lets you set an icon for each monster, which will then
#````````````````````````````````````````````````````````````````````````````
``
#
will
skill, which means that when it is used, a data window on the enemy
You can use analyze status as a criterion for showing data, etc. in the
#````````````````````````````````````````````````````````````````````````````
``
encounter_monster(id)
analyze_monster(id)
hide_monster(id)
This will set it so the identified monster will not show up in the
reveal_monster(id)
call_monster_catalogue
#=============================================
=================================
$imported ||= {}
$imported[:MA_MonsterCatalogue] = true
MAMC_CONFIG = {
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Useful Options
#````````````````````````````````````````````````````````````````````````````
# The first four options all have this in common - they can be set to one of
:always
:encounter - The value to be shown will be shown once the monster has
:analyze - The value to be shown will be shown once the monster has
#````````````````````````````````````````````````````````````````````````````
that hidden enemies will never show up, regardless of your choice here,
and also note that unless either the battler or data are to be shown,
at that enemy in the catalogue? Note that if the data is shown, the
x/y where x is the amount of monsters you have completed (as per the
nor the stats are shown, this replaces the name of the monster. If you
actually still want the name to be shown, then you can put "%s" as the
value.
data is shown for the monster. You also must set the corresponding text
valid values for this are: :mhp, :mmp, :atk, :def, :mat, :mdf, :agi,
:luk, :hit, :eva, :cri, :exp, :gold, :cev, :mev, :mrf, :cnt, :hrg, :mrg,
:trg, :tgr, :grd, :rec, :pha, :mcr, :tcr, :pdr, :mdr, :fdr, and :exr.
#
by
then that word will be drawn. However, if you make :"Label" a symbol
putting a colon before the quotation marks, then the text shown will be
#
put
# EXAMPLE Lines:
# where the Enemy's Attack is 45, the enemy's hit rate is 95, and the
name
shows up as:
shows up as:
ATK
DMG
45
45
shows up as:
HIT
95%
# :stats_label - This is the label placed just above the Stats section.
# :species - This allows you to give monsters species, and the icon and
name
of the species will show up underneath its name once data is revealed.
[icon_index, "name"],
\species_id[n]
:species => [
[335, "Monster"],
[291, "Beast"],
# ID: 1 - Monster
# ID: 2 - Beast
[339, "Undead"],
# ID: 3 - Undead
[121, "Human"],
# ID: 4 - Human
],
:menu_index => 4,
do want this feature on, however, then there is an option to have the
\silhouette["Filename", hue]
hue is an integer between 0 and 360 and setss the graphic's hue
# :categories - This lets you create categories of monsters, and the setup is
identical to :species (see line 191). The first entry in the array must
However, the next ones can be whatever you want. To add an enemy to
category, you just need to put the following code into its notebox:
\category[x]
Where x is the ID of the category you want to put it in. One monster can
be in as many categories as you want, so you can put more in, like this:
\category[x, y, z]
:categories => [
],
It must be an array of the IDs of the above set categories. If you only
put in one number, then the category window won't be shown in the
whether it should just rely on the fact that only the icon of the
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Superfluous options
#````````````````````````````````````````````````````````````````````````````
# :desc_window_lines - This allows you to choose how many lines will fit in
description.
:desc_window_lines => 2,
# :sort_by - This allows you to choose how the monsters are sorted in the
:id - The monsters will be ordered from the smallest ID to the largest
# :number_by - This option allows you to number the monsters in the list. It
number will show up in. %d is where the number will show up, so "%d. "
1. name
2. name (etc.)
(1) name
# :frame_width - The width, in pixels of the frame for the monster data.
:frame_width => 2,
region of the window. This sets the opacity for that section of the
battler.
use the first font in the array that the player has installed.
shown to the left of each monster's name in the list. To set what icon
will show, you would use the following code in a notebox of an Enemy:
\icon[index]
value to true and, if you do not directly set an icon for a monster,
#````````````````````````````````````````````````````````````````````````````
# Colours - the next seven options all set colours for various things. They
windowskin palette.
Array - if an array, it must have between three and four entries and
the first three will be the rgb values and the last is optional and
#````````````````````````````````````````````````````````````````````````````
# :system_colour - This allows you to change the colour of all of the labels
# :normal_colour - This allows you to change the colour of all of the values
shadow.
# :species_colour - This allows you to select the colour for the species name
:species_colour => 8,
# :complete_colour - This allows you to select the colour the completion stat
:complete_colour => 3,
#````````````````````````````````````````````````````````````````````````````
completion stat will simply be drawn centred. If the string isn't empty,
then this text will be drawn on the left in system_color and the
allows you to choose how it shows up. The first %d will be replaced by
the number completed and the second %d will be replaced by the total
allows you to choose how it shows up. The %.1f will be replaced by the
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#////////////////////////////////////////////////////////////////////////////
MAMC_CONFIG[:shown_categories] = [0] if
MAMC_CONFIG[:shown_categories].empty?
#=============================================
=================================
# ** RPG::UsableItem
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#=============================================
=================================
class RPG::UsableItem
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Analyze Item
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def mamc_analyze?
@mamc_analyze
end
end
#=============================================
=================================
# ** RPG::Enemy
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
silhouette_battler; mamc_hide?
#=============================================
=================================
class RPG::Enemy
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Description
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if !@mamc_description
if note[/\\(DESCRIPTION|DESC)\{(.+?)\}/im]
@mamc_description = $2
@mamc_description.gsub!(/[\r\n]/, "")
@mamc_description.gsub!(/\\[Nn]/, "\n")
end
end
@mamc_description
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Icon Index
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if !@mamc_icon_index
if note[/\\ICON\[\s*(\d+)\s*\]/i]
@mamc_icon_index = $1.to_i
elsif MAMC_CONFIG[:inherit_species_icon]
# Species Icon
end
end
@mamc_icon_index
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Species ID
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def species_id
if !@mamc_species_id
end
@mamc_species_id
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Category IDs
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def category_ids
if !@mamc_category_ids
@mamc_category_ids = [0]
if self.note[/\\CATEGOR(Y|IES)\[(.+?)\]/i] != nil
end
end
@mamc_category_ids
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Hide?
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def mamc_hide?
@mamc_hide
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Silhouette Battler
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def silhouette_battler
if !@mamc_silhouette_battler
@mamc_silhouette_battler = []
if self.note[/\\SILHOUETTE\[\s*["'](.+?)["'][,;:\s]*H?(\d*)\s*\]/i]
@mamc_silhouette_battler.push($2.to_i)
@mamc_silhouette_battler.unshift($1.gsub(/[\r\n]/, ""))
end
end
@mamc_silhouette_battler
end
end
#=============================================
=================================
# ** Game_System
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#
mamc_encounter_monster; mamc_analyze_monster;
mamc_data_conditions_met?
#=============================================
=================================
class Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Encounter/Analyze Array
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
define_method(:"mamc_#{method}_ary") do
instance_variable_set(:"@mamc_#{method}_ary", []) if
instance_variable_get(:"@mamc_#{method}_ary").nil?
instance_variable_get(:"@mamc_#{method}_ary")
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Encounter/Analyze Monster
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
define_method(:"mamc_#{method}_monster") do |*args|
ary = send(:"mamc_#{method}_ary")
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Hidden Array
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def mamc_hide_ary
if !@mamc_hide_ary
@mamc_hide_ary = []
$data_enemies.compact.each { |enemy|
@mamc_hide_ary.push(enemy.id) if enemy.mamc_hide? }
end
@mamc_hide_ary
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else
false
end
end
end
#=============================================
=================================
# ** Game_Enemy
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#=============================================
=================================
class Game_Enemy
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_accessor :mamc_analyze_now
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Die/Transform
#``````````````````````````````````````````````````````````````````````````
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias_method(:"mamc_enem#{meth}_2aw1", meth)
define_method(meth) do |*args|
send(:"mamc_enem#{meth}_2aw1", *args)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if item.mamc_analyze?
$game_system.mamc_analyze_monster(enemy.id)
@mamc_analyze_now = true
@result.success = true
end
end
end
#=============================================
=================================
# ** Game_Interpreter
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
reveal_monster; call_monster_catalogue
#=============================================
=================================
class Game_Interpreter
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Encounter/Analyze Monster
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
define_method(:"#{method}_monster") do |*args|
$game_system.send(:"mamc_#{method}_monster", *args)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Hide/Reveal Monster
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def hide_monster(monster_id)
$game_system.mamc_hide_ary.push(monster_id) unless
$game_system.mamc_hide_ary.include?(monster_id)
end
def reveal_monster(monster_id)
$game_system.mamc_hide_ary.delete(monster_id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def call_monster_catalogue
return if $game_party.in_battle
SceneManager.call(Scene_MonsterCatalogue)
Fiber.yield
end
end
#=============================================
=================================
# *** MAMC_WindowAdditions
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
module MAMC_WindowAdditions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
super(*args, &block)
self.windowskin = Cache.system(MAMC_CONFIG[:windowskin]) if
MAMC_CONFIG[:windowskin]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
define_method(method) do |*args|
super(*args)
contents.font.name = MAMC_CONFIG[:font_name] if
MAMC_CONFIG[:font_name]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * MA Text Color
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def text_color(param)
begin
else
normal_color
end
end
end
def normal_color
c = MAMC_CONFIG[:normal_colour]
end
def system_color
c = MAMC_CONFIG[:system_colour]
end
end
#=============================================
=================================
# ** Window_MonsterCategory
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
include MAMC_WindowAdditions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_reader :monsterlist_window
attr_reader :label_window
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Window Width
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def window_width
MAMC_CONFIG[:list_window_width]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Column Max
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def col_max
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def current_item_enabled?
!current_data.nil?
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def make_command_list
MAMC_CONFIG[:shown_categories].each { |cat|
ary = MAMC_CONFIG[:categories][cat]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Item
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_item(index)
rect = item_rect(index)
contents.clear_rect(rect)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Enabled?
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def enable?(index)
self.index == index
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Set Index
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def index=(index)
old_index = self.index
super(index)
draw_item(old_index)
draw_item(self.index)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Frame Update
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update
super
@monsterlist_window.category = MAMC_CONFIG[:shown_categories]
[index] if @monsterlist_window
@label_window.category = MAMC_CONFIG[:shown_categories][index] if
@label_window
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def monsterlist_window=(monsterlist_window)
@monsterlist_window = monsterlist_window
update
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def label_window=(label_window)
@label_window = label_window
update
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Cursor
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update_cursor
super
cursor_rect.empty if MAMC_CONFIG[:hide_category_cursor]
end
end
#=============================================
=================================
# ** Window_MonsterCategoryLabel
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
include MAMC_WindowAdditions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize(x, y)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Refresh
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
contents.clear
change_color(system_color)
contents.font.bold = true
contents.font.bold = false
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Completion
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_completion(x, y)
if !MAMC_CONFIG[:completion_label].empty?
change_color(system_color)
align = 2
else
align = 1
end
a, b = get_completion
colour = a == b ? text_color(MAMC_CONFIG[:complete_colour]) :
normal_color
change_color(colour)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Get Completion
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def get_completion
a, b = 0, 0
$data_enemies.compact.each { |enemy|
if enemy.category_ids.include?(@category) && !
$game_system.mamc_hide_ary.include?(enemy.id)
b += 1
a += 1 if $game_system.mamc_data_conditions_met?
(MAMC_CONFIG[:complete_when], enemy.id)
end
return a, b
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Completion String
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def completion_to_s(x, y)
return "" if y == 0
case MAMC_CONFIG[:show_completion]
else
""
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Set Category
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def category=(category)
@category = category
refresh
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Window Width
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def window_width
MAMC_CONFIG[:list_window_width]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Window Height
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def window_height
hght
end
end
#=============================================
=================================
# ** Window_MonsterList
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
include MAMC_WindowAdditions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
super
@data = []
self.index = 0
activate
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Set Category
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def category=(category)
@category = category
refresh
self.index = 0
self.oy = 0
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Column Max
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def col_max
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Item Maximum
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def item_max
@data ? @data.size : 1
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Get monster
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def item
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def current_item_enabled?
enable?(@data[index])
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def include?(item)
$game_system.mamc_data_conditions_met?
(MAMC_CONFIG[:show_entry_when], item.id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def enable?(item)
$game_system.mamc_data_conditions_met?
(MAMC_CONFIG[:show_battler_when], item.id) ||
$game_system.mamc_data_conditions_met?
(MAMC_CONFIG[:show_data_when], item.id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def make_item_list
case MAMC_CONFIG[:sort_by]
when :alphabet
when :encounter
encounter_order = $game_system.mamc_encounter_ary.reverse
encounter_order.each { |id|
a = @data.delete($data_enemies[id])
@data.unshift($data_enemies[id]) if a != nil
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Item
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_item(index)
item = @data[index]
if item
rect = item_rect_for_text(index)
enable = enable?(item)
change_color(normal_color, enable)
if show_name?(item)
if MAMC_CONFIG[:show_monster_icon]
else
draw_text(rect, item.name)
end
else
if MAMC_CONFIG[:show_monster_icon]
rect.x += 24
rect.width -= 24
end
draw_text(rect, sprintf(MAMC_CONFIG[:absent_monster_name],
item.name))
end
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Number
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
end
tw = contents.text_size(string).width
draw_text(rect, string)
rect.x += tw
rect.width -= tw
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Refresh
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def refresh
make_item_list
create_contents
draw_all_items
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Help
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update_help
end
end
#=============================================
=================================
# ** Window_MonsterCard
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
include MAMC_WindowAdditions
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_reader :monster_id
attr_reader :monster
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
refresh(0)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Refresh
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if monster_id.is_a?(Game_Enemy)
@monster = monster_id
@monster_id = @monster.enemy.id
else
@monster_id = monster_id
end
contents.clear
reset_font_settings
w = MAMC_CONFIG[:frame_width]
end
draw_frame
if show_data?
# Draw Species
# Draw Stats
draw_stats
end
update_help
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Frame
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_frame
w = MAMC_CONFIG[:frame_width]
wdth = contents_width - 2 - w
hght = contents_height - 2 - w
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
w = MAMC_CONFIG[:frame_width]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
w = MAMC_CONFIG[:frame_width]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_stats_label
w = MAMC_CONFIG[:frame_width]
contents.font.bold = true
stw = text_size(MAMC_CONFIG[:stats_label]).width + 8
lx = 34
y = stat_y + (line_height / 2)
change_color(text_color(MAMC_CONFIG[:frame_colour]))
reset_font_settings
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src_rect.y = clear_hght
end
bmp.dispose
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Name
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_name(x, y)
change_color(normal_color)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Species
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_species(x, y)
draw_icon(icon_index, x, y)
change_color(text_color(MAMC_CONFIG[:species_colour]))
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Stats
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_stats
x = 6 + MAMC_CONFIG[:frame_width]*2
y = stat_y + line_height
stats = shown_stats
for i in 0...stats.size
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Stat
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stat_val = stat_value(stat)
label = MAMC_CONFIG[:shown_stats][stat]
tw = text_size(stat_val).width + 4
change_color(system_color)
change_color(normal_color)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Show Data?
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$game_system.mamc_data_conditions_met?
(MAMC_CONFIG[:show_data_when], monster_id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
show_data?(monster_id) || $game_system.mamc_data_conditions_met?
(MAMC_CONFIG[:show_battler_when], monster_id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bmp = get_battler(silhouette)
# Maximum Parameters
# Draw Battler
if fits
else
end
dummy_bmp
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Get Battler
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if silhouette
if !monster.enemy.silhouette_battler.empty?
begin
return Cache.battler(*monster.enemy.silhouette_battler)
rescue
end
end
bmp_to_silhouette(Cache.battler(monster.battler_name,
monster.battler_hue).dup)
else
Cache.battler(monster.battler_name, monster.battler_hue)
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def bmp_to_silhouette(bmp)
colour = text_color(MAMC_CONFIG[:silhouette_colour])
for i in 0...bmp.width
for j in 0...bmp.height
pa = bmp.get_pixel(i, j).alpha
if pa != 0
colour.alpha = pa
bmp.set_pixel(i, j, colour)
end
end
end
bmp
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Battler Rect
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dest_rect = bmp.rect.dup
if !fits
end
# Centre Battler
else
dest_rect.y = 8
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Showable Stats
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def shown_stats
stats
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Monster Name
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def monster_name
sprintf(MAMC_CONFIG[:absent_monster_name], monster.enemy.name)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Stat Value
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def stat_value(stat)
if $imported[:MA_EnemyStatVariance]
if param_id != nil
stat_val = monster.enemy.params[param_id]
plus = 0
monster.enemy.maesv_add_params.each { |param_var|
if param_var[0] == param_id
if param_var[2]
else
plus += (param_var[1] - 1)
end
end
end
end
stat_val = monster.send(stat)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Stat Y
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def stat_y
y = contents_height - (1 + MAMC_CONFIG[:frame_width]*2)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Help
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update_help
end
end
#=============================================
=================================
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
module MAMC_BattleMonsterCard
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Stat
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
case stat
else
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Stat Value
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def stat_value(stat)
stat_val = monster.send(stat)
end
end
#=============================================
=================================
# ** Scene_Battle
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
close_monstercard_window
#=============================================
=================================
class Scene_Battle
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
create_monstercard_window
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_monstercard_window
x = (Graphics.width - @status_window.width) / 2
@monstercard_window = Window_MonsterCard.new(x, 0,
@status_window.width, Graphics.height - @status_window.height)
@monstercard_window.openness = 0
@monstercard_window.send(:extend, MAMC_BattleMonsterCard)
@monstercard_window.set_handler(:cancel, lambda
{ close_monster_card_window })
@monstercard_window.set_handler(:ok, lambda
{ close_monster_card_window })
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Analyze Monster
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def mamc_analyze_monster(target)
target.mamc_analyze_now = false
@monstercard_window.monster = target
@monstercard_window.open
@monstercard_window.activate
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Frame Update
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if @monstercard_window.active
update_basic
else
$game_troop.members.each { |enemy|
if enemy.class.method_defined?(:mamc_analyze_now) &&
enemy.mamc_analyze_now
mamc_analyze_monster(enemy)
return
end
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def close_monster_card_window
$imported["YEA-BattleEngine"] ? @monstercard_window.openness = 0 :
@monstercard_window.close
end
end
#=============================================
=================================
# ** Scene_Map
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#=============================================
=================================
class Scene_Map
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Scene
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mamc_updatscen_2wh5(*args, &block)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update_call_monster_catalogue
if $game_map.interpreter.running?
@monster_catalogue_calling = false
else
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def call_monster_catalogue
@monster_catalogue_calling = false
Sound.play_ok
SceneManager.call(Scene_MonsterCatalogue)
end
end if MAMC_CONFIG[:map_access]
# Menu Access
MA_COMMAND_INSERTS = {}
#=============================================
=================================
# ** Game_System
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#=============================================
=================================
class Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def maic_inserted_menu_commands
if !@maic_inserted_menu_commands
@maic_inserted_menu_commands = MA_COMMAND_INSERTS.keys
# Sort by index
@maic_inserted_menu_commands.sort! { |a, b|
MA_COMMAND_INSERTS[a].index <=> MA_COMMAND_INSERTS[b].index }
end
@maic_inserted_menu_commands
end
end
#=============================================
=================================
# ** Window_MenuCommand
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#=============================================
=================================
class Window_MenuCommand
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#``````````````````````````````````````````````````````````````````````````
# have all commands created before I can insert at the correct index
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$game_system.maic_inserted_menu_commands.each { |sym|
maic_insert_command(sym) }
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Insert Command
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def maic_insert_command(symbol)
command = MA_COMMAND_INSERTS[symbol]
else
enabled = true
end
added = @list.pop
end
end
#=============================================
=================================
# ** Scene_Menu
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
# Summary of Changes:
#=============================================
=================================
class Scene_Menu
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$game_system.maic_inserted_menu_commands.each { |symbol|
maic_set_insert_handler(symbol) }
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def maic_set_insert_handler(symbol)
other = MA_COMMAND_INSERTS[symbol].other
else
handler = method(:maic_command_insert)
end
@command_window.set_handler(symbol, handler)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Custom Command
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def maic_command_insert
SceneManager.call(Kernel.const_get(MA_COMMAND_INSERTS[@command_win
dow.current_symbol].scene))
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Personal OK
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if $game_system.maic_inserted_menu_commands.include?
(@command_window.current_symbol)
maic_command_insert
else
end
end
end
$imported[:MA_InsertCommand] = true
end
if MAMC_CONFIG[:menu_access]
MA_COMMAND_INSERTS[:monster_catalogue] =
MA_InsertableMenuCommand.new(MAMC_CONFIG[:menu_label],
end
#=============================================
=================================
#+++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++
#=============================================
=================================
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Start
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def start
super
create_help_window
create_categorylabel_window
create_category_window
create_monstercard_window
create_monsterlist_window
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_help_window
if MAMC_CONFIG[:desc_window_lines] > 0
@help_window = Window_Help.new(MAMC_CONFIG[:desc_window_lines])
@help_window.send(:extend, MAMC_WindowAdditions)
@help_window.windowskin = Cache.system(MAMC_CONFIG[:windowskin])
if MAMC_CONFIG[:windowskin]
@help_window.reset_font_settings
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_categorylabel_window
@categorylabel_window = Window_MonsterCategoryLabel.new(0, 0)
@categorylabel_window.category = MAMC_CONFIG[:shown_categories][0]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_category_window
@category_window = Window_MonsterCategory.new(0,
@categorylabel_window.height)
@category_window.label_window = @categorylabel_window
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_monstercard_window
x = MAMC_CONFIG[:list_window_width]
@monstercard_window.set_handler(:cancel, method(:return_scene))
@monstercard_window.activate
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_monsterlist_window
y = @category_window ? @category_window.y +
@category_window.height : @categorylabel_window.height
@monsterlist_window = Window_MonsterList.new(0, y,
MAMC_CONFIG[:list_window_width], hght)
@monsterlist_window.category = MAMC_CONFIG[:shown_categories][0]
@monsterlist_window.help_window = @monstercard_window
@category_window.monsterlist_window = @monsterlist_window if
@category_window
end
end