RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

script tweak. Bestiary hide category until discovered.

Started by kawagiri, January 05, 2017, 02:18:58 AM

0 Members and 1 Guest are viewing this topic.

kawagiri

Hi, I was hoping someone could help me tweak the code a little on the following script to keep a category hidden until it's list contains at least 1 entry.

The script is Venka's Bestiary v1.8 which can be found here in full: https://www.dropbox.com/s/j43haetbe00k0gq/Beastiary.txt?dl=0



the line of code I believe is needed for modification is the following, however, not being a coder I have almost 0 knowledge of how to link it up correctly. [line 921-923]

  def make_command_list
    @categories.each{|key, info| add_command(info[:name], key)}
  end


I thought it might be something simple like inserting an if function before adding a command to check if there is a monster in the list discovered. But to someone like me with no real coding experience, I couldn't fathom how to insert a check before the category command list is formed.


Either the seemingly simpler method I'm wanting or an option to hide only some categories until a monster is discovered would be brilliant if anyone knows how to solve my issue I would be very grateful for your help  :)

I love the script but the author seems inactive and I'd like to keep some locations secret until visited.

Thanks  :)