Hope it is no problem, to answer to this thread, which is a little older:
I've the same problem in RPG Maker VX Ace. I know that RM2K3 can do this out of the box! So I would like just to do the same thing with the newer makers.
So why I want to do this anyway?
I would like to not repeat myself by creating event pages. Copying events over and over to place the same functionality at different places on the same map is not recommended. Not having this functionality means, if you want to correct or change your game commands you have to do it in several places. If you could call an event page instead, you have to do your changes just for this one page. Of course you can use common events to attain a similar behavor. But much stuff belongs to a specific map or even to a specific character on that map only. Therefore a common event often is just the wrong location to store stuff there. If you keep commands to the maps / events where they actually belong to, your game will become more readable/understandable for those who want to know how it works.
For that reasons I would like to have back the event call command of RM2K3 also for the newer makers. In my opinion it would be the best solution if we could achive this just by using the script-command and calling a single ruby method with it. I know there are scripts out there to do so, but if it is possible I would prefer just calling one method. Any ideas or do you think this is not possible?
Here a little example:
Say we would like a dog who is able to watch for chickens and cows. Whenever an animal touches a specific line the dog goes there, barks and brings the other animal to turn back.
I actually created such an event for an RM2K3 game. I named the dog "Lasso". Lasso consists of four event pages. The first command of every page is a comment, describing for what the page is used for:
Lasso.Page 1
Lets Lasso watch all places
This is automatically triggered by the LassoKeepWatching-event.
(LassoKeepWatching-event is a parallel process which calls that event page periodically.)
Lasso.Page 2
Keeps Lasso in position and prevents Lasso from accidentally leaving the place.
Lasso.Page 3
Makes Lasso do his work for the place at ParameterX ParameterY.
Lasso.Page 4
This is the active event page and can be started with the action button. It will let Lasso bark it the player "speaks" to him.
The Lasso.Page 1 uses the other Lasso-Pages like functions or methods. Therefore Lasso.Page 3 will be even called mulitple without repeating the code on it. Of course ParameterX and ParameterY are normal game variables which are actually global variables. This is not that good, but its better than nothing and Lasso is programmed by the normal commands.
If the cows and chickens touches a border, Lasso.Page 1 calles Lasso.Page 3. Lasso.Page 3 lets Lasso walk to the cow or chicken and bark. Every cow and chicken has an escape event page. This is always page 1 and will be also called by Lasso.Page 3. Over this the other animals have got a page 2 which lets them moo or cluck if the player speaks to them.
Without the capability to call an event page directly from another event page, it is not able to keep the commands to those events where they belong to and the game is hard to read and hard to maintain.
In order to solve the problem for RMVXA I had a closer look to the code:
As far as I understand this up to now, I have to create a new Game_Interpreter object (e. g. with "my_interpreter = Game_Interpreter.new") or use the existing one from the active map ($game_map.interpreter). After that I've to setup the interpreter with the setup method:
my_interpreter.setup(list, event_id = 0)
The event_id is not the problem here, but the list. With "$game_map.events[event_id].list" I've only access to the list of the active page of the event with the ID event_id. It is not clear to me why I'm able to access the list member of the Game_Event class, since I could not find any definition of a getter method. But I found a function init_private_members which assigns the page class variable with nil and there is a call of a pages in this class, which definition I also wasn't able to find. I assume "pages" as an array holding the information of all pages of this event. Without being able to access it, I assume I've to expand the Game_Event class. Is there an easier way?
I think for RMVXA it really does not make sense to dive deeper in. Thanks to Yanfly! I found one of Yanflys scripts which does the stuff and tried it out. It really works fine.
Here are the links where to find it for RMVXA:
Last Updated: 2011.12.14 Download Link Github Link This is a reproduced method from RPG Maker 2000 and RPG Maker 2003. It allows the game to call a page’s events as if it were a common event.…
yanflychannel.wordpress.com
Any original material made by Yanfly on Yanfly Channel is free for use with both free and commercial RPG Maker games. I don’t demand royalties or special liberties if you choose to use the or…
yanflychannel.wordpress.com