dinhbat3

Veteran
Veteran
Joined
Feb 5, 2014
Messages
184
Reaction score
32
First Language
English
Primarily Uses
I am currently using Yanfly's Battle Engine WITH Saba Kan's Ao no Kiseki, and have noticed an oddity about damage application and pop ups when a state that drains hp/mp is applied to an actor... The damage is displayed at the start of an actors turn, but isn't applied til the end.

For a play by play of what I mean:

1. Turn begins and pop up for -453hp shows

2. Player enters the action taken by the actor

3. Actor performs the selected action

4. The 453hp damage is applied after action has been taken

Is there any way to have the damage from poison or other hp/mp damaging states occur at the start of a turn when the pop up occurs?
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
I thought I've answered it on the other forum...
 

dinhbat3

Veteran
Veteran
Joined
Feb 5, 2014
Messages
184
Reaction score
32
First Language
English
Primarily Uses
Ha you did! I actually thought this didn't post... Thought I had posted on the other one originally... so I retyped it over there! It is resolved. Too many tabs open =\ Sorry
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
23,212
Reaction score
12,815
First Language
English
Primarily Uses
RMMZ
And which other forum is that?  I'd be interested in knowing the answer to this query.
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
Well, the quick answer is that the @status_window is just not refreshed after applying the slip damage (and regeneration too if I might add).

To fix this, well, I just called refresh for status window after that regeneration. In Saba Kan's script, regenerations are executed on turn start, so I just add this snippet.

class Scene_Battle < Scene_Base def start_party_command_selection unless scene_changing? refresh_status @status_window.unselect @status_window.open BattleManager.input_start top_unit = OrderManager.top_unit top_unit.battler.on_turn_start refresh_status @status_window.refresh # <- Added this line. @log_window.display_auto_affected_status(top_unit.battler) @log_window.wait_and_clear next_command end endendThe topic is here.

refresh_status should also call @status_window.refresh, but Yanfly's script changed it so that the method did nothing.
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
277
First Language
English
Primarily Uses
RMMV
Actually all you have to do is fix the on_turn_start and on_turn_end, The script modifies those two and doesn't have what the default engine has, so you have to fill it in. (the state/buff updates, regens, turn count +1, remove state/buff)

Make it look similar to this (in the first script btw)

Code:
  #--------------------------------------------------------------------------  # ○ ターン開始処理  #--------------------------------------------------------------------------  def on_turn_start    regenerate_all    make_actions  end  #--------------------------------------------------------------------------  # ● ターン終了処理  #--------------------------------------------------------------------------  def on_turn_end    @result.clear    update_state_turns    update_buff_turns    remove_states_auto(2)    remove_buffs_auto    @turn_count += 1  end  #--------------------------------------------------------------------------  # ● 戦闘行動終了時の処理  #--------------------------------------------------------------------------  def on_action_end    @result.clear  end
 
Last edited by a moderator:

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
You kinda misunderstand the problem. the slip damage IS applied, but it is not redrawn.

The script does not refresh the Battle Scene's @status_window.
 

It is because Yanfly overwrote refresh_status.

The original refresh_status method is like this:
 
def refresh_status
  @status_window.refresh
end
 
Yanfly overwrote it to become this.
 
def refresh_status; return; end
 

There is a method from Yanfly Battle Engine that lets you redraw only the current battler's status, it is redraw_current_status.

def redraw_current_status return if @status_window.index < 0 @status_window.draw_item(@status_window.index) endSo you could also just replace the refresh_status in start_party_command_selection to redraw_current_status.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
277
First Language
English
Primarily Uses
RMMV
Well that explains why I never had that problem before.
 

Latest Threads

Latest Posts

Latest Profile Posts

Now that I have linklists on large trees and cars, is there any theme that would interest you?
Debugging multiplayer issues... I'm having fun, right?
yay_streaming.jpg

For just starting streaming on the 10th... Definitely not the worst. :LZScheeze:

Granted I need 333.34 hours a month on average to achieve money. So I don't really expect that, but it sure has helped my game dev go much faster.
Proud on how this map turned out.

FnmhDLIXgAAOvIC
I just finally fixed a huge problem that wouldn’t let my game load and would crash it.. I thought that I was gonna have to trash the project and start over lol

Forum statistics

Threads
128,329
Messages
1,193,665
Members
168,817
Latest member
Clust3rPepis
Top