Skip to content

Commit

Permalink
'all' keyword in 'release' config discards all pokemon in bag except …
Browse files Browse the repository at this point in the history
…N best ones (#4615)

* "release": {"all": keep_best_cp": 100} globally keeps 100 best CP pokemon
* fixed description of 'any' in docs and configs
* added 'all' example in config files
* added example of 'all' to docs
  • Loading branch information
LitRidl authored and solderzzc committed Aug 23, 2016
1 parent 382a406 commit 0d2c391
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 168 deletions.
61 changes: 31 additions & 30 deletions configs/config.json.cluster.example
Original file line number Diff line number Diff line change
Expand Up @@ -111,35 +111,34 @@
"recycle_wait_max": 4
}
},
{
"type": "CatchPokemon",
"config": {
"enabled": true,
"catch_visible_pokemon": true,
"catch_lured_pokemon": true,
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"treat_unseen_as_vip": true,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6
},
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
}
}
},
{
"type": "CatchPokemon",
"config": {
"enabled": true,
"catch_visible_pokemon": true,
"catch_lured_pokemon": true,
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6
},
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
}
}
},
{
"type": "SpinFort",
"config": {
Expand Down Expand Up @@ -199,8 +198,10 @@
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 stronger (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// Keep no more than 3 best IV pokemon for every pokemon type": {},
"// any": {"keep_best_iv": 3},
"// Discard all pokemon in bag except 100 pokemon with best CP": {},
"// all": {"keep_best_cp": 100},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
},
Expand Down
12 changes: 7 additions & 5 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"enabled": true,
"longer_eggs_first": true,
"min_interval": 120,
"infinite": [2,5,10],
"breakable": [2,5,10]
"infinite": [2,5,10],
"breakable": [2,5,10]
}
},
{
Expand Down Expand Up @@ -228,12 +228,14 @@
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// Keep no more than 3 best IV pokemon for every pokemon type": {},
"// any": {"keep_best_iv": 3},
"// Discard all pokemon in bag except 100 pokemon with best CP": {},
"// all": {"keep_best_cp": 100},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3},
"// Example of custom order of static criterion": {},
"// Zubat": {"keep_best_custom": "iv, cp, hp_max", "amount":2}
"// Example of custom order of static criterion": {},
"// Zubat": {"keep_best_custom": "iv, cp, hp_max", "amount":2}
},
"vips" : {
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
Expand Down
61 changes: 31 additions & 30 deletions configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -111,35 +111,34 @@
"recycle_wait_max": 4
}
},
{
"type": "CatchPokemon",
"config": {
"enabled": true,
"catch_visible_pokemon": true,
"catch_lured_pokemon": true,
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"treat_unseen_as_vip": true,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6
},
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
}
}
},
{
"type": "CatchPokemon",
"config": {
"enabled": true,
"catch_visible_pokemon": true,
"catch_lured_pokemon": true,
"min_ultraball_to_keep": 5,
"berry_threshold": 0.35,
"vip_berry_threshold": 0.9,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6
},
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 2,
"catch_wait_max": 6,
"berry_wait_min": 2,
"berry_wait_max": 3,
"changeball_wait_min": 2,
"changeball_wait_max": 3
}
}
},
{
"type": "SpinFort",
"config": {
Expand Down Expand Up @@ -455,8 +454,10 @@
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 stronger (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// Keep no more than 3 best IV pokemon for every pokemon type": {},
"// any": {"keep_best_iv": 3},
"// Discard all pokemon in bag except 100 pokemon with best CP": {},
"// all": {"keep_best_cp": 100},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
},
Expand Down
4 changes: 3 additions & 1 deletion configs/config.json.path.example
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 stronger (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// Keep no more than 3 best IV pokemon for every pokemon type": {},
"// any": {"keep_best_iv": 3},
"// Discard all pokemon in bag except 100 pokemon with best CP": {},
"// all": {"keep_best_cp": 100},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
}
Expand Down
67 changes: 35 additions & 32 deletions docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ 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.
```"release": {"any": {"keep_best_cp": 2}}```, ```"release": {"any": {"keep_best_cp": 10}}``` - can be any number. In the latter case for every pokemon type bot will keep no more that 10 best CP pokemon.

If you wish to limit your pokemon bag as a whole, not type-wise, use `all`:
```"release": {"all": {"keep_best_cp": 200}}```. In this case bot looks for 200 best CP pokemon in bag independently of their type. For example, if you have 150 Snorlax with 1500 CP and 100 Pidgeys with CP 100, bot will keep 150 Snorlax and 50 Pidgeys for a total of 200 best CP pokemon.

### Keep the best custom pokemon configuration (dev branch)
[[back to top](#table-of-contents)]
Expand Down Expand Up @@ -533,7 +536,7 @@ This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map i
"snipe_high_prio_threshold": 400,
"update_map": true,
"mode": "priority",
"max_extra_dist_fort": 10,
"max_extra_dist_fort": 10,
"catch": {
"Aerodactyl": 1000,
"Ditto": 900,
Expand All @@ -553,12 +556,12 @@ This task will fetch current pokemon spawns from /raw_data of an PokemonGo-Map i
### Description
[[back to top](#table-of-contents)]

Walk to the specified locations loaded from .gpx or .json file. It is highly recommended to use website such as [GPSies](http://www.gpsies.com) which allow you to export your created track in JSON file. Note that you'll have to first convert its JSON file into the format that the bot can understand. See [Example of pier39.json] below for the content. I had created a simple python script to do the conversion.
Walk to the specified locations loaded from .gpx or .json file. It is highly recommended to use website such as [GPSies](http://www.gpsies.com) which allow you to export your created track in JSON file. Note that you'll have to first convert its JSON file into the format that the bot can understand. See [Example of pier39.json] below for the content. I had created a simple python script to do the conversion.

### Options
[[back to top](#table-of-contents)]
* `path_mode` - linear, loop
- `loop` - The bot will walk along all specified waypoints and then move directly to the first waypoint again.
- `loop` - The bot will walk along all specified waypoints and then move directly to the first waypoint again.
- `linear` - The bot will turn around at the last waypoint and along the given waypoints in reverse order.
* `path_start_mode` - first
* `path_file` - "/path/to/your/path.json"
Expand All @@ -569,21 +572,21 @@ Walk to the specified locations loaded from .gpx or .json file. It is highly rec

```
{
"type": "FollowPath",
"type": "FollowPath",
"config": {
"path_mode": "linear",
"path_start_mode": "first",
"path_mode": "linear",
"path_start_mode": "first",
"path_file": "/home/gary/bot/PokemonGo-Bot/configs/path/pier39.json"
}
}
```

Example of pier39.json
```
[{"location": "37.8103848,-122.410325"},
{"location": "37.8103306,-122.410435"},
{"location": "37.8104662,-122.41051"},
{"location": "37.8106146,-122.41059"},
[{"location": "37.8103848,-122.410325"},
{"location": "37.8103306,-122.410435"},
{"location": "37.8104662,-122.41051"},
{"location": "37.8106146,-122.41059"},
{"location": "37.8105934,-122.410719"}
]
```
Expand Down Expand Up @@ -676,7 +679,7 @@ Periodically displays the user inventory in the terminal.
### Options
[[back to top](#table-of-contents)]
* `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'
* `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` :
Expand Down Expand Up @@ -738,14 +741,14 @@ Simulates the user going to sleep every day for some time, the sleep time and th
###Example Config
```
{
"type": "SleepSchedule",
"config": {
"time": "12:00",
"duration":"5:30",
"time_random_offset": "00:30",
"duration_random_offset": "00:30"
"wake_up_at_location": "39.408692,149.595838,590.8"
}
"type": "SleepSchedule",
"config": {
"time": "12:00",
"duration":"5:30",
"time_random_offset": "00:30",
"duration_random_offset": "00:30"
"wake_up_at_location": "39.408692,149.595838,590.8"
}
}
```

Expand All @@ -764,13 +767,13 @@ Simulates the random pause of the day (speaking to someone, getting into a store
###Example Config
```
{
"type": "RandomPause",
"config": {
"min_duration": "00:00:10",
"max_duration": "00:10:00",
"min_interval": "00:10:00",
"max_interval": "02:00:00"
}
"type": "RandomPause",
"config": {
"min_duration": "00:00:10",
"max_duration": "00:10:00",
"min_interval": "00:10:00",
"max_interval": "02:00:00"
}
}
```

Expand All @@ -786,12 +789,12 @@ Configure how the bot should use the incubators.
###Example Config
```
{
"type": "IncubateEggs",
"type": "IncubateEggs",
"config": {
"longer_eggs_first": true,
"infinite": [2,5],
"breakable": [10]
}
"longer_eggs_first": true,
"infinite": [2,5],
"breakable": [10]
}
}
```

Expand Down
Loading

0 comments on commit 0d2c391

Please sign in to comment.