Finding rogue switch?

I have a report from player about what seems to be a certain switch activating in the situations when it should not. The problem is that i am unable to replicate it, meaning - it's hidden in some kind of interaction, and there are just too many of them.

I tried using search function to find every map where switch is used. I checked all of them but still can't find a single instance where the switch is turned on except for the only place where it should. Is there a way i can peform the search, but instead of any switch occurance it would show me only places where switch is turned on?
There is a tool called RMFinder by Starlit that can do that. It's really useful.

Events are not the only thing that can change switches and variables.

some of the more complex plugins use switches and variables to interact with events, that is why it is so important to configure every single plugin: to check if it is connected to a switch or variable, then change the default ID for that connectzion to an unused switch or variable and name that one to prevent it from used in events later.
There is a tool called RMFinder by Starlit that can do that. It's really useful.

Looks like a nice tool but the price are completly unaffordable for me, especially for one use.
Events are not the only thing that can change switches and variables.

some of the more complex plugins use switches and variables to interact with events, that is why it is so important to configure every single plugin: to check if it is connected to a switch or variable, then change the default ID for that connectzion to an unused switch or variable and name that one to prevent it from used in events later.
I don't use many plugins to avoid that situation, dont' think that any of mine could be causing that since nothing in their settings are about switches.
Then how about using another switch? If you can't find it you leave if.
I have a report from player about what seems to be a certain switch activating in the situations when it should not.
How did the player identify that switch?
Has the player only access to the final version of your game or is he a playtester that has tested with several different development versions?

Basically I want you to check how the switch was identified and if there are other possible causes for the same result
Then how about using another switch? If you can't find it you leave if.
Thanks, a possible solution, but will need a lot of adjustments, so would like to try other methods first if they exist.
How did the player identify that switch?
He did not. The switch is one of the switches that activates the passive skill in dialogues. The report was abouth one of those dialogues (exactly where check happens) being stuck, but the error not happened again after reloading save (i failed to reproduce it either). Also the another complaint was about having different skill triggier in dialogue (not one originally selected). That is how i assumed that i (probably) forgot to turn some of the test switches somwhere... but could not find any so far. I don't think that anything else can cause that problem.
can you post screenshots of the events that place said dialogue?
just so that we can check the logic behind that one and if there is indeed no other way to get that output.

and what about the answer to my second question?
Sorry, forgot to answer that. It's the final build.

Here is the screenshot of one of the events. They all are like this, just check for the right switch and that's all. So if the wrong dialogue is displayed for the player, i would assume that two different switches are active at the same time because i don't know what else it might be.
1731585233627.png
yes and no

there have been a lot of cases over the decades where people simply messed up their event logic, resulting in the event not working like they believed it would.
And that is what I wanted to check - if you had some convoluted logic that could result in the messages without those switches on. However it doesn't look like that.

Because there is no randomness in any computer, not even the results of any random generator are truly random - the mathematics are just too complex for a human to follow the number sequence.

can your player reproduce the error? for example from a save before it?
I will ask, maybe to give me a save game if he has one. But since he already finished game, he might not have it.

Just manually checking all the events before the reported part, and not finding anything(
What do the other event pages in that event up above look like?
What do the other event pages in that event up above look like?
I will show entire event that was reported to have the problem (one of the two).
1731765482369.png
1731765505269.png
1731765527954.png
1731765556031.png
1731765579385.png
1731765605153.png
1731765622255.png
1731765645520.png
1731765665494.png
So i got the saves from the player, and it's 100% positive that 2 switches are being active at the same time. Weird thing is that i am unable to figure out where that happens, checked all the locations that search for the switch gives me, but all of them are about triggering the switch, not activating it.
are about triggering the switch, not activating it.
can you explain what you mean?
It's probably a language/translation problem but triggering and activating a switch is the same
can multiple switches be on in the autorun event? weaponized words, brute force?
if it is, maybe use an else handle for those conditions?

another way to find the cultprit if it crashes is the use of console log scriptcall:

console.log("before check")

inside weaponized words

console.log("weaponized switch is ON")

and continue from there (you can leave or remove it later if needed as it's most
dev console log only, so you know where the issue is.

you can also set "event ID autorun, map X Y coord" to find the event faster inside the console log.
can you explain what you mean?
I mean that there is only one single instance that turns switches on. The rest are just checks if they are on or not.
So somewhere there is another instance that turns the switch on for some reason, and i need to find where it is.
can multiple switches be on in the autorun event?
Yes, most of the time all 3 of them are checked, but only 1 should be active.
if it is, maybe use an else handle for those conditions?
It is already structured like that: if switch 1 is not active, check for switch 2, if switch 2 is not active, check for switch 3.
And if switch is active, action happens, else - next switch check plays.
if it crashes
It does not crash, it plays events tied to switch A, and then events tied to switch B, meaning both switches are active, but i can't understand how.
Maybe you could use something like Notepad++ to search through all the JSON files in your game looking for where the switch is turned on? For example,
Code:
{"code":121,"indent":0,"parameters":[1,1,0]}
means turn switch 1 on, so if you did a search through all your game's data files for that text you should find everywhere switch 1 gets turned on. (I suppose you'd try {"code":121,"indent":0,"parameters":[2,2,0]} for switch 2, and so on).
Maybe you could use something like Notepad++ to search through all the JSON files in your game looking for where the switch is turned on? For example,
Code:
{"code":121,"indent":0,"parameters":[1,1,0]}
means turn switch 1 on, so if you did a search through all your game's data files for that text you should find everywhere switch 1 gets turned on. (I suppose you'd try {"code":121,"indent":0,"parameters":[2,2,0]} for switch 2, and so on).
Thank you, this is excellent advice.
The code were not really like that, it was "{"code":121,"indent":1,"parameters":[2,2,0]}" for switch 2 on the map where it activates.
But i failed to find it on any other map. I guess i will just write it off on mysterious forces of chaos.
It is already structured like that: if switch 1 is not active, check for switch 2, if switch 2 is not active, check for switch 3.
from your screenshot it is NOT structures but as

if: switch 1 = ON
do stuff
end
if switch 2 = ON
do stuff

this check if switch 1 = ON and execute the code, than if switch 2 = ON the same thing.
if you use an else hander, only the first true condition got executed and the rest is skipped.

otherwise if you use the structure like you have to "JUMP TO LABEL "NAME HERE" " on each condition.
than the setup will work as well.
but I don't see the else handler in your screenshot or the JUMP TO LABEL that goes after the conditions.

so recheck the event or add else handlers (both work, but in your case, add a jump to label (less trouble)).

Original thread: https://forums.rpgmakerweb.com/threads/finding-rogue-switch.173205/