Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: LiTTleDRAgo on February 18, 2012, 09:17:44 pm

Title: [XP][VX][VXA] Colorful Description
Post by: LiTTleDRAgo on February 18, 2012, 09:17:44 pm
Colorful Description
Authors: LiTTleDRAgo
Version: 1.0
Type: Menu Add-on
Key Term: Menu Add-on



Introduction

Add color to your description


Features




Screenshots

Spoiler: ShowHide
(http://i.imgur.com/ekT6m.jpg)



Script

Here (http://littledrago.blogspot.com/2012/02/rgss23-colorful-description.html)


Instructions

Insert \c[id] to your description
ex :
    Restores \c[3]HP\c[0] to one ally.


Compatibility

---


Credits and Thanks




Author's Notes

~
Title: Re: [XP][VX] Colorful Description
Post by: AngryPacman on February 19, 2012, 03:40:56 am
Nice script. Nifty that you made it compatible with all 3 RGSSs.
A little tip in REGEXP, and it barely matters, but instead of [0-9] you can just use \d, i.e.:
/\\[Cc]\[(\d+)\]/

You can also make it case insensitive if you add an i after the slash at the end.
/\\c\[(\d+)\]/i

Again, nice and nifty script. My only other tiny problem with it is that you overwrote the set_text method. While it's not that big a deal, you could've done the same thing just by going:
alias coloured_descriptions_stxt set_text
def set_text(t = '', a = 0, *args)
  t.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  coloured_description_stxt(t, a, *args)
end

Not 100% that would work though... :S
Title: Re: [XP][VX] Colorful Description
Post by: ForeverZer0 on February 19, 2012, 04:12:18 am
Or just alias draw_text of the Bitmap class. Then it works in everything.