Jump to content

Recommended Posts

Any way to make this dependent on an actor wearing a certain weapon or armor? And only affect the actor wearing that weapon or armor? Sort of like the Cat's Bell accessory in FFX-2.

Share this post


Link to post
Share on other sites

No idea what Cat's Bell accessory does or how it exactly works. But of course, you can do that.

You could make it like this:

    if $game_player.normal_walk?
      if equips.include?($data_armors[2])
        self.hp += [(self.mhp * MovementHeal::HEAL_PER_STEP).to_i, 1].max
      end
    end

Then if actor has Armor with ID 2 equipped it will recover HP per step. For weapons you can use $data_weapons[iD].

Share this post


Link to post
Share on other sites

This is a my idea.

You must improve your script in this way:

- Create this script compatible to heal with move also TP and MP

- Using notetag like <hp heal on move: x> or <mp heal on move: x%> to use on actor/classes/equipment/states> so people can decide the way to heal on move and what heal on move (healing by numer or %)

Share this post


Link to post
Share on other sites

Your idea and I must improve in that way, huh. Choice of strong words.

 

Anyways, I'll add TP/MP as that's only couple of extra lines. But I'm not going to bother with notetags to keep this script simple.

Share this post


Link to post
Share on other sites

What do you mean by 'replaced the entire party script'?

The script I gave William C. is just a part he had to edit in himself into my script.

So the end result would have looked like:

 

 

#===============================================================================
# )----------------------------------------------------------------------------(
# )--     AUTHOR:     Mr Trivel                                              --(
# )--     NAME:       Heal on Move                                           --(
# )--     CREATED:    2014-09-19                                             --(
# )--     VERSION:    1.1                                                    --(
#===============================================================================
# )----------------------------------------------------------------------------(
# )--                         VERSION HISTORY                                --(
# )--  1.0 - Initial script.                                                 --(
#===============================================================================
# )----------------------------------------------------------------------------(
# )--                          DESCRIPTION                                   --(
# )--  Actors heal on movement.                                              --(
#===============================================================================
# )----------------------------------------------------------------------------(
# )--                          INSTRUCTIONS                                  --(
# )--  Define how many % per step do you want your actors to heal in module. --(
#===============================================================================
# )----------------------------------------------------------------------------(
# )--                          LICENSE INFO                                  --(
# )--  Free for non-commercial & commercial games if credit was given to     --(
# )--  Mr Trivel.                                                            --(
# )----------------------------------------------------------------------------(
#===============================================================================

# )=======---------------------------------------------------------------------(
# )-- Module: MovementHeal                                                   --(
# )---------------------------------------------------------------------=======(
module MovementHeal
  
  # )--------------------------------------------------------------------------(
  # )--  How many % HP per step your actors will heal.                       --(
  # )--  0.01 = 1%, 0.50 = 50%                                               --(
  # )--------------------------------------------------------------------------(
  HEAL_PER_STEP = 0.01 # 0.01 = 1% per step
end

# )=======---------------------------------------------------------------------(
# )-- class: Game_Actor                                                      --(
# )---------------------------------------------------------------------=======(
class Game_Actor < Game_Battler
  alias :mrts_movement_heal_on_player_walk :on_player_walk
  
  # )--------------------------------------------------------------------------(
  # )-- Alias: on_player_walk                                                --(
  # )--------------------------------------------------------------------------(
  def on_player_walk
    if $game_player.normal_walk?
      if equips.include?($data_armors[2])
        self.hp += [(self.mhp * MovementHeal::HEAL_PER_STEP).to_i, 1].max
      end
    end
    mrts_movement_heal_on_player_walk
  end
end 

 

 

Share this post


Link to post
Share on other sites

Also, if I ever used a script like this for a game? Could I use it in a commercial game since it was created by someone else or no? I am totally new to scripting and everything RPG Maker related. :-) So please enlighten me.

Share this post


Link to post
Share on other sites

@Khaav-Rocca,

You place it in Materials in Script Editor. Like this:

 

 

d9db0d2d59.png

 

 

 

And can it be used for commercial use? - That differs from script to script. In this script's case - you didn't read  the LICENSE INFO inside of the script.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted