back on the old forum WcW had started working on a blood mage script for me. He had finished it but there were a bug in it and when I went to use magic not only would it take my Hp like I wanted it to but it still took my Mp. I was just wongering if anybody could help me finish it.
#============================================================================
# Blood Mage Magic Script v 1.0.0
# by WcW
#
# Introduction:
# I made this script for Akkein(Akkrin) at http://chaosproject.co.nr/ at his request.
# If he has allowed you to use this, enjoy. If he has not, ask him.
#
# Features:
# - Allows for certain classes to use up their HP instead of MP when using
# spells.
# - Lightweight.
#
# Instructions:
# Place this script below the default scripts that come with RMXP, but above
# all of Blizzard's scripts and the "Main" script that is included with RMXP.
# Then add the IDs of all your "Blood Mage" classes to the [] thingy in the
# CONFIG section.
#
# Compatibility:
# This has no known compatibility issues, but it might because it edits tiny
# parts of Scene_Battle. If you find any problems, please post them at
# http://chaosproject.co.nr/.
#
# WcW, Signing Off
#============================================================================
#----------------------------------------------------------------------------
# * CONFIG
# Configuration section
#----------------------------------------------------------------------------
class Game_System
attr_reader :bloodmages
alias init_bloodmage_later initialize
def initialize
@bloodmages = [] # Between the "[" and "]", add the ID of each class the you
# want to be a blood mage and seperate each with a comma.
init_bloodmage_later
end
end
# Below lies the code
#----------------------------------------------------------------------------
# * Battle Scene
#----------------------------------------------------------------------------
class Scene_Battle
#--------------------------------------------------------------------------
# * Make Skill Action Result
#--------------------------------------------------------------------------
def make_skill_action_result
@skill = $data_skills[@active_battler.current_action.skill_id]
unless @active_battler.current_action.forcing
unless @active_battler.skill_can_use?(@skill.id)
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
if @active_battler.is_a?(Game_actor) &&
$game_system.bloodmages.include?(@active_battler.class_id)
@active_battler.hp -= @skill.sp_cost
else
@active_battler.sp -= @skill.sp_cost
end
@status_window.refresh
@help_window.set_text(@skill.name, 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = @skill.common_event_id
set_target_battlers(@skill.scope)
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
end
There's a bug in a line where it says Game_actor. It should be Game_Actor. That's all I can tell that is wrong. Try fixing it, it may just be the cause of the problem.
sorry but now the script crashes when I get into a fight and have him attack. it says
Script 'Blood Mage' line 62: NameError occurred. Uninitialized constant Scene_Battle::Game_actor
It should be Game_Actor, not Game_actor. I suppose I wasn't clear enough. >.<
I did change it but that is still what pops up becase before it was Game_actor it never poped up but when i changed it the error started poping up which now that I think about it is really wierd.
So ya now it says
if @active_battler.is_a?(Game_Actor) &&
but it doesn't seem to do any thing.
PS sorry for repeating myself, hope that was the right line. only one I noticed
*Edit*
Just thinking could it maybe be line 64-66
@active_battler.hp -= @skill.sp_cost
else
@active_battler.sp -= @skill.sp_cost
most likely line 66?
I just tried it and it worked fine after I changed it to Game_Actor. You DO know that you need to start a new game if you are using this, do you? It won't work with old savegames that didn't use this script.
And change ALL instances of Game_actor to Game_Actor, I just guessed you might have missed that.
There is only one. -_-
...oops (^_^')
I did start a new game because I don't have a save file in the one I was making. When I brought this up with WcW he said that it was just a slight error and he just needed to do some aliasing. so could it have anything to do with the scripts that I have. Which is just Blizz's tons of add-ons. (bars, hud, caterpiller, arrow over player and heal At lvl up).
Actually, that could be it. You need to put this under Tons. But then again, it should only override Tons if it is below. >_>
thanks Blizz that got it working properly.
PS. posting this script was also a way of giving permission to the public to use it but it must be properly credited to me and WcW.
How about I add it to Tons of Add-ons?
sure
ohhhh now I have a got a reason to update tons :)