Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Asscersories that add more Slots?

Is there a piece of script so that when equipping an acsessory, you can get another acsessory slot? Note that no other modifications have been made to the equipment slots.

Also, is there a script mod so that using the standard battle system window, it displays Current / Max HP and Current / Max SP?
 

poccil

Sponsor

For the second question, add the following script code to a new script section:

Code:
class Window_Base
  def draw_actor_hp_sp(x, y, word, width, value, maxvalue)
    bitmap=self.contents
    valuewidth=bitmap.text_size(value.to_s).width
    maxvaluewidth=bitmap.text_size("/"+maxvalue.to_s).width
    bitmap.font.color = system_color
    bitmap.draw_text(x, y, bitmap.text_size(word).width, 
       32, word)
    self.contents.font.color = value == 0 ? knockout_color :
        value <= maxvalue / 4 ? crisis_color : normal_color
    bitmap.draw_text(x+width-maxvaluewidth-valuewidth,
     y, valuewidth, 32, value.to_s)
    self.contents.font.color = normal_color
    bitmap.draw_text(x+width-maxvaluewidth,
     y, maxvaluewidth, 32, "/"+maxvalue.to_s)
  end
  def draw_actor_hp(actor, x, y, width = 144)
    draw_actor_hp_sp(x,y,$data_system.words.hp,width,actor.hp,actor.maxhp)
  end
  def draw_actor_sp(actor, x, y, width = 144)
    draw_actor_hp_sp(x,y,$data_system.words.sp,width,actor.sp,actor.maxsp)
  end
end
 
poccil":1qd32w96 said:
For the second question, add the following script code to a new script section:

Code:
class Window_Base
  def draw_actor_hp_sp(x, y, word, width, value, maxvalue)
    bitmap=self.contents
    valuewidth=bitmap.text_size(value.to_s).width
    maxvaluewidth=bitmap.text_size("/"+maxvalue.to_s).width
    bitmap.font.color = system_color
    bitmap.draw_text(x, y, bitmap.text_size(word).width, 
       32, word)
    self.contents.font.color = value == 0 ? knockout_color :
        value <= maxvalue / 4 ? crisis_color : normal_color
    bitmap.draw_text(x+width-maxvaluewidth-valuewidth,
     y, valuewidth, 32, value.to_s)
    self.contents.font.color = normal_color
    bitmap.draw_text(x+width-maxvaluewidth,
     y, maxvaluewidth, 32, "/"+maxvalue.to_s)
  end
  def draw_actor_hp(actor, x, y, width = 144)
    draw_actor_hp_sp(x,y,$data_system.words.hp,width,actor.hp,actor.maxhp)
  end
  def draw_actor_sp(actor, x, y, width = 144)
    draw_actor_hp_sp(x,y,$data_system.words.sp,width,actor.sp,actor.maxsp)
  end
end

Where do I place this?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top