Coder Social home page Coder Social logo

mp-poraclepvphelper's Introduction

Deprecation warning

This plugin will be considered deprecated and not receive further support, fixes or updates after the merge of PoracleJS PR #474, and you should stop using it to send data to PoracleJS after the merge of this PR!

mp-poraclePvpHelper

This MAD plugin exists to pass RDM-like PvP data to PoracleJS using webhooks. It targets the PvP Stats Tracking implementation in the now merged PoracleJS PR #151 / PR #206 and complies with its formats, emulating the behaviour of RDM PR #120.

As of version 2.0, the calculations part has been moved to a separate project called PogoPvpData, which is linked in as a submodule.

Installation

This project can now be cloned directly into your MAD/plugins folder using the following command - please also note the command for updating:

git clone --recurse-submodules https://github.com/crhbetz/mp-poraclePvpHelper.git

Downloading and distributing .mp files for an active project seems a little tedious to me, so cloning and pulling updates from GitHub will be considered the primary way of distribution for this plugin. I'll try to keep up with .mp releases though.

After installation, the usual setup procedure for MAD plugins applies. Copy the plugin.ini.example to plugin.ini and edit it to your personal preferences.

It is recommended to deactivate regular pokemon webhooks to endpoint(s) you're sending to with this plugin, because it sends all the pokemon data the usual webhook worker would send, enhanced with the additional pvp data. Sending the same data through two different webhook workers may cause unintended behaviour. You can disable regular pokemon data either by disabling pokemon webhooks altogether, or by omitting pokemon from the list of enabled webhook types for a specific URL (example: [raid gym weather pokestop quest]http://localhost:4201)

Finally, restart your MAD instance.

Updating

Updating your installation including the submodule through git will require the following command:

git pull --recurse-submodules

.mp file installs are updated by uploading a newer .mp file.

Re-calculation of data

The plugin saves its PokemonData object to a file called .data.pickle within the plugin directory to aviod having to repeat the rather heavy calculations for every run of your MAD instance. To apply certain settings or load new Pokemon / Stats / Forms, a re-calculation of the previously mentioned data will be necessary. Settings that require a recalc will be commented accordingly in the plugin.ini.example file. To achieve a recalc, delete the .data.pickle file and restart your MAD instance. Recalculation will be done according to your precalc setting.

Multi-instance setup

This plugin is able to run across multiple MAD instances from the same MAD directory. Settings can be made instance-specific by naming a settings category like the status-name of your instances. An example can be seen as a comment in the plugin.ini.example file.

The .data.pickle file can be shared across those instances, so only one initial calculation is required.

A little disclaimer

I don't think it's the scanners job to provide this data. I think these are things that should happen in the front-end, like in PokeAlarm. However, I only speak python, so I'm unable to make a "correct" PR for PoracleJS. So instead of complaining, I put my "beliefs" aside, accepted the status quo and created this MAD plugin which is basically a port and extension of the pvp work I made for PokeAlarm.

mp-poraclepvphelper's People

Contributors

crhbetz avatar jabluszko avatar

Stargazers

 avatar  avatar  avatar Piikachuu avatar

Watchers

 avatar  avatar dkmur avatar Axi avatar

mp-poraclepvphelper's Issues

webhook_max_payload_size

plugin does not seem to respect parameter webhook_max_payload_size, set to 500 in my case

[09-23 14:13:18.91] [           system] [   poraclePvpHelper:491 ] [S] Successfully sent payload to webhook. Stats: 1274
[09-23 14:13:22.37] [           system] [      webhookworker:125 ] [S] Successfully sent payload to webhook [pl 1/3]. Stats: {"raid": 180, "weather": 35, "pokestop": 285}
[09-23 14:13:22.41] [           system] [      webhookworker:125 ] [S] Successfully sent payload to webhook [pl 2/3]. Stats: {"pokestop": 500}
[09-23 14:13:22.45] [           system] [      webhookworker:125 ] [S] Successfully sent payload to webhook [pl 3/3]. Stats: {"pokestop": 31}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.