Save-Point
Damage Pop VX Help: Syncing Damage Pop With Instant Text - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Damage Pop VX Help: Syncing Damage Pop With Instant Text (/thread-841.html)



Damage Pop VX Help: Syncing Damage Pop With Instant Text - Yojimbo - 01-21-2010

Firstly, thank you for your time and interest. Secondly, I was wondering if there was a way to sync the damage pop with the text that appears in the message window. For example, the time that the damage pop appears is directly after the battler blinks. However, the text in the message window has displayed quite a few frames before it (I want to say 20). Therefore, the message window and the damage pop are not synced. The reason I desire this modification is because I have eliminated the post-animation battler blink; I just don't happen to find it aesthetically pleasing. If further elaboration is required, I would be happy to provide it.

Here is the link to DerVVulfman's script on this forum:

DerVVulfman's Damage Pop VX

And just in case, here's the default Scene_Battle, where most of the wait and message commands occur:

Scene_Battle

Once again, thank you!


[Resolved] Damage Pop VX Help: Syncing Damage Pop With Instant Text - DerVVulfman - 01-21-2010

You will find it unlikely to down right painful to attempt.

You see, the damage pop system is modeled after the RPGMaker XP version of the damage pop and is tied into the Sprite class (formerly hidden in RMXP). As such, and like RMXP, it is tied to the action system that performs the actual attack animations and calculations the moment it occurs.

Let's look at a section of Scene_Battle code:
Code:
#--------------------------------------------------------------------------
  # * Execute Battle Action: Attack
  #--------------------------------------------------------------------------
  def execute_action_attack
    text = sprintf(Vocab::DoAttack, @active_battler.name)
    @message_window.add_instant_text(text)
    targets = @active_battler.action.make_targets
    display_attack_animation(targets)
    wait(20)
    for target in targets
      target.attack_effect(@active_battler)
      display_action_effects(target)
    end
  end
The section that states target.attack_effect(@active_battler) .... It cycles through each target and calculates/applies the damage immediately.

However, the text in the message window has displayed quite a few frames before it (I want to say 20).

Well, let's refer to the above code I showed you. It had... wait(20) ... didn't it? Well, I guess you'd be going through the execute_action_attack, execute_action_skill, and the like to remove or reduce the time in the wait statement.

Personally, I prefer to 'remove' the windows and make it work more like RMXP. Or you didn't know I did that too?


[Resolved] Damage Pop VX Help: Syncing Damage Pop With Instant Text - Yojimbo - 01-22-2010

Yucky. I can see your point here. While I am partial to the text in the message window, it is practically obsolete; certainly not worth retaining. I should probably just track down that script of yours that you hinted at. Heh, heh.

Thank you.

EDIT: Found it.