Adding a "Bestiary" option in the pre-battle menu

I'm using Shadowmaster's Fantasy Bestiary script (http://www.rpgmakerv...ntasy-bestiary/).

I have the bestiary scene tied to a common event that is then tied to an item (a book) that I also want to be usable in battle. However, when you try to use the item to call the bestiary scene, and then exit the scene, it resets the entire turn. So say I have a party of 3 fighting a single monster. I queue up the actor's actions, with one actor set to use the book to call the bestiary scene. So the following turn progresses something like this:

Actor 1 attacks

Enemy attacks

Actor 2 then uses the book, calls up the Bestiary scene to be browsed, I exit the bestiary scene.

Turns immediately resets, without Actor 3 getting a chance to perform his action for that turn.

I initially wished the Bestiary item to be usable in battle without it resetting the turn, but I think I came up with a better idea that may be easier to implement (I don't have coding knowledge so I can't say for sure if it actually is easier. Just seems like it would be).

I think the easier way around this problem is to have an option in the pre-battle menu alongside Fight and Escape that calls Bestiary scene with the manual script call that Shadowmaster provides with his script: SceneManager.call(Scene_Bestiary). This way, you don't have to compromise an entire turn just to view the Bestiary. Another thing is that I don't want this option to appear until the player has the bestiary book in his/her inventory.

I'd try to do all this myself, but as I said, I simply lack the coding knowledge.

So, all told, I'm just looking to add an option below Fight and Escape in the pre-battle menu that calls Shadowmaster's Fantasy Bestiary scene, with that option not appearing until a specific item is in the player's inventory (the bestiary book itself).
Have you tried this?

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/battle-command-list/
Edit:  I screwed up the first time.

This should work better

Spoiler
Code:
#==============================================================================# ▼ Use Fantasy Bestiary in Battle# - Engine: RPG Maker Ace# - Created: 2015.09.24# - Requires: Fantasy Bestiary v3.6 (may work with other versions)# - Terms of Use:  Free to use commercially or non-commercially with credit#      to The Infamous Bon Bon.# - Find Me @: [URL="https://ccrgeek.wordpress.com/"]https://ccrgeek.wordpress.com/[/URL] or [URL="http://forums.rpgmakerweb.com/#==============================================================================%23==============================================================================%23"]http://forums.rpgmakerweb.com/#==============================================================================#==============================================================================#[/URL] ▼ Updates# -----------------------------------------------------------------------------# None#==============================================================================#==============================================================================# ** Introduction# -----------------------------------------------------------------------------# Let's you use Shadowmaster9000's Fantasy Bestiary in Battle.  Command added# party menu.#==============================================================================#==============================================================================# ▼ Instructions# -----------------------------------------------------------------------------# Plug n' Play#==============================================================================#==============================================================================# ▼ Compatibility# -----------------------------------------------------------------------------# Aliased methods:#   Window_PartyCommand - Create Command List#   Scene_Battle - Create Party Commands Window#==============================================================================#==============================================================================# ** Window_PartyCommand#------------------------------------------------------------------------------#  This window is used to select whether to fight or escape on the battle# screen.#==============================================================================class Window_PartyCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Command List  #--------------------------------------------------------------------------  alias bestiary_make_command_list make_command_list  def make_command_list    bestiary_make_command_list    add_command(FantasyBestiary::Bestiary_Name,  :bestiary)  endend#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Party Commands Window  #--------------------------------------------------------------------------  alias bestiary_create_party_command_window create_party_command_window  def create_party_command_window    bestiary_create_party_command_window    @party_command_window.set_handler(:bestiary, method(:command_bestiary))  end  #--------------------------------------------------------------------------  # * [Bestiary] Command  #--------------------------------------------------------------------------  def command_bestiary    SceneManager.call(Scene_Bestiary)  endend
The Infamous Bon Bon,

That works great! Except there are two problems:

1) - As I mentioned in my original post, I'd like a way to have the "Bestiary" option in battle be invisible unless the party has a specific item in their inventory (an actual Bestiary book).

2) - I also mentioned in my original post that calling the bestiary scene resets the entire turn. While this is true, I think it's more appropriate to say that it actually resets the entire battle, although damage received and dealt from previous turns remains. The reason I know this is because I'm also using a combat log script (Yanfly's to be specific) that records battle text. After calling the bestiary scene, the "[Enemy] emerged!" text appears as if it were the start of the battle, and then upon checking the combat log, it has reset to turn 1, despite it not actually being the first turn. I didn't notice this until I had used your script, but I don't believe it's a problem with your script, rather the Fantasy Bestiary script. Don't know if there is a way you can possible fix this as well. If not, I'm just going to remove the combat log script. Though, ideally, I'd like to have both.
I totally forgot about the item part.  I will get right on that.

I'm going to see if I can fix the second problem.  Yanfly has an equip in combat option script that probably has a work around for that so I'm going to see if I can figure out how.
you just need to do something like if previous_scene = scene_bestiary do not call "start" when initializing battle scene again.

here a simple fix for your log to prevent them to be erase until the end of the battle and if The Infamous Bon Bon can prevent start from being called if you go in bestiary and come back in battle the "new" message battle start should disapear

 

Code:
class Window_CombatLog < Window_Selectable  $savedData = []  alias old_add_line add_line  def add_line(text)    old_add_line(text)    $savedData = @data  end  endmodule BattleManager  class << BattleManager    alias old_battle_end battle_end  end      def self.battle_end(result)      old_battle_end(result)      $savedData = []    endend
Took me a bit but I finally figured it out.  It will be necessary to credit Yanfly as well because I had to use one of Yanfly's methods.

Of course since you said you're using the Combat Log Display you will be anyways.

Spoiler
Code:
#==============================================================================# ▼ Use Fantasy Bestiary in Battle# - Engine: RPG Maker Ace# - Created: 2015.09.24# - Requires: Fantasy Bestiary v3.6 (may work with other versions)# - Terms of Use:  Free to use commercially or non-commercially with credit#      to The Infamous Bon Bon and Yanfly for force_recall method# - Find Me @: [URL="https://ccrgeek.wordpress.com/"]https://ccrgeek.wordpress.com/[/URL] or [URL="http://forums.rpgmakerweb.com/#==============================================================================%23==============================================================================%23"]http://forums.rpgmakerweb.com/#==============================================================================#==============================================================================#[/URL] ▼ Updates# -----------------------------------------------------------------------------# None#==============================================================================#==============================================================================# ** Introduction# -----------------------------------------------------------------------------# Let's you use Shadowmaster9000's Fantasy Bestiary in Battle.  Command added# party menu.#==============================================================================#==============================================================================# ▼ Instructions# -----------------------------------------------------------------------------# Plug n' Play#==============================================================================#==============================================================================# ▼ Compatibility# -----------------------------------------------------------------------------# Aliased methods:#   Window_PartyCommand - Create Command List#   Scene_Battle - Create Party Commands Window#==============================================================================#==============================================================================# ** Config#------------------------------------------------------------------------------# Here you can decide which Item must be in the party's inventory before the # command appears in battle.  Set to 0 if you do not wish to use this.#==============================================================================module TIBB  module Config    BestiaryItem = 0  endend#==============================================================================# ** Window_PartyCommand#------------------------------------------------------------------------------#  This window is used to select whether to fight or escape on the battle# screen.#==============================================================================class Window_PartyCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Command List  #--------------------------------------------------------------------------  alias bestiary_make_command_list make_command_list  def make_command_list    bestiary_make_command_list    add_command(FantasyBestiary::Bestiary_Name,  :bestiary) if bestiary_enabled  end  #--------------------------------------------------------------------------  # * Bestiary Enabled  #--------------------------------------------------------------------------  def bestiary_enabled    if TIBB::Config::BestiaryItem == 0      return true    else      $game_party.has_item?($data_items[TIBB::Config::BestiaryItem])    end  endend #class Window_PartyCommand < Window_Command#==============================================================================# ** SceneManager#------------------------------------------------------------------------------#  This module manages scene transitions. For example, it can handle# hierarchical structures such as calling the item screen from the main menu# or returning from the item screen to the main menu.#==============================================================================module SceneManager  #--------------------------------------------------------------------------  # new method: self.force_recall  #--------------------------------------------------------------------------  def self.force_recall(scene_class)    @scene = scene_class  endend # SceneManager#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Party Commands Window  #--------------------------------------------------------------------------  alias bestiary_create_party_command_window create_party_command_window  def create_party_command_window    bestiary_create_party_command_window    @party_command_window.set_handler(:bestiary, method(:command_bestiary))  end  #--------------------------------------------------------------------------  # * [Bestiary] Command  #--------------------------------------------------------------------------  def command_bestiary    SceneManager.call(Scene_Bestiary)    SceneManager.scene.main    SceneManager.force_recall(self)    @party_command_window.setup    perform_transition  endend #class Scene_Battle < Scene_Base
Took me a bit but I finally figured it out.  It will be necessary to credit Yanfly as well because I had to use one of Yanfly's methods.

Of course since you said you're using the Combat Log Display you will be anyways.

Spoiler
#==============================================================================# ▼ Use Fantasy Bestiary in Battle# - Engine: RPG Maker Ace# - Created: 2015.09.24# - Requires: Fantasy Bestiary v3.6 (may work with other versions)# - Terms of Use:  Free to use commercially or non-commercially with credit#      to The Infamous Bon Bon and Yanfly for force_recall method# - Find Me @: https://ccrgeek.wordpress.com/ or http://forums.rpgmakerweb.com/#==============================================================================#==============================================================================# ▼ Updates# -----------------------------------------------------------------------------# None#==============================================================================#==============================================================================# ** Introduction# -----------------------------------------------------------------------------# Let's you use Shadowmaster9000's Fantasy Bestiary in Battle.  Command added# party menu.#==============================================================================#==============================================================================# ▼ Instructions# -----------------------------------------------------------------------------# Plug n' Play#==============================================================================#==============================================================================# ▼ Compatibility# -----------------------------------------------------------------------------# Aliased methods:#   Window_PartyCommand - Create Command List#   Scene_Battle - Create Party Commands Window#==============================================================================#==============================================================================# ** Config#------------------------------------------------------------------------------# Here you can decide which Item must be in the party's inventory before the # command appears in battle.  Set to 0 if you do not wish to use this.#==============================================================================module TIBB  module Config    BestiaryItem = 0  endend#==============================================================================# ** Window_PartyCommand#------------------------------------------------------------------------------#  This window is used to select whether to fight or escape on the battle# screen.#==============================================================================class Window_PartyCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Command List  #--------------------------------------------------------------------------  alias bestiary_make_command_list make_command_list  def make_command_list    bestiary_make_command_list    add_command(FantasyBestiary::Bestiary_Name,  :bestiary) if bestiary_enabled  end  #--------------------------------------------------------------------------  # * Bestiary Enabled  #--------------------------------------------------------------------------  def bestiary_enabled    if TIBB::Config::BestiaryItem == 0      return true    else      $game_party.has_item?($data_items[TIBB::Config::BestiaryItem])    end  endend #class Window_PartyCommand < Window_Command#==============================================================================# ** SceneManager#------------------------------------------------------------------------------#  This module manages scene transitions. For example, it can handle# hierarchical structures such as calling the item screen from the main menu# or returning from the item screen to the main menu.#==============================================================================module SceneManager  #--------------------------------------------------------------------------  # new method: self.force_recall  #--------------------------------------------------------------------------  def self.force_recall(scene_class)    @scene = scene_class  endend # SceneManager#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Party Commands Window  #--------------------------------------------------------------------------  alias bestiary_create_party_command_window create_party_command_window  def create_party_command_window    bestiary_create_party_command_window    @party_command_window.set_handler🙂bestiary, method🙂command_bestiary))  end  #--------------------------------------------------------------------------  # * [Bestiary] Command  #--------------------------------------------------------------------------  def command_bestiary    SceneManager.call(Scene_Bestiary)    SceneManager.scene.main    SceneManager.force_recall(self)    @party_command_window.setup    perform_transition  endend #class Scene_Battle < Scene_Base
Beautiful, works perfectly now! Thanks so much for the help! It is greatly appreciated!
No problem.  Were you needing a way for the bestiary to only appear on the main menu only when you have the item as well?

Because that can be done super easy as well.
Hmm... Well, I have no problem having the player access the Bestiary through their inventory (as I mentioned in my first post, I originally wanted them use the Bestiary as an item in battle), but I see no reason not to add that feature.
Here's the updated version:

Spoiler
Code:
#==============================================================================# ▼ Use Fantasy Bestiary in Battle & optional need item to use# - Engine: RPG Maker Ace# - Created: 2015.09.24# - Requires: Fantasy Bestiary v3.6 (may work with other versions)# - Terms of Use:  Free to use commercially or non-commercially with credit#      to The Infamous Bon Bon and Yanfly for force_recall method# - Find Me @: [URL="https://ccrgeek.wordpress.com/"]https://ccrgeek.wordpress.com/[/URL] or [URL="http://forums.rpgmakerweb.com/#==============================================================================%23==============================================================================%23"]http://forums.rpgmakerweb.com/#==============================================================================#==============================================================================#[/URL] ▼ Updates# -----------------------------------------------------------------------------# 2015.09.26 - Added the need for the item to see on Main Menu as well.#==============================================================================#==============================================================================# ** Introduction# -----------------------------------------------------------------------------# Let's you use Shadowmaster9000's Fantasy Bestiary in Battle.  Command added# party menu.#==============================================================================#==============================================================================# ▼ Instructions# -----------------------------------------------------------------------------# Plug n' Play#==============================================================================#==============================================================================# ▼ Compatibility# -----------------------------------------------------------------------------# Aliased methods:#   Window_PartyCommand - Create Command List#   Scene_Battle - Create Party Commands Window#==============================================================================#==============================================================================# ** Config#------------------------------------------------------------------------------# Here you can decide which Item must be in the party's inventory before the # command appears in battle.  Set to 0 if you do not wish to use this.#==============================================================================module TIBB  module Config    BestiaryItem = 0  endend#==============================================================================# ** Window_PartyCommand#------------------------------------------------------------------------------#  This window is used to select whether to fight or escape on the battle# screen.#==============================================================================class Window_PartyCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Command List  #--------------------------------------------------------------------------  alias bestiary_make_command_list make_command_list  def make_command_list    bestiary_make_command_list    add_command(FantasyBestiary::Bestiary_Name,  :bestiary) if bestiary_enabled  end  #--------------------------------------------------------------------------  # * Bestiary Enabled  #--------------------------------------------------------------------------  def bestiary_enabled    if TIBB::Config::BestiaryItem == 0      return true    else      $game_party.has_item?($data_items[TIBB::Config::BestiaryItem])    end  endend #class Window_PartyCommand < Window_Command#==============================================================================# ** SceneManager#------------------------------------------------------------------------------#  This module manages scene transitions. For example, it can handle# hierarchical structures such as calling the item screen from the main menu# or returning from the item screen to the main menu.#==============================================================================module SceneManager  #--------------------------------------------------------------------------  # new method: self.force_recall  #--------------------------------------------------------------------------  def self.force_recall(scene_class)    @scene = scene_class  endend # SceneManager#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Party Commands Window  #--------------------------------------------------------------------------  alias bestiary_create_party_command_window create_party_command_window  def create_party_command_window    bestiary_create_party_command_window    @party_command_window.set_handler(:bestiary, method(:command_bestiary))  end  #--------------------------------------------------------------------------  # * [Bestiary] Command  #--------------------------------------------------------------------------  def command_bestiary    SceneManager.call(Scene_Bestiary)    SceneManager.scene.main    SceneManager.force_recall(self)    @party_command_window.setup    perform_transition  endend #class Scene_Battle < Scene_Base#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------#  This command window appears on the menu screen.#==============================================================================class Window_MenuCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Add Main Commands to List  #--------------------------------------------------------------------------  def add_main_commands    bestiary_add_main_commands    if FantasyBestiary::Menu_Access      add_command(FantasyBestiary::Bestiary_Name,                     :fantasy_bestiary) if menu_bestiary_enabled    end  end  #--------------------------------------------------------------------------  # * Bestiary Enabled  #--------------------------------------------------------------------------  def menu_bestiary_enabled    if TIBB::Config::BestiaryItem == 0      return true    else      $game_party.has_item?($data_items[TIBB::Config::BestiaryItem])    end  endend #class Window_MenuCommand < Window_Command

 
 

I just thought if I required an item to see it in battle I would want that in my Main Menu as well for consistency.  (I'm kind of anal retentive like that)
Here's the updated version:

Spoiler
#==============================================================================# ▼ Use Fantasy Bestiary in Battle & optional need item to use# - Engine: RPG Maker Ace# - Created: 2015.09.24# - Requires: Fantasy Bestiary v3.6 (may work with other versions)# - Terms of Use:  Free to use commercially or non-commercially with credit#      to The Infamous Bon Bon and Yanfly for force_recall method# - Find Me @: https://ccrgeek.wordpress.com/ or http://forums.rpgmakerweb.com/#==============================================================================#==============================================================================# ▼ Updates# -----------------------------------------------------------------------------# 2015.09.26 - Added the need for the item to see on Main Menu as well.#==============================================================================#==============================================================================# ** Introduction# -----------------------------------------------------------------------------# Let's you use Shadowmaster9000's Fantasy Bestiary in Battle.  Command added# party menu.#==============================================================================#==============================================================================# ▼ Instructions# -----------------------------------------------------------------------------# Plug n' Play#==============================================================================#==============================================================================# ▼ Compatibility# -----------------------------------------------------------------------------# Aliased methods:#   Window_PartyCommand - Create Command List#   Scene_Battle - Create Party Commands Window#==============================================================================#==============================================================================# ** Config#------------------------------------------------------------------------------# Here you can decide which Item must be in the party's inventory before the # command appears in battle.  Set to 0 if you do not wish to use this.#==============================================================================module TIBB  module Config    BestiaryItem = 0  endend#==============================================================================# ** Window_PartyCommand#------------------------------------------------------------------------------#  This window is used to select whether to fight or escape on the battle# screen.#==============================================================================class Window_PartyCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Command List  #--------------------------------------------------------------------------  alias bestiary_make_command_list make_command_list  def make_command_list    bestiary_make_command_list    add_command(FantasyBestiary::Bestiary_Name,  :bestiary) if bestiary_enabled  end  #--------------------------------------------------------------------------  # * Bestiary Enabled  #--------------------------------------------------------------------------  def bestiary_enabled    if TIBB::Config::BestiaryItem == 0      return true    else      $game_party.has_item?($data_items[TIBB::Config::BestiaryItem])    end  endend #class Window_PartyCommand < Window_Command#==============================================================================# ** SceneManager#------------------------------------------------------------------------------#  This module manages scene transitions. For example, it can handle# hierarchical structures such as calling the item screen from the main menu# or returning from the item screen to the main menu.#==============================================================================module SceneManager  #--------------------------------------------------------------------------  # new method: self.force_recall  #--------------------------------------------------------------------------  def self.force_recall(scene_class)    @scene = scene_class  endend # SceneManager#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # --Alias Method--  # * Create Party Commands Window  #--------------------------------------------------------------------------  alias bestiary_create_party_command_window create_party_command_window  def create_party_command_window    bestiary_create_party_command_window    @party_command_window.set_handler🙂bestiary, method🙂command_bestiary))  end  #--------------------------------------------------------------------------  # * [Bestiary] Command  #--------------------------------------------------------------------------  def command_bestiary    SceneManager.call(Scene_Bestiary)    SceneManager.scene.main    SceneManager.force_recall(self)    @party_command_window.setup    perform_transition  endend #class Scene_Battle < Scene_Base#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------#  This command window appears on the menu screen.#==============================================================================class Window_MenuCommand < Window_Command  #--------------------------------------------------------------------------  # --Alias Method--  # * Add Main Commands to List  #--------------------------------------------------------------------------  def add_main_commands    bestiary_add_main_commands    if FantasyBestiary::Menu_Access      add_command(FantasyBestiary::Bestiary_Name,                     :fantasy_bestiary) if menu_bestiary_enabled    end  end  #--------------------------------------------------------------------------  # * Bestiary Enabled  #--------------------------------------------------------------------------  def menu_bestiary_enabled    if TIBB::Config::BestiaryItem == 0      return true    else      $game_party.has_item?($data_items[TIBB::Config::BestiaryItem])    end  endend #class Window_MenuCommand < Window_Command

 
Spoiler
 

I just thought if I required an item to see it in battle I would want that in my Main Menu as well for consistency.  (I'm kind of anal retentive like that)
Hmm, don't know if I'm missing something or what, but I can't get the menu access to work. Should there be a config option for it like there is for the battle one? I don't see one. I tried plugging in the item ID into line 135, but it didn't work.

EDIT: Nevermind, I figured out what I was doing wrong. I had menu access disabled in Shadowmaster's original script. Silly me.
Oh good, I was worried I'd introduced another bug.

Original thread: https://forums.rpgmakerweb.com/threads/adding-a-bestiary-option-in-the-pre-battle-menu.45081/