Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VXA] Monster Catalogue

Started by modern algebra, February 05, 2012, 12:49:04 AM

0 Members and 3 Guests are viewing this topic.

pacdiggity

Quote from: modern algebra on April 03, 2012, 11:04:23 PM
Great Notetag War of '09

Had I been around I would've been with you every step of the way. \thing[numbers] always seems to be easier to me, and I find it easier to write out /\\thing\[(\d+)\]/i than... I can't even remember how to do Yanfly-style tags. MA-style has always made more sense to me  ;D
it's like a metaphor or something i don't know

whitedahlia

Is there anyway to show the description when you analyze them in battle?

Wiimeiser

Still waiting on feedback regarding the test project I uploaded. You might want to add scrolling between levels/difficulties.

Wiimeiser


Wiimeiser

Should I just remove Yanfly's two scripts and use an overly complex series of events to achieve a similar but less satisfying result? Or should I remove this script and use Scan for YEA- Show Target Info or just remove the skill entirely?(Not actually remove, but make Rayna unable to learn it)

modern algebra

I'll try to get to look at it today or tomorrow.

Wiimeiser

So, how's progress? I noticed you were offline for sometime...

Wiimeiser

#57
Since I haven't been getting much help with this I've decided to remove this script from my game. I will, by extension, remove the three script calls using it (two in the test room and one in a library) and dummy out the "Scan" skill that would've analysed monsters. I'm not doing it tonight, I'll do it when I get around to it.

In hindsight, maybe I shouldn't have made the test project's default font Wingdings...


EDIT: Dummied the script out (it's there but inaccessible) and the skill. Also made a new test project and uploaded two versions, with and without Doppelganger. I haven't tested them yet but I doubt anything will be different.

modern algebra

OK, well normally there is a class method which returns the class of an object in Ruby. Borrowing from the way the default scripts setup actors, Yanfly overwrites the class method of Game_Enemy to instead return the RPG::Class object of a monster, which would be nil for a regular monster and the actor's class for a doppleganger. This was a problem because I was using monster.class instead of simply Game_Enemy to account for the possibility that another script could make enemies of a different (RGSS3) class.

Anyway, paste the following into a new slot anywhere above Main and below the Monster Catalogue and it should fix the problem:


#==============================================================================
#    MA Monster Catalogue + Yanfly's Doppelganger
#      Compatibility Patch
#    Version: 1.0.0
#    Author: modern algebra (rmrk.net)
#    Date: July 25, 2012
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Descriptions:
#
#    This fixes an incompatibility between Yanfly's Doppelganger script and
#   my Monster Catalogue.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Paste this script into its own slot in the Script Editor, above Main but
#   below the Monster Catalogue script.
#==============================================================================

#==============================================================================
# ** Window_MonsterCard
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    overwritten method - shown_stats
#==============================================================================

class Window_MonsterCard 
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Showable Stats
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def shown_stats
    stats = (monster.nil? || !show_data?) ? [] : MAMC_CONFIG[:shown_stats].keys
    stats.keep_if { |stat| Game_Enemy.method_defined?(stat) }
    stats
  end
end


Sorry that I took such a long time to look into it. I was really uninterested in RM for the past few months and only just recently decided to return to it.

Wiimeiser

Thanks, that worked. I had to reinstate Scan's functionality (but all I did was delete the notebox data) and the script call in the test room (I only deleted one). I'll use the one in the library for something else, like analyzing past bosses or something (like the bin in Paper Mario: The Thousand Year Door)

lostboyrufio

Hi MA, I've come across a bug recently and I'm not sure as to why. I tried using your script on my current project as well as on a clean one with no other scripts. I get a syntax error in line 1076 on both projects:

unexpected tLBRACK, expecting ')'
[:frame_shadow_colour]))

I've tried going through to see if there was a typo anywhere within the few lines surrounding this one, or if there was a missing ) after a line but I couldn't find anything. I tried commenting the line out but then the error just continues to move downwards. I copied the script directly from your Pastebin link. If you could help it would be much appreciated.

modern algebra

I am not receiving that error, sorry. Also, that's not line 1076 in the pastebin script. Are you sure you correctly copied the script off pastebin? Try downloading it off pastebin and then select all in the txt file that is produced.

If that doesn't work, I will need you to share a demo with the error since I cannot reproduce the error.

lostboyrufio

Aha! Of course it would end up being something as simple as clicking the pasteboard icon to copy it. I just copied it straight from the doc at the bottom of the page before. Now I feel stupid, but thanks for pointing out the obvious!

Chansel

Hi there!
This script does almost exactly what I want, with one small detail missing: would it be possible to show the 'rates' (Element Rate, Debuff Rate, State Rate, State Resist) if the enemy has any? Perhaps in a second screen that you get by pressing the action button a second time?
If not (which I would understand, because I feel like this is a rather large request), would it be possible to show the description when using the 'analyze' skill? That way it's possible to write the rates there :)

WCouillard

Awesome script. A few issues and questions, though.

I use this script ONLY for the \analyze aspect of using a skill or item to scan an enemy.

The only error I've come across is when changing what stats are shown. In my project, the Luck stat represents the Level of the enemy, so when I changed "Vocab.param(7)", to "Level", the script would crash citing an uninitialized constant. Not a big deal, I just made it so the Level (Luck) wasn't shown. But if there could be a fix for that, it'd be awesome.

Is there a way to completely remove the border around the text in the window when using an analyze skill. The information is already contained within a window, so it looks kind of weird to me.

For species, I think it should be possible to add more than one species to an enemy, for when you have enemies that are, let's say, made of fire and can fly.

Then you could have something like:

Fire Demon
Flying

Letting the player know to use weapons or skills that have increased effectiveness against flying enemies, etc. Currently, the script only displays one species for an enemy.

That's all for now. Great work on this script!

modern algebra

Well, for the LUK crash, you need to remove the colon. So, currently it is:


    :luk  => :"Vocab.param(7)",


What you did is change it to:


    :luk  => :"Level",


But that is wrong. You need to delete the colon before "Level", so that it is this:


    :luk  => "Level",


Alternately, you could have just changed the term for Luck in the database.

As for multiple species, you are right that would be a good feature to add and it wouldn't be overly difficult to do, but I don't intend to return to this script at this time. I don't have much time for RM these days, and I have several prior commitments.

Lord Arkausey

How can I add this to the PAC Main Menu Ace script? When I use this script with Pacman's it gives me an error. It would be nice if I could add the monster catalogue to his menu.

PS: I'm also using Pacman's Menu Compact Display Addon.
Soo long!

bluntsword

If you can show him what the error message is or looks like, he may be able to give you a little more help bud.

Lord Arkausey

Here:


I hope you can help  :)

Bye
Soo long!

pacdiggity

#69
Can you show me your setup for the main menu?

Also I was definitely about to say what Modern Algebra says in the next post.
it's like a metaphor or something i don't know

modern algebra

I think the problem is with the way my script automatically inserts commands into the menu. It is intended to bypass any custom scripts and add it directly, but it runs into a problem where your script relies on there being an entry in your COMMANDS array to show an icon. As such, he needs to turn off the automatic adding in my script, but once he does that there is no longer any method to call the scene, since that method relies on it going into an array in my script.

Anyway, what you need to do is all of the following. First, go into my script. Around line 211, you should see:


  # :menu_access - This value determines whether the Bestiary is accessible
  #    from a command in the menu. If true, then it is. If false, it isn't.
  :menu_access => true,


Change that to false:


  # :menu_access - This value determines whether the Bestiary is accessible
  #    from a command in the menu. If true, then it is. If false, it isn't.
  :menu_access => false,


Next, insert the following code into its own slot above Main but below Materials:

#==============================================================================
# ** Scene_Menu
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method -
#==============================================================================

class Scene_Menu
  def mamcpmm_bestiary_command
    SceneManager.call(Scene_MonsterCatalogue)
  end
end


Next, you need to add the following setup in the PAC Main Menu configuration, wherever you want it to show up:


  #----------
    ["Bestiary",
    'mamcpmm_bestiary_command',
    335,
    'true'],


You can name it whatever you want and change the icon as well, naturally.

Lord Arkausey

Thank you, MA! It works perfectly!

But can I do the same thing with your Quest Log?
Soo long!

modern algebra

Yeah, pretty well. You will need to add a different method to Scene_Menu, like this:



  def maqjpmm_quest_command
    SceneManager.call(Scene_Quest)
  end


And in Pacman's configuration you would need to use that method name. Otherwise it's the same once you turn off :menu_access in the Quest Journal.

Lord Arkausey

Thanks a lot, MA! It works! :D
Soo long!

schmacht

Hi all,
first of all: sorry for bad english ;-)

I want to use your script in my game. When I open the window from menu, everything works.
But when I start a battle, and your script should caputre the monster information, i become the follow error:
Quote
Script 'Monster Catalogue 1.1' line 1354: NoMethodError occured.
undefined method 'method_defined?' for nil:NilClass

HELP PLEASE ;-)