RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
SP+ when Defending v1.00

0 Members and 2 Guests are viewing this topic.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
SP+ when Defending v1.00
Version: 1.00
Author: NAMKCOR
Date: October 26, 2007

Version History


  • v1.00 - completed script

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


Code: [Select]
#=============================================================================
#   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


  • NAMKCOR
  • MrMoo (request)

Thanks

  • MrMoo (requesting it :P)

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
« Last Edit: November 11, 2007, 07:57:43 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

***
Rep:
Level 87
Things we fear the most have already happened 2 us
that's a pretty useful script,,thx once again namkcor,,u did it again.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
thanks, I do what I can :D

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Very nice. Another excellent script.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
thanks, glad you like it, hope MrMoo got it

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
NAMKCOR...you rock!
Watch out for: HaloOfTheSun

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
;D thanks Nouman

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
That's a very useful script!
Great Job ;D
Be kind, everyone you meet is fighting a hard battle.

***
Rep:
Level 91
Blah blah blah...
Project of the Month winner for November 2008
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.


- -

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
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

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
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.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
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

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

***
Rep:
Level 91
Blah blah blah...
Project of the Month winner for November 2008
The script is below the RTAB right above main. I'll send you the rxdata through pm later today.


- -

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
Watch out for: HaloOfTheSun

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
The script is below the RTAB right above main. I'll send you the rxdata through pm later today.

alright, sounds good

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
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:

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

***
Rep:
Level 91
Blah blah blah...
Project of the Month winner for November 2008
Lol then I guess it's too much trouble  :-\
Thanks anyways, this could still be useful to other people.


- -

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
it has to be possible, I'm just unsure how to do it cuz I don't know RTAB well enough :tpg:

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon