Stardance Mult Utility
- 5 Devlogs
- 6 Total hours
Tools to visualize and explore the formula that Stardance uses to calculate project multipliers
Tools to visualize and explore the formula that Stardance uses to calculate project multipliers
I added the code walkthrough!
I have mixed feelings about MathML.
I’d never used MathML before, and I was a little worried that it would be extremely complicated and difficult. But really, it was just tedious and verbose. The opaque syntax took a while to get used to, but it’s fairly straightforward.
I added a new section to the site, which renders the formula step-by-step using MathML, substituting the percentile and mult from the other tools.
So when you change the calculator, it also updates the formula. Once I implement the graph, moving the point along the graph will update the calculator and the formula. So it’ll all be unified.
Anyways, now I have a 340+ line Svelte file mostly comprised of a bunch of repetitive MathML tags. Usually I want to refactor really long files, but I don’t think I really can in this case.
I implemented the mult formula!
percentileToMult() function which basically just reimplements the Ruby code in TypeScriptmultToPercentile() function, which performs the exact mathematical inverse of percentileToMult()
Calculator.svelte component and put it on the site, which uses the functions I madeNext I think I’ll work on the annotated Ruby code walkthrough. I also have an idea to use <math> tags to render the steps to compute the formula, which I think would be interesting.
I’ve started working on the site!
You can check it out at https://ethmarks.github.io/sdmu/
I decided that I am going to use SvelteKit, because it gets the job done and I have the most experience with it.
As usual (if you’ve seen any of my other projects, I do this a lot), I’m using a classless CSS stylesheet for the base site styles. I decided to try out Bahunya this time, because it fits the aesthetic that I’m going for.
So far, the only actual functionality is that I embedded the Desmos graph as an iframe. I plan on replacing it with my own graph ASAP, but it’ll stay for now.
Next, I think I’ll work on re-implementing the formula in TypeScript. It’s like 5 operators of basic arithmetic, so it shouldn’t take long at all, though I’ll try to make the code modular so that later I can easily implement the modifiers like blessed and cursed.
Do you wish there was a way to predict how much Stardust your project will get?
Well look no further: @The_Craw made a tool to do that over two months ago: https://www.desmos.com/calculator/ww5xp3gi52. It’s been mentioned literally multiple dozens of times in the Slack.
But do you wish that the graph had more features? No? Well too bad, because I’m making it anyways.
Here are some of the planned features of Stardance Mult Utility:
I don’t know what tech stack I’m going to use. I haven’t thought that far ahead, lol. It’s definitely going to be a web project, and I’ll probably use SvelteKit. but I don’t know what library/component I’ll use to make the interactive graph, because I’ve never done anything like this before, so I’ll have to research it along the way.