New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulate insane event execution order of RPG2k3 Battle Interpreter #488

Closed
Ghabry opened this Issue May 18, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@Ghabry
Member

Ghabry commented May 18, 2015

At Turn 0 (when battle begins) the order is like RPG2k battle interpreter, that's fine.

More funny is when anybody does a turn.
Then the order seems to be:

  1. The Turn counter is increased (global battle and actor counter)
  2. Pages with turn-based (doesn't matter if battle or actor-based) event triggers run
  3. The BattleAction is executed
  4. Pages with other event triggers run

This needs more extensive testing to figure out if 4. has more special cases

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Aug 11, 2016

Member

Just to update what we know already: The normal interpreter update rule applies (When a page finishes and an earlier page can run it gets priority over later pages). When a page ran a turn it will not run again that turn.
Following pages are reset, when actor/enemy X does his turn: "X uses command", "X turn". All other pages are always reset, independ of who does the turn.

By doing some investigation the following pages run depending on there start condition. It's enough when one of the start conditions fulfills the criteria, when there is a 2nd one which would normally run later it runs early anyway.

Battle start:

  • Turn elapsed (global & per actor)
  • Switch
  • Variable
  • Party exhaust

After selecting a target but before the action is executed:
Turn counter is incremented, page reset as described above

  • Turn elapsed (global & actor)
  • X uses the fight command

After executing the action:
All remaining

  • Switch
  • Variable
  • Party exhaustions
  • Monster HP is
  • Hero HP is

So there are basicly three different blocks of events that can run depending on where in the battle we are... I made some changes to the battle interpreter logic, so fulfilling this should be easy now :)

Guess this also fixes Pom gets Wifi

Member

Ghabry commented Aug 11, 2016

Just to update what we know already: The normal interpreter update rule applies (When a page finishes and an earlier page can run it gets priority over later pages). When a page ran a turn it will not run again that turn.
Following pages are reset, when actor/enemy X does his turn: "X uses command", "X turn". All other pages are always reset, independ of who does the turn.

By doing some investigation the following pages run depending on there start condition. It's enough when one of the start conditions fulfills the criteria, when there is a 2nd one which would normally run later it runs early anyway.

Battle start:

  • Turn elapsed (global & per actor)
  • Switch
  • Variable
  • Party exhaust

After selecting a target but before the action is executed:
Turn counter is incremented, page reset as described above

  • Turn elapsed (global & actor)
  • X uses the fight command

After executing the action:
All remaining

  • Switch
  • Variable
  • Party exhaustions
  • Monster HP is
  • Hero HP is

So there are basicly three different blocks of events that can run depending on where in the battle we are... I made some changes to the battle interpreter logic, so fulfilling this should be easy now :)

Guess this also fixes Pom gets Wifi

@fdelapena fdelapena modified the milestones: 0.5.0, 0.6.0 Aug 11, 2016

@fdelapena fdelapena closed this in dc3dfb7 Aug 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment