Skip to content

Commit

Permalink
Merge pull request #5734 from PokemonGoF/dev
Browse files Browse the repository at this point in the history
Dev merge to master
  • Loading branch information
Gobberwart authored Oct 1, 2016
2 parents fd49544 + f65b063 commit ff7eae5
Show file tree
Hide file tree
Showing 22 changed files with 986 additions and 561 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ If you do not want any data to be gathered, you can turn off this feature by set
* Breeze Ro
* bruno-kenji
* Gobberwart
* javajohnHub
* kolinkorr839

## Disclaimer
©2016 Niantic, Inc. ©2016 Pokémon. ©1995–2016 Nintendo / Creatures Inc. / GAME FREAK inc. © 2016 Pokémon/Nintendo Pokémon and Pokémon character names are trademarks of Nintendo. The Google Maps Pin is a trademark of Google Inc. and the trade dress in the product design is a trademark of Google Inc. under license to The Pokémon Company. Other trademarks are the property of their respective owners.
Expand Down
9 changes: 9 additions & 0 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"type": "EvolvePokemon",
"config": {
"enabled": false,
"log_interval": 120,

"// evolve only pidgey and drowzee": "",
"// evolve_list": "pidgey, drowzee",
Expand Down Expand Up @@ -211,6 +212,14 @@
"recycle_force_max": "00:05:00"
}
},
{
"type": "CatchLimiter",
"config": {
"enabled": false,
"min_balls": 20,
"duration": 15
}
},
{
"type": "Sniper",
"config": {
Expand Down
8 changes: 8 additions & 0 deletions configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@
"enabled": true
}
},
{
"type": "CatchLimiter",
"config": {
"enabled": false,
"min_balls": 20,
"duration": 15
}
},
{
"type": "MoveToMapPokemon",
"config": {
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.optimizer.example
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"mode": "by_pokemon",
"names": ["!with_next_evolution"],
"top": 1,
"sort": ["dps_attack"],
"sort": ["dps_attack", "iv"],
"keep": {"iv": 0.9}
}
]
Expand Down
45 changes: 39 additions & 6 deletions docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [Settings Description](#settings-description)
- [`flee_count` and `flee_duration`](#flee_count-and-flee_duration)
- [Previous `catch_simulation` Behaviour](#previous-catch_simulation-behaviour)
- [CatchLimiter Settings](#catchlimiter-settings)
- [Sniping _(MoveToLocation)_](#sniping-_-movetolocation-_)
- [Description](#description)
- [Options](#options)
Expand Down Expand Up @@ -190,9 +191,14 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json`
* `changeball_wait_max`: 5 | Maximum time to wait when changing balls
* `newtodex_wait_min`: 20 | Minimum time to wait if we caught a new type of pokemon
* `newtodex_wait_max`: 39 | Maximum time to wait if we caught a new type of pokemon
* Catch Limiter
* `enabled`: Default false | Enable/disable the task
* `min_balls`: Default 20 | Minimum balls on hand before catch tasks enabled
* `duration`: Default 15 | Length of time to disable catch tasks
* EvolvePokemon
* `enable`: Disable or enable this task.
* `evolve_all`: Default `NONE` | Depreciated. Please use evolve_list and donot_evolve_list
* `log_interval`: `Default: 120`. Time (in seconds) to periodically print how far you are from having enough pokemon to evolve (more than `min_pokemon_to_be_evolved`)
* `evolve_list`: Default `all` | Set to all, or specifiy different pokemon seperated by a comma
* `donot_evolve_list`: Default `none` | Pokemon seperated by comma, will be ignored from evolve_list
* `min_evolve_speed`: Default `25` | Minimum seconds to wait between each evolution
Expand All @@ -207,6 +213,9 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json`
* `enable`: Disable or enable this task.
* `spin_wait_min`: Default 3 | Minimum wait time after fort spin
* `spin_wait_max`: Default 5 | Maximum wait time after fort spin
* `daily_spin_limit`: Default 2000 | Daily spin limit
* `min_interval`: Default 120 | When daily spin limit is reached, how often should the warning message be shown
* `exit_on_limit_reached`: Default `True` | Code will exits if daily_spin_limit is reached
* HandleSoftBan
* IncubateEggs
* `enable`: Disable or enable this task.
Expand Down Expand Up @@ -570,7 +579,7 @@ Key | Info
"enabled": true,
"dont_nickname_favorite": false,
"good_attack_threshold": 0.7,
"nickname_template": "{iv_pct}-{iv_ads}"
"nickname_template": "{iv_pct}-{iv_ads}",
"locale": "en"
}
}
Expand Down Expand Up @@ -652,6 +661,30 @@ If you want to make your bot behave as it did prior to the catch_simulation upda
}
```

## CatchLimiter Settings
[[back to top](#table-of-contents)]

These settings define thresholds and duration to disable all catching tasks for a specified duration when balls are low. This allows your bot to spend time moving/looting and recovering balls spent catching.

## Default Settings

```
"enabled": false,
"min_balls": 20,
"duration": 15
```

### Settings Description
[[back to top](#table-of-contents)]

Setting | Description
---- | ----
`enabled` | Specify whether this task should run or not
`min_balls` | Determine minimum ball level required for catching tasks to be enabled
`duration` | How long to disable catching

Catching will be disabled when balls on hand reaches/is below "min_balls" and will be re-enabled when "duration" is reached, or when balls on hand > min_balls (whichever is later)

## Sniping _(MoveToLocation)_
[[back to top](#table-of-contents)]

Expand Down Expand Up @@ -852,8 +885,8 @@ This task is an upgrade version of the MoveToMapPokemon task. It will fetch poke

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.

The json file can contain for each point an optional `loiter` field. This
indicated the number of seconds the bot should loiter after reaching the point.
The json file can contain for each point an optional `wander` field. This
indicated the number of seconds the bot should wander after reaching the point.
During this time, the next Task in the configuration file is executed, e.g. a
MoveToFort task. This allows the bot to walk around the waypoint looking for
forts for a limited time.
Expand All @@ -872,9 +905,9 @@ forts for a limited time.
### Notice
If you use the `single` `path_mode` without e.g. a `MoveToFort` task, your bot
with /not move at all/ when the path is finished. Similarly, if you use the
`loiter` option in your json path file without a following `MoveToFort` or
similar task, your bot will not move during the loitering period. Please
make sure, when you use `single` mode or the `loiter` option, that another
`wander` option in your json path file without a following `MoveToFort` or
similar task, your bot will not move during the wandering period. Please
make sure, when you use `single` mode or the `wander` option, that another
move-type task follows the `FollowPath` task in your `config.json`.

### Sample Configuration
Expand Down
86 changes: 64 additions & 22 deletions docs/pokemon_optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ It will also collect the candies from your Buddy and select the next buddy.

# Configuration
## Default configuration
```
```json
{
"tasks": [
{
Expand Down Expand Up @@ -119,7 +119,7 @@ It will also collect the candies from your Buddy and select the next buddy.
"mode": "by_pokemon",
"names": ["!with_next_evolution"],
"top": 1,
"sort": ["dps_attack"],
"sort": ["dps_attack", "iv"],
"keep": {"iv": 0.9}
}
]
Expand Down Expand Up @@ -363,7 +363,7 @@ You can define `groups` of Pokemon to help you restrict rules to a specific set
<br>You can then use these `groups` names in the [`names`](#rule-names) parameter of your rule to refer to list of Pokemon

`groups` are list of Pokemon names:
```
```json
"groups": {
"gym": ["Dragonite", "Snorlax"],
"my_love": ["Pikachu"],
Expand Down Expand Up @@ -398,36 +398,78 @@ The order in which the rule are defined may have an impact on the behavior.
Especially, if there not enough candies/stardust to evolve/upgrade all the selected Pokemon, the Pokemon selected by the first rule will be evolved/upgraded first, then the ones of the second rule etc.
More generally, the first rule always have higher priority for evolve, upgrade or buddy.

```
```json
"rules": [
{
"// Of all Pokemon with less than 124 candies, buddy the Pokemon having the highest maximum cp": {},
"mode": "overall",
"top": 1,
"sort": ["max_cp", "cp"],
"keep": {"candy": -124},
"evolve": false,
"buddy": true
},
{
"// Buddy the Pokemon having the less candies. In case no Pokemon match first rule": {},
"mode": "overall",
"top": 1,
"sort": ["-candy", "max_cp", "cp"],
"evolve": false,
"buddy": true
},
{
"mode": "by_pokemon",
"names": ["gym"],
"top": 3,
"sort": ["iv", "ncp"],
"evolve": {"iv": 0.9, "ncp": 0.9},
"upgrade": {"iv": 0.9, "ncp": 0.9}
},
{
"// Keep best iv of each family and evolve it if its iv is greater than 0.9": {},
"mode": "by_family",
"top": 1,
"sort": ["iv"],
"evolve": {"iv": 0.9}
},
{
"// Keep best ncp of each family and evolve it if its ncp is greater than 0.9": {},
"mode": "by_family",
"top": 1,
"sort": ["ncp"],
"evolve": {"ncp": 0.9}
},
{
"// Keep best cp of each family but do not evolve it": {},
"mode": "by_family",
"top": 1,
"sort": ["cp"]
"sort": ["cp"],
"evolve": false
},
{
"mode": "by_family",
"top": 3,
"names": ["gym"],
"sort": ["iv", "ncp"],
"evolve": {"iv": 0.9, "ncp": 0.9},
"upgrade": {"iv": 0.9, "ncp": 0.9}
"// For Pokemon of final evolution and with iv greater than 0.9, keep the best dps_attack": {},
"mode": "by_pokemon",
"names": ["!with_next_evolution"],
"top": 1,
"sort": ["dps_attack", "iv"],
"keep": {"iv": 0.9}
}
]
```

The following table describe how the parameters of a rule affect the selection of Pokemon:

| | | Balbusaur `{"iv": 0.38}` | Ivysaur `{"iv": 0.98}` | Venusaur `{"iv": 0.71}` | ... | Dratini `{"iv": 0.47}` | Dratini `{"iv": 0.93}` | Dragonair `{"iv": 0.82}` | Dragonair `{"iv": 0.91}` | Dragonite `{"iv": 1.0}` |
|:-------:|:-------------:|:------------------------:|:----------------------:|:-----------------------:|:---:|:----------------------:|:----------------------:|:------------------------:|:------------------------:|:-----------------------:|
| mode | `per_family` | A | A | A | | B | B | B | B | B |
| names | `Dragonite` | | | | | x | x | x | x | x |
| keep | `{"iv": 0.8}` | | | | | | x | x | x | x |
| sort | `["iv"]` | | | | | | 2 | 4 | 3 | 1 |
| top | `3` | | | | | | x | | x | x |
| evolve | `{"iv": 0.9}` | | | | | | x | | x | |
| upgrade | `{"iv": 1.0}` | | | | | | | | | x |


[[back to top](#pokemon-optimizer)]

#### rule mode
Expand Down Expand Up @@ -653,7 +695,7 @@ For Eevee Pokemon family, and any other family with multiple paths of evolution,
# FAQ
#### How do I keep the 2 best `iv` of every single Pokemon, and evolve them if they are over `0.9` `iv` ?

```
```json
{
"mode": "by_pokemon",
"top": 2,
Expand All @@ -664,7 +706,7 @@ For Eevee Pokemon family, and any other family with multiple paths of evolution,

#### How do I keep the 2 best `iv` of every single Pokemon, and evolve them if they are over `0.9` `ncp` ?

```
```json
{
"mode": "by_pokemon",
"top": 2,
Expand All @@ -675,50 +717,50 @@ For Eevee Pokemon family, and any other family with multiple paths of evolution,

#### How do I keep my 10 best `cp` Dragonite and Snorlax to fight gyms ?

```
```json
{
"mode": "by_pokemon",
"names": ["Dragonite", "Snorlax"]
"names": ["Dragonite", "Snorlax"],
"top": 10,
"sort": ["cp"]
},
```

#### How do I keep the Gyarados with the best moveset for attack ?

```
```json
{
"mode": "by_pokemon",
"names": ["Gyarados"]
"names": ["Gyarados"],
"top": 1,
"sort": ["dps_attack"]
},
```

#### How do I keep the Gyarados with the best fast attack ?

```
```json
{
"mode": "by_pokemon",
"names": ["Gyarados"]
"names": ["Gyarados"],
"top": 1,
"sort": ["dps1"]
},
```

#### How do I keep all my Poliwag with `cp` less that `20` ?

```
```json
{
"mode": "by_pokemon",
"names": ["Poliwag"]
"names": ["Poliwag"],
"keep": {"cp": -20}
},
```

#### How do I buddy the Pokemon for which I have the less number of candies ?

```
```json
{
"mode": "overall",
"top": 1,
Expand Down
15 changes: 13 additions & 2 deletions docs/telegramtask.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,19 @@ This will subscribe you to be notified every time a Dratini has been caught with

> /top 10 iv
List top 10 pokemon, ordered by IV
List top 10 pokemon, ordered by IV, descending order

> /top 15 cp
List top 15 pokemon, ordered by CP
List top 15 pokemon, ordered by CP, descending order

> /top 5 dated
List top 5 pokemon, ordered by catching date, descending order

Same logic for :
/evolved <num> <cp-or-iv-or-dated>
/hatched <num> <cp-or-iv-or-dated>
/caught <num> <cp-or-iv-or-dated>
/released <num> <cp-or-iv-or-dated>
/vanished <num> <cp-or-iv-or-dated>
Loading

0 comments on commit ff7eae5

Please sign in to comment.