Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from crhbetz/2.0
Browse files Browse the repository at this point in the history
2.0
  • Loading branch information
crhbetz authored May 20, 2021
2 parents ee9314d + 52be3a1 commit a65cbd0
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 535 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "PogoPvpData"]
path = PogoPvpData
url = https://github.com/crhbetz/PogoPvpData.git
1 change: 1 addition & 0 deletions PogoPvpData
Submodule PogoPvpData added at d9a686
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# mp-poraclePvpHelper
This MAD plugin exists to pass RDM-like PvP data to PoracleJS using webhooks. It targets the PvP Stats Tracking implementation in
[PoracleJS PR #151](https://github.com/KartulUdus/PoracleJS/pull/151) and complies with its formats.
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](https://github.com/KartulUdus/PoracleJS/pull/151) / [PR #206](https://github.com/KartulUdus/PoracleJS/pull/206)
and complies with its formats, emulating the behaviour of [RDM PR #120](https://github.com/RealDeviceMap/RealDeviceMap/pull/120).

As of version 2.0, the calculations part has been moved to a separate project called [PogoPvpData](https://github.com/crhbetz/PogoPvpData), which is linked in as a submodule.

## Installation
Pulling this directly into your MAD/plugins folder *may* cause issues until [MAD PR #1010](https://github.com/Map-A-Droid/MAD/pull/1010)
is merged. Downloading and distributing `.mp` files for an active project seems a little tedious to me though, so this will be the primary
way of distribution for this plugin. I may occasionally upload one as a release though.
This project can now be cloned directly into your MAD/plugins folder using the following command - [please also note the command for updating](#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](https://github.com/crhbetz/mp-poraclePvpHelper/releases) though.

After installation, the usual procedure for MAD plugins applies. Copy the `plugin.ini.example` to `plugin.ini` and edit it to your personal preferences.
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
Expand All @@ -16,14 +21,19 @@ altogether, or by omitting pokemon from the list of enabled webhook types for a

Finally, restart your MAD instance.

### First start
On first start, the required data for pvp rank/rating lookups will be calculated locally and saved to a `.data.pickle` file. This will take a while.
Progress should be logged for every 50th mon-form combination. Subsequent starts will load the data from the `.data.pickle` file.
## 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. A new initial calculation will start.
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
Expand Down
2 changes: 0 additions & 2 deletions additional-enum-info.ini

This file was deleted.

103 changes: 0 additions & 103 deletions cp_multipliers.json

This file was deleted.

4 changes: 4 additions & 0 deletions plugin.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ precalc=False
# file corruption and inconsistencies - the data can still be loaded from all instances
savedata=True

# send encounter_id as a string instead of as an int to work around parsing issues
# on poracle's side
encidstring=True


# by using a category named like your status-name (setting in MAD's config.ini)
# you can set per-instance settings, so if you had two instances
Expand Down
Loading

0 comments on commit a65cbd0

Please sign in to comment.