The Beta Bug Detail (Patreon)
Content
#1 Beta Error-- Inaction
so, there were a bunch of inaction errors this time around. I may have alluded to this previously, but pretty much all of them were sourced back to a few issues:
- Encore, which had a secret hidden error buried deep within it under the error we found and fixed for it in Alpha
- Panic! on the Burning Field, which caused leaders to break down and take no action
- The moral dilemma to heal God or not, since Elias is one of the only characters with items that can recover status so they hadn't been tested properly otherwise
- Recycle, which we just got yesterday because fucking no one uses Recycle.
- one more that i cant remember lol
- and finally, the Specific Switches issue.
The Specific Switch thing is our crowning champion this time around, because it appeared fucking everywhere. I think something like 80-90% of the inactions this time around were because of this. So let's taka 'bout it.
The reason we call i the Specific Switch issue is because that's how it appears in the debuglogs. We always knew it was that because the inactive rounds in the logs would look like this:
***Round 1***
Initial switchscore building: Statuses (0)
Initial switchscore building: Stat Stages (0)
Initial switchscore building: Healing
Initial switchscore building: fsteak (0)
Initial switchscore building: Specific Switches (0)
***Round 2***
The fact that it cut off under the Specific Switches heading meant the error was in that section-- i.e, the section of code that's checking some precise cases, to see if it should do things like, switch ferrothorn into a cinccino using tail slap and make it bleed all over its pretty fur.
The first question to ask though, is, why did we not catch this sooner?
and the answer to that, my loves, is i have no fucking clue. for as crazy prevalent as it was in beta, we didn't see these inactions at all in supervised, internal, and alpha. further, this part of the code was added in E17 and as far as i know basically unchanged since. so why wouldn't it have been reported sooner?
well, it actually might have.
but very rarely-- and we were never able to recreate it. however, i recall a few specific instances during both early E18 testing and E17 testing/release where we kept getting an inaction that looked much like this VS two specific trainers-- the Q Gang duo who you fight in the mega quest just before Eustace. it would usually only happen for a turn at a time, but although we tried that duo a handful of times every time this came up, we never got it.
so when this started appearing all over beta, i was very concerned. however-- the volume gave us plenty of room to check it. to be honest, the fact that it went from extremely rare to happening so commonly leaves me very confused and makes me doubt if this was actually the Q Gang error. but it looks the same. so we conclude that it is until proven wrong. maybe something we fixed in alpha allowed the code to more easily get to this part in beta-- but I have no idea what that would be.
i was pretty worried at first because i knew the similarities, and i knew we'd had no luck reproducing the Q gang problem. but I happened to luck into the error vs Taka/ZEL on my ghost mono, on turn 2 no less, so suddenly I had exact conditions at my finger tips. I passed it to Cass, who has proven herself The Great Replicator, and she and Marcello nailed it overnight.
the issue turned out to be with the Specific Switch case of when it looks to sac a low health mon to get a free switch. this is something that happens in competitive, so I built it into the AI back in e17. Now that the issue is fixed, I currently have some doubts about its decision making with regards to that feature, but that can be addressed later on so long as it doesn't freeze up.
So the bug came about as a result of the check to see if there was a low health mon it could sac on its team. There were two problems: In doubles, it would find a low health mon and want to switch it in, but not realize that the low health mon was its partner who was already dying on the battle field. A scan of the Switch Score inaction reports confirmed that every single case where this happened in doubles had a low health opponent left out on the field for a time. Then, in singles, it was still trying to do that same check for doubles when a low health mon was on the team somewhere, only it was doubles, so it couldn't.
crasho.
so anyway i understand nothing as to why this wasn't a thing before but hey it's fixed so
Defacto Embargo
in alpha, trainers would sometimes spam potions even at high HPs. gross. when i looked, i saw that some of the scores were just astronomical, so I slashed them for beta, hoping it would be for the. then it came around and several of the beta testers were saying things like I like that opposing trainers don't use items anymore
boi they wat
sure as hell they do sure might
and I had seen a couple in my run... but really just a couple. There were a lot of instances of it not potioning when it definitely could've saved a life,
i over there like boi this ain' how i raise you
so i'm like, okay. alpha too much potion. beta too little potion. all i gotta do is strike a middle ground with the scoring values.
so i sat down to do it.
and i didn't like what i saw.
as i was tracking the potion score through various stages of its calculations, i saw there was one part that it was constantly dropping. it was after a check that basically said, if the player's move's damage is greater than this pokemon's hp, maybe want to use a potion more.
and if not, really don't want to use a potion, ok?
and the script was like, ok.
and never wanted to use a potion ever again even when the player's move's damage was higher than the pokemon's hp.
basically the check for it was busterino'd so the score was -always- getting cut by a significant amount. this had to have been the case in alpha so how the ai ever used potions is frankly beyond me.
it also explained most of my gripes with the usage that i'd seen in my playthrough. julia's electrode is the prime example since i was solo-dartrix for her during my ghost mono. the only reason i won first try was because it potioned to lower than my attack damage, which was nice for me, but also deeply upsetting since that was exactly what the code was meant to avoid.
so Marcello took a look and found the problem-- the values for how much damage the player's move was expected to do were only getting set some of the time. specifically when the opponent was slower. this is unfortunate, since opponents usually outlevel the player. 's an oof. and that was references multiple times through the potion logic, so really it's a wonder it didn't just crash the whole thing.
kind of wish it would have. then we'd have known.
it's fixed now and i've since sat down with it and julia's electrode specifically to tweak values and make sure potions are pretty intelligent. they are-- at least in that case. let's see how it holds up with others.
for the record, as much as AI has been a clusterfuck it's also getting to the point that i can just settle in with it and change the numbers until it's better. that is not something we've been able to do in the past. that's my comfort zone. feels good to be able to control that without needing to rewrite entire sections.
cuz we already rewrote it all lol
Upon further reflection...
so i got to Serra with my ghost mono, still in the Mono Extravaganza call with the Lads. serra scares me-- because I'm using Golurk. I'm using Decidueye. I'm using Gourgeist. I've got an Oricorio and Sandygast on deck. I didn't realize before how many ghost types were actually weak to ice, but the answer is apparently a solid handful. half my team, really.
Serra doesn't do so well with Shedinja though. in fact, if i wait out hail and don't let her set up stealth rock, she only has one way to kill it-- froslass. works for me. So I pull up my trusty Shedinja and march confidently into battle.
Glaceon's boosts activate, granting it evasion. But that doesn't matter, there's nothing it can do to Shedinja. I'll hit it enough eventually, maybe burn some potions, stall out Aurora Veil. All G.
I use Shadow Sneak once. Shedinja misses, hits the mirrors, and fucking dies.
Everything on her team uses evasion. Much like her mirrors and my Shedinja, my whole plan is in pieces.
So, okay. I've got Golurk. Golurk has Earthquake. I don't care about Relationship Points this run, I'll just demolish her entire field and pull through her. At this point I'm starting to fall behind the rest of our group, so I wanna get through quickly.
I just need Golurk to live for one turn. Fortunately, her field's evasion can be used against her. The Lax Incense is available before her for that exact reason. I slap it on Golurk, meaning it should have something like a 33% chance to miss with Glaceon's Ice Beam. Shouldn't be long before she does and I get the Earthquake in.
It doesn't go well at first. Nothing but hits, but that's all right. I'm patient, and with the combined powers of F12, speed up and text skip, resetting til I break field probably will take less time than trying to fight on with that loss.
I'm about 20 resets in when I begin to suspect something is wrong.
I know RNG can be a cruel mistress though, so I just wait. And just in case Lax Incense isn't enough, I switch over to Synthetic Seed, which, boosting two stages of evasion in her field, should give me a 40% miss chance. Any day now.
The day does not come.
One of the other guys, increasingly amused by the situation, reminds me that the move could just be reflected anyway. True, I admit, but there's only a 50% chance of it, and I haven't seen a message saying that it's doing that. That's when I begin to realize the problem.
In the Mirror Field there are two main categories of attacks-- those that reflect after missing, and those that cannot miss at all. The second category is generally reserved for light-based attacks, and the former for beam attacks. I'm pretty sure Ice Beam should be in the former, but maybe it got mixed up.
I check my fails to make sure I'm right that it should only reflect. I am. So I close out my game, and go hunting.
Unfortunately, Ice Beam appears to be in the right category. I worry more. Is something in the code making all of the beam attacks never miss? I dig further. All in all I probably spend a solid forty minutes hunting around in the code trying to find the issue causing Ice Beam to never miss.
Eventually one of the other guys suggests that I've just gotten impossibly bad luck.
I can find no other explanation. Everything seems to be working perfectly. I presume I've just been irrationally unlucky and gotten the singular corner of RNG after however many dozen resets in which I never get the miss.
Which means, all the more likely I get it soon, right?
So I go back to soft-resetting. No problem. I can wait.
More resets. The other guys are increasingly amused because it's going on two hours since I first started trying to do this. Ice Beam hits. F12. Star Battle. Ice Beam hits. F12. Start Battle. Ice Beam hits. F12--
Then it hits me.
Golurk has No Guard.
i bash my head against the table and cry. the call explodes with laughter like hyenas over their prey. i join them and can't breathe for laughing so much in the next ten minutes. someone gets back in the room and is deeply, deeply, confused. i am in despair.
one ability capsule later, i beat serra.
the game, was frankly, working better than my brain was.
that's why this tweet:

Knot a Functional Game Engine
i wasn't there for this one, so i don't have the details. but the people deserve to know.
just a few days ago, some of our mono group has been reaching the ends of their lines (almost typo'd that as 'lives', yikes). our good buddy Tony, aka Shogo Mogo, aka 2KLANGZ, aka Riku, aka i'm sorry inuki, aka Nesquik Rabbit, aka niteleebs, aka Shogo-a-Gogo aka the guy who my mom always mixes up with my boyfriend and thinks lives in italy despite the fact that he's from australia, was on his Steel-type game and facing Amaria. and having a mite of trouble with it.
As I understand, Swampert was the main offender here, because, you know, ground type, and how he gonna get through that when it's splashin' around like that.
so I guess he tried out a new strat. Called Grass Knot. and mercing that 4x weak Swampert to oblivion. he put it on his Empoleon, counting on its water type to keep it up to snuff, and went about his Swampert-mercing business.
it did fucking nothing.
for the mathematically inclined, here are the calcs they ran to assess the situation,
252+ SpA Choice Specs Empoleon Grass Knot (100 BP) vs. 0 HP / 0 SpD Swampert-Mega: 408-480 (138.7 - 163.2%) -- guaranteed OHKO
252+ SpA Choice Specs Empoleon Grass Knot (100 BP) vs. 252 HP / 0 SpD Swampert-Mega: 408-480 (117.2 - 137.9%) -- guaranteed OHKO
252+ SpA Choice Specs Empoleon Grass Knot (100 BP) vs. 252 HP / 252+ SpD Swampert-Mega: 296-352 (85 - 101.1%) -- 12.5% chance to OHKO
tl;dr swampert should have been toast. it was nowhere near toast.
inuki did an examine as to why. he posted this snippet, from our code for grass knot:

even those we've never so much as looked at code can probably see how those numbers match up. red on the left is the BP of the move. red on the right is how heavy it gotta be to get that BP.
now let's compare to the actual values. mind you, we are apparently using the metric values for weights.

now i got a question for you. which is heavier? a pokemon who's weight is rounded to the nearest integer? or a pokemon who's weight is typed omitting a decimal point?

that's right, it's the pokemon who's weight was typed omitting a decimal point. because that add an extra 0 onto all of these values.
meaning grass knot would basically always do shit for damage.
by the way, do you know how many pokemon weigh more than 1000kg?
none of them. because the metric in pokemon games doesn't go up that high.
here's the kicker-- we have not changed this part of the code. this is code from basic bitch essentials. we let jan know for rejuv, but really anyone who's making a fan game should go delete a few 0's from their 09a function code.
grass knot and low kick have been broken for literal years in all essentials fangames and apparently nobody bothered to figure that out before us hooligans.
No Awoo
i will begin explaining this problem with a screenshot, which Ikaru graciously took to explain the issue to one of the other players who noticed the problem:

basically there is a certain area which i need music to play over the normal environmental music for an event that goes on there. it is a shoddy solution to have a event start playing the bgm and the commit seppuku but it's one that i've depended on in a lot of other areas in the game.
apparently this is the first time that i've needed it to be in a place that has battles though, because wow the music and battles are just not playing nice whatsoever. those who played the alpha probably know exactly where.
the thing is the music's been misbehaving in literally every wave so far. and honestly, i don't have high hopes for this next one in regards to that because it always seems to find a way to fuck up. like sometimes it would not play, or else it would go silent after battles, or else it would play through battles, and i have tried different ways each time to no avail.
i was very frustrated when i heard it was still busted in beta.
but then i had a plan.
a plan that should, in theory, be infalliable... except in one single case.
i'll just paste the conversation log here:
Amethyst
i have a vague idea of what to try next for it
Marcello
Maybe an issue with the indoor maps? idek
Amethyst
nah, indoor's unaffected
the parallel event temporarily changing the normal music to something else is just playing through battles.
...but then if i do it that way it plays -no- music after battles.
so.
Marcello
Oh hey I forgot the Tania event on route 1 hello
And hmm, sounds vexing
Amethyst
maybe i just need to lock out wild encounters until the event is done
which is also not something i have a quick method for
or set background and then do the...
sigh.
i have difficulty believing i haven't changed the bgm anywhere that has wild encounters before
but
that might be the case and essentials might be too dumb to do this properly
so idk
Marcello
God bless essentials
Amethyst
ill go pout about it
Marcello
Pouting, the most adorable way to demonstrate one is seething with rage
Amethyst
hmph.
👀
maybe i can use field effects to fix it.
since the only encounters are over water
i can have it ask if the field has become water surface
and if so fix the music
and reset field var
Marcello
Saving this for posterity

Amethyst
how is that for posterity????
Marcello
Maybe I just don't know what posterity means
😅
Amethyst
🤔
i mean
if someone used electric terrain while surfing on water during this and then finished the battle
for instance
the music would break again.
but if anyone reports that i think i'll put them in the 'go fuck yourself' corner
[for context the 'go fuck yourself' thing was from an earlier error we discussed where our fix to alpha's revive glitch messes with the party order in the switch screen, and we jokingly said if anyone reports that, they could-- you know.
it's not actually meant to be aggressive though; please report things!*]
[*that aren't this.]
Marcello
😅
If you want I could try and just write a 'no wild battles' method?
Amethyst
that's okay.
because here's what would happen.
some jerk
is gonna go to surf
trigger the no wild
and then fly out from surf to god knows where and bring that no wild thing with him.
or teleport.
or fucking white out vs a wailmer.
wait there'd be no wailmer.
...he'd fish and then white out while fishing.
...you see my point.
Marcello
Point taken
Amethyst
i think if i do a field != 0 thing
then i can solve it for all except one case
and that is if some funnyboi with a lycanroc goes and stormshards water surface for the sake of beating up a poor wailmer.
and you know what.
he can have it.
if someone wants to do that.
they can break their fucking music.
that's fine.
Marcello
Sotrmshrds a wailmer
Bug deserved for wailmer cruelty. I like it
Amethyst
ty
Marcello
And that should fix all the issues?
Amethyst
i can only bloody hope.
Marcello
If not, Lin can just deleta the place
Amethyst
fucking please and thanks.
so there. fixed.
but no lycanrocs allowed.

Finally, my favorite bug in all of beta testing.
there's nothing to explain.
just someone found the couch napping on the job...

this happens when you 'talk' to the couch.
i laughed an inelegant amount at this.
One more for the road.
so that's my beta bug stories. in addition to bugfixes in the game, i also finally found the cause of the forum issues that have been plaguing us for the literal past year during this last week. and boy do i hate myself for it.
ok so forum issues-- those of you who are on the forum probably know the various topic glitches-- quote button not working, 21 new replies on this thread when there are none, infinite looping to past forum pages, and the reply box not showing up?
alla that
and more, frankly.
it has plagued me. i've done a bunch of shit to try and solve it.. in fact-- again, text log from our staff chat when i found it.
and please excuse my unintelligible typing; i was very sleep deprived and even verier frustrated after getting little sleep and then staying up for 24 hours cuz i got caught up making the episode banner when i was gonna go sleep and then accidentally figured this out.

but hey.
fixes are nice.
and by the way i love how the banner came out.
y'all remember sleppu? did a lot of fanart for reborn a couple years ago, including the shelly wallpaper and pulse magnezone art. they also did the core art for this epsiode's banner back before they disappeared. i just dressed it up real pretty and put it to a background.
--------
anyway it's been a bug-fixing-filled week on all fronts, frankly, given the number of ants i've squashed here too. yikes, btw.
but that's not all, i've also renewed a focus on convenience improvements/QoL stuff in the game and granting some things people have been asking for for a while. this will probably continue to be a focus for E19 so i can make it as smooth as possible for players.
some of those things include adding another level tier for indra's battles, and one of the grand hall trainers between julia and corey so that players grinding up for samson and florinia don't have to do so on trainers that are respectively far too strong or weak for their current level.
the follower script has been patched up thanks solely to baldr-- god bless him-- who fixed it up for us. there was a concern about ledges, but those seem to work fine, and even route 3's hoppyrocks with aya are improved. the only thing it doesn't seem to respond to is events that move the player around themselves, but that's still a massive improvement.
also you can now use the hyper beam hole in belrose mansion as a door if you really want.
you have no idea how many people have asked for that.
so, the community release is all set now!
i'm super excited to get it out in the morning-- probably could have done it tonight if not for this post, but i didn't want to, cuz E17's community release taught me that i really need to be around for it. i woke up to several hundred messages last time and it was not a good experience.
so tomorrow i fight~
and for now, i leave you with a couple more videos from our group call shenanigans:

Cpt Dana KS [Blind Nuzzle] vs Blake
https://www.youtube.com/watch?v=QVkvTnRpeJo
Sheep [Bug] vs Shelly
https://www.youtube.com/watch?v=tWML4T2dTPs
cheers~