Common Event appears to just stop (and I am very confused)

Here is a quick rundown of what the event is supposed to do:
- Generate random stats in certain ranges, multiply them based on variable "Gladiator Lever" and apply them to to an actor based on the variable "Gladiator Number" (variable 24 is there for something I have yet to implement)
- roll for 1 of 5 weapon affinities and apply specific state. Do same for shield and ability to use magic.

The first part works fine, but then it seems to just stop at the comment "Affinity Weapon"
If I put everything past this comment into another event on a map, it works. If I run this common event in its entirety, it does not. If I separate them into 2 common events by the that comment and run them one after enough. Creating and applying stats work. Applying affinities does not.

The placement of this common event is inside a map event which first sets the variable 9 "Gladiator Number" (determines Actor) , then uses a variable and a conditional branch to decide the value of variable 1 "Gladiator Level". Afterward, the common event below (described above) plays and it is followed by a common event that displays the actors status window (adds actor to party, shows window, removes player from party) and finally a last common event that offers the possibility to play as that actor.

If i made a mistake somewhere, I just cannot find it. If there is some limitations on how the maker can handle common events, I am unaware of them.
1743697712655.png
"it seems to" is not a valid error to search for.

Your first stop is to confirm where and why it stops, and that is best done by adding various show text commands to determine the exact command that no longer works - preferably with some text codes displaying variable numbers like said affinity rolls.


By the way - try to post complete screenshots of the event including its properties. For example how is this common event called or started? What controls it?
From the context it should be called from a map event, but I've seen many cases where RM-users have implemented VERY strange ideas with rather exotic results that made bughunting difficult.
if the common event isn't a trigger but called, and is an action trigger.
try to set some console.log("first call") and change "first" to "second"
after each variable, to check variable values with a comma:
console.log("var 10: ", $gameVariables.value(10)) and see if those are
are outputted correctly.

if it does stop, one of those wont run and you can see where it stops.
Thank you for the tips! Throwing in Text Messages after almost everything showed me that the event in fact does play out fully. This implies that it goes through all the calculations, then goes into the conditional branch to apply the state fitting to the affinity that got rolled but the state gets not applied.

And sorry, I was so focused on somehow adjusting the entire event into one image that I forgot to add the rest. It is inside of a map event and that activated via action button and it is on the same priority as characters. Nothing is further adjusted, just a standard event with a character image.

Through using text messages to check through everything, I finally noticed the really stupid mistake I made, which I will blame using 3 common events after another for.
Because I randomnize all the stats, obviously I need to max out the HP and MP afterwards! Yeah, I used "recover all" in the common event that brings up the status window... It adds the actor to the party, then recovers all and that obviously gets rid of all states... Case Closed! I'm a moron!


Please someone close this thread or delete it to hide this embarrassment xD




"it seems to" is not a valid error to search for.

Your first stop is to confirm where and why it stops, and that is best done by adding various show text commands to determine the exact command that no longer works - preferably with some text codes displaying variable numbers like said affinity rolls.


By the way - try to post complete screenshots of the event including its properties. For example how is this common event called or started? What controls it?
From the context it should be called from a map event, but I've seen many cases where RM-users have implemented VERY strange ideas with rather exotic results that made bughunting difficult.

if the common event isn't a trigger but called, and is an action trigger.
try to set some console.log("first call") and change "first" to "second"
after each variable, to check variable values with a comma:
console.log("var 10: ", $gameVariables.value(10)) and see if those are
are outputted correctly.

if it does stop, one of those wont run and you can see where it stops.
No, I figured it out. It LOOKED Like it did not trigger, because the mess of common events I created cleared the states again through "recover all". It did not occur to me that I forgot to adjust the event for showing the status window to not clear states. I now changed it to "change HP" and "Change MP" it the states are there
everyone make mistakes, and if you run 3 common event after each other,
maybe try YEP_MergeCommonEvents which runs 1 after 1 nicely if its done.

this plugin can be used for very advanced evented menu that are very complex.
if you have it, take a look on it how it exactly works, it might help with your issue too.

Original thread: https://forums.rpgmakerweb.com/threads/common-event-appears-to-just-stop-and-i-am-very-confused.176724/