Save-Point
BattleItemHelp 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)
+--- Thread: BattleItemHelp XP (/thread-8937.html)



BattleItemHelp XP - kyonides - 03-30-2024

BattleItemHelp XP

by Kyonides

Introduction

This scriptlet allows you to change the way the help window works while selecting an enemy. Even if you've just selected the attack option, it will be displayed on screen and hide at the right time.

Just take a look at the picture below to learn what will you get from it.

[Image: attachment.php?aid=2100]

Code:
# * BattleItemHelp XP * #
#   Plug & Play Script
#   Scripter : Kyonides Arkanthes
#   2024-03-29

class Game_BattleAction
  def attack?
    @kind == 0 and @basic == 0
  end

  def skill?
    @kind == 1 and @skill_id > 0
  end

  def item?
    @item_id > 0
  end

  def enemy_target?
    attack? or skill?
  end
end

class Window_Help
  def set_actor(actor)
    if actor != @actor
      self.contents.clear
      draw_actor_name(actor, 4, 0)
      draw_actor_state(actor, 140, 0)
      draw_actor_hp(actor, 284, 0)
      draw_actor_sp(actor, 460, 0)
      @actor = actor
      @text = nil
      self.visible = true
    end
  end

  def set_enemy(enemy)
    @text = nil
    contents.clear
    draw_actor_name(enemy, 4, 0)
    draw_actor_state(enemy, 140, 0)
    draw_actor_hp(enemy, 284, 0)
    draw_actor_sp(enemy, 460, 0)
  end
end

class Window_Skill
  def visible=(bool)
    super(bool)
    update_help if @help_window
  end
end

class Scene_Battle
  alias :kyon_blt_item_help_scn_btl_start_enemy_sel :start_enemy_select
  def start_enemy_select
    kyon_blt_item_help_scn_btl_start_enemy_sel
    @enemy_arrow.update_help
    @help_window.visible = @active_battler.current_action.enemy_target?
  end
end

Terms & Conditions

Free for use in non-commercial Gamer games.
It's not that complex to be used in commercial games, IMHO. Happy with a sweat
Due credit is mandatory. Serious
Mention this forum in your game credits.
That's it! Tongue sticking out