<commit_before># :mouse: [MH Tools](https://tsitu.github.io/MH-Tools/) &middot; [![Build Status](https://travis-ci.com/tsitu/MH-Tools.svg?branch=master)](https://travis-ci.com/tsitu/MH-Tools)

Suite of JavaScript tools for the browser game [MouseHunt](https://www.mousehuntgame.com/).

Ongoing forum discussion thread [here](https://www.mousehuntgame.com/forum/showthread.php?132397-MouseHunt-Tools-by-tsitu&goto=newpost).

Feel free to post your questions, comments, or concerns there (or [here](https://github.com/tsitu/MH-Tools/issues) on GitHub).

## :book: Table of Contents

* [Instructions](#instructions)
  * [General Tips](#thought_balloon-general-tips)
  * [Bookmarklets](#bookmark-bookmarklets)
    * [Browser Installation Tips](#-browser-installation-tips)
    * [Chrome](#user-content-chrome)
    * [Firefox](#user-content-firefox)
    * [Edge / IE](#user-content-edge)
    * [Safari](#user-content-safari)
  * [Catch Rate Estimator](#straight_ruler-catch-rate-estimator)
    * [Sample Size Score](#-sample-size-score)
    * [Special Catch Rate Effects](#-special-catch-rate-effects)
  * [Map Solver and Mouse Finder](#earth_americas-map-solver-and-mouse-finder)
    * [Cheese Filters](#-cheese-filters)
  * [Best Setup](#trophy-best-setup)
  * [Marketplace Analyzer](#chart_with_upwards_trend-marketplace-analyzer)
  * [Crown Solver](#crown-crown-solver)
  * [Crafting Wizard](#hammer-crafting-wizard)
  * [Trap Setup Powers](#mag-trap-setup-powers)
    * [Worksheet](#-worksheet)
  * [CRE Tabs](#bookmark_tabs-cre-tabs)
* [Developers](#developers)
  * [Build and Run](#construction_worker-build-and-run)
  * [Populations](#clipboard-populations)
  * [Coding Style](#barber-coding-style)
* [Miscellaneous](#miscellaneous)
  * [Useful Links](#arrow_down-useful-links)
  * [Thanks](#heart_decoration-thanks-to)
* [License](#license)

## Instructions

### :thought_balloon: General Tips

Several tools make use of mottie's [tablesorter](https://mottie.github.io/tablesorter/docs/#Introduction) plugin, which includes useful additional features such as multi-column sorting with <kbd>Shift</kbd> or special characters for [filtering](https://mottie.github.io/tablesorter/docs/example-widget-filter.html).

We recommend installing [Jack's extension](https://github.com/DevJackSmith/mh-helper-extension#mousehunt-helper-extension) if you have not already. It records valuable information from **active hunts** only. Most of the data supporting recent updates has been sourced from Jack's publicly accessible [database backups](https://keybase.pub/devjacksmith/mh_backups/).

_Disclaimer:_ Newer tools like 'Crafting Wizard' and 'Trap Setup Powers' may be incompatible with outdated or feature-constrained browsers such as Internet Explorer, Opera Mini, Samsung Internet, and Blackberry Browser. Older tools may also become incompatible with these browsers at any point.

### :bookmark: Bookmarklets

Bookmarklets are pieces of JavaScript code that are saved as a bookmark in the user's browser, enabling them to interact with webpages on the fly. We provide 9 different bookmarklets: Catch Rate Estimator, Map Solver, Best Setup: Load Items, Best Setup: Fields, Markeplace Analyzer, Silver Crown Solver, Crafting Wizard, Powers: Worksheet and the all-in-one Auto-Loader. They are each available on their corresponding tool's page.

Using the Auto-Loader is recommended because it automatically grabs the latest version of each bookmarklet without having to manually update.

You **must** be on the official [mousehuntgame.com](https://www.mousehuntgame.com/) website for these bookmarklets to work. Same-origin policy blocks access to DOM elements and requests to server endpoints while playing in Facebook's `<iframe>`.

_Note:_ The process of using a bookmarklet in mobile browsers can vary. For example, in Chrome for Android, you must type the first few characters of the bookmarklet's name in the address bar and click it from there for the code to take effect.

|    Bookmarklet    | Functionality                                                                                                                                                                                                                                        |
| :---------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|        CRE        | Automatically fills in the Catch Rate Estimator with your location, sublocation, cheese, charm, weapon, base, and more                                                                                                                               |
| Setup: Load Items | Automatically loads your owned weapons, bases, and charms into Best Setup                                                                                                                                                                            |
|   Setup: Fields   | Automatically fills in Best Setup with your location, sublocation, cheese, charm, and more                                                                                                                                                           |
|     Analyzer      | Generates a pop-up dialog that allows you to download your entire Marketplace transaction history and send it to the tool                                                                                                                            |
|        Map        | Automatically fills in the Map Solver's mouse name `textarea` with all of the remaining uncaught mice on your Active Map                                                                                                                             |
|       Crown       | Automatically fills in the Crown Solver's `textarea` with the 50 Bronze Crown mice on your 'King's Crowns' page that are closest to reaching Silver status (100 catches)<br><br>_Note:_ Favorited Bronze mice will be included regardless of catches |
|     Crafting      | Automatically loads your 'Crafting Table' materials into Crafting Wizard                                                                                                                                                                             |
| Powers: Worksheet | Generates a pop-up dialog that allows you to select a mouse group/subgroup to target with your current trap setup                                                                                                                                    |
|      Loader       | Generates a pop-up dialog that gives you access to the latest versions of each bookmarklet                                                                                                                                                           |

<div align="right"><a href="#book-table-of-contents">Top</a></div>

#### &sect; Browser Installation Tips

Drag the blue bookmarklet link to your browser's bookmarks bar. If that doesn't work, try the following manual instructions. These concepts apply to other browsers (including mobile), but specific steps may vary.

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/chrome_12-48/chrome_12-48_32x32.png" alt="Chrome" id="chrome"><br>
_Google Chrome_

1. Bookmark an arbitrary page and give it a memorable name like 'CRE' or 'Auto-Loader'
1. Copy the bookmarklet code by right-clicking its link and selecting `Copy link address`
1. Right-click on your newly created bookmark and select `Edit...`
1. Paste the bookmarklet code into the `URL` field and hit `Save`

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/firefox_23-56/firefox_23-56_32x32.png" alt="Firefox" id="firefox"><br>
_Mozilla Firefox_

1. Right-click on the bookmarklet link, select `Bookmark This Link`, and name it accordingly

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/edge/edge_32x32.png" alt="Edge" id="Edge"> <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/internet-explorer_9-11/internet-explorer_9-11_32x32.png" alt="Edge" id="edge"><br>
_Microsoft Edge / Internet Explorer_

1. Bookmark an arbitrary page and give it a memorable name like 'CRE' or 'Auto-Loader'
1. Copy the bookmarklet code by right-clicking its link and selecting `Copy link`
1. Go to 'Hub -> Favorites', right-click on your newly created bookmark and click `Edit URL`
1. Paste the bookmarklet code into the text field and hit <kbd>Enter</kbd> to save
1. If that doesn't work, there is a third-party application called [EdgeManage](http://www.emmet-gray.com/Articles/EdgeManage.html) that claims to add a lot of missing features for managing Favorites - please use at your own discretion
1. Internet Explorer 11 allows you to drag bookmarklets directly to your favorites bar, or right-click and choose `Add to favorites`. However, it doesn't seem to support certain JavaScript features that enable the bookmarklets to run properly

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/safari_1-7/safari_1-7_32x32.png" alt="Safari" id="safari"><br>
_Apple Safari_

1. Bookmark an arbitrary page and give it a memorable name
1. Right-click on the bookmarklet link and select `Copy Link`
1. Right-click on the newly created bookmark, select `Edit Address`, paste into the text box, and click `Done`

<div align="right"><a href="#book-table-of-contents">Top</a></div>

---

### :straight_ruler: [Catch Rate Estimator](https://tsitu.github.io/MH-Tools/cre.html)

> Calculates catch rate estimates along with points, gold, minimum luck and more.

**Bookmarklet:** Run the `CRE` bookmarklet from basically any page on the MH website.

|           Descriptor           |  Per  |    Sum or Average (bottom row)    |
| :----------------------------: | :---: | :-------------------------------: |
|        Attraction Rate         | Mouse |        Sum for this setup         |
|           Catch Rate           | Mouse |      Average for this setup       |
| Catches / 100 hunts (AR \* CR) | Mouse |         Sum per 100 hunts         |
|              Gold              | Catch |         Average per hunt          |
|             Points             | Catch |         Average per hunt          |
|         Tourney Points         | Catch |         Average per hunt          |
|            Min Luck            | Mouse | Highest for this particular setup |
|              Rank              | Catch |             Per hunt              |

<br>

#### &sect; Sample Size Score

An indicator of the quality and accuracy of a specific setup's data based on its sample size and the number of mice in its attraction pool. Setups are separated by locations, sublocations, cheeses and occasionally charms (if they have attraction-altering effects i.e. Warpath Warrior Charm in Waves 1-3 of Fiery Warpath). If you have a charm selected that doesn't affect a setup's mouse population pool, its corresponding "No Charm" data is displayed, since they are equivalent.

Previously, the tool displayed a flat sample size number with a rating assigned to it, which looked like `Sample Size: 300 (bad)` or `Sample Size: 100000 (excellent)`. This format was misleading because it didn't encode important contextual information. The current scoring scheme takes into account factors such as number of mice in a particular setup, 95% confidence levels, and relative margins of error. It combines and normalizes these factors into a single number, capped at 100.

_Note:_ Certain setups may have low scores or even no sample size data attached to them. This could be because: (1) the data was extracted from HornTracker before we decided to start keeping track of sample sizes, (2) there aren't enough recorded hunts for that setup in Jack's database, (3) our population fetching scripts need to be re-run.

#### &sect; Special Catch Rate Effects

The following special effects _are included in catch rate calculations_ for both CRE and Best Setup

* Final Catch Rate Modifiers

  |            Name             |                                                                      Modifier                                                                       |
  | :-------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: |
  | Anniversary Weapon variants |                                                           Up to 10% increased catch rate                                                            |
  |        Bounty Hunter        |                                                 100% catch rate with Sheriff's Badge Charm equipped                                                 |
  |          Fort Rox           | &middot; 50% increased catch rate when upgrades are level 2 or 3<br>&middot; 100% catch rate on Nightmancer and Nightfire when upgrades are level 3 |
  |    Ultimate Anchor Charm    |                                                   100% catch rate while on a dive in Sunken City                                                    |
  |       Ultimate Charm        |                                                             100% catch rate everywhere                                                              |
  |  Zugzwang's Ultimate Move   |                                 50% increased catch rate in Seasonal Garden & Zugzwang's Tower when amplifier > 0%                                  |
  |     Zurreal the Eternal     |                                                   0% catch rate without Zurreal's Folly equipped                                                    |

* Special Bonuses & Effects

  |               Name               |                                                                Effect                                                                 |
  | :------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: |
  |    Dragonbane Charm variants     |                                             +300/600/900% Power Bonus on Dragon-type mice                                             |
  |           EMP400 Charm           |                                                 +25000 Power with Fusion Fondue armed                                                 |
  |     Golem Guardian variants      | &middot; Charge levels are set in CRE and carry over to Best Setup<br>&middot; +6 Luck when equipped with Glowing Golem Guardian Base |
  |         King Grub/Scarab         |                                   Salt level applies a logarithmic function to decrease mouse power                                   |
  | Obvious Ambush / Blackstone Pass |                                    +1800 Power on corresponding side, -2400 Power on opposite side                                    |
  |          Pawn Pinchers           |                              +10920 Power on corresponding Pawn, -60 Power and -5 Luck on opposite Pawn                               |
  |       Physical Brace Base        |                                         25% Power Bonus when equipped with a Physical weapon                                          |
  |     Polluted Charm variants      |                              +4/6/10/15 Luck when equipped with Polluted Base or Refined Pollutinum Base                              |
  |        Rook Crumble Charm        |                                           300% Power Bonus on Rook mice in Zugzwang's Tower                                           |
  |       Super Warpath Charms       |                                               +50 Power on corresponding Warpath groups                                               |
  |          Taunting Charm          |                                            Only applies Rift Set bonuses on WWRift bosses                                             |

* Location Specific Effects

  |          Location          |                                                                                                                                                           Effect                                                                                                                                                           |
  | :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
  |       Claw Shot City       |                                                                         &middot; Claw Shot Base gives +1000 Power when equipped with a S.L.A.C. variant<br>&middot; +2500 Power when equipped with a S.L.A.C. variant _and_ a Cactus Charm variant                                                                         |
  |       Fiery Warpath        |                                                                                    &middot; Flamebane Charm gives +150 Power<br>&middot; Warden Slayer Trap gives +2500 Power and +2500% Power Bonus when equipped in Wave 4 or Portal                                                                                     |
  |          Fort Rox          |                                                                                                                    Nightlight Charm gives +1/3/5/7/9/12/15% Power Bonus depending on the stage of night                                                                                                                    |
  |  Gnawnian Express Station  |                                                                                           Supply Grabber, Bandit Deflector, and Engine Doubler give +1500 Power in Supply Depot, Raider River, and Daredevil Canyon respectively                                                                                           |
  | Iceberg & Slushy Shoreline | &middot; Steam Laser Mk. I gives +1750 Power and +3 Luck<br>&middot; Steam Laser Mk. II gives +1250 Power and +2 Luck<br>&middot; Steam Laser Mk. III gives +1500 Power and +2 Luck<br>&middot; Deep Freeze Base and Ultimate Iceberg Base give +665 Power and +9 Luck in Icewing's Lair, Hidden Depths, and The Deep Lair |
  |      Jungle of Dread       |                                                                                                              &middot; Dreaded Totem Trap gives +8500 Power<br>&middot; Dreaded Charm gives +300% Power Bonus                                                                                                               |
  |      Seasonal Garden       |                                                                                               &middot; Seasonal Base gives +18% Power Bonus<br>&middot; Soul Harvester and Terrifying Spider Trap give +10 Luck during Fall                                                                                                |
  |        Sunken City         |                                                                                                                                    Depth Charge Base gives +1000 Power while on a dive                                                                                                                                     |
  |       Town of Digby        |                                                                                  &middot; +30% Power Bonus if Limelight cheese and Mining Charm are equipped<br>(TODO: Only against Digby Dirt Dwellers plus increased BBB/I-BB chance?)                                                                                   |
  |        Toxic Spill         |                                                                        &middot; Washboard Base gives +5% Power Bonus and +5 Luck<br>&middot; Soap Charm gives +5000 Power and +10 Luck<br>&middot; Super Soap Charm gives +8000 Power and +12 Luck                                                                         |
  |        Tribal Isles        |                                                                                     &middot; Tiki Base gives +6 Luck<br>&middot; Tribe power charms (Derr/Nerg/Elub) give +600 Power and +5% Power Bonus in their respective locations                                                                                     |

<div align="right"><a href="#book-table-of-contents">Top</a></div>

---

### :earth_americas: [Map Solver and Mouse Finder](https://tsitu.github.io/MH-Tools/map.html)

> Calculates ideal specific locations to hunt for a given list of mice. Based on Chad's and <a href="http://olf.github.io/mhmapsolver/" target="_blank" rel="noopener">Olaf's</a> solvers.

**Bookmarklet:** Run the `Map` bookmarklet from the "Active Map - Mice" section of the UI.

<p>Copy and paste mice from maps, or type names leaving a line break between each. Press <kbd>Enter</kbd> to autocomplete and <kbd>Tab</kbd> to cycle through autocomplete suggestions. Additionally, autocomplete can be toggled on/off (requires a page refresh to take effect).</p>

"Fused" cheeses (e.g. Gouda/Brie/Swiss) will often show up in results. This indicates that attraction proportions from the underlined cheese has been extrapolated due to low sample sizes.

| Type of Attraction Rate | Description                                                             |
| ----------------------- | ----------------------------------------------------------------------- |
| Raw                     | Shown for individual mice                                               |
| Total                   | Sum for a specific location, sublocation, cheese, and charm             |
| Weighted                | Same as Total AR, but with baseline cheese attraction rates factored in |<commit_msg>Minor README text update<commit_after># :mouse: [MH Tools](https://tsitu.github.io/MH-Tools/) &middot; [![Build Status](https://travis-ci.com/tsitu/MH-Tools.svg?branch=master)](https://travis-ci.com/tsitu/MH-Tools)

Suite of JavaScript tools for the browser game [MouseHunt](https://www.mousehuntgame.com/).

Ongoing forum discussion thread [here](https://www.mousehuntgame.com/forum/showthread.php?132397-MouseHunt-Tools-by-tsitu&goto=newpost).

Feel free to post your questions, comments, or concerns there (or [here](https://github.com/tsitu/MH-Tools/issues) on GitHub).

## :book: Table of Contents

* [Instructions](#instructions)
  * [General Tips](#thought_balloon-general-tips)
  * [Bookmarklets](#bookmark-bookmarklets)
    * [Browser Installation Tips](#-browser-installation-tips)
    * [Chrome](#user-content-chrome)
    * [Firefox](#user-content-firefox)
    * [Edge / IE](#user-content-edge)
    * [Safari](#user-content-safari)
  * [Catch Rate Estimator](#straight_ruler-catch-rate-estimator)
    * [Sample Size Score](#-sample-size-score)
    * [Special Catch Rate Effects](#-special-catch-rate-effects)
  * [Map Solver and Mouse Finder](#earth_americas-map-solver-and-mouse-finder)
    * [Cheese Filters](#-cheese-filters)
  * [Best Setup](#trophy-best-setup)
  * [Marketplace Analyzer](#chart_with_upwards_trend-marketplace-analyzer)
  * [Crown Solver](#crown-crown-solver)
  * [Crafting Wizard](#hammer-crafting-wizard)
  * [Trap Setup Powers](#mag-trap-setup-powers)
    * [Worksheet](#-worksheet)
  * [CRE Tabs](#bookmark_tabs-cre-tabs)
* [Developers](#developers)
  * [Build and Run](#construction_worker-build-and-run)
  * [Populations](#clipboard-populations)
  * [Coding Style](#barber-coding-style)
* [Miscellaneous](#miscellaneous)
  * [Useful Links](#arrow_down-useful-links)
  * [Thanks](#heart_decoration-thanks-to)
* [License](#license)

## Instructions

### :thought_balloon: General Tips

Several tools make use of mottie's [tablesorter](https://mottie.github.io/tablesorter/docs/#Introduction) plugin, which includes useful additional features such as multi-column sorting with <kbd>Shift</kbd> or special characters for [filtering](https://mottie.github.io/tablesorter/docs/example-widget-filter.html).

We recommend installing [Jack's extension](https://github.com/DevJackSmith/mh-helper-extension#mousehunt-helper-extension) if you have not already. It records valuable information from **active hunts** only. Most of the data supporting recent updates has been sourced from Jack's publicly accessible [database backups](https://keybase.pub/devjacksmith/mh_backups/).

_Disclaimer:_ Newer tools like 'Crafting Wizard' and 'Trap Setup Powers' may be incompatible with outdated or feature-constrained browsers such as Internet Explorer, Opera Mini, Samsung Internet, and Blackberry Browser. Older tools may also become incompatible with these browsers at any point.

### :bookmark: Bookmarklets

Bookmarklets are pieces of JavaScript code that are saved as a bookmark in the user's browser, enabling them to interact with webpages on the fly. We provide 9 different bookmarklets: Catch Rate Estimator, Map Solver, Best Setup: Load Items, Best Setup: Fields, Markeplace Analyzer, Silver Crown Solver, Crafting Wizard, Powers: Worksheet and the all-in-one Auto-Loader. They are each available on their corresponding tool's page.

Using the Auto-Loader is recommended because it automatically grabs the latest version of each bookmarklet without having to manually update.

You **must** be on the official [mousehuntgame.com](https://www.mousehuntgame.com/) website for these bookmarklets to work. Same-origin policy blocks access to DOM elements and requests to server endpoints while playing in Facebook's `<iframe>`.

_Note:_ The process of using a bookmarklet in mobile browsers can vary. For example, in Chrome for Android, you must type the first few characters of the bookmarklet's name in the address bar and click it from there for the code to take effect.

|    Bookmarklet    | Functionality                                                                                                                                                                                                                                        |
| :---------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|        CRE        | Automatically fills in the Catch Rate Estimator with your location, sublocation, cheese, charm, weapon, base, and more                                                                                                                               |
| Setup: Load Items | Automatically loads your owned weapons, bases, and charms into Best Setup                                                                                                                                                                            |
|   Setup: Fields   | Automatically fills in Best Setup with your location, sublocation, cheese, charm, and more                                                                                                                                                           |
|     Analyzer      | Generates a pop-up dialog that allows you to download your entire Marketplace transaction history and send it to the tool                                                                                                                            |
|        Map        | Automatically fills in the Map Solver's mouse name `textarea` with all of the remaining uncaught mice on your Active Map                                                                                                                             |
|       Crown       | Automatically fills in the Crown Solver's `textarea` with the 50 Bronze Crown mice on your 'King's Crowns' page that are closest to reaching Silver status (100 catches)<br><br>_Note:_ Favorited Bronze mice will be included regardless of catches |
|     Crafting      | Automatically loads your 'Crafting Table' materials into Crafting Wizard                                                                                                                                                                             |
| Powers: Worksheet | Generates a pop-up dialog that allows you to select a mouse group/subgroup to target with your current trap setup                                                                                                                                    |
|      Loader       | Generates a pop-up dialog that gives you access to the latest versions of each bookmarklet                                                                                                                                                           |

<div align="right"><a href="#book-table-of-contents">Top</a></div>

#### &sect; Browser Installation Tips

Drag the blue bookmarklet link to your browser's bookmarks bar. If that doesn't work, try the following manual instructions. These concepts apply to other browsers (including mobile), but specific steps may vary.

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/chrome_12-48/chrome_12-48_32x32.png" alt="Chrome" id="chrome"><br>
_Google Chrome_

1. Bookmark an arbitrary page and give it a memorable name like 'CRE' or 'Auto-Loader'
1. Copy the bookmarklet code by right-clicking its link and selecting `Copy link address`
1. Right-click on your newly created bookmark and select `Edit...`
1. Paste the bookmarklet code into the `URL` field and hit `Save`

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/firefox_23-56/firefox_23-56_32x32.png" alt="Firefox" id="firefox"><br>
_Mozilla Firefox_

1. Right-click on the bookmarklet link, select `Bookmark This Link`, and name it accordingly

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/edge/edge_32x32.png" alt="Edge" id="Edge"> <img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/internet-explorer_9-11/internet-explorer_9-11_32x32.png" alt="Edge" id="edge"><br>
_Microsoft Edge / Internet Explorer_

1. Bookmark an arbitrary page and give it a memorable name like 'CRE' or 'Auto-Loader'
1. Copy the bookmarklet code by right-clicking its link and selecting `Copy link`
1. Go to 'Hub -> Favorites', right-click on your newly created bookmark and click `Edit URL`
1. Paste the bookmarklet code into the text field and hit <kbd>Enter</kbd> to save
1. If that doesn't work, there is a third-party application called [EdgeManage](http://www.emmet-gray.com/Articles/EdgeManage.html) that claims to add a lot of missing features for managing Favorites - please use at your own discretion
1. Internet Explorer 11 allows you to drag bookmarklets directly to your favorites bar, or right-click and choose `Add to favorites`. However, it doesn't seem to support certain JavaScript features that enable the bookmarklets to run properly

<br><img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/45.3.0/archive/safari_1-7/safari_1-7_32x32.png" alt="Safari" id="safari"><br>
_Apple Safari_

1. Bookmark an arbitrary page and give it a memorable name
1. Right-click on the bookmarklet link and select `Copy Link`
1. Right-click on the newly created bookmark, select `Edit Address`, paste into the text box, and click `Done`

<div align="right"><a href="#book-table-of-contents">Top</a></div>

---

### :straight_ruler: [Catch Rate Estimator](https://tsitu.github.io/MH-Tools/cre.html)

> Calculates catch rate estimates along with points, gold, minimum luck and more.

**Bookmarklet:** Run the `CRE` bookmarklet from basically any page on the MH website.

|           Descriptor           |  Per  |    Sum or Average (bottom row)    |
| :----------------------------: | :---: | :-------------------------------: |
|        Attraction Rate         | Mouse |        Sum for this setup         |
|           Catch Rate           | Mouse |      Average for this setup       |
| Catches / 100 hunts (AR \* CR) | Mouse |         Sum per 100 hunts         |
|              Gold              | Catch |         Average per hunt          |
|             Points             | Catch |         Average per hunt          |
|         Tourney Points         | Catch |         Average per hunt          |
|            Min Luck            | Mouse | Highest for this particular setup |
|              Rank              | Catch |             Per hunt              |

<br>

#### &sect; Sample Size Score

An indicator of the quality and accuracy of a specific setup's data based on its sample size and the number of mice in its attraction pool. Setups are separated by locations, sublocations, cheeses and occasionally charms (if they have attraction-altering effects i.e. Warpath Warrior Charm in Waves 1-3 of Fiery Warpath). If you have a charm selected that doesn't affect a setup's mouse population pool, its corresponding "No Charm" data is displayed, since they are equivalent.

Previously, the tool displayed a flat sample size number with a rating assigned to it, which looked like `Sample Size: 300 (bad)` or `Sample Size: 100000 (excellent)`. This format was misleading because it didn't encode important contextual information. The current scoring scheme takes into account factors such as number of mice in a particular setup, 95% confidence levels, and relative margins of error. It combines and normalizes these factors into a single number, capped at 100.

_Note:_ Certain setups may have low scores or even no sample size data attached to them. This could be because: (1) the data was extracted from HornTracker before we decided to start keeping track of sample sizes, (2) there aren't enough recorded hunts for that setup in Jack's database, (3) our population fetching scripts need to be re-run.

#### &sect; Special Catch Rate Effects

The following special effects _are included in catch rate calculations_ for both CRE and Best Setup

* Final Catch Rate Modifiers

  |            Name             |                                                                      Modifier                                                                       |
  | :-------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: |
  | Anniversary Weapon variants |                                                           Up to 10% increased catch rate                                                            |
  |        Bounty Hunter        |                                                 100% catch rate with Sheriff's Badge Charm equipped                                                 |
  |          Fort Rox           | &middot; 50% increased catch rate when upgrades are level 2 or 3<br>&middot; 100% catch rate on Nightmancer and Nightfire when upgrades are level 3 |
  |    Ultimate Anchor Charm    |                                                   100% catch rate while on a dive in Sunken City                                                    |
  |       Ultimate Charm        |                                                             100% catch rate everywhere                                                              |
  |  Zugzwang's Ultimate Move   |                                 50% increased catch rate in Seasonal Garden & Zugzwang's Tower when amplifier > 0%                                  |
  |     Zurreal the Eternal     |                                                   0% catch rate without Zurreal's Folly equipped                                                    |

* Special Bonuses & Effects

  |               Name               |                                                                Effect                                                                 |
  | :------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: |
  |    Dragonbane Charm variants     |                                             +300/600/900% Power Bonus on Dragon-type mice                                             |
  |           EMP400 Charm           |                                                 +25000 Power with Fusion Fondue armed                                                 |
  |     Golem Guardian variants      | &middot; Charge levels are set in CRE and carry over to Best Setup<br>&middot; +6 Luck when equipped with Glowing Golem Guardian Base |
  |         King Grub/Scarab         |                                   Salt level applies a logarithmic function to decrease mouse power                                   |
  | Obvious Ambush / Blackstone Pass |                                    +1800 Power on corresponding side, -2400 Power on opposite side                                    |
  |          Pawn Pinchers           |                              +10920 Power on corresponding Pawn, -60 Power and -5 Luck on opposite Pawn                               |
  |       Physical Brace Base        |                                         25% Power Bonus when equipped with a Physical weapon                                          |
  |     Polluted Charm variants      |                              +4/6/10/15 Luck when equipped with Polluted Base or Refined Pollutinum Base                              |
  |        Rook Crumble Charm        |                                           300% Power Bonus on Rook mice in Zugzwang's Tower                                           |
  |       Super Warpath Charms       |                                               +50 Power on corresponding Warpath groups                                               |
  |          Taunting Charm          |                                            Only applies Rift Set bonuses on WWRift bosses                                             |

* Location Specific Effects

  |          Location          |                                                                                                                                                           Effect                                                                                                                                                           |
  | :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
  |       Claw Shot City       |                                                                               Claw Shot Base gives +1000 Power when equipped with a S.L.A.C. variant, and +2500 Power when equipped with both a S.L.A.C. variant and a Cactus Charm variant                                                                                |
  |       Fiery Warpath        |                                                                                    &middot; Flamebane Charm gives +150 Power<br>&middot; Warden Slayer Trap gives +2500 Power and +2500% Power Bonus when equipped in Wave 4 or Portal                                                                                     |
  |          Fort Rox          |                                                                                                                    Nightlight Charm gives +1/3/5/7/9/12/15% Power Bonus depending on the stage of night                                                                                                                    |
  |  Gnawnian Express Station  |                                                                                           Supply Grabber, Bandit Deflector, and Engine Doubler give +1500 Power in Supply Depot, Raider River, and Daredevil Canyon respectively                                                                                           |
  | Iceberg & Slushy Shoreline | &middot; Steam Laser Mk. I gives +1750 Power and +3 Luck<br>&middot; Steam Laser Mk. II gives +1250 Power and +2 Luck<br>&middot; Steam Laser Mk. III gives +1500 Power and +2 Luck<br>&middot; Deep Freeze Base and Ultimate Iceberg Base give +665 Power and +9 Luck in Icewing's Lair, Hidden Depths, and The Deep Lair |
  |      Jungle of Dread       |                                                                                                              &middot; Dreaded Totem Trap gives +8500 Power<br>&middot; Dreaded Charm gives +300% Power Bonus                                                                                                               |
  |      Seasonal Garden       |                                                                                               &middot; Seasonal Base gives +18% Power Bonus<br>&middot; Soul Harvester and Terrifying Spider Trap give +10 Luck during Fall                                                                                                |
  |        Sunken City         |                                                                                                                                    Depth Charge Base gives +1000 Power while on a dive                                                                                                                                     |
  |       Town of Digby        |                                                                                  &middot; +30% Power Bonus if Limelight cheese and Mining Charm are equipped<br>(TODO: Only against Digby Dirt Dwellers plus increased BBB/I-BB chance?)                                                                                   |
  |        Toxic Spill         |                                                                        &middot; Washboard Base gives +5% Power Bonus and +5 Luck<br>&middot; Soap Charm gives +5000 Power and +10 Luck<br>&middot; Super Soap Charm gives +8000 Power and +12 Luck                                                                         |
  |        Tribal Isles        |                                                                                &middot; Tiki Base gives +6 Luck<br>&middot; Tribe-specific power charms (Derr/Nerg/Elub) give +600 Power and +5% Power Bonus in their respective locations                                                                                 |

<div align="right"><a href="#book-table-of-contents">Top</a></div>

---

### :earth_americas: [Map Solver and Mouse Finder](https://tsitu.github.io/MH-Tools/map.html)

> Calculates ideal specific locations to hunt for a given list of mice. Based on Chad's and <a href="http://olf.github.io/mhmapsolver/" target="_blank" rel="noopener">Olaf's</a> solvers.

**Bookmarklet:** Run the `Map` bookmarklet from the "Active Map - Mice" section of the UI.

<p>Copy and paste mice from maps, or type names leaving a line break between each. Press <kbd>Enter</kbd> to autocomplete and <kbd>Tab</kbd> to cycle through autocomplete suggestions. Additionally, autocomplete can be toggled on/off (requires a page refresh to take effect).</p>

"Fused" cheeses (e.g. Gouda/Brie/Swiss) will often show up in results. This indicates that attraction proportions from the underlined cheese has been extrapolated due to low sample sizes.

| Type of Attraction Rate | Description                                                             |
| ----------------------- | ----------------------------------------------------------------------- |
| Raw                     | Shown for individual mice                                               |
| Total                   | Sum for a specific location, sublocation, cheese, and charm             |
| Weighted                | Same as Total AR, but with baseline cheese attraction rates factored in |
{'fraction_non_alphanumeric': 0.11357534462919928, 'fraction_numerical': 0.012499153938135957, 'mean_word_length': 1.2370041384879378, 'pattern_counts': {'":': 0, '<': 110, '<?xml version=': 0, '>': 118, 'https://': 36, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 463, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2688767', 'n_tokens_mistral': 9769, 'n_tokens_neox': 8960, 'n_words': 3632}