HatMouse is a quick and dirty site to show Steam game prizes for events on the Stardew Valley Discord. Currently hosted at https://hatmouse.smapi.io.
Our prizes usually consist of Steam keys from sites like Humble Bundle donated by server staff members. These generally only have a display name (like "Bastion Steam Key"), with no Steam link or other info.
To build the prize list:
-
Install the latest version of LINQPad.
-
If you're not based in the US, connect to a US-based VPN if you want prices consistently in USD.
-
Replace
scripts/game keys.csv
with the list of game keys. It must have these fields (with a header row matching these exact names):field effect Title
The game key name, ideally with text like Steam Key
or(Steam)
removed.Ignored
(Optional) If true
, don't show this game key (e.g. for games which no longer exist).Claimed
(Optional) If true
, the game key is struck out and marked claimed in the prize list.AppId
BundleId
(Optional) Link the game key to a specific store page on Steam. This matches the number in the store page URL after app/
(forOverrideAppId
) orsub/
(forOverrideBundleId
). If both are omitted, the script will use the Steam API to find the matching game if possible (though that doesn't work for DLC or bundles).Price
(Optional) Show this USD price instead of the one fetched from the Steam API (e.g. for unlisted games). Description
(Optional) Show this description instead of the one fetched from the Steam API. You can use HTML in this field (e.g. to link to multiple store pages). StorePageUrl
(Optional) The full URL to the store page to link the game key to, for non-Steam games. The script will still try to match it to Steam to fill in the other info, so you should set the Price
column to match the custom store too.Comments
Arbitrary comments ignored by the code (e.g. to explain why we're overriding fields). -
Open
scripts/build prize list.linq
in LINQPad. -
Click the ▶ button to fetch info from the Steam API.
The fetched data will be saved to two files:
scripts/results.csv
is a CSV file that can be imported into Excel or Google Sheets;config/games.json
is the data that'll be used by the web UI.
This will cache the fetched info. To fetch the latest info instead, delete the scripts/cache
folder.
You can edit config/config.json
to change a few settings:
defaultCurrency
is the main currency for the prices in your prize list. If a prize uses a different currency, it'll be shown in the table (e.g.89.00 HKD
for Hong Kong Dollars).prizeGroups
groups prizes into sections based on the Steam retail price. The key is the display label, and the value is the minimum price. Each game uses the first matching group, and there should always be a final group with a price of0
for any games that don't fit in another group.
You can edit index.html
directly to change the intro text.
The site is just HTML/CSS/JavaScript, so there's many ways to run it. Here is one though:
- Install Visual Studio Code.
- Install the Live Server extension.
- Open the
HatMouse
folder in Visual Studio Code. - Right-click
index.html
and choose Open with Live Server to launch the site in your default browser.
All content is covered by the MIT license, with exceptions:
favicon.ico
is a Stardew Valley game sprite, so it's copyright ConcernedApe.