Skip to content
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
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
<link rel="stylesheet" href="assets/site.css">
<script src="assets/site.js"></script>

</head><body><a class="skip" href="#main">Skip to content</a><nav class="site"><a class="brand" href="index.html" aria-label="KCD Tools home"><span class="logo">⚒️</span> KCD Tools</a><a href="crafting.html">Crafting</a><a href="farming.html">Farming</a><a href="loadouts.html">Loadouts</a><a href="prices.html">Prices</a><a class="gh" href="https://github.com/xBusterguy/KCDCalculator" target="_blank" rel="noopener noreferrer" title="View the code or report an issue on GitHub">GitHub ↗</a><details class="menu" id="menu"><summary aria-label="Settings: light or dark mode, backup" title="Light/dark mode and backup"><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 3a9 9 0 0 1 0 18z" fill="currentColor"/></svg><span class="mlabel">Settings</span></summary><div class="pop"><button id="theme" type="button" aria-label="Switch light or dark mode">Switch to dark</button><hr><button id="bk" type="button">Back up my data</button><button id="rsb" type="button">Restore from backup</button><input id="rs" aria-label="Choose a backup file" type="file" accept=".json,application/json" hidden><p class="s" id="bkmsg">Saves your prices, orders, favourites, loadouts and settings to a file.</p></div></details></nav><main id="main" tabindex="-1"><div class="tbar"><h1>Page not found</h1></div><div class="layout norail"><div class="mc"><p>That page does not exist. <a href="index.html">Go to the home page</a>, or pick a tool: <a href="crafting.html">Crafting</a>, <a href="farming.html">Farming</a> or <a href="loadouts.html">Loadouts</a>.</p></div></div></main><footer class="site"><div class="sig">Made by <b>Busterguy</b> · Found a bug or have an issue? Contact me on <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg>Discord.</div><div class="sig">Open source: <a href="https://github.com/xBusterguy/KCDCalculator" target="_blank" rel="noopener noreferrer">view the repo</a> or <a href="https://github.com/xBusterguy/KCDCalculator/issues/new/choose" target="_blank" rel="noopener noreferrer">report an issue</a> on GitHub.</div></footer></body></html>
</head><body><a class="skip" href="#main">Skip to content</a><nav class="site"><a class="brand" href="index.html" aria-label="KCD Tools home"><span class="logo">⚒️</span> KCD Tools</a><span class="nl"><a href="crafting.html">Crafting</a><a href="farming.html">Farming</a><a href="loadouts.html">Loadouts</a><a href="prices.html">Prices</a><a href="market.html">Market</a></span><a class="gh" href="https://github.com/xBusterguy/KCDCalculator" target="_blank" rel="noopener noreferrer" title="View the code or report an issue on GitHub">GitHub ↗</a><details class="menu" id="menu"><summary aria-label="Settings: light or dark mode, backup" title="Light/dark mode and backup"><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 3a9 9 0 0 1 0 18z" fill="currentColor"/></svg><span class="mlabel">Settings</span></summary><div class="pop"><button id="theme" type="button" aria-label="Switch light or dark mode">Switch to dark</button><hr><button id="bk" type="button">Back up my data</button><button id="rsb" type="button">Restore from backup</button><input id="rs" aria-label="Choose a backup file" type="file" accept=".json,application/json" hidden><p class="s" id="bkmsg">Saves your prices, orders, favourites, loadouts and settings to a file.</p></div></details></nav><main id="main" tabindex="-1"><div class="tbar"><h1>Page not found</h1></div><div class="layout norail"><div class="mc"><p>That page does not exist. <a href="index.html">Go to the home page</a>, or pick a tool: <a href="crafting.html">Crafting</a>, <a href="farming.html">Farming</a> or <a href="loadouts.html">Loadouts</a>.</p></div></div></main><footer class="site"><div class="sig">Made by <b>Busterguy</b> · Found a bug or have an issue? Contact me on <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"/></svg>Discord.</div><div class="sig">Open source: <a href="https://github.com/xBusterguy/KCDCalculator" target="_blank" rel="noopener noreferrer">view the repo</a> or <a href="https://github.com/xBusterguy/KCDCalculator/issues/new/choose" target="_blank" rel="noopener noreferrer">report an issue</a> on GitHub.</div></footer></body></html>
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ If you add, rename or remove a file the pages load, update the `FILES` list in `

The button in the top bar reads `changelog.json`. Add a new object at the top of `entries` (newest first) with a `date` (`YYYY-MM-DD`), a short `title` and a `changes` list in plain language. Do it in the same pull request as the change. The small dot on the button appears for visitors whenever the top entry is new to them.

## Updating the suggested market prices
## Adding a week of market prices

`assets/market.js` holds a dated snapshot of material prices (groschen) taken from the Auction houses page of the KCDRoleplay account site (the 7-day average sale price). That page needs a game login, so the file is updated by hand: change the numbers under `p` (the keys are the material ids used in `assets/recipes.js`) and set `date`. Prices a visitor types on the Prices page always override these, and a tick box there turns the suggestions off. Groups for the Prices page are set at the top of `assets/pricing.js`; a new raw material lands in “Other” until you add its id to a group.
Once a week, copy the whole **Prices** table from the Auction houses page of the KCDRoleplay account site (it needs a game login) into a text file, then run:

```
node scripts/add-market-week.js week.txt 2026-12-01
```

This stores the week in `assets/market-history.js` (the Market page's data; running it again for the same date replaces that week) and, when it is the newest week, refreshes the suggested prices in `assets/market.js` from the 7-day averages. It prints every price that changed so you can check them before committing.

Odd names on the auction page (another language, for example `cibule` for onions) are fixed in the `alias` list at the top of `assets/market-history.js`; names that do not match a site material by name alone go in its `ids` list. Prices a visitor types on the Prices page always override the suggestions, and a tick box there turns them off.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ Everything runs in your browser. There is no account and nothing is sent anywher
- Show only the prices you set, the ones still missing, or what your current order needs.
- Save named price sets (for example one per town), and share or bring in price lists as plain text.

## Market

![Market page](docs/screenshots/market.png)

- A weekly report from the Kuttenberg auction houses: pieces sold and value traded, the biggest risers and fallers, bargains, goods running low, and observations written from the numbers (including how the week's prices changed recipe costs).
- Every good on the market below it: search, filter by group or by signal, sort, and click a good for its price over the weeks and what is happening to it.
- Each week's auction house table is kept in `assets/market-history.js`, so the trends grow with every update.

## Everywhere

![The guided tour highlighting a feature](docs/screenshots/tour.png)
Expand Down Expand Up @@ -91,19 +99,21 @@ crafting.html crafting cost calculator
farming.html farming efficiency
loadouts.html loadout builder
prices.html the Prices page: every material price in one place
market.html the Market page: weekly report and every good on the auction houses
404.html page not found
assets/site.css the look shared by every page: colours, top bar, title bar, left rail (edit styles here)
assets/site.js shared behaviour: light/dark, backup and restore, loading feedback, offline copy and updates
assets/recipes.js every crafting recipe (edit recipes here only)
assets/market.js suggested material prices from the auction houses (dated snapshot)
assets/market-history.js every weekly auction house snapshot (the Market page reads it)
assets/pricing.js shared price logic: groups, your price vs market, worked-out parts (used by Prices, Farming and the price line)
assets/categories.js how the crafting page groups pieces into types (Swords, Helmets, Furniture...)
assets/tour.js the guided tour (one list of steps, edit the text there)
changelog.json the list shown by the What's new button (add new entries at the top)
sw.js saves the site in the browser for fast repeat visits and offline use
assets/social.png picture shown when a link is shared in Discord or chat
robots.txt, sitemap.xml help search engines find the pages
scripts/ recipe checker, site checker and wiki sync
scripts/ recipe checker, site checker, wiki sync and add-market-week
docs/screenshots/ images used in this README
.github/ workflows, issue forms and pull request template
CONTRIBUTING.md how to fix a recipe
Expand Down
Loading