0.227.0 APK breakdown: Trainer Battles refactor imminent

Trainer Battles refactor, Pokémon Sleep, a New Move, and much more ahead

Posted in

Hello Trainers! Pokémon GO 0.227.0 update is currently rolling out to a device near you and it brings with it some pretty neat updates under the hood.

From the long awaited Trainer Battles rewrite (aka refactor), to a new move, Pokémon Sleep and much more.

💡 Disclaimer: You know the drill by now, everything in this article is data mined, and therefore subject to change or not even being released at all. Keep that in mind as we go through his, especially the PvP Refactor stuff as Niantic hasn’t said anything about any of this.

Official Release Notes

Quality of Life

  • Menu Indicators
    • When there is unrea​​d News, the “News” text in the Pokéball menu will turn blue instead of orange
    • The overflow number of Items or Pokémon will now appear in orange instead of red
  • Power-Up PokéStops
    • The bonus rewards from a powered up Pokéstop will now have a blue background

Bug Fixes

      • Mitigated an issue where Pokémon such as Aerodactyl were flying too high for Trainers to catch
      • Fixed an issue where setting Mega Gengar sometimes locked Trainer into their profile view and set their level to 00
      • Mitigated an issue where Trainers would be unable to catch Pokémon during a raid encounter if they received “Network Error (2)”
      • Fixed an issue where Gift icon would sometimes show up when a Friend requested a trade, even when the Friend had not also sent a Gift
      • Fixed an issue where when swapping a Trainer’s Buddy, multiple taps on the swap button got counted against the daily swap limit
      • Fixed an issue where if the user has Dark Mode enabled on Android, the buttons in the Map View would come up black to match Dark Mode
      • Fixed an issue where the power up animation for a PokéStop did not always play after submitting a scan
      • Fixed an issue where the text on the “Share Friend Code” button was overflowing in Spanish
      • Fixed an issue where Ferroseed and Inkay sometimes did not fit on the Trainer Achievement cards
      • Fixed an issue where the encounter music would not stop playing after the Trainer flees the encounter
      • Fixed an issue where the sound effect when transferring multiple Pokémon was sometimes loud and distorted

PVP Refactor

The good folks at PokéMiners spent a ton of time analyzing this part of the code as a lot of it was obfuscated. Here are the findings that were discovered through de-obfuscation. Your mileage may vary, but this looks plausible to us.

Websockets

As mentioned in a previous APK mine, Niantic  have added WebSockets support into the game. WebSockets are a way to enable seamless 2-way communication between the game and the server.

They are typically used for chat apps that require real-time communication, and they are fast, reliable and almost instant – most of the time. Let’s see what’s what in GO.

Websocket Library

TOKEN_HEADER
VERSION_HEADER
webSocket
LastWebsocketContext

A few common WebSocket items were added to the WebSocket library.

Pub/Sub

It appears that Niantic is also using the common Pub/Sub development pattern, which stands for Publisher/Subscriber.

Pub/Sub is typically used for things like streaming analytics and data integration pipelines to ingest and distribute data. I won’t go into the nitty-gritty of Pub sub here – you can read more about Pub/Sub in this article here – but the idea is simple:

  • Publisher publishes messages,
  • Subscribers pick up and react to those messages
  • There can be multiple publishers and subscribers in the same room

Sounds confusing? We got you. The long and the short of WebSockets and the new Pub/Sub pattern is it will (hopefully) lead to more seamless communication, less lag and more stability in Trainer Battlers.

The new system has the potential reduce lag and some of the other issues that are currently plaguing PvP in Pokémon GO, as it will allow these connections to be ‘always on’ and instant.

Pubbed and Subbed

END_NPC_COMBAT
END_INVASION_COMBAT
COMBAT_NOTIFY
END_PVP_COMBAT
VS_SEEKER_MATCH_STARTED
COMBAT_CHARGE_ATTACK_ANIMATION_ACTIVE_CHANGE
COMBAT_UPDATE_ACTION_UI
COMBAT_EXIT_COMBAT_STATE
COMBAT_SUPER_EFFECTIVE_CHARGED_ATTACKS_UPDATE
COMBAT_STATE_ENTERED
COMBAT_STATE_DONE
COMBAT_STATE_EXITED
COMBAT_INITIALIZE_PRESENTATION_DIRECTOR
COMBAT_SHOW_UI
COMBAT_HIDE_UI
COMBAT_SHOW_MESSAGE
COMBAT_SHOW_TOAST
COMBAT_SHOW_TUTORIAL
COMBAT_UPDATE_IS_SHOWING_CHARGE_ANIM
COMBAT_PLAY_MINI_GAME
COMBAT_CONTINUE_AFTER_MINI_GAME
COMBAT_SHOW_SPECIAL_ATTACK
COMBAT_SPECIAL_MOVE_STATE_ENDED
COMBAT_CLEAN_UP_SPECIAL_MOVE_STATE
COMBAT_HANDLE_SPECIAL_MOVE_CAMERA_ZOOM
COMBAT_SHIELD_USED
COMBAT_DEFENDER_FLINCH
COMBAT_OPPONENT_REACT
COMBAT_FOCUS_ON_POKEMON
COMBAT_PLAY_START_FADE_TRANSITION
COMBAT_PLAY_END_FADE_TRANSITION
COMBAT_PLAY_COMBAT_MUSIC
COMBAT_PLAY_BACK_BUTTON_SFX
COMBAT_SETUP_COMBAT_STAGE_SUBSCRIPTIONS
COMBAT_OPPONENT_RETRIEVE_POKEMON
COMBAT_HIDE_NAMEPLATE
COMBAT_DISPLAY_PHYSICAL_SHIELD
COMBAT_UPDATE_TIMER

The Miners believe that all of the above is what will be included in part of the ‘real-time’ communication. Things that you would expect, special move states, charge attack states, the ‘mini-games’ (swiping the icons), etc.

Logging

It also appears that there will be logging as well. It looks like they’re going to be re-using parts of the raid logging to send back PvP specific data.

There are 50 different data points that the logging will record and report back on, below are some of the highlights:

  • Opening, Updating, and Leaving Battles
  • How the battle ended
  • Websocket and Pub/Sub Data
  • GBL Matchmaking data
  • App data like if the app was paused, in focused, or if it was closed
  • Any unexpected crashes

Pokémon Sleep

Way back in May of 2019 the Pokémon Company announced that it was working on something called Pokémon Sleep, and a new device called a Go Plus+ (seriously, that’s what it’s called).  We haven’t heard much about it since then, until now.

Go Plus+

WAINA
USER_DIALOG_FIRST_CONNECT 
USER_DIALOG_RECONNECT 
USER_DIALOG_RECONNECT_REJECT 
REJECTED

First, that’s the promotional image that was shared in 2019.  The device is codenamed Waina, which is a rice cake.  Given the shape of the device, it’s kind of a fair codename.
Second, there are some new connection states for the device.

Sleep Library

SleepDetailGuiController
SleepDetailPanel
PrintPanelDate
SetupSleepDetail
UpdatePageWidth
testText
goalMetText
pageBackground
normalBackgroundColor
noDataBackgroundColor

A whole new library was added to support Pokémon Sleep.

Graphs and Bar Charts

ToggleGraphMode
UpdateGraph
dayBarChartWidget
weekBarSetting
monthBarSetting
switchToMonth

There will be graphs and bar charts included.  Which makes sense for sleep tracking.

Tracking your time slept

ClientSleepRecord
StartTimeSec
DurationTimeSec
totalSleep

Pretty standard for a sleep tracking device, tracking sleep.

Rewards

WainaGetRewardsRequest
SleepDay

You will apparently be able to get rewards, maybe based on how long you sleep?

Route Updates

SelectRouteTab
SelectPokemonTab
SelectRaidsTab
defaultPoiTipTextColor 
warningPoiTipTextColor 
warningExclamation

The route tab will apparently be to the left of the Pokémon tab, and some text colours were added.

Team GO Rocket Quest Updates

Jessie and James Pokémon GO

BeginQuestIncident 
danglingStoryIncidentViewPrefab 
incidentRewardModalImage
StartRewardInteraction
LoadRewardInteraction
StartLoadedRewardInteraction
StopLoadingRewardInteraction
get_RewardTimeoutSeconds
.get_DidQueueRewardPromiseTimeout
.get_InteractionIsLoaded
.get_LoadedQuestEncounterOutProto
.get_LoadedStartIncidentOutProto
QuestRewardInteractionService
IncidentQuestBackgroundGuiController 
textureSize 
textureDepth

More on the quests that will result in Team Go Rocket encounters, including a method to start the reward portion, and an indication that the quests will show up differently in the list.

New Move

V0359_MOVE_ICICLE_SPEAR

Icicle spear has been added for Spheal CD, no information on energy or speed yet.

Audio Updates

Audio Looping Fix

StartTimes
.get_StartTimesEnabled
isFirstPlay
startTimeIndex

This is likely to fix the audio looping issues.

Power Up Reward Bubbles

powerUpPoiBonusBubbleColor
powerUpPoiBonusTextColor
PowerUpPoiBonus

As indicated in the release notes, bonus rewards from powered-up Pokéstops will appear with a blue background.

Wayfarer Updates

Checks

add_GuiClosed
IsWayfarerOnboardingBypassed
add_SubmissionUploadCancelled
.get_UploadsQueuedCount
.get_UploadsInProgressCount

Some checks were added, one to see if the GUI is closed, another to check if the tutorial was passed, and some for submission uploads.

Image Gallery

enableNotifMarker
UpdateNotificationMarker

A couple of items were added to the image gallery, likely for highlighting items during the tutorial.

Showing existing Wayspots

PoiMapMarkerInformationState
markerInformation

Part of the new code that shows existing Wayspots on the map when you are nominating a ‘new’ wayspot.

Parting Words

There’s a lot to be hopeful for when it comes to the PvP Refactor.  Hopefully, all the work that they are putting into this pays off in the end.  Are you excited? Hopeful? Let us know in the comments!  That’s all for now Trainers, stay safe out there.

Author & tags

Tags
Glawhantojar
Glawhantojar
I've been playing Pokemon Go since the game launched way back in 2016, I am a loyal Valor player and also a content creator on YouTube going by the name Professor Glaw.

Further reading

Popular today

Latest articles

Support us

Buy GO Hub merch

Get your very own GO Hub t-shirt, mug, or tote.