Help - Search - Members - Calendar
Full Version: Munkis' Quick Bio
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
munkis
Munkis' Quick Bio

Version: 1.0
Author: munkis
Release Date: 02/08/2012


Exclusive Script at RPG RPG Revolution


Introduction
Just adds a small little blurb of info about the character to the status screen. Would probably be most useful in a story-driven game than an action hackfest.

Features
You can move the window and change the color, make paragraphs for the characters. Not really that much too it.

Script
CODE
#------------------------------------------------------------------------------
#  * Munkis' Quick Bio on Status Screen V 1.0
#  * Made by munkis
#    •”•••••••••••—
#    •‘ FEATURES •‘
#    •š•••••••••••
#  * Adds a small window to the status screen with a little blurb about the
#    character.  Probably more useful in a story-driven game than an action
#    hackfest.
#  * Uses one alias and one custom class, so any scripts that modify the status
#    screen should be compatible.
#  * V 1.0: Initial release
#------------------------------------------------------------------------------

module MNK_Bio

  BIO_PROPERTIES = [306,50,Color.new(0,0,0,140),Color.new(255,0,0,160)]

  PARAGRAPH = []

  PARAGRAPH[0] = "Mediocrity incarnate, Ralph is the star of pretty much every script demo EVER.  Who says you have to stand out to be notable?"

  PARAGRAPH[1] = "From overused to undeused, Ulrika is probably one of the best RTP characters few people have heard of."

  PARAGRAPH[3] = "Everyone needs a cleric in their party, right?"

end
class Window_Status < Window_Base
  alias munkis_bio_refresh refresh
  def refresh
    munkis_bio_refresh
    write_bio(MNK_Bio::BIO_PROPERTIES[0],MNK_Bio::BIO_PROPERTIES[1])
  end
  def write_bio(x,y)
    rect = Rect.new(x-5,y-22,63,WLH)
    contents.fill_rect(rect,MNK_Bio::BIO_PROPERTIES[2])
    lsize = 2
    lcolor = MNK_Bio::BIO_PROPERTIES[3]
    contents.fill_rect(rect.x, rect.y, lsize, rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y, rect.width, lsize, lcolor)
    contents.fill_rect(rect.x + rect.width - lsize, rect.y, lsize, rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y + rect.height - lsize, rect.width, lsize, lcolor)
    self.contents.font.color = system_color
    self.contents.draw_text(x,y-23, 120, WLH, "Bio:")
    rect = Rect.new(x-5,y,307,144)
    contents.fill_rect(rect,MNK_Bio::BIO_PROPERTIES[2])
    lsize = 2
    lcolor = MNK_Bio::BIO_PROPERTIES[3]
    contents.fill_rect(rect.x, rect.y, lsize, rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y, rect.width, lsize, lcolor)
    contents.fill_rect(rect.x + rect.width - lsize, rect.y, lsize, rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y + rect.height - lsize, rect.width, lsize, lcolor)
    self.contents.font.color = normal_color
    if MNK_Bio::PARAGRAPH[$game_party.last_actor_index] != nil
      self.contents.draw_paragraph(x,y+5, 295, 130, MNK_Bio::PARAGRAPH[$game_party.last_actor_index])
    else
      self.contents.draw_paragraph(x,y+5, 295, 130, "ERROR 404: FILE NOT FOUND")
    end
  end
end


Customization
Other than what I mentioned in "features", you may have to move other parts of the status screen around to make room. Most people can simply look at lines 22-28 of Window_Status to see what can be moved.

Compatibility
No known issues. Requires modern_algebra's paragraph formatter.

Screenshot
Not sure if that's really necessary...

DEMO
...or that either.

Installation
Place in MATERIALS, above MAIN.

FAQ
Q: ZOMG teh scriptz doesn't werk!!!
A: First of all, be more specific. Second, all reports typed in chat-speak or 1337-speak will be ignored.

Terms and Conditions
I don't mind this script being posted or linked on other sites AS LONG AS YOU GIVE CREDIT!!! Same goes for using this in your project. Contact me if you want to use this in a commercial project.

Credits
Credit goes to me for the script.
Pera
Can you help me, I always get this error when entering status screen:
Script 'Quick Bio' line 55: NoMethodError occured. undefined method `draw_paragraph' for # <Bitmap:0x1a6cac8>
munkis
You need modern_algebra's paragraph formatter; my fault for not saying that in the OP.
Pera
QUOTE (munkis @ Mar 2 2012, 08:35 AM) *
You need modern_algebra's paragraph formatter; my fault for not saying that in the OP.

Oh, great. Works like a charm now. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.