Small edit to regen function

● ARCHIVED · READ-ONLY
Started by Kes 5 posts View original ↗
  1. 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.
  2. 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 :)
  3. @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?
  4. Correct
  5. @TheoAllen Thank you. I didn't realise it would be so simple.

    [mod]Closing this.[/mod]