Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Sniper docs, config.map.example and config.example files. #5554

Merged
merged 6 commits into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 69 additions & 7 deletions configs/config.json.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"websocket_server": false,
"heartbeat_threshold": 10,
"enable_social": true,
"enable_social": false,
"live_config_update": {
"enabled": false,
"tasks_only": false
Expand Down Expand Up @@ -211,6 +211,74 @@
"recycle_force_max": "00:05:00"
}
},
{
"type": "Sniper",
"config": {
"enabled": false,
"mode": "social",
"bullets": 1,
"homing_shots": true,
"special_iv": 100,
"order": ["missing", "vip", "priority"],
"sources": [
{
"enabled": false,
"url": "http://localhost:5000/raw_data",
"key": "pokemons",
"mappings": {
"id": { "param": "pokemon_id" },
"name": { "param": "pokemon_name" },
"latitude": { "param": "latitude" },
"longitude": { "param": "longitude" },
"expiration": { "param": "disappear_time", "format": "milliseconds" }
}
},
{
"enabled": false,
"url": "https://pokewatchers.com/grab/",
"mappings": {
"iv": { "param": "iv" },
"id": { "param": "pid" },
"name": { "param": "pokemon" },
"latitude": { "param": "cords" },
"longitude": { "param": "cords" },
"expiration": { "param": "timeend", "format": "milliseconds" }
}
},
{
"enabled": false,
"url": "http://pokesnipers.com/api/v1/pokemon.json",
"key": "results",
"mappings": {
"iv": { "param": "iv" },
"name": { "param": "name" },
"latitude": { "param": "coords" },
"longitude": { "param": "coords" },
"expiration": { "param": "until", "format": "utc" }
}
}
],
"catch": {
"Snorlax": 1000,
"Dragonite": 1000,
"Growlithe": 600,
"Clefairy": 500,
"Kabuto": 500,
"Dratini": 500,
"Dragonair": 500,
"Mr. Mime": 500,
"Magmar": 500,
"Electabuzz": 500,
"Tangela": 500,
"Tauros": 500,
"Primeape": 500,
"Chansey": 500,
"Pidgey": 100,
"Caterpie": 100,
"Weedle": 100
}
}
},
{
"type": "CatchPokemon",
"config": {
Expand Down Expand Up @@ -382,16 +450,10 @@
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate": {},
"any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
"Lapras": {},
"Moltres": {},
"Zapdos": {},
"Articuno": {},

"// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
"Mewtwo": {},
"Dragonite": {},
"Snorlax": {},
"// Mew evolves to Mewtwo": {},
"Mew": {},
"Arcanine": {},
"Vaporeon": {},
"Gyarados": {},
Expand Down
32 changes: 28 additions & 4 deletions configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -468,24 +468,48 @@
{
"type": "Sniper",
"config": {
"enabled": true,
"enabled": false,
"mode": "social",
"bullets": 3,
"bullets": 1,
"homing_shots": true,
"special_iv": 100,
"order": ["missing", "iv", "priority", "vip", "expiration_timestamp_ms"],
"order": ["missing", "vip", "priority"],
"sources": [
{
"enabled": false,
"url": "http://localhost:5000/raw_data",
"key": "pokemons",
Copy link
Contributor

@DBa2016 DBa2016 Sep 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add "enabled": false

I suggest disabling all sources by default, allowing user to enable exactly what he wants to

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

"mappings": {
"iv": { "param": "iv" },
"id": { "param": "pokemon_id" },
"name": { "param": "pokemon_name" },
"latitude": { "param": "latitude" },
"longitude": { "param": "longitude" },
"expiration": { "param": "disappear_time", "format": "milliseconds" }
}
},
{
"enabled": false,
"url": "https://pokewatchers.com/grab/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add "enabled": false, here, same reason

"mappings": {
"iv": { "param": "iv" },
"id": { "param": "pid" },
"name": { "param": "pokemon" },
"latitude": { "param": "cords" },
"longitude": { "param": "cords" },
"expiration": { "param": "timeend", "format": "milliseconds" }
}
},
{
"enabled": false,
"url": "http://pokesnipers.com/api/v1/pokemon.json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add "enabled": false, here, same reason

"key": "results",
"mappings": {
"iv": { "param": "iv" },
"name": { "param": "name" },
"latitude": { "param": "coords" },
"longitude": { "param": "coords" },
"expiration": { "param": "until", "format": "utc" }
}
}
],
"catch": {
Expand Down
32 changes: 23 additions & 9 deletions docs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,21 +736,25 @@ This task is an upgrade version of the MoveToMapPokemon task. It will fetch poke
### Options
[[back to top](#table-of-contents)]

* `enabled` - Defines whether the **WHOLE** task is enabled or not. Please bear in mind that even if the task is enabled, all or any of its sources can be disabled. (default: false)
* `mode` - The mode on which the sniper will fetch the informations. (default: social)
- `social` - Information will come from the social network.
- `url` - Information will come from one or multiple urls.
* `bullets` - Each bullet corresponds to an attempt of catching a pokemon. (default: 1)
* `homing_shots` - This will ensure that each bullet will catch a target. (default: true)
* `special_iv` - This will skip the catch list if the value is greater than the target's IV. This currently does not work with `social` mode and only works if the given `url` has this information. (default: 100)
* `bullets` - Each bullet corresponds to an **ATTEMPT** of catching a pokemon. (default: 1)
* `homing_shots` - This will ensure that each bullet **will catch** a target. If disabled, a target might not exist and thus it wont be caught. When enabled, this will jump to the next target (if any) and try again to catch it. This will be repeated untill you've spent all the bullets. (default: true)
* `special_iv` - This will skip the catch list if the value is greater than or equal to the target's IV. This currently does not work with `social` mode and only works if the given `url` has this information. (default: 100)
* `time_mask` - The time mask used (if `expiration.format` is a full date). The default mask is '%Y-%m-%d %H:%M:%S'.
* `order` - The order on which you want to snipe. This can be one or multiple of the following values (default: [`missing`, `vip`, `threshold`]):
- `iv` - Order by IV, if any. See `min_iv_to_ignore_catch_list`.
* `order` - The order on which you want to snipe. This can be one or multiple of the following values (default: [`missing`, `vip`, `priority`]):
- `iv` - Order by IV, if any. See `special_iv`.
- `vip` - Order by VIP.
- `missing` - Order by the target's pokedex missing status.
- `threshold` - Order by the threshold you have specified in the `catch` list.
- `priority` - Order by the priority you have specified in the `catch` list.
- `expiration_timestamp_ms` - Order by the expiration time.
* `sources` - This should map a JSON param values from a given url. For example: different urls will provide different JSON response formats. If a param does not exist, you DO NOT have to specify it! Map bellow their corresponding values:
- `iv` - The JSON param that corresponds to the pokemon IV. Only certain sources provide this info. NOTE: social does not provide this info!
* `sources` - This should map a JSON param values from a given url. For example: different urls will provide different JSON response formats. **PLEASE ADVISED THAT, IF A PARAM DOES NOT EXIST (OR CONTAINS WRONG DATA LIKE PokeSnipers's ID PARAM), DO NOT SPECIFY IT!** Pokesnipers is a special case where it does provide IDs, however theyre wrong. Map bellow their corresponding values:
* `sources.key` - The JSON key that contains the results, eg.: For a JSON response such as `{ "SomeWeirdoName": [{"id": 123, ...}, {"id": 143, ...}]}`, `SomeWeirdoName` would be the key name.
* `sources.url` - The URL that will provide the JSON.
* `sources.enabled` - Defines whether this source is enabled or not. This has nothing to do with the task's `enabled`.
- `iv` - The JSON param that corresponds to the pokemon IV. Only certain sources provide this info. **NOTE:** `social` mode does not provide this info!
- `id` - The JSON param that corresponds to the pokemon ID. (required)
- `name` - The JSON param that corresponds to the pokemon name. (required)
- `latitude` - The JSON param that corresponds to the latitude. It will work if a single param is used for both `latitude` and `longitude`, eg.: "coords": "1.2345, 6.7890" (required)
Expand Down Expand Up @@ -790,13 +794,23 @@ This task is an upgrade version of the MoveToMapPokemon task. It will fetch poke
"url": "http://localhost:5000/raw_data",
"key": "pokemons",
"mappings": {
"iv": { "param": "iv" },
"id": { "param": "pokemon_id" },
"name": { "param": "pokemon_name" },
"latitude": { "param": "latitude" },
"longitude": { "param": "longitude" },
"expiration": { "param": "disappear_time", "format": "milliseconds" }
}
},
{
"url": "https://pokewatchers.com/grab/",
"mappings": {
"iv": { "param": "iv" },
"id": { "param": "pid" },
"name": { "param": "pokemon" },
"latitude": { "param": "cords" },
"longitude": { "param": "cords" },
"expiration": { "param": "timeend", "format": "milliseconds" }
}
}
],
"catch": {
Expand Down
Loading