Blizzard's little tricks

Started by Blizzard, January 12, 2008, 12:50:57 pm

Previous topic - Next topic

winkio

I'm calling the 'already exists' flag here.  It's built in to the default scripts.

draw_text(x, y, width, height, text, positioning)

make width the width of the text it needs to be centered over, replace text with the text, and put in 1 for positioning.  Centered.  I 'think' that this is what Blizz was referring to.

Calintz

March 14, 2009, 11:24:32 pm #41 Last Edit: March 14, 2009, 11:27:31 pm by Calintz16438
Another contribution...

Infirmary





So you have seen this feature used in games like Dragonquest(dragonwarrior)...In Dragonquest, however, this feature takes place in a chapel, but does the same thing.

**This little trick will make it so you have two separate restorative franchises in your game. What this really means...is that you will have your Inn(heal all characters if they still have some HP left) and an infirmary(revives characters from a knockout state).

**This feature adds a very realistic effect to any game, as a character in critical condition will not make a full recovery by simply resting over night. This system simulates the use of extra care to help revive a player. This is a very simple feature to add to your game...

Most inns are created along this basis...
Spoiler: ShowHide

The inn keeper introduces himself and explains the inn's rate.
The inn keeper offers you the choice to stay for the night.
You set up the handler for your character's choice.


To add this feature to your game, simply create your inn along this basis...
Spoiler: ShowHide

The inn keeper introduces himself and explains the inn's rates.
The inn keeper offers you the choice to stay for the night.
After you choose your option, add a handler that checks for the knockout state.
You will need to either add this handler 4x(one for each character) or you can use the call script command to check for the knockout state on all characters at once. (I do not know the proper syntax for this).
The rest is history...heal only the party members who do not have the knockout state inflicted on them.


When Creating your infirmary, do the same, but revive and heal the characters WITH the knockout state. XD

Blizzard

Yup, winkio got it right. You just need to set the text drawing area width properly. Can somebody quickly make a minisystem that will cause damage each second when walking over / standing on tiles that have a specific terrain tag? It's an parallel process with 5 commands and 1 conditional branch. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shining Riku

I could. I actually know how to do that kind of stuff now.

(Your tute on slippy floors actually taught me that, Blizz.)
Easy peasy. If anybody wants i'll actually post the stuff, but since i'm on another computer that doesn't have RPG Maker XP, I can't reference it at the moment.

I post it later...Is that ok?
And unlike some types of people I actually intend to back up my statement. I'll be back.

Blizzard

Sure thing. I'll be looking forward to it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shining Riku

Ok, five commands...

Something like THIS, perhaps?

Control variables: (Name of variable here) =Player's terrain tag
Conditional Branch: If variable = tag of tile that causes damage
    wait 40 frames 'cause I think that's an in-game second
    deal damage to party (set the damage to whatever.


Actually, That's four commands. Pbth. Did I do something wrong?

Reverse the last two commands...I just thought about that. Deal damage first THEN wait the 40 frames.
And it HAS to be a parallel event.

Yay if I got it right, darn if i didn't.  :P

G_G

April 27, 2009, 09:51:29 pm #46 Last Edit: April 28, 2009, 12:49:08 am by Starrodkirby86
Spoiler: ShowHide


A bit easier to see then actually reading code :P But yes you were right.

Added random damage bit so its not precise every single time.

Obligatory image thingie message. :3 ~Love, Starrodkirby86

Shining Riku

Sweet. Didn't really know there was a random damage command, but then again most of my eventing knowledge is all stuff i've figured out on my own. Thanks for putting up a picture, i'm just too lazy, lol.

SO....(Powers up)

Thank ya, game_guy!

Mightylink

Hero switch is really neat, I just wonder if it will cause problems down the road like in cutscenes :P

G_G

Quote from: Mightylink on May 03, 2009, 07:49:31 pm
Hero switch is really neat, I just wonder if it will cause problems down the road like in cutscenes :P



Make it a parallel process and it'll only work when the switch Cutscene Off is on then just turn off the switch during cutscenes.

soniclink386

Hello, I'm having problems adding new menu options, I do what you say, but it still doesn't show up.  I'm trying to put your bestairy in the menu.

Landith

May 31, 2009, 12:26:24 am #51 Last Edit: May 31, 2009, 12:29:04 am by Landith
Send me the script and I'll do it for you :)

Or if you tell me what script you are currently using I can help you.

Edit:
Wait, did you put '$scene = Scene_NEW_OPTION.new'?
That's suppose to be there is '$scene = Scene_Bestiary.new'

and

s5 = "NEW_OPTION" is suppose to be s5 = "Bestiary"

If you did that then send me the script and I'll do it for you :)


soniclink386

May 31, 2009, 12:31:04 am #52 Last Edit: May 31, 2009, 12:39:37 am by Aqua
I think I did, let me make sure and i'll tell you in a second.

Edit:
Still doesn't seem to be working, but I did correct a spelling error.


#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Bestiary by Blizzard
# Version: 2.21b
# Type: Enemy Catalogue Display
# Date: 5.7.2006
# Date v1.1: 18.9.2006
# Date v1.2b: 23.2.2007
# Date v1.3b: 7.7.2007
# Date v2.0b: 12.7.2007
# Date v2.1b: 6.8.2007
# Date v2.2b: 24.9.2007
# Date v2.21b: 8.4.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   98% compatible with SDK v1.x. 70% compatible with SDK v2.x. May cause
#   incompatibility issues with exotic CBS-es. WILL corrupt your old savegames.
#
#
# Features:
#
#   - display of full data of enemies
#   - option to disable different information
#   - integrated support for my "Advanced Analyze System"
#   - press SHIFT/ENTER to change the appearance of the Bestiary window
#   - use LEFT/RIGHT/UP/DOWN to navigate through the information database
#
# new in v1.1b:
#   - bugs fixed
#
# new in v1.2b:
#   - improved coding (uses less RAM now and processes faster)
#
# new in v1.3b:
#   - increased compatibility
#
# new in v2.0b:
#   - completely overworked and fixed compatibility issues
#
# new in v2.1b:
#   - added custom info possibility
#
# new in v2.2b:
#   - rewritten conditions using classic syntax to avoid RGSS conditioning bug
#   - added SORT_BEASTS option
#   - improved coding
#
# new in v2.21b:
#   - improved coding
#
#
# Instructions:
#
# - Explanation:
#
#   This script will allow your characters to retrieve information about
#   enemies during battle and show them in a window. It also has built-in
#   compatibility for my "Advanced Analyze System" script and allows adding
#   enemies to it only if enemies were analyzed at least once. This script can
#   easily be used for Pokémon typed games.
#
# - Configuration:
#
#   Configure the part below and make one or more skills, that can analyze
#   enemies. Add the IDs into the array called ANALYZE_IDS and separate them
#   with commas. If you have one or more scripts using dummy elements (e.g. my
#   EQUAP Skills, SephirothSpawn's Limit Break, etc.) be sure to include every
#   dummy element ID in the array called ELM_DUMMIES, also separated by commas.
#   Below is everything explained, how to set the bestiary up. It has
#   additional options for rendering single or all enemies "Unknown" and adding
#   them into the bestiary as such. Later you can use a syntax described below
#   to enable their information display (e.g. like in Pokémon games, you get
#   the real info about a pokémon not when you meet it, but when you catch it).
#   You can use $game_system.bestiary_missing? to check how many enemies were
#   not added into the Bestiary. If you wish to see how many were added, use
#   $game_system.beasts.size
#
#
# Important notes:
#
#   You MUST configure the part below if you have scripts that use dummy
#   elements! Do NOT give your enemies MORE than 11 elements/status effects of
#   one resistance type (e.g. 12 or more elements, that are absorbed), because
#   they won't be displayed.
#
#
# If you find any bugs, please report them here:
# http://www.chaosproject.co.nr
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ELM_DUMMIES = [] # include EVERY dummy element ID, that is used by other scripts
STA_DUMMIES = [] # include EVERY dummy status effect ID, that you use
EVASION = 'Eva' # word used to display Evasion
MAP_BACKGROUND = true # true will show the map background, false won't
BESTIARY_SIZE = 999 # change this if to as many
NEVER_ADD = [] # include IDs of enemies which will never be added
SORT_BEASTS = true # set to false if you don't want all enemies to be sorted by ID

# enemy IDs from enemies, that are unknown (e.g. bosses), to make an enemy
# known use $game_system.enable(ENEMY_ID) through the event command
# "Call Script" to enable the display of information

if $override_bestiary
 UNKNOWN = [4] # overrides the commands further below
else
 UNKNOWN = [] # DO NOT TOUCH THIS
end

# every enemy is initially unknown (e.g. for Pokémon games), so you don't have
# to fill the array above with all the IDs of your enemy database

ALL_UNKNOWN = false

# If a display below is disabled, the appropriate part above will be overriden.
# The values below can also be changed during gameplay by just calling the
# "Call script" event command and changing the values like below
# DO NOT SET EVERYTHING TO true! THIS WILL BUG YOUR BESTIARY!

# set to true to disable display of basic info
DISABLE_BEAST_BASIC = false
# set to true to disable display of basic stats
DISABLE_BEAST_STATS = false
# set to true to disable display of extended stats
DISABLE_BEAST_EXTSTATS = false
# set to true to disable display of extreme element weakness
DISABLE_BEAST_XTRWEAK = false
# set to true to disable display of element weakness
DISABLE_BEAST_WEAK = false
# set to true to disable display of element resistance
DISABLE_BEAST_RESIST = false
# set to true to disable display of element nullification
DISABLE_BEAST_NULLIFY = false
# set to true to disable display of element absorbtion
DISABLE_BEAST_ABSORB = false
# set to true to disable display of extreme status effect weakness
DISABLE_BEAST_XTRWEAK_S = false
# set to true to disable display of status effect weakness
DISABLE_BEAST_WEAK_S = false
# set to true to disable display of status effect resistance
DISABLE_BEAST_RESIST_S = false
# set to true to disable display of status effect nullification
DISABLE_BEAST_NULLIFY_S = false
# set to true to disable display of status effect absorbtion
DISABLE_BEAST_ABSORB_S = false
# set to false to enable custom display
DISABLE_BEAST_CUSTOM = false

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

if $DUMMY_ELEMENTS == nil
 $DUMMY_ELEMENTS = ELM_DUMMIES.clone
else
 $DUMMY_ELEMENTS |= ELM_DUMMIES
end
ELM_DUMMIES = nil
if $DUMMY_STATES == nil
 $DUMMY_STATES = STA_DUMMIES.clone
else
 $DUMMY_STATES |= STA_DUMMIES
end
STA_DUMMIES = nil

$bestiary_enabled = 2.21

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
 attr_accessor :window_mode
 attr_accessor :known
 
 def get_bestiary_info(id)
   return get_analyze_info(id) if $override_bestiary_info
   case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Custom Beast Info Database
#
# Use following template to add custom information about monsters:
#
#    when ID then return "STRING"
#
# ID is the enemy ID and STRING is a string with the information that should be
# displayed. Type all the information into one string, the script will slice
# the text by itself. Note that special characters like a " (double quote)
# need the use of the escape character \ (backslash). If you get and error
# with your string or the character doesn't appear right on the screen, try to
# use the escape character (i.e. for a " it would be \" instead of just ").
# The backslash itself needs an escape character (i.e. \\).
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   when 1 then return "Until now I believed there is no such thing as a ghost. It's hard to not believe in something that is trying to kill you."
   when 2 then return "These creatures can be found in swamps and marshes. They are said to be able to have the ability to turn anything they glaze at into stone. If this rumor is true, these creatures can be considered as part of the family of \"Gorgons\"."
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Custom Beast Info Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   end
   return 'Unknown'
 end

 alias init_beast_later initialize
 def initialize
   init_beast_later
   @window_mode, @beasts, @known = 0, [], []
 end
 
 def beasts
   return ($bestiary_override ? @analyzed : @beasts) - NEVER_ADD
 end
 
 def add_beast(beast)
   unless @beasts.include?(beast)
     @beasts.push(beast)
     @beasts.sort! if SORT_BEASTS
   end
 end
 
 def bestiary_missing?
   return (BESTIARY_SIZE - @beasts.size)
 end
 
 def enable(id)
   $game_system.known.push(id) unless $game_system.known.include?(id)
   return
 end
 
end

#==============================================================================
# RPG::Enemy
#==============================================================================

class RPG::Enemy
 
 def known
   return ($game_system.known.include?(self.id)) if ALL_UNKNOWN
   return (!UNKNOWN.include?(self.id))
 end
 
end

#==============================================================================
# Window_Base
#==============================================================================

class Window_Base
 
 def draw_bestiary_battler(enemy, w, h)
   bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
   bitmap_w = bitmap.width / 2
   bitmap_h = bitmap.height / 2
   src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
   self.contents.blt(w/2 - bitmap_w, h/2 - bitmap_h, bitmap, src_rect, 192)
 end
 
end

#==============================================================================
# Bitmap
#==============================================================================

class Bitmap
 
 def slice_text(text, width)
   result, last_word, current_text = [], 0, ''
   (0..text.size).each {|i|
       if text[i, 1] == ' ' || i == text.size
         word = text[last_word, i-last_word]
         if self.text_size("#{current_text} #{word}").width > width
           result.push(current_text)
           current_text = word
         else
           current_text += (current_text == '' ? word : " #{word}")
         end
         last_word = i+1
       end}
   result.push("#{current_text} #{text[last_word, text.size-last_word]}")
   return result
 end
 
end

#==============================================================================
# Window_Beast
#==============================================================================

class Window_Beast < Window_Base

 attr_accessor :mode
 
 def initialize
   super(0, 0, 576, 416)
   @index_enemy = 0
   @index_page = 0
   @d = [DISABLE_BEAST_BASIC, DISABLE_BEAST_STATS, DISABLE_BEAST_EXTSTATS,
         DISABLE_BEAST_XTRWEAK, DISABLE_BEAST_WEAK, DISABLE_BEAST_RESIST,
         DISABLE_BEAST_NULLIFY, DISABLE_BEAST_ABSORB, DISABLE_BEAST_XTRWEAK_S,
         DISABLE_BEAST_WEAK_S, DISABLE_BEAST_RESIST_S, DISABLE_BEAST_NULLIFY_S,
         DISABLE_BEAST_ABSORB_S, DISABLE_BEAST_CUSTOM]
   @pages = 14 - ((0..13).find_all {|i| @d[i]}).size
   @mode = $game_system.window_mode
   @enemies = []
   for id in ($override_bestiary ? $game_system.analyzed : $game_system.beasts)
     @enemies.push($data_enemies[id]) if id != nil
   end
   self.contents = Bitmap.new(width - 32, height - 32)
   if $fontface != nil
     self.contents.font.name = $fontface
     self.contents.font.size = $fontsize
   elsif $defaultfonttype != nil
     self.contents.font.name = $defaultfonttype
     self.contents.font.size = $defaultfontsize
   end
   self.x = 320 - self.width / 2
   self.y = 240 - self.height / 2
   refresh
 end
 
 def update
   return if @enemies.size == 0
   if Input.trigger?(Input::RIGHT)
     $game_system.se_play($data_system.cursor_se)
     @index_enemy = (@index_enemy + 1) % @enemies.size
     refresh
   elsif Input.trigger?(Input::LEFT)
     $game_system.se_play($data_system.cursor_se)
     @index_enemy = (@index_enemy + @enemies.size - 1) % @enemies.size
     refresh
   elsif Input.trigger?(Input::DOWN)
     $game_system.se_play($data_system.cursor_se)
     @index_page = (@index_page + 1) % @pages
     refresh
   elsif Input.trigger?(Input::UP)
     $game_system.se_play($data_system.cursor_se)
     @index_page = (@index_page + @pages - 1) % @pages
     refresh
   end
 end
 
 def refresh
   self.contents.clear
   x = y = 0
   ox = x + 64
   enemy = @enemies[@index_enemy]
   if enemy == nil
     self.contents.draw_text(0, 64, 544, 32, 'Bestiary is empty', 1)
     return
   end
   self.contents.draw_text(0, 0, 544, 32, "#{enemy.id}.  #{enemy.name}", 1)
   draw_bestiary_battler(enemy, self.width, self.height)
   if enemy.known
     case @index_page
     when (0 - ((0..0).find_all {|i| @d[i]}).size)
       if enemy.item_id > 0
         drop = $data_items[enemy.item_id]
         t = "#{drop.name} (#{enemy.treasure_prob}% chance)"
       elsif enemy.weapon_id > 0
         drop = $data_weapons[enemy.weapon_id]
         t = "#{drop.name} (#{enemy.treasure_prob}% chance)"
       elsif enemy.armor_id > 0
         drop = $data_armors[enemy.armor_id]
         t = "#{drop.name} (#{enemy.treasure_prob}% chance)"
       end
       self.contents.draw_text(x, 32, 128, 32, $data_system.words.hp)
       self.contents.draw_text(x, 96, 128, 32, $data_system.words.sp)
       self.contents.draw_text(x, 160, 128, 32, 'EXP')
       self.contents.draw_text(x, 224, 128, 32, $data_system.words.gold)
       self.contents.draw_text(x, 288, 128, 32, 'Drops')
       self.contents.draw_text(ox, 64, 256, 32, enemy.maxhp.to_s)
       self.contents.draw_text(ox, 128, 256, 32, enemy.maxsp.to_s)
       self.contents.draw_text(ox, 192, 256, 32, enemy.exp.to_s)
       self.contents.draw_text(ox, 256, 256, 32, enemy.gold.to_s)
       self.contents.draw_text(ox, 320, 256, 32, (drop != nil ? t : 'nothing'))
     when (1 - ((0..1).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 128, 32, $data_system.words.str)
       self.contents.draw_text(x, 96, 128, 32, $data_system.words.dex)
       self.contents.draw_text(x, 160, 128, 32, $data_system.words.agi)
       self.contents.draw_text(x, 224, 128, 32, $data_system.words.int)
       self.contents.draw_text(ox, 64, 256, 32, enemy.str.to_s)
       self.contents.draw_text(ox, 128, 256, 32, enemy.dex.to_s)
       self.contents.draw_text(ox, 256, 256, 32, enemy.agi.to_s)
       self.contents.draw_text(ox, 192, 256, 32, enemy.int.to_s)
     when (2 - ((0..2).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 128, 32, $data_system.words.atk)
       self.contents.draw_text(x, 96, 128, 32, $data_system.words.pdef)
       self.contents.draw_text(x, 160, 128, 32, $data_system.words.mdef)
       self.contents.draw_text(x, 224, 128, 32, EVASION)
       self.contents.draw_text(ox, 64, 256, 32, enemy.atk.to_s)
       self.contents.draw_text(ox, 128, 256, 32, enemy.pdef.to_s)
       self.contents.draw_text(ox, 192, 256, 32, enemy.mdef.to_s)
       self.contents.draw_text(ox, 256, 256, 32, enemy.eva.to_s)
     when (3 - ((0..3).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Extremely efficient elements:')
       draw_elements(enemy, x, 1)
     when (4 - ((0..4).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Efficient elements:')
       draw_elements(enemy, x, 2)
     when (5 - ((0..5).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Elemental resistances:')
       draw_elements(enemy, x, 4)
     when (6 - ((0..6).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Elemental nullifications:')
       draw_elements(enemy, x, 5)
     when (7 - ((0..7).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Elemental absorbtions:')
       draw_elements(enemy, x, 6)
     when (8 - ((0..8).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Extremely efficient status effects:')
       draw_states(enemy, x, 1)
     when (9 - ((0..9).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Efficient status effects:')
       draw_states(enemy, x, 2)
     when (10 - ((0..10).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Status effect resistances:')
       draw_states(enemy, x, 4)
     when (11 - ((0..11).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Strong status effect resistances:')
       draw_states(enemy, x, 5)
     when (12 - ((0..12).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Status effect immunities:')
       draw_states(enemy, x, 6)
     when (13 - ((0..13).find_all {|i| @d[i]}).size)
       self.contents.draw_text(x, 32, 544, 32, 'Informations:')
       draw_info(enemy, x)
     end
   else
     self.contents.draw_text(0, 64, 544, 32, 'Unknown', 1)
   end
 end
 
 def draw_elements(enemy, x, index)
   elements = []
   (1...$data_system.elements.size).each {|id|
       if !$DUMMY_ELEMENTS.include?(id) &&
           index == $data_enemies[@enemies[@index_enemy].id].element_ranks[id]
         elements.push($data_system.elements[id])
       end}
   elements = ['Nothing'] if elements.size == 0
   elements.each_index {|i|
       self.contents.draw_text(x, 64 + i * 32, 544, 32, elements[i])}
 end
   
 def draw_states(enemy, x, index)
   states = []
   (1...$data_states.size).each {|id|
       if !$DUMMY_STATES.include?(id) &&
           index == $data_enemies[@enemies[@index_enemy].id].state_ranks[id]
         states.push($data_states[id].name)
       end}
   states = ['Nothing'] if states.size == 0
   states.each_index {|i|
       self.contents.draw_text(x, 64 + i * 32, 544, 32, states[i])}
 end
 
 def draw_info(enemy, x)
   text = self.contents.slice_text($game_system.get_bestiary_info(enemy.id), 528)
   text.each_index {|i|
       self.contents.draw_text(x, 64 + i*32, 544, 32, text[i])}
 end
   
end

#==============================================================================
# Scene_Bestiary
#==============================================================================

class Scene_Bestiary
 
 def main
   @spriteset = Spriteset_Map.new if MAP_BACKGROUND
   @beast_window = Window_Beast.new
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     break if $scene != self
   end
   Graphics.freeze
   @spriteset.dispose if MAP_BACKGROUND
   @beast_window.dispose
 end
 
 def update
   @beast_window.update
   if MAP_BACKGROUND && (Input.trigger?(Input::A) || Input.trigger?(Input::C))
     Graphics.freeze
     $game_system.se_play($data_system.cursor_se)
     case @beast_window.mode
     when 0 then @beast_window.back_opacity = 128
     when 1 then @beast_window.opacity = 0
     when 2 then @beast_window.opacity = @beast_window.back_opacity = 255
     end
     $game_system.window_mode = ($game_system.window_mode+1) % 3
     @beast_window.mode = $game_system.window_mode
     Graphics.transition(5)
   end
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
   end
 end


end
 
#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
 alias update_beast_later update
 def update
   if @log == nil && !$override_bestiary
     @log = true
     $game_troop.enemies.each {|enemy| $game_system.add_beast(enemy.id)}
   end
   update_beast_later
 end
 
end


It would help if you just pasted both of the scripts [Bestairy and Scene_menu.  I haven't made any other changes to Scene_Menu on my current game, so you don't need to worry]


Don't double post within 24 hours.  There's a Modify button for a reason.
~Aqua

G_G

If you havent changed anything on the scene menu how can you expect the Bestiary to appear on the menu?

soniclink386

No, I mean like changing it for other scripts.  I've already done the things he said, that's the only difference from the default scripts.   ;)

Landith

May 31, 2009, 01:08:05 am #55 Last Edit: May 31, 2009, 01:13:29 am by Landith
Give me a few minutes.


Spoiler: ShowHide


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     menu_index : command cursor's initial position
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
 end
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make command window
   s1 = $data_system.words.item
   s2 = $data_system.words.skill
   s3 = $data_system.words.equip
   s4 = "Status"
   s5 = "Bestiary"
   s6 = "Save"
   s7 = "End Game"
   @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
   @command_window.index = @menu_index
   # If number of party members is 0
   if $game_party.actors.size == 0
     # Disable items, skills, equipment, and status
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
   end
   # If save is forbidden
   if $game_system.save_disabled
     # Disable save
     @command_window.disable_item(4)
   end
   # Make play time window
   @playtime_window = Window_PlayTime.new
   @playtime_window.x = 0
   @playtime_window.y = 224
   # Make steps window
   @steps_window = Window_Steps.new
   @steps_window.x = 0
   @steps_window.y = 320
   # Make gold window
   @gold_window = Window_Gold.new
   @gold_window.x = 0
   @gold_window.y = 416
   # Make status window
   @status_window = Window_MenuStatus.new
   @status_window.x = 160
   @status_window.y = 0
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @command_window.dispose
   @playtime_window.dispose
   @steps_window.dispose
   @gold_window.dispose
   @status_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @command_window.update
   @playtime_window.update
   @steps_window.update
   @gold_window.update
   @status_window.update
   # If command window is active: call update_command
   if @command_window.active
     update_command
     return
   end
   # If status window is active: call update_status
   if @status_window.active
     update_status
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when command window is active)
 #--------------------------------------------------------------------------
 def update_command
   # 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 C button was pressed
   if Input.trigger?(Input::C)
     # If command other than save or end game, and party members = 0
     if $game_party.actors.size == 0 and @command_window.index < 4
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Branch by command window cursor position
     case @command_window.index
     when 0  # item
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to item screen
       $scene = Scene_Item.new
     when 1  # skill
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2  # equipment
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3  # status
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4
       $game_system.se_play($data_system.decision_se)
       # Switch to beastiary screen
       $scene = Scene_Bestiary.new
     when 5  # save
       # If saving is forbidden
       if $game_system.save_disabled
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to save screen
       $scene = Scene_Save.new
     when 6  # end game
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to end game screen
       $scene = Scene_End.new
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when status window is active)
 #--------------------------------------------------------------------------
 def update_status
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Make command window active
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Branch by command window cursor position
     case @command_window.index
     when 1  # skill
       # If this actor's action limit is 2 or more
       if $game_party.actors[@status_window.index].restriction >= 2
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to skill screen
       $scene = Scene_Skill.new(@status_window.index)
     when 2  # equipment
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to equipment screen
       $scene = Scene_Equip.new(@status_window.index)
     when 3  # status
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to status screen
       $scene = Scene_Status.new(@status_window.index)
     end
     return
   end
 end
end




That should work. If not tell me and I'll fix it. Kinda half asleep right now...


soniclink386

That didn't fix it, so it must be with the bestiary script.

Landith

May 31, 2009, 01:28:24 am #57 Last Edit: May 31, 2009, 01:31:30 am by Landith
I'll try it real fast. Just half asleep...

It works perfectly for me...
No errors or anything. I used the bestiary script you posted and everything.

What's wrong with it?

soniclink386

Nothing shows up in the menu.   Do I have to do something to activate it or something?  Like scan an enemy [Scanning script that goes with it]

Landith

You have to fight an enemy, that's it.