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.

help editing falcao universal bestiary script.

Hi im using a universal bestiary that falcao and a few others a responsible for creating it. The issue i am
having is that in my game im using dynamic lighting effects, a picture semi transparent on certain
maps that give lighting effects, see pictures below for a clearer description of what is happening when I
call the bestiary up...

this a cave with a little of the lighting effect....

http://imageshack.us/photo/my-images/52/example1p.jpg/

this a cave with the bestiary called up, as you see the problem is that
the script is behind, I need the script to be on top of everything....


http://imageshack.us/photo/my-images/64/exmple2.jpg/

below is the main script...

#================================================= ===========================#
# ******************************* This is a universal Bestiary, which is #
# * U. ARPG Bestiary By Falcao * Compatible with all systems #
# * ------------------------- * Battles like, HERO XAS ABS, battles #
# * Original code by: KGC * lateral or frontal battles #
# ******************************* Come by default. #
# # RMXP
# Makerpalace.onlinegoo.com #
#================================================= ===========================#

#------------------------------------------------- ---------------------------
# * Instructions
# Just copy and paste the script to their projects, to call a des
# Do an event like this: $ scene = Scene_MonsterGuide.new
#
# If you access the bestiary from the Menu button only Press Z
#
#------------------------------------------------- ---------------------------

module FalcaoVocab

# Text if no data
NoEnemys = "No Data"

# Text if not defeated
NoDefeat = "Not Defeated"

#Text if no Item or weapon data
NoItem = "No Item"

# popup in the menu true / false
MenuWindow = true

# Text from the popup
WindowHelpText = "Press Z To Access Enemy Bestiary"

end

$xrxs = {} if $xrxs == nil

class Game_Event < Game_Character
if $xrxs["xas"] == true
alias falcaoxas_Defeat enemy_defeat_process
def enemy_defeat_process(enemy)
falcaoxas_Defeat(enemy)
$game_system.enemy_defeated[enemy.id] = true
end
end
end

class Monster_info < Window_Base
def initialize
super(240, 380, 400, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 120
self.contents.font.size = 20
self.contents.font.name = "Georgia"
$show_des = false
end
def update(desc,desc2)
self.contents.clear
if $show_des == true
self.contents.draw_text(0, 0, 608, 50, desc)
self.contents.draw_text(0, 30, 608, 50, desc2)
end
end
end

module KGC
$game_special_elements = {}
$imported = {}
$data_states = load_data("Data/States.rxdata")
$data_system = load_data("Data/System.rxdata")
end

module KGC
# Esconder enemigos poner los ID en el array
MG_HIDE_ENEMIES = []
end

class Window_MonsterGuideRight < Window_Base
MG_ELEMENT_RANGE = 1..15
MG_WEEK_COLOR = Color.new(255, 128, 128)
MG_RESIST_COLOR = Color.new(128, 128, 255)
end

class Scene_MonsterGuide
MG_MOVE_REFRESH = true
end

class Scene_Battle
MG_ORIGINAL_DEFEAT = true
end
$imported["Lista de Monstros"] = true
class Object
include KGC
end

def call_monster_guide
$game_player.straighten
$scene = Scene_MonsterGuide.new
end

class Game_System
attr_accessor :enemy_encountered
attr_accessor :enemy_defeated
alias initialize_KGC_MonsterGuide initialize
def initialize
initialize_KGC_MonsterGuide
@enemy_encountered = []
@enemy_defeated = []
end

def enemy_exist?(enemy_id)
return $data_enemies[enemy_id] != nil && $data_enemies[enemy_id].name != ""
end
def all_enemies_count
n = 0
for i in 1...$data_enemies.size
next if !enemy_exist?(i) || MG_HIDE_ENEMIES.include?(i)
n += 1
end
return n
end

def defeated_enemies_count
n = 0
for i in 1...$data_enemies.size
next if !enemy_exist?(i) || !@enemy_encountered ||
!@enemy_defeated || MG_HIDE_ENEMIES.include?(i)
n += 1
end
return n
end
def monster_guide_completion
return defeated_enemies_count * 100 / all_enemies_count
end
end

class Game_Enemy < Game_Battler
attr_reader :eek:riginal_id
alias initialize_KGC_MonsterGuide initialize
def initialize(troop_id, member_index)
initialize_KGC_MonsterGuide(troop_id, member_index)
@original_id = []
unless @hidden
$game_system.enemy_encountered[@enemy_id] = true
end
end

alias transform_KGC_MonsterGuide transform
def transform(enemy_id)
@original_id.push(@enemy_id)
transform_KGC_MonsterGuide(enemy_id)
$game_system.enemy_encountered[@enemy_id] = true
end

def hidden=(value)
@hidden = value
unless @hidden
$game_system.enemy_encountered[@enemy_id] = true
end
end
end

class Window_MonsterGuideTop < Window_Base
def initialize
super(0, 0, 240, 96)
self.contents = Bitmap.new(width - 32, height - 32)
#self.back_opacity = 200
refresh
end
def refresh
self.contents.clear
text = "Total: #{$game_system.defeated_enemies_count}/#{$game_system.all_enemies_count}"
self.contents.draw_text(0, 0, width - 32, 32, text)
text = "Complete :#{$game_system.monster_guide_completion}%"
self.contents.draw_text(0, 32, width - 32, 32, text)
end
end

class Window_MonsterGuideLeft < Window_Selectable
def initialize
super(0, 96, 240, 384)
self.index = 0
#self.back_opacity = 200
refresh
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_enemies.size
next if !$game_system.enemy_exist?(i) || MG_HIDE_ENEMIES.include?(i)
@data.push($data_enemies)
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end

def draw_item(index)
enemy = @data[index]
if $game_system.enemy_defeated[enemy.id]
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4
y = index * 32
rect = Rect.new(x, y, self.width - 40, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
if $game_system.enemy_encountered[enemy.id]
self.contents.draw_text(x, y, self.width - 40, 32, enemy.name)
else
self.contents.draw_text(x, y, self.width - 40, 32, "? ? ? ? ? ? ? ?", 1)
end
end
end

class Window_MonsterGuideRight < Window_Base
def initialize
super(240, 0, 400, 480)
self.contents = Bitmap.new(width - 32, height - 32)
#self.back_opacity = 200
end
def refresh(enemy, show_status = true)
self.contents.clear
unless $game_system.enemy_encountered[enemy.id]
self.contents.font.color = disabled_color
self.contents.draw_text(0, 208, 368, 32, FalcaoVocab::NoEnemys, 1)
$show_des = false
return
end
bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
cw = bitmap.width; ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(184 - cw / 2, 0, bitmap, src_rect)
return unless show_status
if $game_system.enemy_defeated[enemy.id]
self.contents.font.size = 21
self.contents.font.name = "Georgia"
self.contents.font.color = system_color
self.contents.draw_text(0, 215, 64, 32, $data_system.words.hp)
self.contents.draw_text(122, 215, 64, 32, $data_system.words.sp)
self.contents.draw_text(244, 215, 64, 32, $data_system.words.str)
self.contents.draw_text(0, 242, 64, 32, $data_system.words.dex)
self.contents.draw_text(122, 242, 64, 32, $data_system.words.agi)
self.contents.draw_text(244, 242, 64, 32, $data_system.words.int)
self.contents.draw_text(0, 274, 64, 32, $data_system.words.atk)
self.contents.draw_text(122, 274, 64, 32, $data_system.words.pdef)
self.contents.draw_text(244, 274, 64, 32, $data_system.words.mdef)
self.contents.draw_text(0, 306, 96, 32, "Exp")
self.contents.draw_text(184, 306, 384, 32, $data_system.words.gold)
self.contents.draw_text(0, 338, 64, 32, $data_system.words.item)
self.contents.font.color = normal_color
hp = enemy.maxhp; sp = enemy.maxsp
str = enemy.str; dex = enemy.dex; agi = enemy.agi; int = enemy.int
atk = enemy.atk; pdef = enemy.pdef; mdef = enemy.mdef
exp = enemy.exp; gold = enemy.gold
if $imported["LimitBreak"]
hp *= $maxhp_correct
sp *= $maxsp_correct
end
if $imported["BattleDifficulty"]
hp *= get_difficulty[1]
sp *= get_difficulty[2]
correct = get_difficulty[3]
str *= correct; dex *= correct; agi *= correct; int *= correct
atk *= correct; pdef *= correct; mdef *= correct
exp *= get_difficulty[4]; gold *= get_difficulty[5]
end
self.contents.draw_text(48, 215, 64, 32, Integer(hp).to_s, 2)
self.contents.draw_text(170, 215, 64, 32, Integer(sp).to_s, 2)
self.contents.draw_text(292, 215, 64, 32, Integer(str).to_s, 2)
self.contents.draw_text(48, 242, 64, 32, Integer(dex).to_s, 2)
self.contents.draw_text(170, 242, 64, 32, Integer(agi).to_s, 2)
self.contents.draw_text(292, 242, 64, 32, Integer(int).to_s, 2)
self.contents.draw_text(48, 274, 64, 32, Integer(atk).to_s, 2)
self.contents.draw_text(170, 274, 64, 32, Integer(pdef).to_s, 2)
self.contents.draw_text(292, 274, 64, 32, Integer(mdef).to_s, 2)
self.contents.draw_text(0, 306, 144, 32, Integer(exp).to_s, 2)
self.contents.draw_text(184, 306, 144, 32, Integer(gold).to_s, 2)
$show_des = true
text = ""
#------------------------------------------
self.contents.font.color = MG_WEEK_COLOR.dup
self.contents.draw_text(104, 320, 264, 32, text)
text = ""
self.contents.font.color = MG_RESIST_COLOR.dup
self.contents.draw_text(104, 352, 264, 32, text)
self.contents.font.color = normal_color
# ??????
n = enemy.treasure_prob
n *= get_difficulty[6] if $imported["BattleDifficulty"]
prob = "#{Integer(n)}%"
if enemy.item_id > 0
icon = RPG::Cache.icon($data_items[enemy.item_id].icon_name)
text = $data_items[enemy.item_id].name
elsif enemy.weapon_id > 0
icon = RPG::Cache.icon($data_weapons[enemy.weapon_id].icon_name)
text = $data_weapons[enemy.weapon_id].name
elsif enemy.armor_id > 0
icon = RPG::Cache.icon($data_armors[enemy.armor_id].icon_name)
text = $data_armors[enemy.armor_id].name
else
icon = Bitmap.new(24, 24)
text = FalcaoVocab::NoItem
prob = ""
end
self.contents.blt(70, 338, icon, Rect.new(0, 0, 24, 24))
self.contents.draw_text(92 , 338, 204, 32, text)
self.contents.draw_text(300, 338, 64, 32, prob)
else
self.contents.font.color = disabled_color
self.contents.draw_text(0, 280, 368, 32, FalcaoVocab::NoDefeat, 1)
$show_des = false
end
end
end

class Scene_MonsterGuide
def main
@spriteset = Spriteset_Map.new
@guide_top_window = Window_MonsterGuideTop.new
@guide_left_window = Window_MonsterGuideLeft.new
@guide_right_window = Window_MonsterGuideRight.new
@info_monter = Monster_info.new
@show_status = true
enemy = @guide_left_window.item
@guide_right_window.refresh(enemy, @show_status)
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@guide_top_window.dispose
@guide_left_window.dispose
@guide_right_window.dispose
@info_monter.dispose
end
def update
@guide_top_window.update
@guide_left_window.update
@guide_right_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
$game_map.refresh
return
end
if Input.trigger?(Input::A)
$game_system.se_play($data_system.decision_se)
@show_status = !@show_status
enemy = @guide_left_window.item
@guide_right_window.refresh(enemy, @show_status)
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
enemy = @guide_left_window.item
@guide_right_window.refresh(enemy, @show_status)
return
end
if MG_MOVE_REFRESH
if @last_index != @guide_left_window.index
@last_index = @guide_left_window.index
enemy = @guide_left_window.item
@guide_right_window.refresh(enemy, @show_status)
return
end

end
end
end

class Scene_Battle
alias start_phase5_KGC_MonsterGuide start_phase5
def start_phase5
for enemy in $game_troop.enemies
next if enemy.hidden
$game_system.enemy_defeated[enemy.id] = true
if MG_ORIGINAL_DEFEAT
enemy.original_id.each do |id|
next if id == nil
$game_system.enemy_defeated[id] = true
end
end
end
start_phase5_KGC_MonsterGuide
end
end

class Scene_Menu
alias falcaoABSbestiario_update update
def update
falcaoABSbestiario_update
if Input.trigger?(Input::A)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_MonsterGuide.new
end
end
end

class BesInfo < Window_Base
def initialize
super(160, 430, 480, 50)
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 500
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 20
self.contents.draw_text(-70, -6, 600, 32, FalcaoVocab::WindowHelpText,1)
end
end

class Scene_Menu
alias falcaoPulsaZ_main main
def main
@besinfo = BesInfo.new
@besinfo.x = 160
@besinfo.y = 490
@counter = 0
falcaoPulsaZ_main
@besinfo.dispose
end
alias falcaoPulsaZ_update update
def update
falcaoPulsaZ_update
unless FalcaoVocab::MenuWindow == true
@besinfo.visible = false
end
@besinfo.y -= 3 if @besinfo.y > 430 and @counter != 80
if @counter == 80
@besinfo.y += 3
else
@counter += 1
end
end
end


here's the other script needed...

#---------------------------------------
# Falcao says: This script always
# goes under the Primary Script.
#---------------------------------------

class Scene_MonsterGuide
alias falcaoDes_update update
def update
falcaoDes_update
case @guide_left_window.index

#------------------------------------------------- -----------------------------
# * Descriptions of the enemy, to add more descriptions just copy
# A block like this. The descriptions are optional but very imporatant.
#
# When X
# @ Info_monter.update (
# "Description line 1"
# "Description line 2"
#)
#
# Where "when X" instead of the X sets the ID of the enemy least 1, Example
# Enemy ID 6 to 1 = 5, and below are edited descriptions.
#------------------------------------------------- -----------------------------

when 0 #ID 1
@info_monter.update(
"A Squirrel That Likes To Protect Its Nuts",
"Found around the fields of the Yolkfolk Village"
)

when 1 #ID 2
@info_monter.update(
"This Rabbit Thinks It's Bruce Lee",
"Found around the fields of the Yolkfolk Village"
)

when 2 #ID 3
@info_monter.update(
"This Creature Don't Like To Be Disturbed",
"Found at Slime Beach Cove"
)

when 3 #ID 4
@info_monter.update(
"This Creature Likes To Linger In The Darkness",
"Found in Dungeon 1 - The Sunken Caverns"
)

when 4 #ID 5
@info_monter.update(
"A Powerful Foe Of Water Magic Mastery",
"Found in Dungeon 1 - The Sunken Caverns"
)

when 5 #ID 6
@info_monter.update(
"A Monster Of Ancient Times",
"Found in Dungeon 1 - The Sunken Caverns"
)

when 6 #ID 7
@info_monter.update(
"A Water Elemental Slime, Wipeout!",
"Found in Dungeon 2 - Slime Beach Cavern"
)

when 7 #ID 8
@info_monter.update(
"A Earth Elemental Slime, Shake It Baby!",
"Found in Dungeon 2 - Slime Beach Carvern"
)

when 8 #ID 9
@info_monter.update(
"A Fire Elemental Slime, Burn Baby Burn!",
"Found in Dungeon 2 - Slime Beach Cavern"
)

when 9 #ID 10
@info_monter.update(
"A Light Elemental Slime, I'm Blinded!",
"Found in Dungeon 2 - Slime Beach Cavern"
)

when 10 #ID 11
@info_monter.update(
"A Dark Elemental Slime, Is It Dark In Here?",
"Found in Dungeon 2 - Slime Beach Cavern"
)

when 11 #ID 12
@info_monter.update(
"A Wind Elemental Slime, Brrrrr",
"Found in Dungeon 2 - Slime Beach Cavern"
)

when 12 #ID 13
@info_monter.update(
"A Lightning Elemental Slime, Shocking!",
"Found in Dungeon 2 - Slime Beach Cavern"
)

when 13 #ID 14
@info_monter.update(
"A Pirate Guarding The Entrance To Petuga",
"Found in Dungeon 2 - Slime Beach Caverns"
)

when 14 #ID 15
@info_monter.update(
"A Drunk Pirate Wanting To Steal From People",
"Found loitering around Petuga"
)

when 15 #ID 16
@info_monter.update(
"A Small Worker Spider From A Larger Species",
"Found on the island of - Webb Wood"
)

when 16 #ID 17
@info_monter.update(
"A Rose Bush That Likes To Be A Thorny Nuissence",
"Found on the island of - Webb Wood"
)

when 17 #ID 18
@info_monter.update(
"Stringy Vines That Hang From The Tree Tops",
"Found on the island of - Webb Wood"
)

when 18 #ID 19
@info_monter.update(
"A legendary Flower That Likes To Eat Flesh",
"Found on the island of - Webb Wood"
)

when 19 #ID 20
@info_monter.update(
"This beetle Likes To Hide In The Long Grass",
"Found on the island of - Webb Wood"
)

when 20 #ID 21
@info_monter.update(
"A Beetle That Likes To Hide Under Rocks",
"Found on the island of - Webb Wood"
)

when 21 #ID 22
@info_monter.update(
"A Venomous Moth That Attacks From High Up",
"Found on the island of - Webb Wood"
)

when 22 #ID 23
@info_monter.update(
"Beware This Beetles Sharp Blade, It's Sharp!",
"Found on the island of - Webb Wood"
)

when 23 #ID 24
@info_monter.update(
"A Spider Bite Caused This Transformation",
"Found on the island of - Webb Wood"
)

when 24 #ID 25
@info_monter.update(
"It's Claws Are Made Of Pure Gold",
"Found on the island of - Webb Wood"
)

when 25 #ID 26
@info_monter.update(
"It's Claws Are Made Of Pure Gold",
"Found on the island of - Webb Wood"
)

#------------------------------------------------------------------------------
end
@info_monter.contents.clear if $show_des == false
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@info_monter.contents.clear
end
end
end

SO, my question is.. CAN someone please tell me how to change the script so when it is called it's brought to the front
of everything, ~(or on top of everything)~,

thanks
 
Try
below line 53 adding
self.z = 9000

then under line 169 add
self.z = 9000

under line 186
self.z = 9001

under 235
self.z = 9000


This is completely untested. Back up your script before trying ;)
 
Just as a general reminder, please use code or rgss tags next time you post code, because you might not find masochistic people who like to read code without formatting or indentation next time around (that, by the way, also don't use code tags :huh: just what has this place become...).
 
I tried to use the code tags but when i submitted the post, the whole code was on screen and not hidden.. so I had to hide it by using the other tags, thought anyone would'nt mind as i wrote in red that the codes hidden below!... anyhows.. i got my answer!
 

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