+ Glasses 606 Posted September 19, 2014 Author: Mr Trivel Name: Heal on Move Created: 2014-09-19 Version: 1.0 What does it do? Your party will heal HP on each step they take. Minimum of 1 HP per step. Requirements: None Instructions: Plug, Change, Play. Script: <Link: Github> Blog: <Link: On blog> Share this post Link to post Share on other sites
Coolie 148 Posted September 19, 2014 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
+ Glasses 606 Posted September 19, 2014 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
ShidoLionheart 5 Posted September 19, 2014 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
+ Glasses 606 Posted September 19, 2014 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
b133d_4_u 1 Posted September 26, 2014 It says there is an error on line 48... Share this post Link to post Share on other sites
+ Glasses 606 Posted September 26, 2014 What kind of error? Did you place it wrongly? Share this post Link to post Share on other sites
b133d_4_u 1 Posted September 26, 2014 I followed the instructions, but it says Script line 48: NoMethodError occurred. undefined method 'normal_walk?' for nil:NilClass Share this post Link to post Share on other sites
+ Glasses 606 Posted September 26, 2014 What other scripts do you use, and where did you place this script? What edits did you do to the script? Because by default normal_walk? is on line 49. Share this post Link to post Share on other sites
b133d_4_u 1 Posted September 26, 2014 I don't use any other scripts, yet. I placed it under Materials. I replaced the entire party script with the script you gave William C. Share this post Link to post Share on other sites
+ Glasses 606 Posted September 26, 2014 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
b133d_4_u 1 Posted September 26, 2014 That's what I meant ^^; And thank you for posting the resulting script. I fixed it now. Sorry for being a bother. Share this post Link to post Share on other sites
Khaav-Rocca 1 Posted September 27, 2014 I am jumping onto this because it sounds awesome! :-) As far as scripts go, where would I add a script to take advantage of it? Share this post Link to post Share on other sites
Khaav-Rocca 1 Posted September 27, 2014 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
+ Glasses 606 Posted September 27, 2014 @Khaav-Rocca, You place it in Materials in Script Editor. Like this: 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