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.

Remove SP in Skill Menu.

Hey Everyone,

I have a small question, am I able to remove the amount of SP used of certain skills, next to the skills name in the skill menu durning battles, and just in the normal Menu? I already found out how I could remove the SP bar at a characters status durning battle and in the menu, so its like only the amount of SP used of certain skills.

Thank you :)

x, Daisy
 
There is a script that allows you to remove the skill cost as long as the skill cost is set to "0" SP. I will have to look up the author of this script, because it is not credited in the script (forgive my horrible memory, I've had this script for a while). Just insert this in a new section above main:

#==============================================================================
# ** Window_Skill
#------------------------------------------------------------------------------
#  This will hide the zero if the skill doesn't cost any SP.
#==============================================================================
class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Item
  #    index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    if @data[index].sp_cost != 0
    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
    end
  end
end


I hope this is what you were looking for. If you wanted it to be set to something other than zero, just change the value in "if @data[index].sp_cost != 0" to whatever you wanted it to be.
 

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