Save-Point
Super Skill Nerf XP - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Super Skill Nerf XP (/thread-12789.html)



Super Skill Nerf XP - kyonides - 09-06-2025

Super Skill Nerf XP

by Kyonides

Introduction

Nerf! Nerf! Nerf your favorite super duper skills!
Yes, even up to the point where your heroes can only use them once per battle!

Just add the Skill ID to the ONLY_ONCE_SKILL_IDS array and that's it!

And just in case you want to clear this skill use limit once per call:
Code:
$game_party.clear_used_skills!

The Script

Code:
# * Super Skill Nerf XP * #
#   Scripter : Kyonides
#   v1.0.0 - 2025-09-06

# Nerf! Nerf! Nerf your favorite super duper skills!
# Even up to the point where your heroes can only use them once per battle!

# Just add the Skill ID to the ONLY_ONCE_SKILL_IDS array and that's it!

# * Optional Script Call * #
# - Just in case you want to clear this skill use limit once per call:
# $game_party.clear_used_skills!

module RPG
  class Skill
    ONLY_ONCE_SKILL_IDS = [57]
    def cast_only_once?
      ONLY_ONCE_SKILL_IDS.include?(@id)
    end
  end
end

class Game_Battler
  alias :kyon_ssn_gm_btlr_sk_fx :skill_effect
  def skill_effect(user, skill)
    user.used_skills[skill.id] = true if user.actor?
    kyon_ssn_gm_btlr_sk_fx(user, skill)
  end

  def actor?
    false
  end
end

class Game_Actor
  alias :kyon_ssn_gm_act_stp :setup
  alias :kyon_ssn_gm_act_sk_cn_use? :skill_can_use?
  def setup(actor_id)
    kyon_ssn_gm_act_stp(actor_id)
    @used_skills = {}
  end

  def skill_cast_only_once?(skill_id)
    return unless skill_used?(skill_id)
    skill = $data_skills[skill_id]
    skill != nil and skill.cast_only_once?
  end

  def skill_can_use?(skill_id)
    return false if skill_cast_only_once?(skill_id)
    kyon_ssn_gm_act_sk_cn_use?(skill_id)
  end

  def skill_used?(skill_id)
    @used_skills[skill_id] != nil
  end

  def clear_used_skills!
    @used_skills.clear
  end

  def actor?
    true
  end
  attr_reader :used_skills
end

class Game_Party
  def clear_used_skills!
    @actors.each {|actor| actor.clear_used_skills! }
  end
end

class Scene_Battle
  alias :kyon_ssn_scn_btl_btl_end :battle_end
  def battle_end(result)
    $game_party.clear_used_skills!
    kyon_ssn_scn_btl_btl_end(result)
  end
end

Terms & Conditions

Free as in Beer beer for non commercial games. Gamer
Include my nickname in your game credits.
Thank Opozorilo for making the script request. (Optional aka a Joke)
That's it! Tongue sticking out