Indeed, the code is changed concerning the shinyflag of pokemon in script version 2.0.4 for Pokemon Essentials 18 and 18.1. I could rewrite that section for PEv17.2. but before we should check if it is really an issue coming from the overworld encounter script.
Could it be possible that the shiny status got locked on because you lost a battle against an overworld encounter? Or did something else happen before? What do you meen with "was via a normal encounter"? Were the first shiny encounter a normal encounter? Did overworld encounter become shiny too after that normal encounter or only normal encounters? Can you explain that precisely, and can you tell me what you mean with "iirc"?
Right now I don't have a clue, I don't see why this error should raise.
right yea, since it happened only to players and not me not got that much info, but
player got a normal encounter, that was shiny, caught it, then every pokemon after (Even not from encounters and event ones) was shiny, which included overworlds, iirc is if i recall correctly, because the other person never said if the overworlds got them, but the first incident did. could it be catching a shiny doesnt turn of the flag? i dont know as i have people going just for shinies and this bug doesnt occur, and i see shinies when testing but never get locked.
again only feel its this script as nothing else mentions "SHINY_WILD_POKEMON_SWITCH" or switch 31 (the actual switch) minus this and in settings and encounter modifiers where it makes them shiny. the trigger could even be set by the pokemon before that but im not sure (e.g. a seemingly normal encounter somehow triggered it) but that feels a bit far fetched.
if i could recreate the bug for you then i could do more testing but.
its the actual switch being locked on causing shinies (i assume you knew i meant that just re-iterating)
Actually i have an idea...
so with how it works it sets something to the switches settings prior (So if it was off its off being "oldShinySwitchStatus" then changes the switch back in that time) what if, when a shiny appears, from normal or smth a overworld spawns (or with how normal ones work it causes both) and before it can set the switch back, oldShinySwitchStatus is rewritten for the new encounter as true, thus locking it?
if that is the case; could have a specific switch/metadata trigger for overworlds for this shiny toggle over the wild switch? (like Metadata.ShinyStatus (ofc not right call but for simplicity) = $game_switches[SHINY_WILD_POKEMON_SWITCH], then change were it references the switch to the metadata?)