From b7976fa75314c85c307c985eef6e2627c24ff635 Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Sat, 20 Aug 2016 18:26:33 +0100 Subject: [PATCH 1/6] Minor update/fix * Fixed bad function call at update_live_inventory.py * Fixed 'Total eggs' only show not incubating eggs --- pokemongo_bot/cell_workers/incubate_eggs.py | 2 +- pokemongo_bot/cell_workers/update_live_inventory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pokemongo_bot/cell_workers/incubate_eggs.py b/pokemongo_bot/cell_workers/incubate_eggs.py index b3312ca5a6..f47cbead42 100644 --- a/pokemongo_bot/cell_workers/incubate_eggs.py +++ b/pokemongo_bot/cell_workers/incubate_eggs.py @@ -38,7 +38,7 @@ def work(self): data={ 'km_needed': self.used_incubators[0]['km_needed'], 'distance_in_km': km_left, - 'eggs': len(self.eggs), + 'eggs': len(self.eggs) + len(self.used_incubators), 'eggs_inc': len(self.used_incubators) } ) diff --git a/pokemongo_bot/cell_workers/update_live_inventory.py b/pokemongo_bot/cell_workers/update_live_inventory.py index 89726b5f49..a5341aeddf 100644 --- a/pokemongo_bot/cell_workers/update_live_inventory.py +++ b/pokemongo_bot/cell_workers/update_live_inventory.py @@ -213,7 +213,7 @@ def print_all(self): self.logger.info( 'Items: {}/{}'.format( self.inventory.get_space_used(), - self.inventory.get_space_used() + self.inventory.get_space_left() + inventory.get_item_inventory_size() ) ) From 123a9142d58add11183dff1a9107547b9e09444a Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Sat, 20 Aug 2016 18:59:58 +0100 Subject: [PATCH 2/6] Updated configuration file --- docs/configuration_files.md | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/docs/configuration_files.md b/docs/configuration_files.md index e11c1aaa76..9af53755f0 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -20,6 +20,9 @@ | `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 |`daily_catch_llimit` | 800 | Limit the amount of pokemon caught in a 24 hour period. +|`pokemon_bag.show_at_start` | false | At start, bot will show all pokemon in the bag. +|`pokemon_bag.show_count` | false | Show amount of each pokemon. +|`pokemon_bag.pokemon_info` | [] | Check any config example file to see available settings. ## 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). @@ -55,6 +58,7 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json` * SpinFort * TransferPokemon * `min_free_slot`: Default `5` | Once the pokebag has less empty slots than this amount, the transfer process is triggered. | Big values (i.e 9999) will trigger the transfer process after each catch. +* UpdateLiveInventory ### 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. @@ -407,3 +411,56 @@ This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map i \\ ... } ``` + + +## UpdateLiveInventory Settings +### Description +Periodically displays the user inventory in the terminal. + +### Options + * `min_interval` : The minimum interval at which the stats are displayed, in seconds (defaults to 120 seconds). The update interval cannot be accurate as workers run synchronously. + * `show_all_multiple_lines` : Logs all items on inventory using multiple lines. Ignores configuration of 'items' + * `items` : An array of items to display and their display order (implicitly), see available items below (defaults to []). + +Available `items` : +``` +- 'pokemon_bag' : pokemon in inventory (i.e. 'Pokemon Bag: 100/250') +- 'space_info': not an item but shows inventory bag space (i.e. 'Items: 140/350') +- 'pokeballs' +- 'greatballs' +- 'ultraballs' +- 'masterballs' +- 'razzberries' +- 'blukberries' +- 'nanabberries' +- 'luckyegg' +- 'incubator' +- 'troydisk' +- 'potion' +- 'superpotion' +- 'hyperpotion' +- 'maxpotion' +- 'incense' +- 'incensespicy' +- 'incensecool' +- 'revive' +- 'maxrevive' +``` + +### Sample configuration +```json +{ + "type": "UpdateLiveInventory", + "config": { + "enabled": true, + "min_interval": 120, + "show_all_multiple_lines": false, + "items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"] + } +} +``` + +### Example console output +``` +2016-08-20 18:56:22,754 [UpdateLiveInventory] [INFO] [show_inventory] Items: 335/350 | Pokeballs: 8 | GreatBalls: 186 | UltraBalls: 0 | RazzBerries: 51 | LuckyEggs: 3 +``` From 98a7a591cc05d052a6b7e1d7baeee18953d06c08 Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Sat, 20 Aug 2016 19:12:53 +0100 Subject: [PATCH 3/6] Small fix --- docs/configuration_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration_files.md b/docs/configuration_files.md index 0bfec54ca5..9e0b8ffbda 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -59,7 +59,7 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json` * TransferPokemon * `min_free_slot`: Default `5` | Once the pokebag has less empty slots than this amount, the transfer process is triggered. | Big values (i.e 9999) will trigger the transfer process after each catch. * UpdateLiveStats -* [UpdateLiveInventory](#UpdateLiveInventory_Settings) +* [UpdateLiveInventory](#UpdateLiveInventory) ### 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. From afa743c12f6127d1939466bccbba5d42adbca6e8 Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Sat, 20 Aug 2016 19:13:30 +0100 Subject: [PATCH 4/6] Small fix --- docs/configuration_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration_files.md b/docs/configuration_files.md index 9e0b8ffbda..c0afeff6e2 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -59,7 +59,7 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json` * TransferPokemon * `min_free_slot`: Default `5` | Once the pokebag has less empty slots than this amount, the transfer process is triggered. | Big values (i.e 9999) will trigger the transfer process after each catch. * UpdateLiveStats -* [UpdateLiveInventory](#UpdateLiveInventory) +* [UpdateLiveInventory](#updateliveinventory-settings) ### 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. From 4c84b7a1ec74ceba36e3fa290d8eee69c53235b4 Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Sat, 20 Aug 2016 20:49:00 +0100 Subject: [PATCH 5/6] Minor fix --- docs/configuration_files.md | 4 ++-- pokemongo_bot/cell_workers/incubate_eggs.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration_files.md b/docs/configuration_files.md index c0afeff6e2..b426403626 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -243,13 +243,13 @@ Key | Info ---- | ---- **{name}** | Pokemon name *(e.g. Articuno)* **{id}** | Pokemon ID/Number *(1-151, e.g. 1 for Bulbasaurs)* -**{cp}** | Pokemon's Combat Points (CP) *(10-4145)* +**{cçp}** | Pokemon's Combat Points (CP) *(10-4145)* | **Individial Values (IV)** **{iv_attack}** | Individial Attack *(0-15)* of the current specific pokemon **{iv_defense}** | Individial Defense *(0-15)* of the current specific pokemon **{iv_stamina}** | Individial Stamina *(0-15)* of the current specific pokemon **{iv_ads}** | Joined IV values in `(attack)/(defense)/(stamina)` format (*e.g. 4/12/9*, matches web UI format -- A/D/S) -**{iv_ads_hex}** | Joined IV values of `(attack)(defense)(stamina)` in HEX (*e.g. 4C9* for A/D/S \ 4/12/9) +**{iv_ads_hex}** | Joined IV values of `(attack)(defense)(stamina)` in HEX (*e.g. 4C9* for A/D/S = 4/12/9) **{iv_sum}** | Sum of the Individial Values *(0-45, e.g. 45 when 3 perfect 15 IVs)* | **Basic Values of the pokemon (identical for all of one kind)** **{base_attack}** | Basic Attack *(40-284)* of the current pokemon kind diff --git a/pokemongo_bot/cell_workers/incubate_eggs.py b/pokemongo_bot/cell_workers/incubate_eggs.py index f47cbead42..e465c6752d 100644 --- a/pokemongo_bot/cell_workers/incubate_eggs.py +++ b/pokemongo_bot/cell_workers/incubate_eggs.py @@ -34,11 +34,11 @@ def work(self): else: self.emit_event( 'next_egg_incubates', - formatted='Next egg ({km_needed} km) incubates in {distance_in_km:.2f} km (Total eggs: {eggs}, Incubating: {eggs_inc})', + formatted='Next egg ({km_needed} km) incubates in {distance_in_km:.2f} km (Eggs left: {eggs}, Incubating: {eggs_inc})', data={ 'km_needed': self.used_incubators[0]['km_needed'], 'distance_in_km': km_left, - 'eggs': len(self.eggs) + len(self.used_incubators), + 'eggs': len(self.eggs), 'eggs_inc': len(self.used_incubators) } ) From b7857f407199486a8048a8d5d10ca0f1220d9d4d Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Sat, 20 Aug 2016 20:52:04 +0100 Subject: [PATCH 6/6] Fixed typo mistake --- docs/configuration_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration_files.md b/docs/configuration_files.md index b426403626..ce78989185 100644 --- a/docs/configuration_files.md +++ b/docs/configuration_files.md @@ -243,7 +243,7 @@ Key | Info ---- | ---- **{name}** | Pokemon name *(e.g. Articuno)* **{id}** | Pokemon ID/Number *(1-151, e.g. 1 for Bulbasaurs)* -**{cçp}** | Pokemon's Combat Points (CP) *(10-4145)* +**{cp}** | Pokemon's Combat Points (CP) *(10-4145)* | **Individial Values (IV)** **{iv_attack}** | Individial Attack *(0-15)* of the current specific pokemon **{iv_defense}** | Individial Defense *(0-15)* of the current specific pokemon