| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| search_thread = Thread(target=search_overseer_thread, | ||
| name='search-overseer', args=argset) | ||
| fake_pokemon_mode = True | ||
| if fake_pokemon_mode: |
There was a problem hiding this comment.
This always yields True, so you can practically throw away the else-block (and the whole if/else statement).
Sorry, something went wrong.
There was a problem hiding this comment.
I think that you need to add another command line switch for this as right now it only fakes data
Sorry, something went wrong.
There was a problem hiding this comment.
I agree, it's not integrated well right now. I just wanted a "self-documented" way to show how to switch the fake mode on/off.
Sorry, something went wrong.
There was a problem hiding this comment.
updated!
Sorry, something went wrong.
|
I don't really get what this PR does. So basically if this gets merged the map is completely useless because it will only run in fake search mode. I assume that this PR wants to introduce some sort of debug/testing/demo mode to let RocketMap show Pokemon on a map without actual API requests (even fake ones). That might be in fact helpful for frontend developers but at least make it optional please. ;-) |
Sorry, something went wrong.
|
This is an AWESOME pr if it does what i need it to .... would be awesome to fake any data off pokemons to test new code ....... IE we could of used this for form and im sure in future thier will be other new things |
Sorry, something went wrong.
|
Nice idea but needs some love. |
Sorry, something went wrong.
| } | ||
|
|
||
| if pokemon: | ||
| db_updates_queue.put((Pokemon, pokemon)) |
There was a problem hiding this comment.
for a real fake, there needs to be the data for the webhook too. So users jump out of their chair when they see the 100% Mewtwo from PokeAlarm.
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, this code doesn't handle webhooks, pokestops, gyms, etc, since I didn't need those. But, I wanted to share my work in case it was useful for others.
Sorry, something went wrong.
There was a problem hiding this comment.
I updated the code to be merge-able, but there's no webhook support. I hope that's OK.
Sorry, something went wrong.
|
Thanks for the feedback guys! This code was useful for myself, and I just wanted to share. It's not in a merge-able state for sure. I'm not sure how to do that, but @friscoMad has good ideas. |
Sorry, something went wrong.
|
Well looks like it has great potential to be used as a standalone server for multiple remote mysql servers where this map could accept incoming webhooks - and then display that data. |
Sorry, something went wrong.
|
@aRengo Why should we depend on a mysql db any more than we need to? Most users tend to use the webhook features already so if RM had a way to run as a standalone server that accepts incomings POSTS to display the markers that would allow many local neighborhood scanners to team up together without much extra work as replication requires a lot of extra knowledge and configurations. With a standalone server to handle this on its own all it would require is users to add another webhook and than prob set the firewall to only allow incoming connections from other scanner ips on that port if they wish to team up. Much more user friendly and in theory should be less load than pulling data from mysql. |
Sorry, something went wrong.
|
Hey @sebastienvercammen , any chance this could be merged? Please let me know if there's no chance or if there's something that you want. I think it opens up some possibilities, like collaborative maps (great idea, @343334 !) |
Sorry, something went wrong.
|
i really like this feature for testing... any possibility it could be adapted to send the pokemon to webhooks too, ie again unown formatting, im trying to set this up currently and it would be of great help to be able to fake a spawn and/or an alert too |
Sorry, something went wrong.
generate fake dittoes in a basic pattern, as an example
new command-line parameter `-fss` specifies a script file that provides search data updated docs added some error checking
|
@SkOODaT |
Sorry, something went wrong.
|
@TomSirgedas Sorry for the late reply, somehow the notification for your ping got lost and I've been swamped with shadowban/API work. Yes, this definitely has a use case and will be merged if implemented properly. However, as it is, we can't merge yet. This needs to be a completely stand-alone mode, separate from the main codebase, similar to how -mock does its thing. I'm not sure if -fss has any use for any other "fake search script" implementation than a single fake implementation that covers all use cases. I understand the client/server example that you've added, but what are the advantages of this (more complex) implementation versus a single mock data mode that randomly adds Pokémon (customizable amount) of all types (start at Pokémon 1, increment, modulo to reset) with a single toggle rather than separate scripts? Just curious about your thoughts. :) |
Sorry, something went wrong.
|
Some use cases:
Like frisco said:
So, re: "I'm not sure if -fss has any use for any other "fake search script" implementation than a single fake implementation that covers all use cases.", I think it's valuable to specify a script! I'm not sure what "completely stand-alone mode, separate from the main codebase" means exactly. I want to use the existing database, classes, etc. Changes to the main code path are minimal, just checking if "fake_search_script" mode is on. (Though it seems that fake_pokemon_mode = True if fake_pokemon_mode: is still in the code, instead of checking the config variable :/) |
Sorry, something went wrong.
|
I wouldn't have thought it, but this had use now, with broken hash servers. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Edit: I don't expect to merge this as-is. I just wanted to share some code that was useful for me.
Update: Should be merge-able now
This PR lets you get Pokemon data from code instead of Niantic servers.
The code can be run with very few "real" inputs, just your Google API key.
How to run the code:
runserver.py -cf config/config.ini.example -k GMAPS_KEY -l 42.7,-84.5 -fss ./pogom/sample_fake_scripts/simpleDitto.py
This is the included example code, which generates Dittoes in a simple pattern:
def go(args): count = 0 while True: time.sleep(3) fake_pokemon_objects = [{'pokemon_id': 132, # ditto 'disappear_time': datetime.utcnow() + timedelta(seconds=15), 'latitude': args.position[0], 'longitude': args.position[1] + count*.0002}] count += 1 args.add_pokemon(fake_pokemon_objects)This is what the result looks like on http://localhost:5000/:

And in GIF format (13MB):
https://content.screencast.com/users/Tom/folders/Snagit/media/a1d73d1c-4c35-4916-883d-3723f7f03a4c/05.08.2017-22.10.GIF