Bestiary Script V1.1

Bestiary Script
Version: 1.0


Introduction

This is a new bestiary script based on the Scan Window I created for my Stealing/Mugging/Scanning script. It works both with or without that script (Although the secondary and rare items will appear if you use it in conjunction with that script). It also shows Enemy Hp, Sp, Stats, Enemy Weaknesses and Resistance Elements, Number of times Encontered, Number of times Killed, Maps Found, and a Description.

Screenshots

You got lucky this time >:(
http://img411.imageshack.us/img411/1609/screenve4.th.png[/IMG]

Demo

http://www.rmxp.org/forums/downloads.php?do=file&id=683

Script

Sorry the families should not be looking at a Bestiary

Instructions

Add above main

See the Setup Script, its pretty much self-explanatory

FAQ


Compatibility

Requires SDK Part 1, but it really requires SDK Part III (Required Scripts)

Credits and Thanks

Kurisu, Panda, Yeyinde, for commenting on the screenies :D

Author's Notes
You make the familys sad, but you make me happy. Thankyou.
Thanks

Quick Bug Fix Line 120 of Script Windows_ needs to be this
   
    draw_battler_items(battler, 0, 192)
Expand to see the code.
I might just use this instead of momomo's one. (Because everyone uses it.)
Maybe add the possibility to exclude certain enemies? Like heroes that become temporary villians or tuturial characters etc.

Oh wait the descrition option just makes it better. :D
EDIT: What if you don't use the random encounters, will the Location and Seen sections still work?
I'd use this, but is there anyway to make the battler image's x and y divided by 4?

On the current script I use, I was able to edit a line to this:

        bitmap = RPG::Cache.battler(@enemy.battler_name, @enemy.battler_hue);
        src_rect = Rect.new(0, 0, bitmap.width/4, bitmap.height/4);
Expand to see the code.


But, I couldn't figure out how to do it with this script.
[QUOTE=Jirbytaylor;175393]I might just use this instead of momomo's one. (Because everyone uses it.)
Maybe add the possibility to exclude certain enemies? Like heroes that become temporary villians or tuturial characters etc. Oh wait the descrition option just makes it better. :D[/QUOTE]

Instant Fail for not looking over the setup ;)


[QUOTE=Jirbytaylor;175393]
EDIT: What if you don't use the random encounters, will the Location and Seen sections still work?[/Quote]

Seen will still work, but Location will not, unless I add that in as another constant

@kaze950 - I'll work in an option, later
Trickster did you want hte window to pop up as a regular window's window for one of the events? When you go up to the guy on the left in your demo a window that belongs to windows (not the rxmp kind) pops up that says "0". Shouldn't it be in game instead of that?

It also says I killed 3 when I only killed two. What's up with that?
Hmm, I can't seem to use this with SDK v. 1.5.

But, when I switch to 2.1, one of Seph's scripts gets an SDK related error, the script in question being "Equipment, Item & Skill Requirements (EIS)"

It gets an error on these lines

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('EIS Requirements', 'SephirothSpawn', 0.9, '2006-10-30')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('EIS Requirements')
Expand to see the code.
You do know there is an SDK update patch that should fix that

http://www.rmxpu.net/owai/scripts/the_rmxp_sdk_2_patch.txt

How do you feel about having another image for the enemy just for the this script kaze? because I'm either thinking about that or adding a split bitmap option for battlers that are spritesheets instead of one image
sweet, once again another great script from Trickster!
Just one question, is it possible to make it so that only certain information shows depending on how many times you kill the enemy?
Like only have the items they drop show on the list when you have killed that enemy at least 5 times? or have HP only show after 3 times, etc. preferably something settable via RGSS/Call Script event?
[QUOTE=Trickster;175452]You do know there is an SDK update patch that should fix that

http://www.rmxpu.net/owai/scripts/the_rmxp_sdk_2_patch.txt

How do you feel about having another image for the enemy just for the this script kaze? because I'm either thinking about that or adding a split bitmap option for battlers that are spritesheets instead of one image[/QUOTE]

Heh, I just now changed the script to make the graphic come from the picture folder.

Because in my game, several enemies are the same except for recolor. With your script, I can make the recolors not appear in the bestiary and by having a picture instead of the actual battler, I can have a picture of the enemy and all the recolors.


I assume to put the patch under the 2.1 SDK, but then I get this error
Trickster's Beastiary: The following script has been disabled because it is missing part of the SDK. Parts Required: 1, 2, and 3
Expand to see the code.
[QUOTE=swiftdeathsk;175453]sweet, once again another great script from Trickster!
Just one question, is it possible to make it so that only certain information shows depending on how many times you kill the enemy?
Like only have the items they drop show on the list when you have killed that enemy at least 5 times? or have HP only show after 3 times, etc. preferably something settable via RGSS/Call Script event?[/QUOTE]

Well you will have to edit the script to show that information

Window_Bestiary is the class that shows the information

The syntax for getting how many times you killed an enemy is

$game_system.killed[enemy_id]

where enemy_id is the id of the enemy

[QUOTE=kaze950;175454]Heh, I just now changed the script to make the graphic come from the picture folder.

Because in my game, several enemies are the same except for recolor. With your script, I can make the recolors not appear in the bestiary and by having a picture instead of the actual battler, I can have a picture of the enemy and all the recolors.


I assume to put the patch under the 2.1 SDK, but then I get this error
Trickster's Beastiary: The following script has been disabled because it is missing part of the SDK. Parts Required: 1, 2, and 3
Expand to see the code.
[/QUOTE]

Hmm seems like another bug with the current SDK, All we can do is wait for Seph to finish the new version
Oops, was an error on my part.
Another great SDK replacement for old scripts....

Nice work.
Sweet! I can definitely use this in a project or two (or three, or four...)

I recently considered requesting someone edit Momomo's bestiary to give it extra features (like a number of times defeated count) but this definitely solves my problems.
Thanks for replying saying you like it :)

I may do another bestiary for troops instead of just enemies, stay tuned...
[QUOTE=Trickster;175422]Instant Fail for not looking over the setup ;)[/QUOTE]

Oh I see. I hadn't downloaded it when I posted. :B

Hmmm strange. When I reset (F12) in the demo the map stops working correctly. I press keys and the hero moves but the screen doesn't update unless I open/close the menu.
Also although you can't escape battle 'Escape' isn't grayed out.

Maybe these are just demo only problems.
Oh! I just had an idea! It might be in the script, but I haven't seen it mentioned, nor have I downloaded the script yet.

Is there a way to make it so that some (or all) of the data only appears after using a "Scan" ability from your Steal script? It's kind of an annoying feature actually, but a good deal of RPGs with Scanning and Bestiaries do stuff like that, and I kind of like it some times.
I'll see what I can do :)
@Jirbytaylor: that's a bug in SDK 2.0, I guess SephirothSpawn fixed it in 2.2
@Trickster: I'm getting this error when opening the beastiary scene after adding some ghosts to a map encounter list
Quote:
Script 'Window_' line 384: NoMethodError occurred.

undefined method `encounter_list' for #
When I load the bestiary window, the following error shows up:
http://i30.photobucket.com/albums/c305/ ... error3.jpg[/IMG]

This highlighted area is the "problem":
http://i30.photobucket.com/albums/c305/ ... error4.jpg[/IMG]

Thank you for helping
Yes it is a bug in SDK 2.0, Seph will be posting the new version sometime today

I will looking into that tibuda

@Sturmy I have moved your topic to here

Updated to Version 1.1

You can now manually set the location for each enemy if you want
also the map bug has been fixed (Didn't know $data_mapinfos was a hash instead of an array :-/)
It's working perfectly now.
Keep the good work.
Even with the new SDK 2.2 i get many errors. I think the updated Method and Class library is the problem. I get plenty of errors saying unintialized method Real:Elements, and such.
You should be using Version 1.5 Don't use Version 2.0 right now

Seph messed something up in his Version 2.0 >:( (Goes to Yell at Seph)
[QUOTE=Sturmy;178678]Even with the new SDK 2.2 i get many errors. I think the updated Method and Class library is the problem. I get plenty of errors saying unintialized method Real:Elements, and such.[/QUOTE]

SDK 2.2 is not released yet, only in Trickster Time System.
Yeah the actual cause of the error is that Seph forgot to include something in his MACL 2.0 that he showed me but here is a quick fix for that

Yeah I probably should have pointed out that there are constants you need to check when using MACL or else some methods will not work correctly :-/ well something to improve for my 2.0

Content Hidden Spoiler
#==============================================================================
# Begin Setup Section
#==============================================================================
class Game_BattleAction
  #-------------------------------------------------------------------------
  # * Constants
  #-------------------------------------------------------------------------
  # You should only modify these if you are making custom commands
  # Set this to the basic ids that perform an attack effect
  ATTACK_USING = [0]
  # Set this to the kinds that perform a skill effect
  SKILL_USING  = [1]
  # Set this to the basic ids that perform a defend effect
  DEFEND_USING = [1]
  # Set this to the kinds that perform a item using effect
  ITEM_USING   = [2]
  # Set this to the basic ids that perform an escape effect
  ESCAPE_USING = [2]
  # Set this to the basic ids that perform a wait effect
  WAIT_USING  = [3]
end

class Sprite_ActorCharGraphic < Sprite
  #-------------------------------------------------------------------------
  # * Constants
  #-------------------------------------------------------------------------
  # Pose Names
  POSES = ['down','left','right','up']
  # Number of Frames Per Pose
  FRAMES = 4
end

class Game_Enemy
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  Real_Elements = 1,2,3,4,5,6,7,8
end
Expand to see the code.
I downloaded Sephs Test bed 4.0, and he has implemented the new SDK in his script. I have to use the updated version to use his partyswitcher. I'll just wait until the MACL is updated
Hey Trickster,
I just managed to add maps to the bestiary using event encounter. What I'm doing is to create a Hash in Game_System, filled with an array with the maps where a battle was started with the enemy (Interpreter#command_301). hmmmm... So confused... I guess you can understand my Ruby better than my bad english.
class Game_System
  attr_reader :enemy_maps
  def inititialize
    #......
    enemy_maps = {}
    enemy_maps.default = []
  end
end

class Game_Map
  attr_reader :map_id
end

class Interpreter
  alias_method :trick_bestiary_interpreter_command_301, :command_301
  def command_301
    # If not invalid troops
    troop = $data_troops[@parameters[0]]
    if troop != nil
      for member in troop.members
        enemy_id = member.enemy_id
        unless $game_system.enemy_maps[enemy_id].include?($game_map.map_id)
          $game_system.enemy_maps[enemy_id] << $game_map.map_id
        end
      end
    end
    trick_bestiary_interpreter_command_301
  end
end

class Window_Bestiary
  def draw_maps(*)
    #......
    # Adds event encounter locations
    maps += $game_system.enemy_maps[battler.id]
    #......
  end
end
Expand to see the code.
Oh, that is cool, I will add that in the next version, thanks for that

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=17461