Add PD2 damage calculator#26
Conversation
There was a problem hiding this comment.
is there a reason for these changes? this and to adding the multiple cors origins to the env? did you run into issues?
There was a problem hiding this comment.
This was added to make local dev across Vite/preview ports easier, not important so ill remove it.
There was a problem hiding this comment.
id rather just have the .txt files committed rather than doing all this with the script to extract them, they can just be manually extracted w/ the mpq extractor that comes with pd2 and then just changed once per season
There was a problem hiding this comment.
as it assumes wherever its run has pd2 installed which is not the case in production
There was a problem hiding this comment.
Changed to having the game files in the repo and a brief doc on how to update those files
There was a problem hiding this comment.
don't believe this is needed given my other requested changes
There was a problem hiding this comment.
this can be removed from the pr
There was a problem hiding this comment.
see my comment about cors and the other comment about txt files
There was a problem hiding this comment.
not needed in pr as per my requeseted changes
| }); | ||
|
|
||
| describe("Complex Scenarios", () => { | ||
| it("should apply ChaseWoof-style Druid skill bonuses from equipped items and inventory charms", () => { |
There was a problem hiding this comment.
is this and the other scripts in this folder still meaningful or were they just for your initial testing and research?
There was a problem hiding this comment.
It can live locally
76eaf23 to
6a0c69e
Compare
coleestrin
left a comment
There was a problem hiding this comment.
re: discord comments, I think i'd prefer to have the stress test script and docs/runbooks folder kept locally on your end, you can just remove them the pr and keep them locally for your future development
| violet: "var(--mantine-color-violet-5)", | ||
| gray: "var(--mantine-color-gray-5)", | ||
| white: "var(--mantine-color-white)", | ||
| physical: "var(--mantine-color-pd2Physical-5)", |
There was a problem hiding this comment.
physical, combinedDamage, and bugReport shouldn't have their own theme colors here, it should be just the core theme colors e.g. red, why do those 3 specific attributes need their own tuple of colors?
There was a problem hiding this comment.
Just to distinguish damage types on the calculator with their own color.
The bug report button was a design choice to have a secondary button color.
There was a problem hiding this comment.
id rather place the physical and combineddamage in stat-colors.ts just with the hex there and i think the bug button color if you're not using red or a different standard color i think it'd be better to just put the color inline in the button styles rather than having it here.
| })); | ||
| export const SEASON_STORAGE_KEY_SUFFIX = `s${CURRENT_SEASON}`; | ||
| export const LEVEL_RANGE_COOKIE_KEY = `levelRange_${CURRENT_SEASON}`; | ||
| export const DAMAGE_CALCULATOR_PAYLOAD_VERSION = "damage-model-v10"; |
There was a problem hiding this comment.
Cache busting for updates
| export * from "./damage"; | ||
|
|
||
| // Extended character types | ||
| export * from "./extended-character"; |
There was a problem hiding this comment.
why do we need this? if we are adding the damage prop to every character response i don't think we'd need this special type since every character would have this so we can just add the damage prop to whatever the current character type is.
There was a problem hiding this comment.
I think the original idea was separation of concerns, but yeah agree it's simplified by integrating into existing response.
| @@ -0,0 +1,40 @@ | |||
| import fs from "fs"; | |||
There was a problem hiding this comment.
is this file not needed anymore since we aren't doing the extraction in the repo anymore?
|
The damage model notes dropdown is not very readable to the average user, maybe handwrite some of those (at least the 2nd line to make it more clear?) to make it more readable or understandable to the average user who will be using it? Also we can include a disclaimer there stating it may not be 100% exact and that if you notice significant deviations from the damage you expect, to file a bug report (with a link to the discord) |
|
|
Does it support bows? The "Weapon" dropdown shows as unarmed for characters with bows. |
|
And thank you again for all your work, this is excellent. |
ad11ec3 to
e882b0b
Compare
e882b0b to
6e45be6
Compare
Summary
docs/runbooks/with runbooks for all source scripts, including repeatable commands forapi/src/scripts/damage-stress-test.ts.AGENTS.md, with a pointer to relevant docs.Verification
Notes
Testing
src/scripts/damage-stress-test.tsScreenshots
Desktop

Mobile

Mini-calc on character page

Risks
In my local environment the auto-generated ads were pretty experience breaking. It would often run a full page video ad below the character selection of the
damage-calculatorpage. It will also sometimes put an add in the middle of the Damage Calculator section beneath the skills/aura selection. Not sure how ads are being handled though, so I didn't address it.