Small edit to regen function

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I have discovered a facet of the default way that Ace handles the regen function which I don't like.
The Help file clearly states that the HRG, MRG and TRG restores at the end of each turn. However, I've discovered that walking around does the same thing as Ace considers that to be a 'turn'. The end result is that if you walk around between visible encounters you can heal yourself.

I know how to correct this with 2 small edits directly to the default scripts, but that's not best practice to alter them, so I am asking if someone can do a little stand alone snippet which does it.

The 2 places where the edits would be if I were doing it directly are as follows:
In Game_Battler

Between the section "Processing at end of turn" and the section "Processing at end of battle" Add (at around line 804) this new section.
Code:
  #--------------------------------------------------------------------------
  # * Processing at End of Turn EDIT MAP no regenerate_all
  #--------------------------------------------------------------------------
  def on_turn_end_map
    @result.clear
    update_state_turns
    update_buff_turns
    remove_states_auto(2)
  end
The second place is in Game_Actor where there would be an addition to line 631 so that it reads:
Code:
 #--------------------------------------------------------------------------
  # * End of Turn Processing on Map Screen
  #--------------------------------------------------------------------------
  def turn_end_on_map
    if $game_party.steps % steps_for_turn == 0
      on_turn_end_map
      perform_map_damage_effect if @result.hp_damage > 0
    end
  end
I hope this is clear.
Thank you.
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
How about u try to do it yourself? Here is how...
  • You see it's from "Game_Battler" so what you need to do to create a new script slot, then write "class Game_Battler"
  • Copy the entire 'method' (start with 'def something' to 'end'), copy it in your new script slot, below "class Game_Battler"
  • Close it with "end"
For example
Code:
class Game_Battler
  def on_turn_end_map
   @result.clear
   update_state_turns
   update_buff_turns
   remove_states_auto(2)
  end
end
Do it the same from Game_Actor
Code:
class Game_Actor
  def turn_end_on_map
   if $game_party.steps % steps_for_turn == 0
     on_turn_end_map
     perform_map_damage_effect if @result.hp_damage > 0
   end
  end
end
It's as easy as that :)
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen So I simply put the codes I wrote in my first post into their own slots under Materials, but with the addition of Class whatever?
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Correct
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen Thank you. I didn't realise it would be so simple.

[mod]Closing this.[/mod]
 
Last edited:
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top