i was inspired by snowpoke's prediction system and wanted to do some predicting myself.
when this script works:
in x rank solo queue, except during the 10 placement matches and the first regular match (at least it didn't work during testing).
also: beware, it's ugly python code.
thanks to good ol' ninty, this is hella complicated.
we need the iksm_session
token that the nintendo switch online app uses for auth, etc.
how do i get that token?
here's a guide. beware that if you try this on android, you'll need an android version below 7.0 (nougat), because later versions have a different policy for user-imported certificates.
if you're lucky (like me), you have an old phone with android 6.0 (marshmallow) lying around, otherwise you'd need to screw around with android virtual machines (probably not that fun tbh).
apparently, iksm_session
can be invalidated, so you'll have to keep yours up-to-date
first, adjust the config options in the script.
then do python3 [path to script]
this also somewhat works on mobile, using this android app.
instructions:
- in that app: side panel > pip: install
python-dateutil
andrequests
- top bar > folder icon > open: select xpowerpredict.py
- click the play button
depending on the aspect ratio of your phone, you might want to adjust lframe_width
and rframe_width
.
currently, the script needs to be restarted each rotation, see #3
happy VEEEEMO
start: after the lobby screen says 'BATTLE TIME!'.
end: when the results are shown (level/rank/kills/etc screen).
doing this anytime else might skew the values and cause errors.
- 1: an estimate of the points you'd gain (windelta, can be inflated)
- 2: your current xpower
- 3: how your initial xpower has changed (while the script was running), i.e. the difference between initial and current xpower
- 4: how much you'd lose (losedelta)
- 5: chance of winning (based on windelta & losedelta)
- 6: start button
- 7: end button
- 8: exit the program
- 9: chance of losing (based on windelta & losedelta)
on mobile (with lframe_width
and rframe_width
adjusted):
magic, obviously.
... jk. as soon as a match starts your xpower (in the app) is updated to the value that it'd be if you lost the match. using math we can estimate the points you'd gain. the formulas are not optimal, edge cases (where you lose lots of points or lose less than 5, i.e. unbalanced matches) aren't handled that well and the calculated values tend to be too big/small in those cases. dunno how to fix that atm.
license: gpl3