So. I have been trying to create skills in XP which, when used, increase the user's SP rather than drain it. The database doesn't allow you to input negative values for SP costs. I can break this with events, but it's extremely tedious and I'm sure it can be done a much simpler way through scripts.
What I've been trying to do is alter the bit in Scene_Battle_4 which says
# Use up SP
@active_battler.sp -= @skill.sp_cost
by making it this
# Use up SP
if @skill.id = 13
@active_battler.sp += @skill.sp_cost
else
@active_battler.sp -= @skill.sp_cost
end
which works for making skills restore SP, except that it has made every skill do this now, not only skill 13.
I'm not a scripter, so there's probably a dumb mistake somewhere in calling the ID, but I can't figure out how else to do it. I've been poring over the modules in the Tons of Add-Ons that involve SP, like the SP Cost Status and Sp Damage, but they alter Game_Battler, and Scene_Battle_4 seems to be the place where the default system handles SP change. Well, there's something in Scene_Skill which does the same, but I think that's for when skills are used from the menu.
...Anyway, help would be very much appreciated by this newbie.