[RM2K][RM2K3] COMMONTHISEVENTPATCH - PROPER "THIS EVENT" IN CES

Posts

Pages: 1
Hello, everybody!

I thought you might have a use for this. It's for RM2k v1.07 and RM2k3 v1.08

Normally, if you use "This Event" in a common event, the game will crash ("Erase Event" would do nothing), and if you wanted to move some logic involving "This Event" from a map event into a common event, you couldn't.

This patch will change the behavior so that "This Event" in a common event references the last map event on the call stack. "Erase Event" now works the same - it erases the last map event in the call stack.

Examples, with this patch:
Map Event A calls Common Event C, Common Event C moves "This Event" => Map Event A is moved.
Map Event A calls Common Event C, Common Event C calls "This Event", page 2 => Map Event A, page 2 is called.
Map Event A calls Common Event C, Common Event C uses "Erase Event" => Map Event A is erased.
Map Event A calls Map Event B, Map Event B calls Common Event C, Common Event C moves "This Event" => Map Event B is moved.
Map Event A calls Common Event C, Common Event C calls Common Event D, Common Event D moves "This Event" => Map Event A is moved.

This allows you to finally move all that redundant logic from map events into common events!

Just apply the IPS patch corresponding to your RPG_RT.exe version (using a tool like Lunar IPS) and enjoy. (Or put it in DynPatches if you have DynRPG 0.20.)

Download: http://cherrytree.at/downloads/ctep.zip

Note: If you want to call "This Event" from a common event, the RPG Maker won't let you select pages >1. Just create the "Call Event" line in a map event with enough pages and then copy it over to the common event.

EDIT: Added support for "Erase Event".
And if I put "delete event" the event will be deleted or it will crash because I use that as common event?
Good point, I didn't think of that. It would have done nothing (just as in the original implementation).

I added support for "Erase Event" now, so that "Erase Event" will work the same as "This Event" commands - it will erase the last map event in the call stack.

Just download and patch again.
Thank you! I hate that issue.

Pages: 1