The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Pixie1001 on December 24, 2013, 05:54:53 AM

Title: [VX] Expanded Descriptions Script
Post by: Pixie1001 on December 24, 2013, 05:54:53 AM
Basically, I want a script that'll allow me to override the default description input on certain skills or items, and allow me to write a longer one in the notes section or something. I've been making my abilities quite complicated, so all my skills need a lot of information for the player to know what they do, and right now the space provided is far to small - and even then if you use more than 3/4 of the allowed characters it squeezes them so closely together that the tool tips are almost illegible.

So basically, the script would need to allow a larger limit for characters when creating item and skill descriptions and provide more space in the menu to display said information.

Th only similar script I could find was Yanfly's 'Help Advanced' script, but I couldn't figure out how it worked and it didn't seem to allow you to input additional characters in the description.

Help would be appreciated if you know of any scripts like this that have eluded me or would be willing to whip something up :)
Title: Re: [VX] Expanded Descriptions Script
Post by: IXFURU on January 23, 2014, 02:56:38 PM
Hey, I know I'm kind of late here.  But if you still want this let me know.

If you still do, I was wondering if you would want the help window itself longer, (Like maybe a line or two extra for display) or would you rather have it so that an input key brought up a further explanation?
Title: Re: [VX] Expanded Descriptions Script
Post by: Pixie1001 on May 22, 2014, 11:23:06 AM


Sorry for the late reply, to your late reply, but I'd kinda given up hope of anyone seeing this XD Anyway, if anyone's still around I'm still interested in having this script made.

I'm thinking something that brings up a separate screen with additional information would be good, as simply elongating the already present UI elements kinda clutters the screen. So basically when you arrow key over the spell it should say something brief like "Hurl a writhing mass of demonic energy, damaging and silencing the enemy", and then if you pressed the SHIFT key or something it'd bring up a larger window with like 10 or so lines which explains what exactly 'silenced' means, what states the spell combos with, maybe some advice on its use, exactly how much damage it deals (E.g. Magic/2 + 40 damage) and a bunch of other relevant details so the player knows exactly what's going on.

Hopefully it isn't all to complicated :)

I think I've got the quest journal script, possibly that paragraph formatter one that goes with it and advanced text as well as monster scanner. I don't have access to my game right now, so I'm not sure if I've missed anything or if those are the specific names, but I could probably dig them all up if anyone decides to take this on.
Title: Re: [VX] Expanded Descriptions Script
Post by: munkis on June 10, 2014, 11:38:16 AM
Here's one for the items:

[spoiler]class Sprite
 
  def draw_icon(icon_index, x, y, enabled = true)
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    self.bitmap.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  end
 
end

class Window_Help < Window_Base
 
  @@SCROLL_DELAY = 3     # seconds
  @@SCROLL_SPEED = 1     # pixels / frame (60 frames / sec)
  @@SHOW_ICONS   = true  # display icons for items and skills?
 
  alias :pre_scrolling_initialize :initialize
  def initialize
    pre_scrolling_initialize
    @internal_frame_count = 0
    @text_is_long = false
    @icon_sprite = Sprite.new
    @icon_sprite.x = self.x + 16
    @icon_sprite.y = self.y + 16
    @icon_sprite.z = self.z + 1
    @icon_sprite.bitmap = Bitmap.new(32, 32)
  end
     
  def set_text(text, align = 0)
    unless (text == @text) && (align == @align)
      @internal_frame_count = 0
      txt_width = self.contents.text_size(text).width
      @text_is_long = txt_width > (self.width - 32) 
      self.contents.dispose
      w = @text_is_long ? (txt_width + self.width - 32) : self.width - 32
      self.contents = Bitmap.new(w, self.height - 32)
      self.contents.clear 
      self.ox = 0
      self.contents.font.color = normal_color
      if ((i = get_icon_index(text)) != nil)
        draw_sprite(i, 0, 0)
        self.contents.draw_text(32, 0, self.contents.width, WLH, text, align)
      else
        @icon_sprite.bitmap.clear
        self.contents.draw_text(4, 0, self.contents.width, WLH, text, align)
      end
      @text = text
      @align = align
    end   
  end
 
  def draw_sprite(icon_index, x, y)
    @icon_sprite.bitmap.clear
    bitmap = Graphics.snap_to_bitmap
    rect = Rect.new(@icon_sprite.x, @icon_sprite.x,
                    @icon_sprite.bitmap.width, @icon_sprite.bitmap.height)
    @icon_sprite.bitmap.blt(x, y, bitmap, rect)
    @icon_sprite.draw_icon(icon_index, x, y)
  end
 
  def get_icon_index(desc)
    return nil unless @@SHOW_ICONS
    for item in $data_items
      return item.icon_index if !item.nil? && item.description == desc
    end
    for skill in $data_skills
      return skill.icon_index if !skill.nil? && skill.description == desc
    end
    return nil   
  end
 
  def update
    super
    @internal_frame_count += 1
    if ((@internal_frame_count > @@SCROLL_DELAY * 60) && @text_is_long)
      if self.ox >= (self.contents.width - self.width + 48)       
        self.ox = 0
        @internal_frame_count = 0
      else
        self.ox += @@SCROLL_SPEED
      end
    end
  end
 
  def dispose
    super
    @icon_sprite.dispose
  end
 
end
[/spoiler]

The text will scroll across the window.  It was made by BigEd781, so credit him.  I don't have one for the skill descriptions though.  This'll do item and skill descriptions.
Title: Re: [VX] Expanded Descriptions Script
Post by: Pixie1001 on June 13, 2014, 12:41:57 PM
Omg, thank you so much! I've been stuck in a rut for a while not knowing how complicated I could make my skills.

You have been a great help!