Programming Replay Analyzer

As part of the draft league website I have made, I developed a replay analyzer that reads in a showdown replay url and outputs data. You can find it here:
https://pokemondraftleague.online/replayanalysis/
A sample output is here: https://pokemondraftleague.online/leagues/UPBA/seasons/Season_5/replay/1405

It works by parsing the .log files associated with each replay. The source code is here: https://github.com/claduva/pokemondraftleague/tree/master/replayanalysis/NewParser

As of now, it only supports singles and doesn't work for randbats and I'm sure there are several replays it won't work on, but it does work on all ~3000 replays on my site. Among the more interesting things it calculates is "Luck" which quantifies the number of crits, misses, and secondary effects compared to their expected values over the course of a battle. There are several scenarios that make this less than 100% accurate, but Ive accounted for as many as I have encountered to the extent I know how. It also calculates Damage Dealt, HP Healed, Support Moves Provided.
 

Geysers

not round
is a Community Contributoris a Team Rater Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnus
Trying to analyze this replay: https://replay.pokemonshowdown.com/gen8nationaldexag-1104343529
led to an error thingy:
ValueError at /replayanalysis/
Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f4c8badaac8>>": "inbox.sender" must be a "User" instance.
Request Method:POST
Request URL:http://pokemondraftleague.online/replayanalysis/
Django Version:2.2.10
Exception Type:ValueError
Exception Value:Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f4c8badaac8>>": "inbox.sender" must be a "User" instance.
Exception Location:/app/.heroku/python/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py in __set__, line 211
Python Executable:/app/.heroku/python/bin/python
Python Version:3.6.8
Python Path:['/app',
'/app/.heroku/python/bin',
'/app',
'/app/.heroku/python/lib/python36.zip',
'/app/.heroku/python/lib/python3.6',
'/app/.heroku/python/lib/python3.6/lib-dynload',
'/app/.heroku/python/lib/python3.6/site-packages']
Server time:Mon, 27 Apr 2020 21:47:32 +0000
Traceback Switch to copy-and-paste view
  • /app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py in inner
    1. response = get_response(request)
    ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response
    1. response = self.process_exception_by_middleware(e, request)
    ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response
    1. response = wrapped_callback(request, *callback_args, **callback_kwargs)
    ▶ Local vars
  • /app/replayanalysis/views.py in replay_analysis
    1. raise(e)
    ▶ Local vars
  • /app/replayanalysis/views.py in replay_analysis
    1. inbox.objects.create(sender=request.user,recipient=clad, messagesubject="Replay Error",messagebody=url)
    ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/manager.py in manager_method
    1. return getattr(self.get_queryset(), name)(*args, **kwargs)
    ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py in create
    1. obj = self.model(**kwargs)
    ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py in __init__
    1. _setattr(self, field.name, rel_obj)
    ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py in __set__
    1. self.field.remote_field.model._meta.object_name,
    ▶ Local vars
Request information
USER
AnonymousUser
GET
No GET data
POST
VariableValue
csrfmiddlewaretoken'xzwrpMgQgjO7GMuGXUzMXuHcqqI8bPK9miExoHekAq6dn1eWsQ0lj510FSm0yYZW'
url'https://replay.pokemonshowdown.com/gen8nationaldexag-1104343529'
FILES
No FILES data
COOKIES
VariableValue
csrftoken'W2r8heoV3BfyPMoYrHVNcvFjiRkhrEXxLLzeg9mpnIxEw18eWDmmy6Z7xjY9ONck'
__cfduid'd36598e5b789a8d27e3add9ee11a02da61588023351'
META
VariableValue
CONTENT_LENGTH'160'
CONTENT_TYPE'application/x-www-form-urlencoded'
CSRF_COOKIE'W2r8heoV3BfyPMoYrHVNcvFjiRkhrEXxLLzeg9mpnIxEw18eWDmmy6Z7xjY9ONck'
HTTP_ACCEPT'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_ENCODING'gzip'
HTTP_ACCEPT_LANGUAGE'en-us'
HTTP_CDN_LOOP'cloudflare'
HTTP_CF_CONNECTING_IP'2601:281:8201:2e11:937:f586:763f:e592'
HTTP_CF_IPCOUNTRY'US'
HTTP_CF_RAY'58abbe175e3e58d1-DFW'
HTTP_CF_REQUEST_ID'025f352292000058d15e96d200000001'
HTTP_CF_VISITOR'{"scheme":"https"}'
HTTP_CONNECTION'close'
HTTP_CONNECT_TIME'0'
HTTP_COOKIE('csrftoken=W2r8heoV3BfyPMoYrHVNcvFjiRkhrEXxLLzeg9mpnIxEw18eWDmmy6Z7xjY9ONck; '
'__cfduid=d36598e5b789a8d27e3add9ee11a02da61588023351')
HTTP_HOST'pokemondraftleague.online'
HTTP_ORIGIN'https://pokemondraftleague.online'
HTTP_REFERER'https://pokemondraftleague.online/replayanalysis/'
HTTP_TOTAL_ROUTE_TIME'0'
HTTP_USER_AGENT('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, '
'like Gecko) Version/13.0.5 Safari/605.1.15')
HTTP_VIA'1.1 vegur'
HTTP_X_FORWARDED_FOR'2601:281:8201:2e11:937:f586:763f:e592, 172.69.70.79'
HTTP_X_FORWARDED_PORT'80'
HTTP_X_FORWARDED_PROTO'http'
HTTP_X_REQUEST_ID'0a57fa55-7a54-41fd-ae62-99c06919a345'
HTTP_X_REQUEST_START'1588024052435'
PATH_INFO'/replayanalysis/'
QUERY_STRING''
RAW_URI'/replayanalysis/'
REMOTE_ADDR'10.30.127.176'
REMOTE_PORT'17894'
REQUEST_METHOD'POST'
SCRIPT_NAME''
SERVER_NAME'0.0.0.0'
SERVER_PORT'28213'
SERVER_PROTOCOL'HTTP/1.1'
SERVER_SOFTWARE'gunicorn/20.0.4'
gunicorn.socket<socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.189.182', 28213), raddr=('10.30.127.176', 17894)>
wsgi.errors<gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f4c8cf621d0>
wsgi.file_wrapper''
wsgi.input<gunicorn.http.body.Body object at 0x7f4c8cf62b70>
wsgi.input_terminatedTrue
wsgi.multiprocessTrue
wsgi.multithreadFalse
wsgi.run_onceFalse
wsgi.url_scheme'http'
wsgi.version(1, 0)
Settings
Using settings module pokemondraftleague.settings
SettingValue
ABSOLUTE_URL_OVERRIDES{}
ADMINS[]
ALLOWED_HOSTS['0.0.0.0',
'pokemondraftleague.herokuapp.com',
'127.0.0.1',
'pokemondraftleague.online',
'www.pokemondraftleague.online']
APPEND_SLASHTrue
AUTHENTICATION_BACKENDS['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS'********************'
AUTH_USER_MODEL'auth.User'
AWS_ACCESS_KEY_ID'********************'
AWS_DEFAULT_ACLNone
AWS_LOCATION'addyc6831bad/public/media'
AWS_QUERYSTRING_AUTHFalse
AWS_S3_FILE_OVERWRITEFalse
AWS_S3_OBJECT_PARAMETERS{'CacheControl': 'max-age=86400'}
AWS_SECRET_ACCESS_KEY'********************'
AWS_STORAGE_BUCKET_NAME'cloud-cube'
BASE_DIR'/app'
CACHES{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS'default'
CACHE_MIDDLEWARE_KEY_PREFIX'********************'
CACHE_MIDDLEWARE_SECONDS600
CELERY_ACCEPT_CONTENT['application/json']
CELERY_RESULT_SERIALIZER'json'
CELERY_TASK_SERIALIZER'json'
CELERY_TIMEZONE'UTC'
CLOUDCUBE_URL'https://cloud-cube.s3.amazonaws.com/addyc6831bad'
CRISPY_TEMPLATE_PACK'bootstrap4'
CSRF_COOKIE_AGE31449600
CSRF_COOKIE_DOMAINNone
CSRF_COOKIE_HTTPONLYFalse
CSRF_COOKIE_NAME'csrftoken'
CSRF_COOKIE_PATH'/'
CSRF_COOKIE_SAMESITE'Lax'
CSRF_COOKIE_SECUREFalse
CSRF_FAILURE_VIEW'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS[]
CSRF_USE_SESSIONSFalse
CUBENAME'addyc6831bad'
DATABASES{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.postgresql',
'HOST': 'ec2-23-23-195-205.compute-1.amazonaws.com',
'NAME': 'd1ed9m9clqflm0',
'OPTIONS': {},
'PASSWORD': '********************',
'PORT': '5432',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': 'testdb'},
'TIME_ZONE': None,
'USER': 'sgsaqhpzsyvaht'}}
DATABASE_ROUTERS[]
DATA_UPLOAD_MAX_MEMORY_SIZE2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS1000
DATETIME_FORMAT'N j, Y, P'
DATETIME_INPUT_FORMATS['%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M',
'%m/%d/%y']
DATE_FORMAT'N j, Y'
DATE_INPUT_FORMATS['%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y']
DEBUGTrue
DEBUG_PROPAGATE_EXCEPTIONSFalse
DEBUG_TOOLBAR_PANELS['debug_toolbar.panels.timer.TimerPanel',
'template_timings_panel.panels.TemplateTimings.TemplateTimings',
'debug_toolbar.panels.sql.SQLPanel']
DECIMAL_SEPARATOR'.'
DEFAULT_CHARSET'utf-8'
DEFAULT_CONTENT_TYPE'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE'storages.backends.s3boto3.S3Boto3Storage'
DEFAULT_FROM_EMAIL'pokemondraftleagueonline@gmail.com'
DEFAULT_INDEX_TABLESPACE''
DEFAULT_TABLESPACE''
DISALLOWED_USER_AGENTS[]
EMAIL_BACKEND'sendgrid_backend.SendgridBackend'
EMAIL_FILE_PATH'/app/accounts/sent_emails'
EMAIL_HOST'localhost'
EMAIL_HOST_PASSWORD'********************'
EMAIL_HOST_USER''
EMAIL_PORT25
EMAIL_SSL_CERTFILENone
EMAIL_SSL_KEYFILE'********************'
EMAIL_SUBJECT_PREFIX'[Django] '
EMAIL_TIMEOUTNone
EMAIL_USE_LOCALTIMEFalse
EMAIL_USE_SSLFalse
EMAIL_USE_TLSTrue
FILE_CHARSET'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONSNone
FILE_UPLOAD_HANDLERS['django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE2621440
FILE_UPLOAD_PERMISSIONSNone
FILE_UPLOAD_TEMP_DIRNone
FIRST_DAY_OF_WEEK0
FIXTURE_DIRS[]
FORCE_SCRIPT_NAMENone
FORMAT_MODULE_PATHNone
FORM_RENDERER'django.forms.renderers.DjangoTemplates'
HOST'ec2-23-23-195-205.compute-1.amazonaws.com'
IGNORABLE_404_URLS[]
INSTALLED_APPS['dal',
'dal_select2',
'django_select2',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'accounts.apps.AccountsConfig',
'pokemonadmin.apps.PokemonadminConfig',
'discordbot.apps.DiscordbotConfig',
'draftplanner.apps.DraftplannerConfig',
'individualleague.apps.IndividualleagueConfig',
'leagues.apps.LeaguesConfig',
'main.apps.MainConfig',
'otherseasons.apps.OtherseasonsConfig',
'pokemondatabase.apps.PokemondatabaseConfig',
'replayanalysis.apps.ReplayanalysisConfig',
'crispy_forms',
'django_celery_beat',
'multiselectfield',
'debug_toolbar',
'template_timings_panel',
'storages',
'widget_tweaks']
INTERNAL_IPS[]
LANGUAGES[('af', 'Afrikaans'),
('ar', 'Arabic'),
('ast', 'Asturian'),
('az', 'Azerbaijani'),
('bg', 'Bulgarian'),
('be', 'Belarusian'),
('bn', 'Bengali'),
('br', 'Breton'),
('bs', 'Bosnian'),
('ca', 'Catalan'),
('cs', 'Czech'),
('cy', 'Welsh'),
('da', 'Danish'),
('de', 'German'),
('dsb', 'Lower Sorbian'),
('el', 'Greek'),
('en', 'English'),
('en-au', 'Australian English'),
('en-gb', 'British English'),
('eo', 'Esperanto'),
('es', 'Spanish'),
('es-ar', 'Argentinian Spanish'),
('es-co', 'Colombian Spanish'),
('es-mx', 'Mexican Spanish'),
('es-ni', 'Nicaraguan Spanish'),
('es-ve', 'Venezuelan Spanish'),
('et', 'Estonian'),
('eu', 'Basque'),
('fa', 'Persian'),
('fi', 'Finnish'),
('fr', 'French'),
('fy', 'Frisian'),
('ga', 'Irish'),
('gd', 'Scottish Gaelic'),
('gl', 'Galician'),
('he', 'Hebrew'),
('hi', 'Hindi'),
('hr', 'Croatian'),
('hsb', 'Upper Sorbian'),
('hu', 'Hungarian'),
('hy', 'Armenian'),
('ia', 'Interlingua'),
('id', 'Indonesian'),
('io', 'Ido'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('kab', 'Kabyle'),
('kk', 'Kazakh'),
('km', 'Khmer'),
('kn', 'Kannada'),
('ko', 'Korean'),
('lb', 'Luxembourgish'),
('lt', 'Lithuanian'),
('lv', 'Latvian'),
('mk', 'Macedonian'),
('ml', 'Malayalam'),
('mn', 'Mongolian'),
('mr', 'Marathi'),
('my', 'Burmese'),
('nb', 'Norwegian Bokmål'),
('ne', 'Nepali'),
('nl', 'Dutch'),
('nn', 'Norwegian Nynorsk'),
('os', 'Ossetic'),
('pa', 'Punjabi'),
('pl', 'Polish'),
('pt', 'Portuguese'),
('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'),
('ru', 'Russian'),
('sk', 'Slovak'),
('sl', 'Slovenian'),
('sq', 'Albanian'),
('sr', 'Serbian'),
('sr-latn', 'Serbian Latin'),
('sv', 'Swedish'),
('sw', 'Swahili'),
('ta', 'Tamil'),
('te', 'Telugu'),
('th', 'Thai'),
('tr', 'Turkish'),
('tt', 'Tatar'),
('udm', 'Udmurt'),
('uk', 'Ukrainian'),
('ur', 'Urdu'),
('vi', 'Vietnamese'),
('zh-hans', 'Simplified Chinese'),
('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE'en-us'
LANGUAGE_COOKIE_AGENone
LANGUAGE_COOKIE_DOMAINNone
LANGUAGE_COOKIE_NAME'django_language'
LANGUAGE_COOKIE_PATH'/'
LOCALE_PATHS[]
LOGGING{}
LOGGING_CONFIG'logging.config.dictConfig'
LOGIN_REDIRECT_URL'home'
LOGIN_URL'login'
LOGOUT_REDIRECT_URL'home'
MANAGERS[]
MEDIA_ROOT''
MEDIA_URL'https://cloud-cube.s3.amazonaws.com/addyc6831bad/public/media/'
MESSAGE_STORAGE'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']
MIGRATION_MODULES{}
MONTH_DAY_FORMAT'F j'
NAME'd1ed9m9clqflm0'
NUMBER_GROUPING0
PASSWORD'********************'
PASSWORD_HASHERS'********************'
PASSWORD_RESET_TIMEOUT_DAYS'********************'
PREPEND_WWWFalse
PUBLIC_MEDIA_LOCATION'public/media'
ROOT_URLCONF'pokemondraftleague.urls'
SECRET_KEY'********************'
SECURE_BROWSER_XSS_FILTERFalse
SECURE_CONTENT_TYPE_NOSNIFFFalse
SECURE_HSTS_INCLUDE_SUBDOMAINSFalse
SECURE_HSTS_PRELOADFalse
SECURE_HSTS_SECONDS0
SECURE_PROXY_SSL_HEADERNone
SECURE_REDIRECT_EXEMPT[]
SECURE_SSL_HOSTNone
SECURE_SSL_REDIRECTFalse
SELECT2_CACHE_BACKEND'default'
SELECT2_CACHE_PREFIX'select2_'
SELECT2_CSS'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/css/select2.min.css'
SELECT2_I18N_AVAILABLE_LANGUAGES['ar',
'az',
'bg',
'ca',
'cs',
'da',
'de',
'el',
'en',
'es',
'et',
'eu',
'fa',
'fi',
'fr',
'gl',
'he',
'hi',
'hr',
'hu',
'id',
'is',
'it',
'ja',
'km',
'ko',
'lt',
'lv',
'mk',
'ms',
'nb',
'nl',
'pl',
'pt-BR',
'pt',
'ro',
'ru',
'sk',
'sr-Cyrl',
'sr',
'sv',
'th',
'tr',
'uk',
'vi',
'zh-CN',
'zh-TW']
SELECT2_I18N_PATH'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/js/i18n'
SELECT2_JS'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/js/select2.min.js'
SELECT2_LIB_VERSION'4.0.12'
SENDGRID_API_KEY'********************'
SENDGRID_SANDBOX_MODE_IN_DEBUGFalse
SERVER_EMAIL'root@localhost'
SESSION_CACHE_ALIAS'default'
SESSION_COOKIE_AGE1209600
SESSION_COOKIE_DOMAINNone
SESSION_COOKIE_HTTPONLYTrue
SESSION_COOKIE_NAME'sessionid'
SESSION_COOKIE_PATH'/'
SESSION_COOKIE_SAMESITE'Lax'
SESSION_COOKIE_SECUREFalse
SESSION_ENGINE'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSEFalse
SESSION_FILE_PATHNone
SESSION_SAVE_EVERY_REQUESTFalse
SESSION_SERIALIZER'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE'pokemondraftleague.settings'
SHORT_DATETIME_FORMAT'm/d/Y P'
SHORT_DATE_FORMAT'm/d/Y'
SIGNING_BACKEND'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS[]
STATICFILES_DIRS[]
STATICFILES_FINDERS['django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATIC_ROOT'/app/pokemondraftleague/staticfiles'
STATIC_URL'/static/'
TEMPLATES[{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['/app/templates', '/app/accounts/templates'],
'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'pokemondraftleague.processors.processor']}}]
TEST_NON_SERIALIZED_APPS[]
TEST_RUNNER'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR','
TIME_FORMAT'P'
TIME_INPUT_FORMATS['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE'UTC'
USER'sgsaqhpzsyvaht'
USE_I18NTrue
USE_L10NTrue
USE_THOUSAND_SEPARATORFalse
USE_TZTrue
USE_X_FORWARDED_HOSTFalse
USE_X_FORWARDED_PORTFalse
WSGI_APPLICATION'pokemondraftleague.wsgi.application'
X_FRAME_OPTIONS'SAMEORIGIN'
YEAR_MONTH_FORMAT'F Y'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

any idea why this happened?
 
Trying to analyze this replay: https://replay.pokemonshowdown.com/gen8nationaldexag-1104343529
led to an error thingy:
ValueError at /replayanalysis/
Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f4c8badaac8>>": "inbox.sender" must be a "User" instance.
Request Method:POST
Request URL:http://pokemondraftleague.online/replayanalysis/
Django Version:2.2.10
Exception Type:ValueError
Exception Value:Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f4c8badaac8>>": "inbox.sender" must be a "User" instance.
Exception Location:/app/.heroku/python/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py in __set__, line 211
Python Executable:/app/.heroku/python/bin/python
Python Version:3.6.8
Python Path:['/app',
'/app/.heroku/python/bin',
'/app',
'/app/.heroku/python/lib/python36.zip',
'/app/.heroku/python/lib/python3.6',
'/app/.heroku/python/lib/python3.6/lib-dynload',
'/app/.heroku/python/lib/python3.6/site-packages']
Server time:Mon, 27 Apr 2020 21:47:32 +0000
Traceback Switch to copy-and-paste view
  • /app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py in inner
    1. response = get_response(request)
  • ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response
    1. response = self.process_exception_by_middleware(e, request)
  • ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response
    1. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  • ▶ Local vars
  • /app/replayanalysis/views.py in replay_analysis
    1. raise(e)
  • ▶ Local vars
  • /app/replayanalysis/views.py in replay_analysis
    1. inbox.objects.create(sender=request.user,recipient=clad, messagesubject="Replay Error",messagebody=url)
  • ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/manager.py in manager_method
    1. return getattr(self.get_queryset(), name)(*args, **kwargs)
  • ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py in create
    1. obj = self.model(**kwargs)
  • ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py in __init__
    1. _setattr(self, field.name, rel_obj)
  • ▶ Local vars
  • /app/.heroku/python/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py in __set__
    1. self.field.remote_field.model._meta.object_name,
  • ▶ Local vars
Request information
USER
AnonymousUser
GET
No GET data
POST
VariableValue
csrfmiddlewaretoken'xzwrpMgQgjO7GMuGXUzMXuHcqqI8bPK9miExoHekAq6dn1eWsQ0lj510FSm0yYZW'
url'https://replay.pokemonshowdown.com/gen8nationaldexag-1104343529'
FILES
No FILES data
COOKIES
VariableValue
csrftoken'W2r8heoV3BfyPMoYrHVNcvFjiRkhrEXxLLzeg9mpnIxEw18eWDmmy6Z7xjY9ONck'
__cfduid'd36598e5b789a8d27e3add9ee11a02da61588023351'
META
VariableValue
CONTENT_LENGTH'160'
CONTENT_TYPE'application/x-www-form-urlencoded'
CSRF_COOKIE'W2r8heoV3BfyPMoYrHVNcvFjiRkhrEXxLLzeg9mpnIxEw18eWDmmy6Z7xjY9ONck'
HTTP_ACCEPT'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_ENCODING'gzip'
HTTP_ACCEPT_LANGUAGE'en-us'
HTTP_CDN_LOOP'cloudflare'
HTTP_CF_CONNECTING_IP'2601:281:8201:2e11:937:f586:763f:e592'
HTTP_CF_IPCOUNTRY'US'
HTTP_CF_RAY'58abbe175e3e58d1-DFW'
HTTP_CF_REQUEST_ID'025f352292000058d15e96d200000001'
HTTP_CF_VISITOR'{"scheme":"https"}'
HTTP_CONNECTION'close'
HTTP_CONNECT_TIME'0'
HTTP_COOKIE('csrftoken=W2r8heoV3BfyPMoYrHVNcvFjiRkhrEXxLLzeg9mpnIxEw18eWDmmy6Z7xjY9ONck; '
'__cfduid=d36598e5b789a8d27e3add9ee11a02da61588023351')
HTTP_HOST'pokemondraftleague.online'
HTTP_ORIGIN'https://pokemondraftleague.online'
HTTP_REFERER'https://pokemondraftleague.online/replayanalysis/'
HTTP_TOTAL_ROUTE_TIME'0'
HTTP_USER_AGENT('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, '
'like Gecko) Version/13.0.5 Safari/605.1.15')
HTTP_VIA'1.1 vegur'
HTTP_X_FORWARDED_FOR'2601:281:8201:2e11:937:f586:763f:e592, 172.69.70.79'
HTTP_X_FORWARDED_PORT'80'
HTTP_X_FORWARDED_PROTO'http'
HTTP_X_REQUEST_ID'0a57fa55-7a54-41fd-ae62-99c06919a345'
HTTP_X_REQUEST_START'1588024052435'
PATH_INFO'/replayanalysis/'
QUERY_STRING''
RAW_URI'/replayanalysis/'
REMOTE_ADDR'10.30.127.176'
REMOTE_PORT'17894'
REQUEST_METHOD'POST'
SCRIPT_NAME''
SERVER_NAME'0.0.0.0'
SERVER_PORT'28213'
SERVER_PROTOCOL'HTTP/1.1'
SERVER_SOFTWARE'gunicorn/20.0.4'
gunicorn.socket<socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.189.182', 28213), raddr=('10.30.127.176', 17894)>
wsgi.errors<gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f4c8cf621d0>
wsgi.file_wrapper''
wsgi.input<gunicorn.http.body.Body object at 0x7f4c8cf62b70>
wsgi.input_terminatedTrue
wsgi.multiprocessTrue
wsgi.multithreadFalse
wsgi.run_onceFalse
wsgi.url_scheme'http'
wsgi.version(1, 0)
Settings
Using settings module pokemondraftleague.settings
SettingValue
ABSOLUTE_URL_OVERRIDES{}
ADMINS[]
ALLOWED_HOSTS['0.0.0.0',
'pokemondraftleague.herokuapp.com',
'127.0.0.1',
'pokemondraftleague.online',
'www.pokemondraftleague.online']
APPEND_SLASHTrue
AUTHENTICATION_BACKENDS['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS'********************'
AUTH_USER_MODEL'auth.User'
AWS_ACCESS_KEY_ID'********************'
AWS_DEFAULT_ACLNone
AWS_LOCATION'addyc6831bad/public/media'
AWS_QUERYSTRING_AUTHFalse
AWS_S3_FILE_OVERWRITEFalse
AWS_S3_OBJECT_PARAMETERS{'CacheControl': 'max-age=86400'}
AWS_SECRET_ACCESS_KEY'********************'
AWS_STORAGE_BUCKET_NAME'cloud-cube'
BASE_DIR'/app'
CACHES{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS'default'
CACHE_MIDDLEWARE_KEY_PREFIX'********************'
CACHE_MIDDLEWARE_SECONDS600
CELERY_ACCEPT_CONTENT['application/json']
CELERY_RESULT_SERIALIZER'json'
CELERY_TASK_SERIALIZER'json'
CELERY_TIMEZONE'UTC'
CLOUDCUBE_URL'https://cloud-cube.s3.amazonaws.com/addyc6831bad'
CRISPY_TEMPLATE_PACK'bootstrap4'
CSRF_COOKIE_AGE31449600
CSRF_COOKIE_DOMAINNone
CSRF_COOKIE_HTTPONLYFalse
CSRF_COOKIE_NAME'csrftoken'
CSRF_COOKIE_PATH'/'
CSRF_COOKIE_SAMESITE'Lax'
CSRF_COOKIE_SECUREFalse
CSRF_FAILURE_VIEW'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS[]
CSRF_USE_SESSIONSFalse
CUBENAME'addyc6831bad'
DATABASES{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.postgresql',
'HOST': 'ec2-23-23-195-205.compute-1.amazonaws.com',
'NAME': 'd1ed9m9clqflm0',
'OPTIONS': {},
'PASSWORD': '********************',
'PORT': '5432',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': 'testdb'},
'TIME_ZONE': None,
'USER': 'sgsaqhpzsyvaht'}}
DATABASE_ROUTERS[]
DATA_UPLOAD_MAX_MEMORY_SIZE2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS1000
DATETIME_FORMAT'N j, Y, P'
DATETIME_INPUT_FORMATS['%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M',
'%m/%d/%y']
DATE_FORMAT'N j, Y'
DATE_INPUT_FORMATS['%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y']
DEBUGTrue
DEBUG_PROPAGATE_EXCEPTIONSFalse
DEBUG_TOOLBAR_PANELS['debug_toolbar.panels.timer.TimerPanel',
'template_timings_panel.panels.TemplateTimings.TemplateTimings',
'debug_toolbar.panels.sql.SQLPanel']
DECIMAL_SEPARATOR'.'
DEFAULT_CHARSET'utf-8'
DEFAULT_CONTENT_TYPE'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE'storages.backends.s3boto3.S3Boto3Storage'
DEFAULT_FROM_EMAIL'pokemondraftleagueonline@gmail.com'
DEFAULT_INDEX_TABLESPACE''
DEFAULT_TABLESPACE''
DISALLOWED_USER_AGENTS[]
EMAIL_BACKEND'sendgrid_backend.SendgridBackend'
EMAIL_FILE_PATH'/app/accounts/sent_emails'
EMAIL_HOST'localhost'
EMAIL_HOST_PASSWORD'********************'
EMAIL_HOST_USER''
EMAIL_PORT25
EMAIL_SSL_CERTFILENone
EMAIL_SSL_KEYFILE'********************'
EMAIL_SUBJECT_PREFIX'[Django] '
EMAIL_TIMEOUTNone
EMAIL_USE_LOCALTIMEFalse
EMAIL_USE_SSLFalse
EMAIL_USE_TLSTrue
FILE_CHARSET'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONSNone
FILE_UPLOAD_HANDLERS['django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE2621440
FILE_UPLOAD_PERMISSIONSNone
FILE_UPLOAD_TEMP_DIRNone
FIRST_DAY_OF_WEEK0
FIXTURE_DIRS[]
FORCE_SCRIPT_NAMENone
FORMAT_MODULE_PATHNone
FORM_RENDERER'django.forms.renderers.DjangoTemplates'
HOST'ec2-23-23-195-205.compute-1.amazonaws.com'
IGNORABLE_404_URLS[]
INSTALLED_APPS['dal',
'dal_select2',
'django_select2',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'accounts.apps.AccountsConfig',
'pokemonadmin.apps.PokemonadminConfig',
'discordbot.apps.DiscordbotConfig',
'draftplanner.apps.DraftplannerConfig',
'individualleague.apps.IndividualleagueConfig',
'leagues.apps.LeaguesConfig',
'main.apps.MainConfig',
'otherseasons.apps.OtherseasonsConfig',
'pokemondatabase.apps.PokemondatabaseConfig',
'replayanalysis.apps.ReplayanalysisConfig',
'crispy_forms',
'django_celery_beat',
'multiselectfield',
'debug_toolbar',
'template_timings_panel',
'storages',
'widget_tweaks']
INTERNAL_IPS[]
LANGUAGES[('af', 'Afrikaans'),
('ar', 'Arabic'),
('ast', 'Asturian'),
('az', 'Azerbaijani'),
('bg', 'Bulgarian'),
('be', 'Belarusian'),
('bn', 'Bengali'),
('br', 'Breton'),
('bs', 'Bosnian'),
('ca', 'Catalan'),
('cs', 'Czech'),
('cy', 'Welsh'),
('da', 'Danish'),
('de', 'German'),
('dsb', 'Lower Sorbian'),
('el', 'Greek'),
('en', 'English'),
('en-au', 'Australian English'),
('en-gb', 'British English'),
('eo', 'Esperanto'),
('es', 'Spanish'),
('es-ar', 'Argentinian Spanish'),
('es-co', 'Colombian Spanish'),
('es-mx', 'Mexican Spanish'),
('es-ni', 'Nicaraguan Spanish'),
('es-ve', 'Venezuelan Spanish'),
('et', 'Estonian'),
('eu', 'Basque'),
('fa', 'Persian'),
('fi', 'Finnish'),
('fr', 'French'),
('fy', 'Frisian'),
('ga', 'Irish'),
('gd', 'Scottish Gaelic'),
('gl', 'Galician'),
('he', 'Hebrew'),
('hi', 'Hindi'),
('hr', 'Croatian'),
('hsb', 'Upper Sorbian'),
('hu', 'Hungarian'),
('hy', 'Armenian'),
('ia', 'Interlingua'),
('id', 'Indonesian'),
('io', 'Ido'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('kab', 'Kabyle'),
('kk', 'Kazakh'),
('km', 'Khmer'),
('kn', 'Kannada'),
('ko', 'Korean'),
('lb', 'Luxembourgish'),
('lt', 'Lithuanian'),
('lv', 'Latvian'),
('mk', 'Macedonian'),
('ml', 'Malayalam'),
('mn', 'Mongolian'),
('mr', 'Marathi'),
('my', 'Burmese'),
('nb', 'Norwegian Bokmål'),
('ne', 'Nepali'),
('nl', 'Dutch'),
('nn', 'Norwegian Nynorsk'),
('os', 'Ossetic'),
('pa', 'Punjabi'),
('pl', 'Polish'),
('pt', 'Portuguese'),
('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'),
('ru', 'Russian'),
('sk', 'Slovak'),
('sl', 'Slovenian'),
('sq', 'Albanian'),
('sr', 'Serbian'),
('sr-latn', 'Serbian Latin'),
('sv', 'Swedish'),
('sw', 'Swahili'),
('ta', 'Tamil'),
('te', 'Telugu'),
('th', 'Thai'),
('tr', 'Turkish'),
('tt', 'Tatar'),
('udm', 'Udmurt'),
('uk', 'Ukrainian'),
('ur', 'Urdu'),
('vi', 'Vietnamese'),
('zh-hans', 'Simplified Chinese'),
('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE'en-us'
LANGUAGE_COOKIE_AGENone
LANGUAGE_COOKIE_DOMAINNone
LANGUAGE_COOKIE_NAME'django_language'
LANGUAGE_COOKIE_PATH'/'
LOCALE_PATHS[]
LOGGING{}
LOGGING_CONFIG'logging.config.dictConfig'
LOGIN_REDIRECT_URL'home'
LOGIN_URL'login'
LOGOUT_REDIRECT_URL'home'
MANAGERS[]
MEDIA_ROOT''
MEDIA_URL'https://cloud-cube.s3.amazonaws.com/addyc6831bad/public/media/'
MESSAGE_STORAGE'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']
MIGRATION_MODULES{}
MONTH_DAY_FORMAT'F j'
NAME'd1ed9m9clqflm0'
NUMBER_GROUPING0
PASSWORD'********************'
PASSWORD_HASHERS'********************'
PASSWORD_RESET_TIMEOUT_DAYS'********************'
PREPEND_WWWFalse
PUBLIC_MEDIA_LOCATION'public/media'
ROOT_URLCONF'pokemondraftleague.urls'
SECRET_KEY'********************'
SECURE_BROWSER_XSS_FILTERFalse
SECURE_CONTENT_TYPE_NOSNIFFFalse
SECURE_HSTS_INCLUDE_SUBDOMAINSFalse
SECURE_HSTS_PRELOADFalse
SECURE_HSTS_SECONDS0
SECURE_PROXY_SSL_HEADERNone
SECURE_REDIRECT_EXEMPT[]
SECURE_SSL_HOSTNone
SECURE_SSL_REDIRECTFalse
SELECT2_CACHE_BACKEND'default'
SELECT2_CACHE_PREFIX'select2_'
SELECT2_CSS'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/css/select2.min.css'
SELECT2_I18N_AVAILABLE_LANGUAGES['ar',
'az',
'bg',
'ca',
'cs',
'da',
'de',
'el',
'en',
'es',
'et',
'eu',
'fa',
'fi',
'fr',
'gl',
'he',
'hi',
'hr',
'hu',
'id',
'is',
'it',
'ja',
'km',
'ko',
'lt',
'lv',
'mk',
'ms',
'nb',
'nl',
'pl',
'pt-BR',
'pt',
'ro',
'ru',
'sk',
'sr-Cyrl',
'sr',
'sv',
'th',
'tr',
'uk',
'vi',
'zh-CN',
'zh-TW']
SELECT2_I18N_PATH'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/js/i18n'
SELECT2_JS'//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/js/select2.min.js'
SELECT2_LIB_VERSION'4.0.12'
SENDGRID_API_KEY'********************'
SENDGRID_SANDBOX_MODE_IN_DEBUGFalse
SERVER_EMAIL'root@localhost'
SESSION_CACHE_ALIAS'default'
SESSION_COOKIE_AGE1209600
SESSION_COOKIE_DOMAINNone
SESSION_COOKIE_HTTPONLYTrue
SESSION_COOKIE_NAME'sessionid'
SESSION_COOKIE_PATH'/'
SESSION_COOKIE_SAMESITE'Lax'
SESSION_COOKIE_SECUREFalse
SESSION_ENGINE'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSEFalse
SESSION_FILE_PATHNone
SESSION_SAVE_EVERY_REQUESTFalse
SESSION_SERIALIZER'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE'pokemondraftleague.settings'
SHORT_DATETIME_FORMAT'm/d/Y P'
SHORT_DATE_FORMAT'm/d/Y'
SIGNING_BACKEND'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS[]
STATICFILES_DIRS[]
STATICFILES_FINDERS['django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATIC_ROOT'/app/pokemondraftleague/staticfiles'
STATIC_URL'/static/'
TEMPLATES[{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['/app/templates', '/app/accounts/templates'],
'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'pokemondraftleague.processors.processor']}}]
TEST_NON_SERIALIZED_APPS[]
TEST_RUNNER'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR','
TIME_FORMAT'P'
TIME_INPUT_FORMATS['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE'UTC'
USER'sgsaqhpzsyvaht'
USE_I18NTrue
USE_L10NTrue
USE_THOUSAND_SEPARATORFalse
USE_TZTrue
USE_X_FORWARDED_HOSTFalse
USE_X_FORWARDED_PORTFalse
WSGI_APPLICATION'pokemondraftleague.wsgi.application'
X_FRAME_OPTIONS'SAMEORIGIN'
YEAR_MONTH_FORMAT'F Y'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

any idea why this happened?
It struggles with the multiple arceus formes in a single battle. I don't yet have a great solution for that but am working on it!
 
Hey I'll definitely be bookmarking your tool. This is something I've kinda dreamed of to analyze games at a higher level. How has this not taken off yet?! I'm still figuring out what all this tool measures...do you have a breakdown of what everything means in laymens' terms? I am trying my best to understand everything.

Edit: Spent some more time lurking on the tool and think I figured everything out.

I'll list out section by section what the tool is composed of for future readers:

  1. Replay window: Watch and review just like in the showdown replay viewer.
  2. Match Summary: self explanatory here.
  3. Team summary table:
    • Shows HP remaining of each mon (scaled to out of 100), how many KOs they achieved in the match, whether they were KO'ed, net KOs,
    • Luck factor- (Magnitude of positive luck means that mon was more lucky in the match, while negative luck means that mon was more or less "haxed" in the game)
    • Damage Dealt-(scaled to out of 100)
    • HP Healed- (scaled to out of 100). As an example, leftovers heals 6%.
    • Support Moves Provided- Basically utility moves used like Wish, Stealth Rock, and Rapid Spin
  4. Moves Used:
    • U- Number of times used
    • H- Number of times move hit
    • C- Number of times move landed critical hit
    • SE- Number of times move was produced a significant event (barring critical hits)
    • SEP- Number of times move could have potentially been a significant event (barring critical hits)
  5. Significant Event Table: self explanatory
  6. Luck Catalog: takes into consideration critical hit chances missed (4%) or landed (100%), as well as the +/- of move's secondary effect chances over the course of a battle. Total luck is then summed.
 
Last edited:
Hey I'll definitely be bookmarking your tool. This is something I've kinda dreamed of to analyze games at a higher level. How has this not taken off yet?! I'm still figuring out what all this tool measures...do you have a breakdown of what everything means in laymens' terms? I am trying my best to understand everything.

Edit: Spent some more time lurking on the tool and think I figured everything out.

I'll list out section by section what the tool is composed of for future readers:

  1. Replay window: Watch and review just like in the showdown replay viewer.
  2. Match Summary: self explanatory here.
  3. Team summary table:
    • Shows HP remaining of each mon (scaled to out of 100), how many KOs they achieved in the match, whether they were KO'ed, net KOs,
    • Luck factor- (Magnitude of positive luck means that mon was more lucky in the match, while negative luck means that mon was more or less "haxed" in the game)
    • Damage Dealt-(scaled to out of 100)
    • HP Healed- (scaled to out of 100). As an example, leftovers heals 6%.
    • Support Moves Provided- Basically utility moves used like Wish, Stealth Rock, and Rapid Spin
  4. Moves Used:
    • U- Number of times used
    • H- Number of times move hit
    • C- Number of times move landed critical hit
    • SE- Number of times move was produced a significant event (barring critical hits)
    • SEP- Number of times move could have potentially been a significant event (barring critical hits)
  5. Significant Event Table: self explanatory
  6. Luck Catalog: takes into consideration critical hit chances missed (4%) or landed (100%), as well as the +/- of move's secondary effect chances over the course of a battle. Total luck is then summed.
Yep exactly! Luck is by far the most debatable and difficult to calculate but is done using expected values where a crit, miss, secondary effect are each treated as 1 unit of "luck". But since it is expected values, if you were to say use ice beam and get a freeze 1/10 of the time, it would come out to 1*1+0.1*10=0.
 

Adaam

إسمي جف
is a Community Contributoris a Forum Moderator Alumnusis a Top Tiering Contributor Alumnusis the 8th Grand Slam Winner
This is an incredible tool. I am surprised more people don't use this. I am very interested in using this on high-level replays and determine how viable a certain pokemon is. Thanks for this
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top