EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
989 stars 185 forks source link

RM2K - Hidden enemies can attack on the turn they appear #3158

Closed zankplus closed 9 months ago

zankplus commented 10 months ago

Hi all,

I just noticed that when I use the 'Enemy Encounter' battle function to reveal an enemy initially hidden with ('Appear midway'), they can act on the same turn. This seems to depend on their speed; if the revealed enemy is significantly faster than other combatants, it "misses its chance" to act, but if it's slower, it joins the queue. This (correctly) only occurs on turn 1 or later. I'm using the Steam version of RPG Maker 2000 for Windows.

This may be intentional but I thought it worthwhile to mention as it is a departure from RPG_RT, where I believe enemies never act on the turn they're revealed (and certainly not in this case - I did test it), and therefore may result in incorrect behavior in existing games. Even if this behavior is intended, it's more useful if their ability to act immediately isn't dependent on their speed, right? At least, that's how it appears to me, as an RM2K dev who theoretically would have use for the ability to spawn enemies that act immediately.

Once again, I've declined to include a demo as this one's super easy to replicate, but let me know if it would help and I'll throw one together quick. (I'm sraeka in the discord server, you can just @ me.)

Thanks for all your hard work.

Ghabry commented 10 months ago

Currently the code assigns a battle action to all enemies and when executing them they are filtered when the enemy is hidden or dead.

This explains why it only happens for "slower" enemies: The "faster" enemies missed the turn.

Fixing this looks simple but is risky: This needs careful testing first if there are ways to make an enemy appear and have it doing the action in the same turn.


EDIT: I cannot find a way to make the enemy attack so ignoring "hidden" enemies sounds like a good solution for now.