Looks like a bug, skill can't call two different common events

I've been making a library of common events that act as special types of spell effects. It appears that if I have more than one 'call common event' feature to a skill, it will only call the last event in the chain.

I can obviously work around this by just creating a single unifying common event that does both things, but that will mean making more total common events, and gumming up the clarity of the system. Is this a known issue? Maybe there is something I can do elsewise to fix it?

Note that both events are simple pass throughs to the script backend.
It's not a bug. That's the way the software is designed. You can only have one common event 'pending' at a time.
It's not a bug. That's the way the software is designed. You can only have one common event 'pending' at a time.
That sounds like a bug though. I put a common event in the list of effects for a skill, and then a second one after. It shouldn't just ignore one. Even if it has a poor event queue system, allowing someone to put to call common event effects in and not honor both is definitely wrong. It should just parse one at a time. How would anyone really expect it to work differently?
No, it's NOT a bug. That's the way it works. There is ONE slot for "common event waiting to be run". There is NO event queue system.


The fact that it doesn't work the way you'd LIKE it to work doesn't mean it's a bug 😉
No, it's NOT a bug. That's the way it works. There is ONE slot for "common event waiting to be run". There is NO event queue system.

The fact that it doesn't work the way you'd LIKE it to work doesn't mean it's a bug 😉
 It doesn't work the way the UI suggests it works. I added an effect to a skill, that effect didn't trigger. If I was calling events from a script, and things didn't work as I expected there, that'd be one thing. Just because it's a known bug, doesn't mean it's not a bug.
lol. Saying it many times doesn't make you right.


Internally, everything is set up for ONE common event per skill. The software was very clearly designed to do this - if it wasn't, the script would use an array, and there would be logic to say whether to kick them all off at once or run them one after the other. The ability to use ONE common event per skill is a very definite decision made by the designers.


The fact that you WANT it to be able to handle more simply means you want something that it was not designed to do. In that case, list it in the 'suggestions for next RPG maker' thread, and/or modify the scripts to do it the way you want, but don't call it a bug, because it behaves exactly the way it was designed to behave 😉
Here, try seeing if this will fix it:

put it at the top of the materials section, since it completely overwrites Game_Temp. I also do not guarantee that ti will work, but it's better than nothing I guess.

Spoiler
Code:
class Game_Temp  def initialize    @common_event_id = []    @fade_type = 0  end    def reserve_common_event(id)    @common_event_id.push(id)  end    def clear_common_event    @common_event_id = []  end    def common_event_reserved?    @common_event_id.size > 0  end    def reserved_common_event    $data_common_events[@common_event_id.pop]  endend
You know, why not just, Call Common Event A and that Common Event A calls Common Event B.

Or a Common event that calls A and B.
lol. Saying it many times doesn't make you right.

Internally, everything is set up for ONE common event per skill. The software was very clearly designed to do this - if it wasn't, the script would use an array, and there would be logic to say whether to kick them all off at once or run them one after the other. The ability to use ONE common event per skill is a very definite decision made by the designers.

The fact that you WANT it to be able to handle more simply means you want something that it was not designed to do. In that case, list it in the 'suggestions for next RPG maker' thread, and/or modify the scripts to do it the way you want, but don't call it a bug, because it behaves exactly the way it was designed to behave 😉
It has nothing to do with want. I want it to do what the UI tells me it does. That's all. If it was set up to cause all damage formula's to be 5 points of damage less than normal, that would also be a bug. I feel like you are saying that just because you know exactly why the bug occurs (effects not matching UI) that it isn't a bug.

Edit: Archeia: Because that isn't a portable solution. If I want to call A and C next time, I need yet another event. As it is, my work around is to do this, but I was hoping not to. I guess if it's a known bug than this thread can be closed. No value is going to be had over the resolution of that one 🙁 .
It has nothing to do with want. I want it to do what the UI tells me it does. That's all. If it was set up to cause all damage formula's to be 5 points of damage less than normal, that would also be a bug. I feel like you are saying that just because you know exactly why the bug occurs (effects not matching UI) that it isn't a bug.

Edit: Archeia: Because that isn't a portable solution. If I want to call A and C next time, I need yet another event. As it is, my work around is to do this, but I was hoping not to. I guess if it's a known bug than this thread can be closed. No value is going to be had over the resolution of that one 🙁 .
1. you clearly missed my suggestion:

class Game_Temp def initialize @common_event_id = [] @fade_type = 0 end def reserve_common_event(id) @common_event_id.push(id) end def clear_common_event @common_event_id = [] end def common_event_reserved? @common_event_id.size > 0 end def reserved_common_event $data_common_events[@common_event_id.pop] endendIt should queue events for you.

2. It is not a bug, the system was designed to only use one common event. Just because it doesn't use multiple does not make it broken.
It has nothing to do with want. I want it to do what the UI tells me it does.
Uhm, I just checked it right now...

If you took time to hover thru the common event effect and wait for the Tip Bubble to show, it clearly says that

"ONLY ONE CALL SPECIFICATION TO COMMON EVENTS IS VALID"

sometimes, it pays a lot to read the tip bubbles...
lol - I never even SEE those things pop up!


I'm wondering if you can achieve what you're after by setting a switch (or switches) in your damage formula, having all of these skills call a single common event, and then have the common event poll the various switches and act appropriately for all the switches that are turned on (turning them off again afterwards). "Act appropriately" could either mean doing whatever processing you want to be done (which means JUST one common event for the whole lot), or calling other common events (which means as many common events as you were originally planning to set up, plus the one 'master' event that decides which of those to run).


If the damage formula is long enough, you could turn on a couple of switches (which would take the place of the couple of common events you want to set up as effects). I just don't remember how much text you can bung into that box.


(Edit: Oh, or what Zalerinian said 😉 )
1. you clearly missed my suggestion:

2. It is not a bug, the system was designed to only use one common event. Just because it doesn't use multiple does not make it broken.
1. That looks like a nifty idea, I may try that out, though changing the TYPE of an attribute like that is likely dangerous

2. Hmm, this crow tastes awful.
Unless a script directly directly tries to access the common event, it should work fine. If you want I could write it to still work if they call $game_temp.common_event_id. Its really just a matter of four or so lines.
You should alias Game_Temp.initialize, not overwrite it, or none of the other init will be done.
Unless a script directly directly tries to access the common event, it should work fine. If you want I could write it to still work if they call $game_temp.common_event_id. Its really just a matter of four or so lines.
I wasn't going to take it verbatim anyway. Probably should be a queue style list instead of a stack style list, since I would want events to go in the order listed, not reverse of that!

I'll poke at it tomorrow, and if it works out I'll post the results as a working script to make common events work. er, work BETTER 😛 .
If you want them in the order you put them in, change '@common_eveny_id.push(id)' in reserve_common_event to '@common_event_id.unshift(id)',and they'll be in order.
What's wrong with Archeia's advice though? Make the common event you call, call the other common events. And if you sometimes don't want to call a certain common event, use conditions to get around it.
1. That looks like a nifty idea, I may try that out, though changing the TYPE of an attribute like that is likely dangerous
All of the methods return an integer representing the common event ID, and scripters should be using the interface that it provides.


If anyone's scripts are assuming anything about the underlying implementation then sorry those scripts are poorly written and they should be fixed (or better yet, not used at all to avoid issues)


You can easily turn common events into a queue no problem as long as you return an integer when anyone needs one.

If you want them in the order you put them in, change '@common_eveny_id.push(id)' in reserve_common_event to '@common_event_id.unshift(id)',and they'll be in order.
Just push it into the array and shift the first element out. Well order doesn't really matter I guess but I usually treat the first element of the array as the first element in the queue, not the last.


http://himeworks.wordpress.com/2013/08/01/common-event-queue/


Though, my implementation of `reserved_common_event` is probably wrong since I'm dequeueing it as well.
You should alias Game_Temp.initialize, not overwrite it, or none of the other init will be done.
I know, I figured it wouldn't make a big difference, because I've never seen or heard of anyone overwriting Game_Temp, except for this case now.

Anyway, it's aliased now:

Spoiler
class Game_Temp  alias zale_event_queue_init_chruyaodjrk initialize  def initialize    zale_event_queue_init_chruyaodjrk    @common_event_id = []  end    def reserve_common_event(id)    @common_event_id.unshift(id)  end    def clear_common_event    @common_event_id = []  end    def common_event_reserved?    @common_event_id.size > 0  end    def reserved_common_event    $data_common_events[@common_event_id.pop]  end    def common_event_id    @common_event_id[@common_event_id.size]  endend
And now we have two event queue scripts. 😛

Original thread: https://forums.rpgmakerweb.com/threads/looks-like-a-bug-skill-cant-call-two-different-common-events.16263/