From a8242f7bda8cfb1b726173018a903fd4c58f87cc Mon Sep 17 00:00:00 2001 From: Eli White Date: Wed, 10 Aug 2016 22:00:09 -0700 Subject: [PATCH] Moving wiki pages to docs folder --- docs/auto_restart.md | 73 ++++++++++ docs/configuration_files.md | 271 ++++++++++++++++++++++++++++++++++++ docs/develop.md | 28 ++++ docs/docker.md | 25 ++++ docs/faq.md | 49 +++++++ docs/google_map.md | 54 +++++++ docs/installation.md | 93 +++++++++++++ docs/pokemon_iv.md | 58 ++++++++ 8 files changed, 651 insertions(+) create mode 100644 docs/auto_restart.md create mode 100644 docs/configuration_files.md create mode 100644 docs/develop.md create mode 100644 docs/docker.md create mode 100644 docs/faq.md create mode 100644 docs/google_map.md create mode 100644 docs/installation.md create mode 100644 docs/pokemon_iv.md diff --git a/docs/auto_restart.md b/docs/auto_restart.md new file mode 100644 index 0000000000..e85752018c --- /dev/null +++ b/docs/auto_restart.md @@ -0,0 +1,73 @@ +This page is for a workaround to restart your bot(s). +_(Restarting is superior over reconnecting in case of stability for crashes)_ + +# MAC OS +1. Open your terminal +Just open it and you finished step 1 + +2. Create a new apple script +Heres an example to start and restart bots (in separate folders) adjust it for your needs. (paths, start commands, restart timer, ...) + +You can create a start file (if you are lazy :P) and a restart file or just one for both needs + +Start script: + + tell application "Terminal" + activate + do script "cd desktop" in selected tab of the front window #edit your path + do script "cd bots" in selected tab of the front window #edit your path + do script "cd bot1" in selected tab of the front window #edit your path + do script "python pokecli.py" in selected tab of the front window #start with your parameters + + #add more bots + delay 10 + tell application "System Events" + keystroke "t" using {command down} #open a new tab for next bot + end tell + delay 5 + do script "cd .." in selected tab of the front window + do script "cd bot2" in selected tab of the front window + do script "python pokecli.py" in selected tab of the front window + #copy this part for the amount you need + end tell + +restart: + + repeat + + delay 1200 #timer in seconds + tell application "Terminal" + activate + + tell application "System Events" + keystroke "c" using {control down} #close the bot + end tell + delay 3 + do script "clear" in selected tab of the front window #not needed just for nice view + delay 3 + do script "python pokecli.py" in selected tab of the front window #restart with parameters + + #copy for the amount of bots + delay 10 + tell application "System Events" + keystroke "ö" using {command down} #going to the previous tab + end tell + delay 3 + + tell application "System Events" + keystroke "c" using {control down} + end tell + delay 3 + do script "clear" in selected tab of the front window + delay 3 + do script "python pokecli.py" in selected tab of the front window + + #copy for the amount of bots + tell application "System Events" + keystroke "ä" using {command down} #moving the the last tab + end tell + delay 3 + + end tell + + end repeat diff --git a/docs/configuration_files.md b/docs/configuration_files.md new file mode 100644 index 0000000000..a881740b9a --- /dev/null +++ b/docs/configuration_files.md @@ -0,0 +1,271 @@ +## Usage (up-to-date) + 1. copy `config.json.example` to `config.json`. + 2. Edit `config.json` and replace `auth_service`, `username`, `password`, `location` and `gmapkey` with your parameters (other keys are optional, check `Advance Configuration` below) + 3. Simply launch the script with : `./run.sh` or `./pokecli.py` or `python pokecli.py -cf ./configs/config.json` if you want to specify a config file + +## Advanced Configuration +| Parameter | Default | Description | +|------------------|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tasks` | [] | The behaviors you want the bot to do. Read [how to configure tasks](#configuring-tasks). +| `max_steps` | 5 | The steps around your initial location (DEFAULT 5 mean 25 cells around your location) that will be explored +| `forts.avoid_circles` | False | Set whether the bot should avoid circles | +| `forts.max_circle_size` | 10 | How many forts to keep in ignore list | +| `walk` | 4.16 | Set the walking speed in kilometers per hour. (14 km/h is the maximum speed for egg hatching) | +| `action_wait_min` | 1 | Set the minimum time setting for anti-ban time randomizer +| `action_wait_max` | 4 | Set the maximum time setting for anti-ban time randomizer +| `debug` | false | Let the default value here except if you are developer | +| `test` | false | Let the default value here except if you are developer | | +| `location_cache` | true | Bot will start at last known location if you do not have location set in the config | +| `distance_unit` | km | Set the unit to display distance in (km for kilometers, mi for miles, ft for feet) | +| `evolve_cp_min` | 300 | Min. CP for evolve_all function + +## Configuring Tasks +The behaviors of the bot are configured via the `tasks` key in the `config.json`. This enables you to list what you want the bot to do and change the priority of those tasks by reordering them in the list. This list of tasks is run repeatedly and in order. For more information on why we are moving config to this format, check out the [original proposal](https://github.com/PokemonGoF/PokemonGo-Bot/issues/142). + +### Task Options: +* CatchLuredPokemon +* CatchVisiblePokemon +* EvolvePokemon + * `evolve_all`: Default `NONE` | Set to `"all"` to evolve Pokémon if possible when the bot starts. Can also be set to individual Pokémon as well as multiple separated by a comma. e.g "Pidgey,Rattata,Weedle,Zubat" + * `evolve_speed`: Default `20` + * `use_lucky_egg`: Default: `False` +* FollowPath + * `path_mode`: Default `loop` | Set the mode for the path navigator (loop or linear). + * `path_file`: Default `NONE` | Set the file containing the waypoints for the path navigator. +* FollowSpiral +* HandleSoftBan +* IncubateEggs + * `longer_eggs_first`: Default `True` +* MoveToFort +* [MoveToMapPokemon](#sniping-movetolocation) +* NicknamePokemon + * `nickname_template`: Default `""` | See the [Pokemon Nicknaming](#pokemon-nicknaming) section for more details +* RecycleItems + * `item_filter`: Pass a list of unwanted [items (using their JSON codes)](https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Item-ID's) to recycle when collected at a Pokestop +* SpinFort +* TransferPokemon + +### Example configuration: +The following configuration tells the bot to transfer all the Pokemon that match the transfer configuration rules, then recycle the items that match its configuration, then catch the pokemon that it can, so on, so forth. Note the last two tasks, MoveToFort and FollowSpiral. When a task is still in progress, it won't run the next things in the list. So it will move towards the fort, on each step running through the list of tasks again. Only when it arrives at the fort and there are no other stops available for it to move towards will it continue to the next step and follow the spiral. + +``` +{ + // ... + "tasks": [ + { + "type": "TransferPokemon" + }, + { + "type": "RecycleItems" + }, + { + "type": "CatchVisiblePokemon" + }, + { + "type": "CatchLuredPokemon" + }, + { + "type": "SpinFort" + }, + { + "type": "MoveToFort" + }, + { + "type": "FollowSpiral" + } + ] + // ... +} +``` + +### Specifying configuration for tasks +If you want to configure a given task, you can pass values like this: + +``` +{ + // ... + "tasks": [ + { + "type": "IncubateEggs", + "config": { + "longer_eggs_first": true + } + } + ] + // ... +} +``` + +### An example task configuration if you only wanted to collect items from forts: +``` +{ + // ... + "tasks": [ + { + "type": "RecycleItems" + }, + { + "type": "SpinFortWorker" + }, + { + "type": "MoveToFortWorker" + } + ], + // ... +} +``` + +## Catch Configuration +Default configuration will capture all Pokémon. + +```"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"}``` + +You can override the global configuration with Pokémon-specific options, such as: + +```"Pidgey": {"catch_above_cp": 0, "catch_above_iv": 0.8", "logic": "and"}``` to only capture Pidgey with a good roll. + +Additionally, you can specify always_capture and never_capture flags. + +For example: ```"Pidgey": {"never_capture": true}``` will stop catching Pidgey entirely. + +## Release Configuration + +### Common configuration + +Default configuration will not release any Pokémon. + +```"release": {"any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"}}``` + +You can override the global configuration with Pokémon-specific options, such as: + +```"release": {"Pidgey": {"release_below_cp": 0, "release_below_iv": 0.8, "logic": "or"}}``` to only release Pidgey with bad rolls. + +Additionally, you can specify always_release and never_release flags. For example: + +```"release": {"Pidgey": {"always_release": true}}``` will release all Pidgey caught. + +### Keep the strongest pokemon configuration (dev branch) + +You can set ```"release": {"Pidgey": {"keep_best_cp": 1}}``` or ```"release": {"any": {"keep_best_iv": 1}}```. + +In that case after each capture bot will check that do you have a new Pokémon or not. + +If you don't have it, it will keep it (no matter was it strong or weak Pokémon). + +If you already have it, it will keep a stronger version and will transfer the a weaker one. + +```"release": {"any": {"keep_best_cp": 2}}```, ```"release": {"any": {"keep_best_cp": 10}}``` - can be any number. + +## Evolve All Configuration + +By setting the `evolve_all` attribute in config.json, you can instruct the bot to automatically +evolve specified Pokémon on startup. This is especially useful for batch-evolving after popping up +a lucky egg (currently this needs to be done manually). + +The evolve all mechanism evolves only higher IV/CP Pokémon. It works by sorting the high CP Pokémon (default: 300 CP or higher) +based on their IV values. After evolving all high CP Pokémon, the mechanism will move on to evolving lower CP Pokémon +only based on their CP (if it can). +It will also automatically transfer the evolved Pokémon based on the release configuration. + +Examples on how to use (set in config.json): + +1. "evolve_all": "all" + Will evolve ALL Pokémon. + +2. "evolve_all": "Pidgey,Weedle" + Will only evolve Pidgey and Weedle. + +3. Not setting evolve_all or having any other string would not evolve any Pokémon on startup. + +If you wish to change the default threshold of 300 CP, simply add the following to the config file: + +``` +"evolve_cp_min": +``` + +## Path Navigator Configuration + +Setting the `navigator.type` setting to `path` allows you to specify waypoints which the bot will follow. The waypoints can be loaded from a GPX or JSON file. By default the bot will walk along all specified waypoints and then move directly to the first waypoint again. When setting `navigator.path_mode` to `linear`, the bot will turn around at the last waypoint and along the given waypoints in reverse order. + +An example for a JSON file can be found in `configs/path.example.json`. GPX files can be exported from many online tools, such as gpsies.com.The bot loads the first segment of the first track. + +## Pokemon Nicknaming + +A `nickname_template` can be specified for the `NicknamePokemon` task to allow a nickname template to be applied to all pokemon in the user's inventory. For example, a user wanting all their pokemon to have their IV values as their nickname could use a template `{iv_ads}`, which will cause their pokemon to be named something like `13/7/12` (depending on the pokemon's actual IVs). + +The `NicknamePokemon` task will rename all pokemon in inventory on startup to match the given template and will rename any newly caught/hatched/evolved pokemon as the bot runs. _It may take one or two "ticks" after catching/hatching/evolving a pokemon for it to be renamed. This is intended behavior._ + +> **NOTE:** If you experience frequent `Pokemon not found` error messages, this is because the inventory cache has not been updated after a pokemon was released. This can be remedied by placing the `NicknamePokemon` task above the `TransferPokemon` task in your `config.json` file. + +Niantic imposes a 12-character limit on all pokemon nicknames, so any new nickname will be truncated to 12 characters if over that limit. Thus, it is up to the user to exercise judgment on what template will best suit their need with this constraint in mind. + +Because some pokemon have very long names, you can use the [Format String syntax](https://docs.python.org/2.7/library/string.html#formatstrings) to ensure that your names do not cause your templates to truncate. For example, using `{name:.8s}` causes the Pokemon name to never take up more than 8 characters in the nickname. This would help guarantee that a template like `{name:.8s}_{iv_pct}` never goes over the 12-character limit. + +Valid names in templates are: +- `name` = pokemon name +- `id` = pokemon type id (e.g. 1 for Bulbasaurs) +- `cp` = pokemon's CP +- `iv_attack` = pokemon's attack IV +- `iv_defense` = pokemon's defense IV +- `iv_stamina` = pokemon's stamina IV +- `iv_ads` = pokemon's IVs in `(attack)/(defense)/(stamina)` format (matches web UI format -- A/D/S) +- `iv_sum` = pokemon's IVs as a sum (e.g. 45 when 3 perfect 15 IVs) +- `iv_pct` = pokemon's IVs as a percentage (0-100) + +> **NOTE:** Use a blank template (`""`) to revert all pokemon to their original names (as if they had no nickname). + +Sample usages: +- `"{name}_{iv_pct}"` => `Mankey_69` +- `"{iv_pct}_{iv_ads}"` => `91_15/11/15` +- `""` -> `Mankey` +![sample](https://cloud.githubusercontent.com/assets/8896778/17285954/0fa44a88-577b-11e6-8204-b1302f4294bd.png) + +## Sniping _(MoveToLocation)_ +### Description +This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map instance. For information on how to properly setup PokemonGo-Map have a look at the Github page of the project [here](https://github.com/AHAAAAAAA/PokemonGo-Map/). There is an example config in `config/config.json.map.example` + +### Options +* `Address` - Address of the webserver of PokemonGo-Map. ex: `http://localhost:5000` +* `Mode` - Which mode to run snipin on + - `distance` - Will move to the nearest pokemon + - `priority` - Will move to the pokemon with the highest priority assigned (tie breaking by distance) +* `prioritize_vips` - Will prioritize vips in distance and priority mode above all normal pokemon if set to true +* `min_time` - Minimum time the pokemon has to be available before despawn +* `max_distance` - Maximum distance the pokemon is allowed to be when walking, ignored when sniping +* `snipe`: + - `True` - Will teleport to target pokemon, encounter it, teleport back then catch it + - `False` - Will walk normally to the pokemon +* `update_map` - disable/enable if the map location should be automatically updated to the bots current location +* `catch` - A dictionary of pokemon to catch with an assigned priority (higher => better) +* `snipe_high_prio_only` - Whether to snipe pokemon above a certain threshold. +* `snipe_high_prio_threshold` - The threshold number corresponding with the `catch` dictionary. Any pokemon above this threshold will be caught. Other will be igonored. + +#### Example +``` +{ + \\ ... + { + "type": "MoveToMapPokemon", + "config": { + "address": "http://localhost:5000", + "max_distance": 500, + "min_time": 60, + "min_ball": 50, + "prioritize_vips": true, + "snipe": true, + "snipe_high_prio_only": true, + "snipe_high_prio_threshold": 400, + "update_map": true, + "mode": "priority", + "catch": { + "Aerodactyl": 1000, + "Ditto": 900, + "Omastar": 500, + "Omanyte": 150, + "Caterpie": 10, + } + } + } + \\ ... +} +``` diff --git a/docs/develop.md b/docs/develop.md new file mode 100644 index 0000000000..7a1649219f --- /dev/null +++ b/docs/develop.md @@ -0,0 +1,28 @@ +> $ git clone --recursive -b dev https://github.com/PokemonGoF/PokemonGo-Bot +> $ cd PokemonGo-Bot +> // create virtualenv using Python 2.7 executable +> $ virtualenv -p C:\python27\python.exe venv +> $ source venv/Scripts/activate +> $ pip install -r requirements.txt + +Once you are you to date with [dev-branch] (https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev) create a pull request and it will be re-viewed + + +### How to add/discover new API +The example is [here](https://github.com/PokemonGoF/PokemonGo-Bot/commit/46e2352ce9f349cc127a408959679282f9999585) +1. Check the type of your API request in [POGOProtos](https://github.com/AeonLucid/POGOProtos/blob/eeccbb121b126aa51fc4eebae8d2f23d013e1cb8/src/POGOProtos/Networking/Requests/RequestType.proto) For example: RECYCLE_INVENTORY_ITEM +2. Convert to the api call in pokemongo_bot/__init__.py, RECYCLE_INVENTORY_ITEM change to self.api.recycle_inventory_item +``` +def drop_item(self,item_id,count): + self.api.recycle_inventory_item(...............) +``` +3. Where is the param list? +You need check this [Requests/Messages/RecycleInventoryItemMessage.proto](https://github.com/AeonLucid/POGOProtos/blob/eeccbb121b126aa51fc4eebae8d2f23d013e1cb8/src/POGOProtos/Networking/Requests/Messages/RecycleInventoryItemMessage.proto) +4. Then our final api call is +``` +def drop_item(self,item_id,count): + self.api.recycle_inventory_item(item_id=item_id,count=count) + inventory_req = self.api.call() + print(inventory_req) +``` +5. You can now debug on the log to see if get what you need diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000000..04823a2f5c --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,25 @@ +Start by downloading for your platform: [Mac](https://www.docker.com/products/docker#/mac), [Windows](https://www.docker.com/products/docker#/windows), or [Linux](https://www.docker.com/products/docker#/linux). Once you have Docker installed, simply create the various config.json files for your different accounts (e.g. `configs/config-account1.json`) and then create a Docker image for PokemonGo-Bot using the Dockerfile in this repo. +``` +cd PokemonGo-Bot +docker build -t pokemongo-bot . +``` +You can verify that the image was created with: +``` +docker images +``` + +To run PokemonGo-Bot Docker image you've created, simple run: +``` +docker run --name=pokego-bot1 --rm -it -v $(pwd)/configs/config-account1.json:/usr/src/app/configs/config.json pokemongo-bot +``` +_Check the logs in real-time `docker logs -f pgobot`_ + +If you want to run multiple accounts with the same Docker image, simply specify different config.json and names in the Docker run command. +Do not push your image to a registry with your config.json and account details in it! + +Share web folder with host: +``` +docker run -it -v $(pwd)/web/:/usr/src/app/web --rm --name=pgo-bot-acct1 pokemongo-bot --config config.json +``` + +TODO: Add configuration for running multiple Docker containers from the same image for every bot instance, and a single container for the web UI. diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000000..7720f0a64c --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,49 @@ +### How do I start the application? +After customizing your config.json files, cd to the PokemonGo-Bot folder and enter: +``` +$ python pokecli.py +``` +This will start the application. + +### Python possible bug +If you encounter problems with the module `ssl` and it's function `_create_unverified_context`, just comment it. (Solution available in Python 2.7.11) +In order to comment out the function and the module, please follow the instructions below: +- edit `pokecli.py` +- put `#` before `if` (line 43) and `ssl` (line 44) +- save it + +Please keep in mind that this fix is only necessary if your python version don't have the `_create_unverified_context` argument in the ssl module. + +### What's IV? +Here's the [introduction](http://bulbapedia.bulbagarden.net/wiki/Individual_values) + +### Does it run automatically? +Not yet, still need a trainer to train the script param. But we are very close to. + +### Set GEO Location +It works, use "location": "59.333409,18.045008", in configs/config.json to set lat long for location. Use a Pokemon Go map to find an area with pokemons you still need (e.g. [https://pokevision.com/](https://pokevision.com/)), however don't jump too big distances (see "softban"). + +### Google login issues (Login Error, Server busy)? +Try to generate an [app password](!https://support.google.com/accounts/answer/185833?hl=en) and set is as +``` +-p "" +``` +This error mostly occurs for those who are using 2 factor authentication, but either way, for the purpose of security it would be nice to have a separate password for the bot app. + +### FLEE +The status code "3" corresponds to "Flee" - meaning your Pokemon has ran away. + {"responses": { "CATCH_POKEMON": { "status": 3 } } + +### My pokemon are not showing up in my Pokedex? +Finish the tutorial on a smartphone. This will then allow everything to be visible. + +### How can I maximise my XP per hour? +Quick Tip: When using this script, use a Lucky egg to double the XP for 30 mins. You will level up much faster. A Lucky egg is obtained on level 9 and further on whilst leveling up. (from VipsForever via /r/pokemongodev) + +### How do I use the map?? +[See wiki info here] (https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Google-Maps-API-(web-page)) + +### No JSON object could be decoded or decoder.py error +If you see "No JSON object could be decoded" or you see "decoder.py" in the last part of the error, this means that there is something wrong with your JSON. + +Copy the json in json files and copy it into http://jsonlint.com/ Then fix the error it gives you in your json. diff --git a/docs/google_map.md b/docs/google_map.md new file mode 100644 index 0000000000..7c6e3aca6c --- /dev/null +++ b/docs/google_map.md @@ -0,0 +1,54 @@ +The webpage is a submodule to this repository and config related to that is in ./web folder + +[OpenPoGoWeb] (https://github.com/OpenPoGo/OpenPoGoWeb) uses Google Maps. Read their [README] (https://github.com/OpenPoGo/OpenPoGoWeb/blob/master/README.md) for how to configure web frontend + +## How to set up a simple webserver with nginx +## SimpleHTTPServer +You can either view the map via opening the html file, or by serving it with SimpleHTTPServer (runs on localhost:8000) +To use SimpleHTTPServer: +``` +$ python -m SimpleHTTPServer [port] +``` +The default port is 8000, you can change that by giving a port number. Anything above port 1000 does not require root. +You will need to set your username(s) in the userdata.js file before opening, **Copy userdata.js.example to userdata.js** and edit with your favorite text editor. Put your username in the quotes instead of "username" +If using multiple usernames format like this +``` +var users = ["username1","username2"]; +``` +On Windows you can now go to http://127.0.0.1:8000 to see the map + + + +### Nginx on Ubuntu 14.x, 16.x +#### 1. Install nginx on your Ubuntu machine (e.g. on locally or AWS) +``` +sudo apt-get update +sudo apt-get install nginx +``` + +#### 2. Check the webserver +Check if the webserver is running by using your browser and entering the IP address of your local machine/server. +On a local machine this would be http://127.0.0.1. On AWS this is your public DNS if you haven't configured an elastic IP. + +#### 3. Change Base Directory of the Webserver +``` +sudo nano "/etc/nginx/sites-enabled/default" +``` +Comment out following line: ```root /var/www/html;``` and change it to the web folder of your PokemonGo-Bot: eg: +``` +/home/user/dev/PokemonGo-Bot/web; +``` +Use `nginx -s reload` to load the new configurations. + + +*** +Common Errors and Solutions + +> missing files: 127.0.0.1 - - "GET /catchable-YOURACCOUNT.json 404 +and location-SOMEACCOUNT.json 404 + +just create the file catachable-someaccount@gmail.com.json and put +``` +{} +``` +save and close repeat for other file. (location-SOMEACCOUNT.json) diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000000..8f5f5692e3 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,93 @@ +### Requirements (click each one for install guide) + +- [Python 2.7.x](http://docs.python-guide.org/en/latest/starting/installation/) +- [pip](https://pip.pypa.io/en/stable/installing/) +- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +- [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) (Recommended) +- [docker](https://docs.docker.com/engine/installation/) (Optional) - [how to setup after installation](https://github.com/PokemonGoF/PokemonGo-Bot/wiki/How-to-run-with-Docker) +- [protobuf 3](https://github.com/google/protobuf) (OS Dependent, see below) + +### Protobuf 3 installation + +- OS X: `brew update && brew install --devel protobuf` +- Windows: Download protobuf 3.0: [here](https://github.com/google/protobuf/releases/download/v3.0.0-beta-4/protoc-3.0.0-beta-4-win32.zip) and unzip `bin/protoc.exe` into a folder in your PATH. +- Linux: `apt-get install python-protobuf` + +### Get encrypt.so (Windows part writing need fine tune) +We don't have the copyright of encrypt.so, please grab from internet and build your self.Take the risk as your own. +Example build sequence: +Create a new separate folder some here + +wget http://pgoapi.com/pgoencrypt.tar.gz && tar -xf pgoencrypt.tar.gz && cd pgoencrypt/src/ && make +Then copy libencrypt.so to the gofbot folder and rename to encrypt.so + +### Note on branch +Please keep in mind that master is not always up-to-date whereas 'dev' is. In the installation note below change `master` to `dev` if you want to get and use the latest version. + +## Update +To update your project do (in the project folder): `git pull` + +To update python requirement packages do (in the project folder): `pip install --upgrade -r requirements.txt` + +### Installation Linux +(change master to dev for the latest version) + +``` +$ git clone --recursive -b master https://github.com/PokemonGoF/PokemonGo-Bot +$ cd PokemonGo-Bot +$ virtualenv . +$ source bin/activate +$ pip install -r requirements.txt +``` +#### Example Installation for Ubuntu +(change dev to master for the lastest master version) + +http://pastebin.com/pzPjXT65 + + +### Installation Mac +(change master to dev for the latest version) + +``` +$ git clone --recursive -b master https://github.com/PokemonGoF/PokemonGo-Bot +$ cd PokemonGo-Bot +$ virtualenv . +$ source bin/activate +$ pip install -r requirements.txt +``` + +### Installation Windows +(change master to dev for the latest version) + +On Windows, you will need to install PyYaml through the installer and not through requirements.txt. + +##### Windows vista, 7, 8: +Go to : http://pyyaml.org/wiki/PyYAML , download the right version for your pc and install it + +##### Windows 10: +Go to [this](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml) page and download: PyYAML-3.11-cp27-cp27m-win32.whl +(If running 64-bit python or if you get a 'not a supported wheel on this platform' error, +download the 64 bit version instead: PyYAML-3.11-cp27-cp27m-win_amd64.whl ) + +*(Run the following commands from Git Bash.)* + +``` +// switch to the directory where you downloaded PyYAML +$ cd download-directory +// install 32-bit version +$ pip2 install PyYAML-3.11-cp27-cp27m-win32.whl +// if you need to install the 64-bit version, do this instead: +// pip2 install PyYAML-3.11-cp27-cp27m-win_amd64.whl +``` + +After this, just do: + +``` +$ git clone -b master https://github.com/PokemonGoF/PokemonGo-Bot +$ cd PokemonGo-Bot +$ virtualenv . +$ script\activate +$ pip2 install -r requirements.txt +$ git submodule init +$ git submodule update +``` diff --git a/docs/pokemon_iv.md b/docs/pokemon_iv.md new file mode 100644 index 0000000000..8662314fd5 --- /dev/null +++ b/docs/pokemon_iv.md @@ -0,0 +1,58 @@ +Individual Values, or IVs function like a Pokémon's "Genes". They are the traits which are passed down from one generation to the next. + +![](http://vignette3.wikia.nocookie.net/pokemon/images/d/dd/ImagesCAD6WL01.jpg/revision/latest?cb=20110511020243) + +**Individual values** + +Every stat has an IV ranging from 0 to 31 for each stat (HP, ATK, DEF, SPA, SPD, and SPE), and at level 100, their IVs are added to the Pokémon's stats for their total values. For example, a level 100 Tyranitar with no Effort Values and 0 IVs has 310 HP, however if it had 31 IVs, it would have 341 HP. + + +These stats are provided randomly for every Pokémon, caught or bred, and although as insignificant as 31 points may seem, they are required for Ace Trainers to obtain when breeding Pokémon with perfect natures/stats. On some occasions they are even the tipping point in a close matchup. For example, if there was a Terrakion with 0 Attack IV, it will have an attack of 358 at level 100 (with an attack improving nature), while a Terrakion with perfect Attack IVs would have 392 Attack. This small difference can mean the difference between a one-hit kill (not an OHKO) and survival with 1 HP. + + +**Breeding IVs** +Fortunately for trainers, Ace Trainers and Pokémon Breeders especially, IVs can be bred to obtain the perfect Pokémon. + +The process of breeding IVs is as follows, the example displayed below is to breed Nidorans: + +* The child's IV's are generated randomly, for example: 7/27/31/14/19/2, in HP/ATK/DEF/SPA/SPD/SPE format. +* Three stats are inherited from the parents, and are selected in three checks: +1. First check: A random stat (HP/ATK/DEF/SPA/SPD/SPE) is selected from either the Mother or the Father and passed on to the child. +2. Second check: A random stat with the exception of HP (ATK/DEF/SPA/SPD/SPE) is selected from either the Mother or the Father and passed on to the child. +3. Third check: A random stat with the exception of HP and DEF (ATK/SPA/SPD/SPE) is selected from either the Mother or the Father and passed on to the child. +This means that HP and DEF are less likely to pass on to the child, however there are ways to make sure the IVs are passed on. + +Letting either one of the parents hold a Power Item can ensure that the Power Item's respective stat will be passed on to the offspring from the parent that holds it. + +If the Power Item called Power Weight (doubles all HP EV gained) is held by a parent with a perfect IV of 31 for HP and the first check selects this parent, the child is ensured to have a perfect IV for HP. The other checks, though, will be random, and either luck or patience is required to eventually get the desired stats. + +Important: Only three stats are inherited per Pokémon, and these can stack. For example, the DEF IV can be inherited from both parents, thus rendering one redundant. + + + +**Checking IVs** +Beginning in Generation III, there has always been an NPC that allows players to check the IVs of their Pokémon. + + +If you wanted to check the IV's yourself the formula is as follows: + +The formula for HP is different from the rest of the stats, so here is the formula for HP: + +> IV=((Stat - Level Value - 10) * 100 / Level Value) - 2 * Base stat - (Math.Floor(EV/4)) + +In layman terms: + +> Individual Value= ((Current Stat Level - Current Level Value - 10) * 100 / Current Level Value) - 2 * Base Stat - (Math.Floor(EV/4)) + +Just in case you don't know (Math.Floor(EV/4)) means to take the amount of EVs you have in HP and divide it by 4 and then round down. +The formula you use for the rest of the stats is the same, so here it is: + +> IV=((Math.Ceiling(Stat/Nature) - 5) * 100 / Level Value) - 2 * Base Stat - (Math.Floor(EV/4)) + +In layman terms: + +> Individual Value= (Math.Ceiling(Current Stat Value/Nature Bonus) * 100 / Current Level Value) - 2 * Base Stat - (Math.Floor(EV/4)) + +Just in case you don't know (Math.Floor(EV/4)) means to take the amount of EVs you have in HP and divide it by 4 and then round down. + +Just in case you don't know (Math.Ceiling(Current Stat Value/Nature Bonus)) means to take the Current Stat Value and divide it by the bonus you get from the Pokémon's nature and then round up. If the stat gets an increase from the nature you divide the Current Stat Value by 1.1, and if it is a decrease from the nature you divide the Current Stat Value by 0.9.