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:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# 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
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?
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.
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.
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..
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.
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.
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.
How about finding level_up( and see if your script has that in there.
only has draw_actor_level_up(actor, x, y)
It might help if you posted the custom battle results, then we could look at it.
Right here: http://forum.chaos-project.com/index.php/topic,14009.0.html
Well that makes sense. AA doesn't even use the variable @level_up_flags. How about changing @level_up_flags to $draw_level_up?
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?
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