Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Trickster's Bestiary Script Edit - Replace Battlers w/ Image of Choice

mawk

Sponsor

Hello again, you helpful gents you. I'm going to try to avoid being incredibly vague this time around, so bear with me, and please tell me if I'm lacking necessary information. Thanks in advance.

Miek's spiel
I've decided to go the sideview battle way of things, yea, the labor-intensive road and all that. With luck I'll have the mojo to completely phase out the RTP sprites in battle and make new ones for everything, but that's beside the point.

Having a bunch of side-view enemy sprites in Trickster's Bestiary would look ugly and waste a lot of space. A couple enemies I'd like to flesh out in much more detail, as the side view battles, while much prettier and more involved, just wouldn't do them justice. To this end, I'd like to be able to bypass the Bestiary's automatic image retrieval and instead choose an image to accompany each enemy.

To be edited:
This should be some form of edit to Trickster's Bestiary, found here:
http://www.rmxp.org/forums/showthread.php?t=17461

What I want, written in what I hope is a concise and informative manner:
I want to be able to select an image to be displayed on an enemy's Bestiary page, instead of the script automatically placing its battler there. Perhaps something in the form of the description insertion code:
{
1 => 'This is a description!',
2 => 'This is also a description!'
}
Where, instead of text, you enter the picture file's location.
{
1 => 'graphics/pictures/ghost1.png',
2 => 'graphics/pictures/ghost2.png'
}
That's not necessarily how it'd look (after all, my knowledge of Ruby nearly matches a fish's knowledge of an airplane's controls,) but it should at least give an idea of the functionality I'm shooting for.

Is that enough information? Credit and eternal love will be given, as is customary.
 

mawk

Sponsor

Really?

Thankyouthankyouthankyouthankyou. :0

I'll totally credit you. If you'd like anything more than that ('cause I admit a scrolling name is pretty paltry,) just give the word and be it within mine powers, it shall be yours.

The script's in several parts, so I'll use spoilers and list them in order of appearance, okay? These are all under the SDK library and over Main. Header names should also be preserved as spoiler titles.

Not sure if this first one's necessary for the Bestiary or just part of the SDK library, but I should probably include it anyway.
=begin
=============================================================================
â–  Map Info
=============================================================================
Trickster
Version 1.1
3.17.07
=============================================================================
=end

#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Map Info', 'Trickster', 1.1, '3.17.07')
#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2, 3])
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Map Info')

#--------------------------------------------------------------------------
# * Save RPG::MapInfo Data
# Set to To True to Save MapInfo Data this moves the RPG::Map stuff to
# RPG::MapInfo so maps will not be loaded frequently to get the map info.
# Set it to True run project at least once then set to false, set to
# true again if you changed any of your maps
#--------------------------------------------------------------------------
Save_MapInfoData = false

#--------------------------------------------------------------------------
# * Update RPG::MapInfo Data
# Set this to true if you changed any of your maps
#--------------------------------------------------------------------------
Update_MapInfoData = false


class RPG::MapInfo
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :tileset_id
attr_accessor :width
attr_accessor :height
attr_accessor :autoplay_bgm
attr_accessor :bgm
attr_accessor :autoplay_bgs
attr_accessor :bgs
attr_accessor :encounter_list
attr_accessor :encounter_step
end

class Scene_Title
#--------------------------------------------------------------------------
# * Main Database
#--------------------------------------------------------------------------
alias_method :trick_mapinfo_title_main_database, :main_database
def main_database
# The Usual
trick_mapinfo_title_main_database
# Create $data_mapinfos object
$data_mapinfos = load_data("Data/MapInfos.rxdata")
# Setup encounter info
setup_map_info
end
#--------------------------------------------------------------------------
# * Setup Map Info
#--------------------------------------------------------------------------
def setup_map_info
# Return if test value is not nil or updating info
return if $data_mapinfos[1].width != nil and !Update_MapInfoData
# Begin
begin
# Do from 1 to 999 (Maximum number of maps)
1.upto(999) do |map_id|
# Load Map
map = load_data(sprintf("Data/Map%03d.rxdata", map_id))
# Set Map Info Object
$data_mapinfos[map_id].tileset_id = map.tileset_id
$data_mapinfos[map_id].width = map.width
$data_mapinfos[map_id].height = map.height
$data_mapinfos[map_id].autoplay_bgm = map.autoplay_bgm
$data_mapinfos[map_id].bgm = map.bgm
$data_mapinfos[map_id].autoplay_bgs = map.autoplay_bgs
$data_mapinfos[map_id].bgs = map.bgs
$data_mapinfos[map_id].encounter_list = map.encounter_list
$data_mapinfos[map_id].encounter_step = map.encounter_step
end
rescue Errno::ENOENT
# If Save Map Info Data Save Data
save_data($data_mapinfos, "Data/MapInfos.rxdata") if Save_MapInfoData
end
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

(Here is a blank tab between Mapinfo Script and Setup. May or may not be important... Probably not.)

=begin
=============================================================================
â–  Bestiary
=============================================================================
Trickster
Version 1.1
3.17.07
=============================================================================
=end

#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Trickster\'s Bestiary', 'Trickster', 1.1, '3.17.07')
#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2, 3], ['Map Info'])
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Trickster\'s Bestiary')

module Bestiary
#--------------------------------------------------------------------------
# * Excluded Enemy IDs
#--------------------------------------------------------------------------
Excluded_Enemies = []
#--------------------------------------------------------------------------
# * Excluded Troop IDs
#--------------------------------------------------------------------------
Excluded_Troops = []
#--------------------------------------------------------------------------
# * Excluded Map IDs
#--------------------------------------------------------------------------
Excluded_Maps = []
#--------------------------------------------------------------------------
# * Locations Addition
# syntax - enemy_id => [map_ids]
#--------------------------------------------------------------------------
Locations = {
}
#--------------------------------------------------------------------------
# * Not Seen Name
#--------------------------------------------------------------------------
Not_Seen = '??????'
#--------------------------------------------------------------------------
# * Descriptions
# syntax - enemy_id => Description
#--------------------------------------------------------------------------
Description = {
1 => 'A ceramic doll that moved and attacked on its own. A pathetic fighter, but made of thick porcelain that\'s tough to crack.',
2 => 'Mischievous ghosts who loves to pull pranks. Not especially dangerous, but they can take quite a few hits!',
3 => 'Mischievous ghosts whose favorite pranks involve throwing furniture around. Pack a punch, but can\'t take them so well.',
4 => 'Elite mischief makers with exceptional strength, speed, and even a little in the way of psychic power. Still, they\'re just ghosts.',
5 => 'The lovely leader of the Redmont Boogies, admired by living and nonliving alike. Her looks are only matched by her sharp tongue -- and her sharp claws!'
}
#--------------------------------------------------------------------------
# * Descriptions Default
#--------------------------------------------------------------------------
Description.default = 'No Information'
#--------------------------------------------------------------------------
# * Battler Type (Scanning 0: Fit to Size 1: Crop) (Dimensions 176x176)
#--------------------------------------------------------------------------
Draw_Type = 0
#--------------------------------------------------------------------------
# * Crop (syntax enemy_id => direction 0-8)
# 0 1 2
# 3 4 5
# 6 7 8
#--------------------------------------------------------------------------
Crop = {
}
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Trickster\'s Bestiary')

class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :seen
attr_reader :killed
attr_reader :enemies
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias_method :trick_bestiary_system_initialize, :initialize
def initialize
# The Usual
trick_bestiary_system_initialize
# Setup Enemies
@enemies = (1...$data_enemies.size).to_a - Bestiary::Excluded_Enemies
# Setup Variables
@seen, @killed = Hash.new(0), Hash.new(0)
end
end

class Scene_Battle
#--------------------------------------------------------------------------
# * Main Troopdata
#--------------------------------------------------------------------------
alias_method :trick_bestiary_battle_main_troopdata, :main_troopdata
def main_troopdata
# The Usual
trick_bestiary_battle_main_troopdata
# Run Through Enemies
$game_troop.enemies.each {|enemy| $game_system.seen[enemy.id] += 1}
end
end

class Game_Enemy
#--------------------------------------------------------------------------
# * Add State
#--------------------------------------------------------------------------
alias_method :trick_bestiary_enemy_add_state, :add_state
def add_state(*args)
# The Usual
trick_bestiary_enemy_add_state(*args)
# If Dead Add +1 to kill count
$game_system.killed[id] += 1 if dead?
end
end

class RPG::Enemy
#-------------------------------------------------------------------------
# * Name: Element Test
# Info: Returns Element Effiency Value
# Author: Trickster
# Call Info: One Argument Element_Id the element Id to test
# Returns: AN Integer 1-6 representing the effiency
#-------------------------------------------------------------------------
def element_test(element_id)
# Get a numerical value corresponding to element effectiveness
return [0,6,5,4,3,2,1][element_ranks[element_id]]
end
#-------------------------------------------------------------------------
# * Name: Weaknesses
# Info: Returns Enemy Weaknesses
# Author: Trickster
# Call Info: None
# Returns: An Array of Element Ids for which an A or B effiency
#-------------------------------------------------------------------------
def weaknesses
weak = []
Game_Enemy::Real_Elements.each do |element_id|
weak << element_id if [6,5].include?(element_test(element_id))
end
return weak
end
#-------------------------------------------------------------------------
# * Name: Resistance
# Info: Returns Enemy Resistance
# Author: Trickster
# Call Info: None
# Returns: An Array of Element Ids for which an F or E effiency
#-------------------------------------------------------------------------
def resistance
resists = []
Game_Enemy::Real_Elements.each do |element_id|
resists << element_id if [1,2].include?(self.element_test(element_id))
end
return resists
end
end

class RPG::Troop
#--------------------------------------------------------------------------
# * Has Enemy?
#--------------------------------------------------------------------------
def has_enemy?(enemy_id)
# Run through each member and return true if included
self.members.each {|member| return true if member.enemy_id == enemy_id}
# Not In Troop
return false
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Trickster\'s Bestiary')

class Window_BestiaryCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Call Window_Selectable#initialize
super(0, 0, 160, 480)
# Setup Item Max
@item_max = $game_system.enemies.size
# Create Contents
self.contents = Bitmap.new(width - 32, @item_max * 32)
# Set Font to Shadow
self.contents.font.shadow = true
# Refresh Window
refresh
# Set Index to 0
self.index = 0
end
#--------------------------------------------------------------------------
# * Get Battler
#--------------------------------------------------------------------------
def battler
return $game_system.enemies[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Clear Contents
self.contents.clear
# Draw Each Item
$game_system.enemies.each_index {|index| draw_item(index)}
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
# Get Enemy ID
enemy_id = $game_system.enemies[index]
# Get Position
x, y = 4, index * 32
# Get Enemy
enemy = $data_enemies[enemy_id]
# If Seen At Least Once
name = $game_system.seen[enemy_id] > 0 ? enemy.name : Bestiary::Not_Seen
# Draw Index
self.contents.draw_text(x, y, 32, 32, sprintf("%03d:", index+1))
# Draw Name
self.contents.draw_text(x + 36, y, contents.width, 32, name)
end
end

class Window_Bestiary < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Call Window Base#initialize
super(160, 0, 480, 480)
# Setup Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Set Shadow
self.contents.font.shadow = true
# Setup Instance Variables
@battler = nil
# Refresh Window
refresh
end
#--------------------------------------------------------------------------
# * Set Battler
#--------------------------------------------------------------------------
def battler=(battler)
# Return if a battler and ids are the same
return if @battler != nil and @battler.id == battler
# Set Battler
@battler = $data_enemies[battler]
# Refresh
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# if battler is nil or not seen
if @battler == nil or $game_system.seen[@battler.id] == 0
# Clear
self.contents.clear
# Return
return
end
# Clear Contents
self.contents.clear
# Setup Local Variable battler
battler = @battler
# Draw Name
draw_actor_name(battler, 0, 0)
# Draw Hp
draw_actor_hp(battler, 176, 0, 112)
# Draw Sp
draw_actor_sp(battler, 328, 0, 112)
# Draw Enemy
draw_enemy(battler, 0, 32, 176, 176)
# Do 10 times
10.times do |i|
# Get X and Y
x, y = (i % 2) == 0 ? 176 : 328, (i / 2) * 32 + 32
# Draw Parameter
draw_parameter(battler, x, y, 80, i)
end
# Draw Seens
draw_seens(battler, 328, 192, 80)
# Draw Kills
draw_kills(battler, 328, 224, 80)
# Draw Items
draw_battler_items(battler, 0, 192)
# Draw Elements
draw_battler_elements(battler, 0, 224, 328)
# Draw Maps Where can be found
draw_maps(battler, 0, 288, 328)
# Draw Description
draw_battler_description(battler, 0, 352)
end
#--------------------------------------------------------------------------
# * Draw Name
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 176, 32, actor.name, 1)
end
#--------------------------------------------------------------------------
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# Draw "HP" text string
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# Draw HP
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, 32, actor.maxhp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw SP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# Draw "SP" text string
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# Draw SP
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, 32, actor.maxsp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw Seens
#--------------------------------------------------------------------------
def draw_seens(battler, x, y, width)
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, 'Seen')
# Normal Color Font
self.contents.font.color = normal_color
# Get Value
value = $game_system.seen[battler.id].to_s
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Kills
#--------------------------------------------------------------------------
def draw_kills(battler, x, y, width)
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, 'Killed')
# Normal Color Font
self.contents.font.color = normal_color
# Get Value
value = $game_system.killed[battler.id].to_s
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Parameter
#--------------------------------------------------------------------------
def draw_parameter(battler, x, y, width, type)
# Setup Array (Array of Strings)
array = %w( atk pdef mdef str dex agi int eva gold exp )
# If type is not eva or exp
if not ['eva','exp'].include?(array[type])
# Call $data_system.words.(variable)
name = $data_system.words.method(array[type]).call
else
# Just Capitalize it
name = array[type].capitalize
end
# Call battler.(variable) to get value
value = battler.method(array[type]).call.to_s
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, name)
# Normal Color Font
self.contents.font.color = normal_color
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Battler Items
#--------------------------------------------------------------------------
def draw_battler_items(battler, x, y)
# Get Width
cx = contents.text_size('Items:').width
# Draw Items:
self.contents.draw_text(x, y, width, 32, 'Items:')
# Set Total Width
total_width = cx + 8
# Setup Battler Array
item_array = [battler.item_id, battler.weapon_id, battler.armor_id]
# Get Secondary Item Ids
secondary = battler.respond_to?:)get_item_ids) ? battler.get_item_ids : []
# Get Rare Item Ids
rare = battler.respond_to?:)get_rare_ids) ? battler.get_rare_ids : []
# If An Item
if item_array.max != 0
# Item Id
item_id = item_array.max
# Item Type
item_type = item_array.index(item_id)
# Branch By Item Type
case item_type
when 0
item = $data_items[item_id]
when 1
item = $data_weapons[item_id]
when 2
item = $data_armors[item_id]
end
# Get Item Name
item_name = item.name + ((secondary + rare).empty? ? '' : ',')
# Get Width
width = contents.text_size(item_name).width
# Draw Item Name
self.contents.draw_text(x + cx + 8, y, width, 32, item_name)
# Set Total Width
total_width = cx + 16 + width
end
# If not empty?
if not secondary.empty?
# Get Item ID and Item Type
item_id, item_type = secondary[0..1]
# Branch By Item Type
case item_type
when 1
item = $data_items[item_id]
when 2
item = $data_weapons[item_id]
when 3
item = $data_armors[item_id]
end
# Get Item Name
item_name = item.name + (rare.empty? ? '' : ',')
# Get Width
width = contents.text_size(item_name).width
# Draw Item Name
self.contents.draw_text(x + total_width, y, width, 32, item_name)
# Add to Total Width
total_width += 8 + width
end
# If not Empty
if not rare.empty?
# Get Item ID and Item Type
item_id, item_type = rare[0..1]
# Branch By Item Type
case item_type
when 1
item = $data_items[item_id]
when 2
item = $data_weapons[item_id]
when 3
item = $data_armors[item_id]
end
# Get Width
width = contents.text_size(item.name).width
# Set Text to Gold
self.contents.font.color = Color.new(255, 224, 32)
# Draw Item Name
self.contents.draw_text(x + total_width, y, width, 32, item.name)
# Set Text to Normal Color
self.contents.font.color = normal_color
# Add to Total Width
total_width += 8 + width
end
# If Nothing Drawn (that is total width is cx + 8)
if total_width == cx + 8
# Draw Nothing
self.contents.draw_text(x + cx + 8, y, self.width, 32, 'None')
end
end
#--------------------------------------------------------------------------
# * Draw Enemy
#--------------------------------------------------------------------------
def draw_enemy(enemy, x, y, width, height, opacity = 255)
# Get Bitmap
bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
# If Stretching
if Bestiary::Draw_Type == 0
# Fit Blt (See MACL)
self.contents.fit_blt(x, y, width, height, bitmap, opacity)
# If Cropping
else
# Get Direction of Crop
dir = Bestiary::Crop[enemy.id]
# Crop Blt (See MACL)
self.contents.crop_blt(x, y, width, height, bitmap, dir, 1, opacity)
end
end
#--------------------------------------------------------------------------
# * Draw Battler Elements
#--------------------------------------------------------------------------
def draw_battler_elements(battler, x, y, width)
# Get Weakesses
elements = battler.weaknesses
# Set String
string = 'Weak: '
# If Elements not empty
if not elements.empty?
# Set Name OF Element
elements.each {|element| string += $data_system.elements[element] + ', '}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None
string += 'None'
end
# Draw Weakness String
self.contents.draw_text(x, y, width, 32, string)
# Get Resistance Elements
elements = battler.resistance
# Set String
string = 'Strong: '
# If Elements not empty
if not elements.empty?
# Set Name of Element
elements.each {|element| string += $data_system.elements[element] + ', '}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None
string += 'None'
end
# Draw Resistance String
self.contents.draw_text(x, y + 32, width, 32, string)
end
#--------------------------------------------------------------------------
# * Draw Battler Maps
#--------------------------------------------------------------------------
def draw_maps(battler, x, y, width)
# Setup String
string = 'Location: '
# Get Troops
troops = (1...$data_troops.size).to_a - Bestiary::Excluded_Troops
# Delete Id if Enemy is not in it
troops.delete_if {|troop_id| !$data_troops[troop_id].has_enemy?(battler.id)}
# Setup Maps Array
maps = []
# Get Maps
$data_mapinfos.each do |index, map|
# Skip if index is 0
next if index == 0
# If Includes any of the troops in list Push index
maps << index if map.encounter_list.includes_any?(*troops)
end
# Remove Excluded
maps -= Bestiary::Excluded_Maps
# Add Locations
maps += Bestiary::Locations[battler.id].to_a
# Remove Duplicates
maps.uniq!
# If Maps are not empty
if not maps.empty?
# Run Through and Push Strings
maps.each {|map_id| string += "#{$data_mapinfos[map_id].name}, "}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None (Unknown)
string += 'Unknown'
end
# Draw Text
self.contents.draw_text(x, y, width, 32, string)
end
#--------------------------------------------------------------------------
# * Draw Battler Description
#--------------------------------------------------------------------------
def draw_battler_description(battler, x, y)
# Get String
string = 'Description: ' + Bestiary::Description[battler.id]
# Draw Wrapped Text
self.contents.draw_wrap_text(x, y, contents.width, 32, string)
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Trickster\'s Bestiary')
class Scene_Bestiary < SDK::Scene_Base
#--------------------------------------------------------------------------
# * Main Windows
#--------------------------------------------------------------------------
def main_window
# Call Scene_Base Main Window
super
# Setup Command Window
@command_window = Window_BestiaryCommand.new
# Setup Bestiary Window
@bestiary_window = Window_Bestiary.new
# Set Battler
@bestiary_window.battler = @command_window.battler
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If Up or Down is Triggered
if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
# Set Battler
@bestiary_window.battler = @command_window.battler
end
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
 
Wow! I don't need anything in return, all I did was edit one word (yep, scripting's that easy sometimes :p ). But if you want to give me a little credit, go ahead.

Replace Window_BestiaryCommand with this new one. To use it, just save a picture with the exact same name in your pictures folder.
EXAMPLE: We have an enemy called Ghost. In your pictures folder save a picture called Ghost. It's that simple!

I haven't tested it :p, so tell me if there's any problems.
Code:
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------

class Window_BestiaryCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Call Window_Selectable#initialize
super(0, 0, 160, 480)
# Setup Item Max
@item_max = $game_system.enemies.size
# Create Contents
self.contents = Bitmap.new(width - 32, @item_max * 32)
# Set Font to Shadow
self.contents.font.shadow = true
# Refresh Window
refresh
# Set Index to 0
self.index = 0
end
#--------------------------------------------------------------------------
# * Get Battler
#--------------------------------------------------------------------------
def battler
return $game_system.enemies[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Clear Contents
self.contents.clear
# Draw Each Item
$game_system.enemies.each_index {|index| draw_item(index)}
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
# Get Enemy ID
enemy_id = $game_system.enemies[index]
# Get Position
x, y = 4, index * 32
# Get Enemy
enemy = $data_enemies[enemy_id]
# If Seen At Least Once
name = $game_system.seen[enemy_id] > 0 ? enemy.name : Bestiary::Not_Seen
# Draw Index
self.contents.draw_text(x, y, 32, 32, sprintf("%03d:", index+1))
# Draw Name
self.contents.draw_text(x + 36, y, contents.width, 32, name)
end
end

class Window_Bestiary < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Call Window Base#initialize
super(160, 0, 480, 480)
# Setup Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Set Shadow
self.contents.font.shadow = true
# Setup Instance Variables
@battler = nil
# Refresh Window
refresh
end
#--------------------------------------------------------------------------
# * Set Battler
#--------------------------------------------------------------------------
def battler=(battler)
# Return if a battler and ids are the same
return if @battler != nil and @battler.id == battler
# Set Battler
@battler = $data_enemies[battler]
# Refresh
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# if battler is nil or not seen
if @battler == nil or $game_system.seen[@battler.id] == 0
# Clear
self.contents.clear
# Return
return 
end
# Clear Contents
self.contents.clear
# Setup Local Variable battler
battler = @battler
# Draw Name
draw_actor_name(battler, 0, 0)
# Draw Hp
draw_actor_hp(battler, 176, 0, 112)
# Draw Sp
draw_actor_sp(battler, 328, 0, 112)
# Draw Enemy
draw_enemy(battler, 0, 32, 176, 176)
# Do 10 times
10.times do |i|
# Get X and Y
x, y = (i % 2) == 0 ? 176 : 328, (i / 2) * 32 + 32
# Draw Parameter
draw_parameter(battler, x, y, 80, i)
end
# Draw Seens
draw_seens(battler, 328, 192, 80)
# Draw Kills
draw_kills(battler, 328, 224, 80)
# Draw Items
draw_battler_items(battler, 0, 192)
# Draw Elements
draw_battler_elements(battler, 0, 224, 328)
# Draw Maps Where can be found
draw_maps(battler, 0, 288, 328)
# Draw Description
draw_battler_description(battler, 0, 352)
end
#--------------------------------------------------------------------------
# * Draw Name
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 176, 32, actor.name, 1)
end
#--------------------------------------------------------------------------
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# Draw "HP" text string
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# Draw HP
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, 32, actor.maxhp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw SP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# Draw "SP" text string
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# Draw SP
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, 32, actor.maxsp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw Seens
#--------------------------------------------------------------------------
def draw_seens(battler, x, y, width)
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, 'Seen')
# Normal Color Font
self.contents.font.color = normal_color
# Get Value
value = $game_system.seen[battler.id].to_s
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Kills
#--------------------------------------------------------------------------
def draw_kills(battler, x, y, width)
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, 'Killed')
# Normal Color Font
self.contents.font.color = normal_color
# Get Value
value = $game_system.killed[battler.id].to_s
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Parameter
#--------------------------------------------------------------------------
def draw_parameter(battler, x, y, width, type)
# Setup Array (Array of Strings)
array = %w( atk pdef mdef str dex agi int eva gold exp )
# If type is not eva or exp
if not ['eva','exp'].include?(array[type])
# Call $data_system.words.(variable)
name = $data_system.words.method(array[type]).call
else
# Just Capitalize it
name = array[type].capitalize
end
# Call battler.(variable) to get value
value = battler.method(array[type]).call.to_s
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, name)
# Normal Color Font
self.contents.font.color = normal_color
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Battler Items
#--------------------------------------------------------------------------
def draw_battler_items(battler, x, y)
# Get Width
cx = contents.text_size('Items:').width
# Draw Items:
self.contents.draw_text(x, y, width, 32, 'Items:')
# Set Total Width
total_width = cx + 8
# Setup Battler Array
item_array = [battler.item_id, battler.weapon_id, battler.armor_id]
# Get Secondary Item Ids
secondary = battler.respond_to?(:get_item_ids) ? battler.get_item_ids : []
# Get Rare Item Ids
rare = battler.respond_to?(:get_rare_ids) ? battler.get_rare_ids : []
# If An Item
if item_array.max != 0
# Item Id
item_id = item_array.max
# Item Type
item_type = item_array.index(item_id)
# Branch By Item Type
case item_type
when 0
item = $data_items[item_id]
when 1
item = $data_weapons[item_id]
when 2
item = $data_armors[item_id]
end
# Get Item Name
item_name = item.name + ((secondary + rare).empty? ? '' : ',')
# Get Width
width = contents.text_size(item_name).width
# Draw Item Name
self.contents.draw_text(x + cx + 8, y, width, 32, item_name)
# Set Total Width
total_width = cx + 16 + width
end
# If not empty?
if not secondary.empty?
# Get Item ID and Item Type
item_id, item_type = secondary[0..1]
# Branch By Item Type
case item_type
when 1
item = $data_items[item_id]
when 2
item = $data_weapons[item_id]
when 3
item = $data_armors[item_id]
end
# Get Item Name
item_name = item.name + (rare.empty? ? '' : ',')
# Get Width
width = contents.text_size(item_name).width
# Draw Item Name
self.contents.draw_text(x + total_width, y, width, 32, item_name)
# Add to Total Width
total_width += 8 + width
end
# If not Empty
if not rare.empty?
# Get Item ID and Item Type
item_id, item_type = rare[0..1]
# Branch By Item Type
case item_type
when 1
item = $data_items[item_id]
when 2
item = $data_weapons[item_id]
when 3
item = $data_armors[item_id]
end
# Get Width
width = contents.text_size(item.name).width
# Set Text to Gold
self.contents.font.color = Color.new(255, 224, 32)
# Draw Item Name
self.contents.draw_text(x + total_width, y, width, 32, item.name)
# Set Text to Normal Color
self.contents.font.color = normal_color
# Add to Total Width
total_width += 8 + width
end
# If Nothing Drawn (that is total width is cx + 8)
if total_width == cx + 8
# Draw Nothing
self.contents.draw_text(x + cx + 8, y, self.width, 32, 'None')
end
end
#--------------------------------------------------------------------------
# * Draw Enemy
#--------------------------------------------------------------------------
def draw_enemy(enemy, x, y, width, height, opacity = 255)
# Get Bitmap
bitmap = RPG::Cache.picture(enemy.battler_name)
# If Stretching
if Bestiary:raw_Type == 0
# Fit Blt (See MACL)
self.contents.fit_blt(x, y, width, height, bitmap, opacity)
# If Cropping
else
# Get Direction of Crop
dir = Bestiary::Crop[enemy.id]
# Crop Blt (See MACL)
self.contents.crop_blt(x, y, width, height, bitmap, dir, 1, opacity)
end
end
#--------------------------------------------------------------------------
# * Draw Battler Elements
#--------------------------------------------------------------------------
def draw_battler_elements(battler, x, y, width)
# Get Weakesses
elements = battler.weaknesses
# Set String
string = 'Weak: '
# If Elements not empty
if not elements.empty? 
# Set Name OF Element
elements.each {|element| string += $data_system.elements[element] + ', '}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None
string += 'None'
end
# Draw Weakness String
self.contents.draw_text(x, y, width, 32, string)
# Get Resistance Elements
elements = battler.resistance
# Set String
string = 'Strong: '
# If Elements not empty
if not elements.empty?
# Set Name of Element
elements.each {|element| string += $data_system.elements[element] + ', '}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None
string += 'None'
end
# Draw Resistance String
self.contents.draw_text(x, y + 32, width, 32, string)
end
#--------------------------------------------------------------------------
# * Draw Battler Maps
#--------------------------------------------------------------------------
def draw_maps(battler, x, y, width)
# Setup String
string = 'Location: '
# Get Troops
troops = (1...$data_troops.size).to_a - Bestiary::Excluded_Troops
# Delete Id if Enemy is not in it
troops.delete_if {|troop_id| !$data_troops[troop_id].has_enemy?(battler.id)}
# Setup Maps Array
maps = []
# Get Maps
$data_mapinfos.each do |index, map|
# Skip if index is 0
next if index == 0
# If Includes any of the troops in list Push index
maps << index if map.encounter_list.includes_any?(*troops)
end
# Remove Excluded
maps -= Bestiary::Excluded_Maps
# Add Locations
maps += Bestiary::Locations[battler.id].to_a
# Remove Duplicates
maps.uniq!
# If Maps are not empty
if not maps.empty?
# Run Through and Push Strings
maps.each {|map_id| string += "#{$data_mapinfos[map_id].name}, "}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None (Unknown)
string += 'Unknown'
end
# Draw Text
self.contents.draw_text(x, y, width, 32, string)
end
#--------------------------------------------------------------------------
# * Draw Battler Description
#--------------------------------------------------------------------------
def draw_battler_description(battler, x, y)
# Get String
string = 'Description: ' + Bestiary:escription[battler.id]
# Draw Wrapped Text
self.contents.draw_wrap_text(x, y, contents.width, 32, string)
end
end
 

mawk

Sponsor

Thanks a million, dude! I don't think I'll be able to test it out just yet, as I still have a ways to go before implementing the side battle system and inking my drawings. I'll be sure to pester you if something goes wrong, though. :thumb:

My one question about this would be whether or not underscores are equivalent to spaces as far as the file names are concerned. So far, almost half my enemies have a space in their names, so you can probably understand my concern. So, would underscores do, or should I use "%20" for spaces in the filenames to stay safe?
 
I'm actually not sure, but you might aswell test spaces and underscores. I looked at the script though, and found that I made a mistake@_@

So here's the new version:

Code:
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Trickster\'s Bestiary')

class Window_BestiaryCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Call Window_Selectable#initialize
super(0, 0, 160, 480)
# Setup Item Max
@item_max = $game_system.enemies.size
# Create Contents
self.contents = Bitmap.new(width - 32, @item_max * 32)
# Set Font to Shadow
self.contents.font.shadow = true
# Refresh Window
refresh
# Set Index to 0
self.index = 0
end
#--------------------------------------------------------------------------
# * Get Battler
#--------------------------------------------------------------------------
def battler
return $game_system.enemies[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Clear Contents
self.contents.clear
# Draw Each Item
$game_system.enemies.each_index {|index| draw_item(index)}
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
# Get Enemy ID
enemy_id = $game_system.enemies[index]
# Get Position
x, y = 4, index * 32
# Get Enemy
enemy = $data_enemies[enemy_id]
# If Seen At Least Once
name = $game_system.seen[enemy_id] > 0 ? enemy.name : Bestiary::Not_Seen
# Draw Index
self.contents.draw_text(x, y, 32, 32, sprintf("%03d:", index+1))
# Draw Name
self.contents.draw_text(x + 36, y, contents.width, 32, name)
end
end

class Window_Bestiary < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Call Window Base#initialize
super(160, 0, 480, 480)
# Setup Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Set Shadow
self.contents.font.shadow = true
# Setup Instance Variables
@battler = nil
# Refresh Window
refresh
end
#--------------------------------------------------------------------------
# * Set Battler
#--------------------------------------------------------------------------
def battler=(battler)
# Return if a battler and ids are the same
return if @battler != nil and @battler.id == battler
# Set Battler
@battler = $data_enemies[battler]
# Refresh
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# if battler is nil or not seen
if @battler == nil or $game_system.seen[@battler.id] == 0
# Clear
self.contents.clear
# Return
return 
end
# Clear Contents
self.contents.clear
# Setup Local Variable battler
battler = @battler
# Draw Name
draw_actor_name(battler, 0, 0)
# Draw Hp
draw_actor_hp(battler, 176, 0, 112)
# Draw Sp
draw_actor_sp(battler, 328, 0, 112)
# Draw Enemy
draw_enemy(battler, 0, 32, 176, 176)
# Do 10 times
10.times do |i|
# Get X and Y
x, y = (i % 2) == 0 ? 176 : 328, (i / 2) * 32 + 32
# Draw Parameter
draw_parameter(battler, x, y, 80, i)
end
# Draw Seens
draw_seens(battler, 328, 192, 80)
# Draw Kills
draw_kills(battler, 328, 224, 80)
# Draw Items
draw_battler_items(battler, 0, 192)
# Draw Elements
draw_battler_elements(battler, 0, 224, 328)
# Draw Maps Where can be found
draw_maps(battler, 0, 288, 328)
# Draw Description
draw_battler_description(battler, 0, 352)
end
#--------------------------------------------------------------------------
# * Draw Name
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 176, 32, actor.name, 1)
end
#--------------------------------------------------------------------------
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# Draw "HP" text string
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# Draw HP
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, 32, actor.maxhp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw SP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# Draw "SP" text string
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# Draw SP
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, 32, actor.maxsp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw Seens
#--------------------------------------------------------------------------
def draw_seens(battler, x, y, width)
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, 'Seen')
# Normal Color Font
self.contents.font.color = normal_color
# Get Value
value = $game_system.seen[battler.id].to_s
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Kills
#--------------------------------------------------------------------------
def draw_kills(battler, x, y, width)
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, 'Killed')
# Normal Color Font
self.contents.font.color = normal_color
# Get Value
value = $game_system.killed[battler.id].to_s
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Parameter
#--------------------------------------------------------------------------
def draw_parameter(battler, x, y, width, type)
# Setup Array (Array of Strings)
array = %w( atk pdef mdef str dex agi int eva gold exp )
# If type is not eva or exp
if not ['eva','exp'].include?(array[type])
# Call $data_system.words.(variable)
name = $data_system.words.method(array[type]).call
else
# Just Capitalize it
name = array[type].capitalize
end
# Call battler.(variable) to get value
value = battler.method(array[type]).call.to_s
# System Color Font
self.contents.font.color = system_color
# Draw Parameter Name
self.contents.draw_text(x, y, width, 32, name)
# Normal Color Font
self.contents.font.color = normal_color
# Draw Value
self.contents.draw_text(x + 32, y, width, 32, value, 2)
end
#--------------------------------------------------------------------------
# * Draw Battler Items
#--------------------------------------------------------------------------
def draw_battler_items(battler, x, y)
# Get Width
cx = contents.text_size('Items:').width
# Draw Items:
self.contents.draw_text(x, y, width, 32, 'Items:')
# Set Total Width
total_width = cx + 8
# Setup Battler Array
item_array = [battler.item_id, battler.weapon_id, battler.armor_id]
# Get Secondary Item Ids
secondary = battler.respond_to?(:get_item_ids) ? battler.get_item_ids : []
# Get Rare Item Ids
rare = battler.respond_to?(:get_rare_ids) ? battler.get_rare_ids : []
# If An Item
if item_array.max != 0
# Item Id
item_id = item_array.max
# Item Type
item_type = item_array.index(item_id)
# Branch By Item Type
case item_type
when 0
item = $data_items[item_id]
when 1
item = $data_weapons[item_id]
when 2
item = $data_armors[item_id]
end
# Get Item Name
item_name = item.name + ((secondary + rare).empty? ? '' : ',')
# Get Width
width = contents.text_size(item_name).width
# Draw Item Name
self.contents.draw_text(x + cx + 8, y, width, 32, item_name)
# Set Total Width
total_width = cx + 16 + width
end
# If not empty?
if not secondary.empty?
# Get Item ID and Item Type
item_id, item_type = secondary[0..1]
# Branch By Item Type
case item_type
when 1
item = $data_items[item_id]
when 2
item = $data_weapons[item_id]
when 3
item = $data_armors[item_id]
end
# Get Item Name
item_name = item.name + (rare.empty? ? '' : ',')
# Get Width
width = contents.text_size(item_name).width
# Draw Item Name
self.contents.draw_text(x + total_width, y, width, 32, item_name)
# Add to Total Width
total_width += 8 + width
end
# If not Empty
if not rare.empty?
# Get Item ID and Item Type
item_id, item_type = rare[0..1]
# Branch By Item Type
case item_type
when 1
item = $data_items[item_id]
when 2
item = $data_weapons[item_id]
when 3
item = $data_armors[item_id]
end
# Get Width
width = contents.text_size(item.name).width
# Set Text to Gold
self.contents.font.color = Color.new(255, 224, 32)
# Draw Item Name
self.contents.draw_text(x + total_width, y, width, 32, item.name)
# Set Text to Normal Color
self.contents.font.color = normal_color
# Add to Total Width
total_width += 8 + width
end
# If Nothing Drawn (that is total width is cx + 8)
if total_width == cx + 8
# Draw Nothing
self.contents.draw_text(x + cx + 8, y, self.width, 32, 'None')
end
end
#--------------------------------------------------------------------------
# * Draw Enemy
#--------------------------------------------------------------------------
def draw_enemy(enemy, x, y, width, height, opacity = 255)
# Get Bitmap
bitmap = RPG::Cache.picture(enemy.battler_name)
# If Stretching
if Bestiary:raw_Type == 0
# Fit Blt (See MACL)
self.contents.fit_blt(x, y, width, height, bitmap, opacity)
# If Cropping
else
# Get Direction of Crop
dir = Bestiary::Crop[enemy.id]
# Crop Blt (See MACL)
self.contents.crop_blt(x, y, width, height, bitmap, dir, 1, opacity)
end
end
#--------------------------------------------------------------------------
# * Draw Battler Elements
#--------------------------------------------------------------------------
def draw_battler_elements(battler, x, y, width)
# Get Weakesses
elements = battler.weaknesses
# Set String
string = 'Weak: '
# If Elements not empty
if not elements.empty? 
# Set Name OF Element
elements.each {|element| string += $data_system.elements[element] + ', '}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None
string += 'None'
end
# Draw Weakness String
self.contents.draw_text(x, y, width, 32, string)
# Get Resistance Elements
elements = battler.resistance
# Set String
string = 'Strong: '
# If Elements not empty
if not elements.empty?
# Set Name of Element
elements.each {|element| string += $data_system.elements[element] + ', '}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None
string += 'None'
end
# Draw Resistance String
self.contents.draw_text(x, y + 32, width, 32, string)
end
#--------------------------------------------------------------------------
# * Draw Battler Maps
#--------------------------------------------------------------------------
def draw_maps(battler, x, y, width)
# Setup String
string = 'Location: '
# Get Troops
troops = (1...$data_troops.size).to_a - Bestiary::Excluded_Troops
# Delete Id if Enemy is not in it
troops.delete_if {|troop_id| !$data_troops[troop_id].has_enemy?(battler.id)}
# Setup Maps Array
maps = []
# Get Maps
$data_mapinfos.each do |index, map|
# Skip if index is 0
next if index == 0
# If Includes any of the troops in list Push index
maps << index if map.encounter_list.includes_any?(*troops)
end
# Remove Excluded
maps -= Bestiary::Excluded_Maps
# Add Locations
maps += Bestiary::Locations[battler.id].to_a
# Remove Duplicates
maps.uniq!
# If Maps are not empty
if not maps.empty?
# Run Through and Push Strings
maps.each {|map_id| string += "#{$data_mapinfos[map_id].name}, "}
# Remove Last Two Characters
string[-2, 2] = ''
else
# Add None (Unknown)
string += 'Unknown'
end
# Draw Text
self.contents.draw_text(x, y, width, 32, string)
end
#--------------------------------------------------------------------------
# * Draw Battler Description
#--------------------------------------------------------------------------
def draw_battler_description(battler, x, y)
# Get String
string = 'Description: ' + Bestiary:escription[battler.id]
# Draw Wrapped Text
self.contents.draw_wrap_text(x, y, contents.width, 32, string)
end
end 
#End SDK check
end
 

mawk

Sponsor

Thanks again! Glad you found it, since I'd be totally unable to pick out the error in any code myself.

Anyway, production's at a standstill for now (gee, I totally love school,) but I should get things up and tested by the weekend. Maybe I'll even be able to upload and ink the images I've got for the Bestiary so far.

Sidenote: the hardest part about production is realizing there's something you need to do and building backwards to do it. XD
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top