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.

Hello. I need a LoD script.

Kanuto

Member

I'm just wondering if there is a script that was made to enable the character to gain a percentage of HP when the "defend" skill is used.
I guess the example I can give is the one that Legend of Dragoon battle system utilizes.

Ive looked at the scripts but I didnt really find this, unless I overlooked, and If I did, apologies.
 
This'll only work with the default battle system, but it works nonetheless :D
Just go to Scene_Battle 4 at line 11. Press enter, and paste one of the following codes:
If you want to recover a fixed amount of hp:
Code:
for i in $game_party.actors
  if i.current_action.kind == 0 and i.current_action.basic == 1
    heal_hp = (insert the amount of HP you want recovered here.)
    i.hp = [i.hp + heal_hp, i.maxhp].min
    [COLOR=Red]i.damage = -heal_hp
    i.damage_pop = true[/COLOR]
  end
end
If you want to recover a percentage of hp:
Code:
for i in $game_party.actors
  if i.current_action.kind == 0 and i.current_action.basic == 1
    percentage = (insert the percentage of HP you want recovered here. Don't use a % sign after it.)
    heal_hp = i.maxhp * (percentage.to_f / 100)
    i.hp = [i.hp + heal_hp, i.maxhp].min
    [COLOR=Red]i.damage = -heal_hp
    i.damage_pop = true[/COLOR]
  end
end

the red lines are optional; they decide whether the amount of hp they healed will "pop up" or not. Hope that helps :thumb:
 

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