| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Go a step further and make your PR viable for the whole RocketMap userbase, checking for account level (which is already implemented). So remove cp in this dict update, but add below:
pokemon[p['encounter_id']]['cp'] = pokemon_info['cp'] if level >= 30Also think about adding a similar if statement in front of encounter for IVs/Movesets. (Still not 100% sure about gender/height/weight)
Sorry, something went wrong.
There was a problem hiding this comment.
Adjust accordingly to models.py by adding an if clause:
if (cp !== null){
details += `...`
}
Sorry, something went wrong.
There was a problem hiding this comment.
And please add some info that this is valid for lvl 30+ only
Sorry, something went wrong.
|
-cd can be avoided, inspecting the database via phpMyAdmin or programs like SequelPro and add the new column manually. After the manual "migration" you need to update versions table to the new database version. UPDATE versions SET val = XFunny side fact: versions, together with gymdetails are the the only tables we use a plural wording. Especially for versions it's cool, because it only holds one single entry. |
Sorry, something went wrong.
There was a problem hiding this comment.
SmallIntegerField(null=True)
Sorry, something went wrong.
There was a problem hiding this comment.
And please add some info that this is valid for lvl 30+ only
Sorry, something went wrong.
|
U can add cp to webhook too ? |
Sorry, something went wrong.
|
Could you please add cp_mutliplier to check Pokemonlevel? |
Sorry, something went wrong.
|
Can we dont use csv files for the 25 and 30 level accounts? How should the format be then? I dont see any information about that in the encounters.md file. |
Sorry, something went wrong.
|
@tokar86a This PR is for development, not customer support. Be patient until things are finalized. |
Sorry, something went wrong.
There was a problem hiding this comment.
Tested and confirmed with L25 and L30 accounts. L25 accounts showed IV's only and using L30 accounts, both IV and CP were shown on the map.
Sorry, something went wrong.
|
Why do we specify pokemon to encounter for IV/CP by their pokemon IDs in iv-whitelist-file and cp-whitelist-file, while we have to specify them by their name in webhook-whitelist-file ? Wouldn't it be more consistent to chose for one or the other ? I also guess lots of people have no reason to send pokemons for which they don't scan IV to their webhook so having similar config file would allow to maintain only one. I personally do prefer pokemon IDs as lots of maps are localized and Pokemon IDs are the same for everyone while names are not... |
Sorry, something went wrong.
|
@sebastienvercammen Maybe if I give you an example you would understand why locking in next doesn't help that much. Problem 1: 1.- Account A scans point 1 get 1 mon and need a IV then calls next() and get account X for it While complying with the speed limit if there is thread starvation due to high cpu usage it could even happen with points far away. Problem 2 (only happens if context switch could happen anytime): 1.- Account A scans point 1 get 1 mon and need a IV then calls next() and get account X for it Problem 3: Cpu starvation is not that strange as python threading is bounded to 1 core and we are using hundreds or threads in any instance, I have seen situations where my db queue skyrockets just because the db threads doesn't get priority |
Sorry, something went wrong.
|
@friscoMad That makes more sense. Fixed in next commit. Problem 3 however would use 3 separate accounts for the scans (assuming we're not entering Problem #1), as intended. The login rate is a valid point, and one that I started a discussion about on Discord (login rate vs memory usage). All of the threads that our legacy code uses are actually completely unnecessary. They're bad practice, slow down the process (have you seen the number of threads we use...?!) and lead to unexpected behavior. Luckily they're already put on the roadmap to be reworked. |
Sorry, something went wrong.
| # If the host has L30s in the regular account pool, we | ||
| # can just use the current account. | ||
| if level >= 30: | ||
| hlvl_account = account |
There was a problem hiding this comment.
This is not working the rest of the ifs will need to be under else: for this to work
Sorry, something went wrong.
|
@sebastienvercammen |
Sorry, something went wrong.
|
@friscoMad It doesn't have to be the same account per se. If they're truly so close to one another, it will have the same result but it would spread encounters over different accounts. The problem lies in the login rate, which would be solved by storing the API object, but as mentioned before, that's being discussed. |
Sorry, something went wrong.
|
@sebastienvercammen I don't the reason why not using the same account for everything as it was done previously for all mons found in a scan using the scanning account. If the account from the pool can reach the step it can encounter all in 1 login without any violation (and we can use again the encounter delay). pseudo code (missing a lot of checks) to explain myself: use_cp = false
use_iv = false
encounter_mons = set()
for mon in pokes:
if mon in IV_white:
encounter_mons.add(mon)
use_iv = true
else if mon in CP_white:
encounter_mon.add(mon)
use_cp = true
acc
if use_cp:
acc = next(30, location)
else if use_iv:
acc= next(25, location) or next(30, location)
login(acc)
for mon in encounter_mons:
delay()
encounter(acc, mon) |
Sorry, something went wrong.
|
@friscoMad Remember you also need to consider the distance between each of the encounter_mons. It should be trivial, but needs to be checked. In an upcoming commit, I've added a toggle to enable storing the API object to re-use it. So the host can choose to increase the login rate, or to increase memory usage. I'll do some testing on the distances and re-using a single account for all encounters. If I can confirm our thoughts, I'll look at adding it in. |
Sorry, something went wrong.
| @@ -0,0 +1,53 @@ | |||
| # Pokémon Encounters | |||
|
|
|||
| Since the IV update of April 21st which makes IVs the same for players of level 25 and above, the encounter system has been reworked and now includes CP/IV scanning. | |||
There was a problem hiding this comment.
Mention the year just for historical purposes
Sorry, something went wrong.
|
@sebastienvercammen Confirmed your latest commit does solve my issue with account stopping after 1 encounter. Thanks |
Sorry, something went wrong.
…d docs + re-use API object when using a regular account.
|
All of the previously mentioned points are now committed. |
Sorry, something went wrong.
|
Why so much trouble having different files and all when a simple check to get_player_level response could determine account level? |
Sorry, something went wrong.
|
@neskk this is already addressed by some work on my fork. I thought exactly like you just brought up. Just, this is a first implementation to keep the map up to date with what Niantic pushs into the scanners way. Improvement is coming step by step. |
Sorry, something went wrong.
|
@neskk Because the implementation we decided to go for is one that reduces the amount of integration required with legacy code. This implementation is simple and very easy to separate. This includes not reworking the legacy code to first send an additional request just for its level. A proper rework includes reworking account handling, and ultimately scan handling. This has been talked about several times, including in this thread. High level account files shouldn't be shared by instances, as has always been the case for account files for the past 10+ months, and I'll only repeat this one last time: we need to rework account handling to allow account file sharing and to properly distribute accounts. But that's outside of the scope of this PR. in_use isn't a flag to share between instances, it's to avoid one account being used in two separate threads because of thread starvation. And it would be 88 rather than 132 files with your 44 instances, because we only have two account files: one for accounts to scan with, one for accounts to encounter with. |
Sorry, something went wrong.
|
@sebastienvercammen upon login (first_login), get_player should always be requested to check warning flags, check if account is banned, check tutorial state (remove necessity for -tut flag) and perhaps try to collect level up rewards (something that current -tut with pokestop spinning doesn't do). These are all things easy to implement, I did it in less than an hour and one extra request upon first_login isn't relevant in the overall scheme of things. |
Sorry, something went wrong.
|
@neskk It is relevant when it only adds more code to the list of code that needs to be scrapped, because you'd be reimplementing the same duplicate code yet once again, adding one more place to get rid of it. And if you implement it with an abstraction, you might create an abstraction that fits for your little rework but not for the proper account handling/scanning rework. I said I wouldn't repeat myself again but I indirectly have so I'm leaving that discussion. |
Sorry, something went wrong.
|
@sebastienvercammen impressive how you can write so much and tell so little. |
Sorry, something went wrong.
|
Niantic seems to have changed something recently that might affect this PR. https://www.reddit.com/r/TheSilphRoad/comments/67ypx2/different_stats_and_moves_between_level_26_and/ |
Sorry, something went wrong.
|
The resent changes make this pr more simple, just only lvl 30+ acc in the pool ? |
Sorry, something went wrong.
|
Adjust title ;-) |
Sorry, something went wrong.
* Added CP to map and webhook for level30+ accounts * Add IV/CP scanning support. * Added missing reference. * Only show L>=30 CP + send correct encounter lvl to webhook. * Updated docs. * Typo. * Added 2nd param. * Fixed set names. * Handle empty lines in accounts file. * Updated docs. * Updated docs + info logs. * Fixed set name typo. * Removed default value for cp column as suggested. * Updated for consistency. * Removed unnecessary default. * Fixed AccountSet timer + added verbosity + updated docs + performance increase w/ frozenset. * Updated docs. * Added flag for API object re-use + fixed account exclusivity + updated docs + re-use API object when using a regular account. * Changed to only accept L30 and above for iv/cp scanning and no longer use L25 * Removed references to L25 accounts.
* Added CP to map and webhook for level30+ accounts * Add IV/CP scanning support. * Added missing reference. * Only show L>=30 CP + send correct encounter lvl to webhook. * Updated docs. * Typo. * Added 2nd param. * Fixed set names. * Handle empty lines in accounts file. * Updated docs. * Updated docs + info logs. * Fixed set name typo. * Removed default value for cp column as suggested. * Updated for consistency. * Removed unnecessary default. * Fixed AccountSet timer + added verbosity + updated docs + performance increase w/ frozenset. * Updated docs. * Added flag for API object re-use + fixed account exclusivity + updated docs + re-use API object when using a regular account. * Changed to only accept L30 and above for iv/cp scanning and no longer use L25 * Removed references to L25 accounts.
* Added CP to map and webhook for level30+ accounts * Add IV/CP scanning support. * Added missing reference. * Only show L>=30 CP + send correct encounter lvl to webhook. * Updated docs. * Typo. * Added 2nd param. * Fixed set names. * Handle empty lines in accounts file. * Updated docs. * Updated docs + info logs. * Fixed set name typo. * Removed default value for cp column as suggested. * Updated for consistency. * Removed unnecessary default. * Fixed AccountSet timer + added verbosity + updated docs + performance increase w/ frozenset. * Updated docs. * Added flag for API object re-use + fixed account exclusivity + updated docs + re-use API object when using a regular account. * Changed to only accept L30 and above for iv/cp scanning and no longer use L25 * Removed references to L25 accounts.
* Added CP to map and webhook for level30+ accounts * Add IV/CP scanning support. * Added missing reference. * Only show L>=30 CP + send correct encounter lvl to webhook. * Updated docs. * Typo. * Added 2nd param. * Fixed set names. * Handle empty lines in accounts file. * Updated docs. * Updated docs + info logs. * Fixed set name typo. * Removed default value for cp column as suggested. * Updated for consistency. * Removed unnecessary default. * Fixed AccountSet timer + added verbosity + updated docs + performance increase w/ frozenset. * Updated docs. * Added flag for API object re-use + fixed account exclusivity + updated docs + re-use API object when using a regular account. * Changed to only accept L30 and above for iv/cp scanning and no longer use L25 * Removed references to L25 accounts.
| Back | FazBrowse Home | New Git URL |
Description
Seb edit: This PR implements IV & CP scanning with L25/L30 account pools.
It's important to read the included new doc, encounters.md.
Motivation and Context
Seb edit: This allows people to see correct IVs for L25 and above, and correct CP for L30 and above.
How Has This Been Tested?
Tested on two of my own maps on my computers. It does require -cd as we are adding a new column to the database.
Screenshots (if appropriate):
Types of changes
Checklist: