Blizz's Heal on level up

Started by PhoenixFire, March 27, 2014, 08:22:19 am

Previous topic - Next topic

PhoenixFire

   Alright, so here I am, using the script blizz made, for heal on level up, in the Tons of Addons collection. Playing through, I noticed that they're not healing on level up, which kind of defeats the purpose of setting it to true =/ so in my tinkering, I somehow came up with the conclusion of, why not just hardcode it right into the class Window_BattleStatus since that's where it goes. I cannot for the life of me, figure out how to get that to work though. I tried it in different, logical, spots, but it produces a syntax error each time, on the last line in the script, which is always an 'end' command. Thoughts, comments, ridicule? Help?

For those that need it, the code is right here:

Spoiler: ShowHide


#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Heal at LvlUp by Blizzard
# Version: 1.0b
# Type: Game Alteration
# Date: 4.12.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   90% compatible with SDK v1.x. 40% compatible with SDK v2.x. Might not work
#   with exotic CBS-es or exotic Status displays during battle.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#==============================================================================
# Window_BattleStatus
#==============================================================================

class Window_BattleStatus
 
  alias refesh_heal_at_lvlup_later refresh
  def refresh(number = nil)
    if $game_system.HEAL_AT_LVLUP
      $game_party.actors.each_index {|i|
          if @level_up_flags[i]
            $game_party.actors[i].hp = $game_party.actors[i].maxhp
            $game_party.actors[i].sp = $game_party.actors[i].maxsp
          end}
    end
    if number == nil
      refesh_heal_at_lvlup_later
    else
      refesh_heal_at_lvlup_later(number)
    end
  end
end

Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

G_G

In ToA, you actually did turn it on right? You enabled it? If so, do you have any other script under ToA that could be conflicting with Window_BattleStatus, such as a custom battle system?

PhoenixFire

lolz, yes, I did. It's on. I actually checked that first to make sure haha.. And no, it's the last set of scripts that I have, right above main. Could it be affected by scripts above it? Because if yes, than yes, I have scripts that might mess with it.. I should check to be sure about that though.
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

Blizzard

Are you using some sort of custom battle result status window? This one could be messing with it. Try putting it above Tons of Add-ons if you haven't already.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

PhoenixFire

Quote from: PhoenixFire on March 27, 2014, 08:35:42 pm
...it's the last set of scripts that I have, right above main...


yeah, I thought about that. ToA is right above main, with nothing else under it. I do have the custom battle results active though, so I was wondering, is it possible that it is somehow affecting the heal on level up? I didn't think it would since all other ToA scripts are working the way they're supposed to..
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

G_G

It's possible that your battle result script isn't setting the level up flags properly. That's how Blizz's heal on level up works.

KK20

SHIFT + CTRL + F for Window_BattleStatus in any of your scripts before Tons and look for the method 'refresh' in them. Post those up. If there's nothing out of the ordinary, then it's what G_G says.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

PhoenixFire

Quote from: gameus on March 28, 2014, 10:24:58 am
It's possible that your battle result script isn't setting the level up flags properly. That's how Blizz's heal on level up works.


How would I go about doing this? After looking through with KK20's suggestion, I'm pretty sure that's the issue.
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

KK20

How about finding level_up( and see if your script has that in there.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

PhoenixFire

only has draw_actor_level_up(actor, x, y)
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

G_G

It might help if you posted the custom battle results, then we could look at it.

PhoenixFire

Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

KK20

Well that makes sense. AA doesn't even use the variable @level_up_flags. How about changing @level_up_flags to $draw_level_up?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

PhoenixFire

To be honest, I may have done it wrong, because that didn't make a difference, unless I misunderstood you. You meant to change that in the levelup script, right?
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

KK20


   if $game_system.HEAL_AT_LVLUP
     $game_party.actors.each_index {|i|
         if $draw_level_up[i]    #<================================= That
           $game_party.actors[i].hp = $game_party.actors[i].maxhp
           $game_party.actors[i].sp = $game_party.actors[i].maxsp
         end}
   end

I mainly got the idea from AA's Window_BattleResult#refresh

   for i in 0...$game_party.actors.size
     x = 64
     y = i * 110
     actor = $game_party.actors[i]
       if $draw_level_up[i] == true   #<============= Here
         #print($draw_level_up[i].to_s)
         draw_actor_level_up(actor, x, y)

       end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!