SP+ when Defending v1.00
Version: 1.00
Author: NAMKCOR
Date: October 26, 2007
Version History
Planned Future Versions
- open to suggestions for improvement
Description
adds SP to the actor (or possibly enemy) when they defend
Features
- easy to configure
- percent or flat rate SP gain
- set for actors only, or allow enemies as well
Screenshots
N/A
Instructions
simply configure the values as instructed and the script does the rest
Script
#=============================================================================
# SP+ when Defending v1.00
#-----------------------------------------------------------------------------
# Created By: NAMKCOR
# Created for the Websites: Chaos Project, RPG Maker Resource Kit
# (www.chaosproject.co.nr; www.rmrk.net)
# If this script is hosted on any other website, then it is stolen,
# please contact me at the address given below
# Requested by: MrMoo (RMRK)
#-----------------------------------------------------------------------------
# If you find any Bugs/Incompatability issues with this script, please contact
# me at the following e-mail address: Rockman922@aol.com, and
# please be descriptive with your e-mail subject, as I delete spam on sight.
#-----------------------------------------------------------------------------
# Function:
# allows actors (and possibly enemies) to recover SP when defending
#
# Compatability:
# most likely compatible with SDK (untested)
# no known issues at the moment
#
# Instructions to modify:
# Comments and instructions for the individual customizations will
# be given right where they are located.
# Only real skills needed are reading, typing, and copy&paste
#
# Instructions for use:
# simply change the below values
# as instructed and the script will do the rest
#
#-----------------------------------------------------------------------------
# Version History:
# 1.0 - completed system
#=============================================================================
class Scene_Battle
alias make_basic_action_result_original make_basic_action_result
def make_basic_action_result
#==========================================================================
# These values are here for you to configure :D
#-------------------------------------------------------------------------- #
# @SP_to_add = the number (or percent) of SP you want recovered when
# the actor (or possibly enemy) defends
# @is_percent = determines if @SP_to_add is a percent or not
# @actors_only = determines if enemies can heal SP when defending or not
#==========================================================================
@SP_to_add = 25
@is_percent = false
@actors_only = false
#==========================================================================
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
#==========================================================================
if @active_battler.current_action.basic == 1
if @is_percent
if @actors_only
if @active_battler.is_a?(Game_Actor)
recover_sp = @active_battler.maxsp * @SP_to_add / 100
end
end
else
if @actors_only
if @active_battler.is_a?(Game_Actor)
recover_sp = @SP_to_add
end
else
recover_sp = @SP_to_add
end
end
@active_battler.damage = -recover_sp
@active_battler.sp += recover_sp
@active_battler.damage_pop = true
end
make_basic_action_result_original
end
end
Credit
Thanks
Support
If you find any Bugs/Incompatability issues with this script, please contact me at
the following e-mail address: Rockman922@aol.com, and please be descriptive
with your e-mail subject, as I delete spam on sight.
Known Compatibility Issues
incompatble with RTAB
Author's Notes
yay for script requests
Restrictions
Created for the Websites: Chaos Project, RPG Maker Resource Kit
(www.chaosproject.co.nr; www.rmrk.net)
If this script is hosted on any other website, then it is stolen, please contact me at either of the locations given
If you use this script in your game, please link me to the topic
I love to see what my work is used for
do NOT use this script in a commercial game unless you get my permission first
that's a pretty useful script,,thx once again namkcor,,u did it again.
thanks, I do what I can :D
Very nice. Another excellent script.
thanks, glad you like it, hope MrMoo got it
NAMKCOR...you rock!
;D thanks Nouman
That's a very useful script!
Great Job ;D
Oh noes :(
The very first error. I didn't implement the script till today, but I'm using an RTAB Ver.1.16 by Cogwheel and I got an error whenever I try to defend. The error takes place in cogwheel's script so I dunno if you could change the script to be RTAB compatible or not.
Here's a pic of the error message.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg100.imageshack.us%2Fimg100%2F9171%2Fsadfacesb9.jpg&hash=52da0a36fd2ef5acc50fd94ea07f9ac688c1968a)
is my script below cogwheel's or above cogwheel's?
if the latter, put it below the RTAB
if the former, send me the scripts.rxdata so I can take a look
It likely has to do with the fact that RTAB expects an argument for self.damage. Specifically, I believe it expects the attacker (Game_Battler), but I can't remember. I haven't looked at RTAB for a long time.
hmm...perhaps...
I would like to see the scripts.rxdata if the first fix doesn't work
if worse comes to worse, I could just merge them
The script is below the RTAB right above main. I'll send you the rxdata through pm later today.
+10 rep.
;D
Quote from: MrMoo on October 29, 2007, 10:38:27 PM
The script is below the RTAB right above main. I'll send you the rxdata through pm later today.
alright, sounds good
alright, I'm having very little luck making this work with RTAB
no clue why it's not working, and RTAB is so confusing to look at that I can't figure out where to put it to merge it... :tpg:
Lol then I guess it's too much trouble :-\
Thanks anyways, this could still be useful to other people.
it has to be possible, I'm just unsure how to do it cuz I don't know RTAB well enough :tpg: