Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor Man's IV Queue #886

Open
wants to merge 85 commits into
base: develop
Choose a base branch
from
Open

Poor Man's IV Queue #886

wants to merge 85 commits into from

Conversation

kbtbc
Copy link
Contributor

@kbtbc kbtbc commented Jan 2, 2024

Configure Poracle Scouts to get nearby IV coverage for your map!

When an MonsterNoIV alert is triggered, a scout is sent to Dragonite to scan the location.

Quick Start Guide

Setup config - rarity limits are good to use here (Poracle takes a few minutes to generate this data). Config settings are hard stop safety limits, it's the noIV tracking alerts that trigger the scouts if they pass config filters. You can either rely on Poracle user's noIV alerts to trigger scouts and/or you could start capturing IV data automatically:

  1. Setup Private Discord channel for Poracle, and add ALL areas you want nearby IV coverage.
  2. Start conservative with noIV alert trackings. Your scout needs will depend greatly on both the size of your nearby coverage and how many alerts you generate. An initial strategy might be to try only Frigibax with 2 or 3 scouts, or be brave and try everything rarity5. You can start blacklisting if need, and can also tune rarity % in a separate config section. For example, changing config for rarity5 to .005% and filtering out some gen 1 is very manageable with 4-5 scouts (even room to keep Frigibax).
  3. Setup a custom dts template for your 'scout' type alerts now in your new scout Discord channel. You can use scoutResult in your dts to check for success, ie {{#if scoutResult}} {{scoutResult}} {{else}} Not Scouted {{/if}}. Avoid 'double alerts' by going to Poracle web and toggling max iv down to 0.
  4. That's it, your map is now filled with more valuable IV data, and scouts will twiddle thumbs less!

Motivation and Context

Lost IV Queue support

How Has This Been Tested?

Working great w/ many users, very stable with controlled volume. IV data normally returns within seconds!
Don't blow yourself up.

Types of changes

  • [x ] New feature (non-breaking change which adds functionality)

@kbtbc kbtbc changed the base branch from master to develop January 2, 2024 15:51
@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 2, 2024

It's been pointed out to me that Dragonite does not use an api secret. So, if you want to try this and your servers are in a public environment, you would need to adjust to use Dragonite-Admin for security.

@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 3, 2024

welp, I don't think my dupe checker is working. lastcoords must not persist in state? not sure how to solve

@kamieniarz
Copy link
Contributor

kamieniarz commented Jan 3, 2024

@kbtbc do you mind adding pokemon id to each scout log? Would be easier to track successful results and their total time or if it was scanned already before scout managed to move it's ass ;)

@jfberry
Copy link
Collaborator

jfberry commented Jan 3, 2024

I will review later but pr will need to be rebased on develop before we can consider merging it. Thanks!

@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 3, 2024

@jfberry - kbtbc changed the base branch from master to develop yesterday -- your help is appreciated!

@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 3, 2024

The issue is my duplicate variable doesn't seem to keep state. So, I was thinking I might need to change the location of this function or figure out how to make a variable state persist here -- both I have yet to figure out.

@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 3, 2024

PR updated to add option to scan a cluster around lat/lon to help pickup pokemon data that might not be at cell location.
To use set new config option: "scoutClusters" : true

Warning: if you have a lot of noIV alerts, this might cause issues. Most of this is untested except on my own setup.

@kamieniarz
Copy link
Contributor

Any chance this could be pushed to develop? ;) I'm running this PR for over a week and I haven't seen any issues. Lots of pros tho ;)

config/default.json Outdated Show resolved Hide resolved
config/default.json Outdated Show resolved Hide resolved
src/controllers/monster.js Show resolved Hide resolved
src/controllers/monster.js Outdated Show resolved Hide resolved
@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 18, 2024

Thank you @jfberry, I think I've managed to address most of your recent notes.

TIL: lint 😛 ... & I did get in working on Windows calling eslint directly npx eslint .\src\controllers\monster.js --fix and was able to fix most lint errors except this one: Move function declaration to function body root no-inner-declarations
https://github.com/KartulUdus/PoracleJS/pull/886/files#diff-31c72fd3572ce36ba8f4d27394dda49732e705adc42906717c56e82871825c18R614
These are the cluster calculation functions and I tried moving to root of monsters.js but data.lat/lon not yet declared error. I tried elsewhere, just before the scout conditional, but then lint complains function variables are never used... how should I solve?

EDIT: Solved
...It still seems odd to have to declare function outside of the only conditional where they might be used, but there you go!

@kbtbc
Copy link
Contributor Author

kbtbc commented Jan 18, 2024

I think the PR is ready to merge into develop at this point. I have further ideas, but will probably take a while and this seems pretty solid & working foundation. Also, I must admit @jfberry was right. You cannot use labelled nested conditionals despite what the docs say. My apologies for doubting you, sir.

ps if you merge this, I can also reset my fork and stop working from master 😝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants