News:

SMF - Just Installed!

Attempt: Developing Web Mids

Started by Joshex, Jan 24, 2023, 01:52 PM

Previous topic - Next topic

Joshex

Hi Rebirth, this is being started as an amatuer project. I really don't know what I'm doing. but I've started anyways.

What am I doing? I have copied some of the broken sourcecode for the old Suckerpunch's hero planner, which was an early webpage version of what would eventually inspire Mids. The goal is to modify, fix and update that code to the current database version of rebirth mids (and eventually others) to produce a page where you can plan your hero/villain builds in any webbrowser without any login. so if you save the page you could even use it offline.


Long story short, there has been some interest in a hero/villain planner that can be used on all devices. The Mids team has plans for such a thing (though not actually a webpage version), but they have expressed it's not going to be in the near future as they are focusing on current mids dev which is an extensive task.

Source: Suckerpunch's sourcecode can be found on archive.org from the old cohtitan page for it. the software at that time required you to be logged in to cohtitan to use it, as you cannot validly login to cohtitan via archive.org and as even if you did so the titan staff have long since taken the necessary files to support suckerpunch's offline; the code is effectively broken. but you can find it here:
view-source:https://web.archive.org/web/20110824142004/http://planner.cohtitan.com/planner
and the broken planner looks like this:
https://web.archive.org/web/20110824142004/http://planner.cohtitan.com/planner

Progress:


New hero crest image for the background. spent all day making it. I added it tot he background in the doc. This image will end up in a zip of images later as more images become necessary so as to save attachment space.
  [attachment id=0 msg=4490]
I have also stripped off the log-in arguments.

Right now: KEYBOARD REPLACED. It's been a long time. I got back into it today and started inputting the secondary power selections. Blaster's secondaries are all selectable (but still no data and no anything else). I'm not going to try to upload the script today, I'll wait till it's done. I'll upload a new image of the state of things so far tomorrow or something.

Also I'm thinking up a better method to do the tabs in the power info/totals table. I'm hesitant on using position:absolute and the z axis to control which tab's content is visible, instead I'm literally building the table from code on tab click. the downside for that is I'll need somewhere to store dynamic power info for the table, based on which power last had the mouse over it or is locked. I'm thinking a hidden object, with the data printed on it. could make a button to make it visible but it'll be multiple tabs worth of info so, a lot of text.

Next: Do the whole process again for power pools and Ancillary/Patron pools. And I plan to rework the power info table and tabs to be on different Z locations with backgrounds on the table cells so the can literally work as real tabs.


After that: Create Power Info Dictionaries and a power info table to display the information from the dictionary on button select or mouse-over.

Even Further: The Chosen Powers Field


Future concerns: the mids team has noted that Javascript's floating point numbers might not be compatible with City of heroes numbers. I have talked with them about this and determined that javascript with floats set to a precision of 4 to 6 decimal places might be able to equate it to CoH's floats.

Because of that there is a chance that even if I can make a visibly working planner in a webpage, the numbers wont be right and it may be worthless.  ::) but whatever lets try anyways.. maybe thats why suckerpunch's was taken down, though I seem to remember it was taken down because the guy that made it did not want to maintain it.


This is an open project, if someone knows more than me and wants to spearhead it, by all means please do so, I look forwards to your leadership lol. I'd share my test page, but I'm afraid people would visit my main page. my site is a joke and so I don't feel comfortable sharing it. a site written by a madman for the purpose of html testing and trolllery.. it was supposed to be a portfolio page.. yeah.. troll+freewebpage to do whatever with = webpage poop. If my progress gets closer to something that looks usable, I will clean the poop off my site and share it.

Meanwhile I'll share the source code so far:
CSS buildmaker.css an incomplete cropping of suckerpunch's planner.css with just the bits I need to make what I have work (and some others I have yet to know if I need them)
body, div, span, ul, li, select { margin: 0; padding: 0.2vw; font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, sans-serif; font-size: 1vw; }

body {
  background: #5095BE
}

#CoXBuildMaker_body { width: 75%; margin: 10px auto 0; position: relative; background: white; border: 1px solid #CCC; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; overflow: hidden;}

select option[value="Hero"]{
  margin: 40px;
  background: #5095BE;
  color:#fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  font-size: 1vw;
}

select option[value="Villain"]{
  margin: 40px;
  background: #990000;
  color:#fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  font-size: 1vw;
}

div.powerSelection {
  border-right: 0.2vw solid #909090;
  border-bottom: 0.3vh solid #909090;
  border-top: 0.3vh solid #F3F3F3;
  border-left: 0.2vw solid #F3F3F3;
}

div.powerSelection:active {
  border-right: 0.2vw solid #F3F3F3;
  border-bottom: 0.3vh solid #F3F3F3;
  border-top: 0.3vh solid #909090;
  border-left: 0.2vw solid #909090;
}

HTML CoXHeroAndVillainBuilder.html (javascript included in page, had to attach it getting too long for the post)
  [attachment id=3 msg=4490]

loadPowerSetsForLoop.js (Short Version) attached  [attachment id=1 msg=4490]
primaryPowersList.js attached  [attachment id=2 msg=4490]

As always any help in this project is appreciated. any final outcome will be posted in source (or source documents) here, by someone. and available to place as a page on any city of heroes website.

I don't own any rights to suckerpunch's nor did I get expreess permission to use their code, but I've changed it so drastically that it's vaguely resembling their code anyways, and it's abandonned. I'm not sure if this can be licensed, the plan is to GNU GPL it = Free to use, modify and distribute.

I'll get back into this one of these days here soon. just catching up on a backlog of stuff.



Janu/27/2025

Today I worked on the Secondary Powersets powerlists dictionary. I'm down to the last 5 ATs in it, Mastermind, Dominator, Corruptor, Arachnos Widow, and Arachnos Soldier. I think the code for the arachnos ATs needs to be different. from what I remember I think I set the secondaries in the Primary powerset power list script, so in this case I might not have to program anything else for those 2 at all, so it might be just Mastermind, Dominator, and Corruptor left.

After that is Pool powers and coding it so you can only have one copy of any given pool. Then ancillaries.

I messed with math recently and we decided on a course of action for maintaining number accuracy. there may be inaccuracies in the first version, or maybe there wont be. I know some methods for float handling so we'll deal with that if we need to.


The power info table has been successfully tabbed using a z-index position: absolute, however it was kinda frustrating and only worked after I closed my browser and reopenned it, so there may be some bugs/ headaches to deal with there. But for now it's working and I'm hessitant to touch it though I do need to touch it as I only made 2 tabs.

this project is getting closer. But the BIG job is yet to come. Power Stat Dictionaries.. those will be a tedious chore of data entry. any help will be appreciated once I define how they'll look, it will take no knowledge of coding to help, simple text and number value entry.
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).

brw316

Hey, Joshex! Glad to see someone working on this project for the community. I have tossed a link on the Discord with a small description of the project to give it some more visibility. Good luck!

Joshex

#2
OK decided to do some work on this, Redlynne suggested I add a hash feature so that I could eventually add build details directly into the URL. I thought it was a good idea so after some testing the following javascript will be used:

window.location.href

this gets the current page URL, I double checked that it grabs the changed URL as well with a simple console.log(window.location.href) before and after the hash statement.

next is

location.hash = "whatever you want to put after the URL"

from here I can work with the information, so if I wanted to list out everything in a hero/villain build as text I could do so. it's as simple as .split()ting the string like .split("#")[1].

that information was fairly easy to figure out.  However I'm not at the point where I can even construct much of a build doc at this point. I could potentially do so upto archetype>primary powerset>chosen primary powers, secondary powerset>chosen secondary powers. but I still have yet to finish the master dictionary of power values, and haven't even gotten to enhancements yet.

When the whole web mids thing is functional, I would need to figure out the data format used for mids forum posts and use that system for making the URL hash.

Originally I planned to have the user able to store the information in a cookie and output/readfrom a txt file in a specified folder. but I haven't even gotten to that yet.

anyways at least the hashing will be possible.
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).

Redlynne

Quote from: Joshex on Dec 10, 2024, 12:15 AMRedlynne suggested I add a hash feature so that I could eventually add build details directly into the URL.

I just have too much experience with the (much simpler!) World of Warcraft online talent calculators, where the build details are encoded into the URL directly as a hash code.

Here are some examples used for a vanilla WoW talent calculator:
  • Classic DB Talent Calculator LINK (website is a .ch domain, in case that's an issue for anyone)
  • Warrior (11/5/35) LINK
  • Rogue (12/16/23) LINK
  • Druid (35/11/5) LINK
  • Priest (21/25/5) LINK
  • Hunter (13/0/38) LINK
  • Warlock (15/31/5) LINK
  • Mage (33/15/3) LINK
  • Paladin (11/23/17) LINK
  • Shaman (31/0/20) LINK


This then gives an idea of how dynamically updating the hash code in the URL works from an end user perspective (just copy the URL into a bookmark on your browser or link to it in a post on a forum). It makes things VERY User Friendly™ for someone who wants to make use of the online tool ... no fuss, no muss.

Of course, the HARD part becomes working out the encoding pattern for creating the hash code ... and at this point I'm not even sure that the current generation of Mids' Reborn is using an optimized parsing of data pointers for the purpose. I wouldn't be at all surprised if a refactor from scratch approach to the issue would be superior (especially if intentionally designed to be extensible to account for future developments and additions), rather than trying to retain backwards compatibility with the Mids' Reborn application, including trying to maintain congruency between app and web page calculator going forward (so common hash coding for both). We've already encountered backwards compatibility issues within Mids' itself, such that newer versions are not compatible with old version code hashes (and vice versa) ... so I'm thinking that trying to reverse engineer the Mids' code hash and stay congruent with it going forward is not necessarily the best plan from a code longevity standpoint. Hence why I'm thinking that a complete refactor into a "better" hash code parsing method that is more suitable for a web page build calculator would be the superior choice to make, rather than dragging forward (and on into the future) whatever it is that Mids' is doing, specifically.


Verbogeny is one of many pleasurettes afforded a creatific thinkerizer.

Joshex

#4
Quote from: Redlynne on Dec 10, 2024, 04:42 PM
Quote from: Joshex on Dec 10, 2024, 12:15 AMRedlynne suggested I add a hash feature so that I could eventually add build details directly into the URL.

I just have too much experience with the (much simpler!) World of Warcraft online talent calculators, where the build details are encoded into the URL directly as a hash code.

Here are some examples used for a vanilla WoW talent calculator:
  • Classic DB Talent Calculator LINK (website is a .ch domain, in case that's an issue for anyone)
  • Warrior (11/5/35) LINK
  • Rogue (12/16/23) LINK
  • Druid (35/11/5) LINK
  • Priest (21/25/5) LINK
  • Hunter (13/0/38) LINK
  • Warlock (15/31/5) LINK
  • Mage (33/15/3) LINK
  • Paladin (11/23/17) LINK
  • Shaman (31/0/20) LINK


This then gives an idea of how dynamically updating the hash code in the URL works from an end user perspective (just copy the URL into a bookmark on your browser or link to it in a post on a forum). It makes things VERY User Friendly™ for someone who wants to make use of the online tool ... no fuss, no muss.

Of course, the HARD part becomes working out the encoding pattern for creating the hash code ... and at this point I'm not even sure that the current generation of Mids' Reborn is using an optimized parsing of data pointers for the purpose. I wouldn't be at all surprised if a refactor from scratch approach to the issue would be superior (especially if intentionally designed to be extensible to account for future developments and additions), rather than trying to retain backwards compatibility with the Mids' Reborn application, including trying to maintain congruency between app and web page calculator going forward (so common hash coding for both). We've already encountered backwards compatibility issues within Mids' itself, such that newer versions are not compatible with old version code hashes (and vice versa) ... so I'm thinking that trying to reverse engineer the Mids' code hash and stay congruent with it going forward is not necessarily the best plan from a code longevity standpoint. Hence why I'm thinking that a complete refactor into a "better" hash code parsing method that is more suitable for a web page build calculator would be the superior choice to make, rather than dragging forward (and on into the future) whatever it is that Mids' is doing, specifically.

encoding the data can be in whatever format we want, that's not an issue, I just got a new hardrive installed and copied most of my files over, looks like I didn't lose anything that important. but I'm rebuilding all my settings and such. bonus? my nvidia graphics card seems to work again now! ~for now~. but once I get .net 6 installed again I'll reinstall mids and check if they even do an "export to forum post" feature. if they do, then we'll just use that as the hash system. reading from the hash in the URL will then be in a start-up script on page load if # is present and there's a valid build after it, otherwise "error message"

for a lesson on this you'll have to learn string/text manipulation tactics, it's really simple stuff

strings are text, in code a string is text wrapped in "" or '' or is formatted into a string using a type converting codeword like str() but strings can be indexed by character by doing "text string"[index] like
"textstring"[0] means (the first letter "t") it can also be indexed by a range of letters, so if the primary powerset was always represented by 2 characters 1 after the first character we'd do "insert build string here"[1:3], that'd return the 2 characters we want.

so, as long as you can figure out where something is in the string you can then test for it in a simple javascript if statement: if ("insert build string here"[1:3] == "ns"){your code to run here} then you just have one if statement and bend for each section of the possible build text. and maybe a statement to check if it doesn't match any expected combination and then output a visible error prompt "build failed to load 'ns' is an unknown primary powerset"

strings can be searched as well, if ("string" in "my string"){your code here}

so once I understand the mids export to forum post text system I can write a reader no problem. then it's just a case of telling the different parts of the page what to put where and what text and values to give them.

writing to the same format is fairly easy as well. it's mostly just appending a bunch of indexes of the url string.

so you change something in your build and that button or div or whatever will run a script to update the url feild's hash.

it'd just be tedious work to put it together. but that's no issue for me.
I think I have my neocities sites usernames and passwords saved so I should be able to pick-up right where I left off. but I have other things to set-up before I get back to any real coding work lol.. can't even play city of heroes again till I reinstall .net and mess with getting tequila set-up and such. I might be able to just copy the launcher to my desktop as the CoH install folder is in the exact same drive and folder as on the old harddrive. but if it needs registry entries then I'll have to do a new install.... let me just check that the costume files and mission files are actually there. - yep all good. surprisingly I lost close to no data.



EDIT:
at current mids forum export feature does not work. it does give build links which could be used if I knew the data format they represent. I know it's hex, I assume 2 hex characters represent each various component of a build (which is ironically what I was thinking would be smart to do).

Edit 12/19/24 I will be working on this for the rest of the week, my computer set-up is done everything is installed and back to normal. and my game dev work for the week was just to review what will be necessary for the remaining menu buttons to work in my puzzle game. so I'm done with that.

this week's work on webmids will be similar, mostly review so I understand what I was doing and where things are. I'll likely focus on totals tabs.

Edit: Totals table tabs tested, I had the backgrounds of the totals table transparent prior to this so the background image could show through. that will no longer be possible when using position: absolute and z-index for tabbing, but the benefit is I wont have to rebuild the entire totals table in javascript every time a tab is clicked lol. it also means I no longer need hidden <p>'s with data stored in them, now data will be input in permanent table entries, which makes everything easier. after I setup the other tabs tables and set specific ids for each element and make the tab buttons work, then I'll have to get back to the tedious grueling work of the power info dictionary, which will be one of the main databases to support things and give this web-page it's first breaths returning actual numbers.

lol secondaryPowersList.js only has blaster and controller entries atm. I know I finished that one, or at least I think I did.. I'll check my backups and see if I have a more complete version. if not I'll need to fill that in, again.

nope I don't have another copy, maybe I never finished it? oh well, it's something to do, can probably finish filling in the lists tonight, the code to make the buttons may need some reworking. lesson for would be developers, "backup backup backup, after working on something, when you think you have a backup of something already, back it up again just to be sure."

I finished up the entries in Guardian, Brute, and Stalker, and am currently upto Mastermind secondaries. this work I'm doing really could be done by anyone, it's simple text data entry. if anyone would like to help, let me know. I'll need a lot more help with text data entry for pool and ancillary powers, and all the power dictionaries once I define their structure.
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).

Joshex

#5
Currently I'm working through Guardian, there's alot less copy pasta I can do from primaries here as the sets are unique.

for anyone who wants to help with text input, this is the dictionary system I'm using:

secondaryDict['Guardian'] = {};
  secondaryDict['Guardian']['Atmospheric_Composition'] = ["Charged Armor", "Gale Winds", "Grounding Shield", "Static Shield", "Steamy Mist", "Mass Energise", "Snow Storm", "Power Sink", "Freezing Rain"];
  secondaryDict['Guardian']['Atmospheric_CompositionValues'] = ["Charged_Armor", "Gale_Winds", "Grounding_Shield", "Static_Shield", "Steamy_Mist", "Mass_Energise", "Snow_Storm", "Power_Sink", "Freezing_Rain"];
  secondaryDict['Guardian']['Dark_Composition'] = ["Dark Embrace", "Twilight Grasp", "Tar Patch", "Obsidian Shield", "Murky Haze", "Shadow Fall", "Cloak of Fear", "Soul Absorption", "Howling Twilight"];
  secondaryDict['Guardian']['Dark_CompositionValues'] = ["Dark_Embrace", "Twilight_Grasp", "Tar_Patch", "Obsidian_Shield", "Murky_Haze", "Shadow_Fall", "Cloak_of_Fear", "Soul_Absorption", "Howling_Twilight"];
  secondaryDict['Guardian']['Energy_Composition'] = ["Kinetic Shield", "Siphon Power", "Power Shield", "Entropy Shield", "Inertial Siphon", "Mass Energize", "Kinetic Dampening", "Transference", "Fulcrum Flip"];
  secondaryDict['Guardian']['Energy_CompositionValues'] = ["Kinetic Shield", "Siphon Power", "Power Shield", "Entropy Shield", "Inertial Siphon", "Mass Energize", "Kinetic Dampening", "Transference", "Fulcrum Flip"];

to explain it so it's simple:
secondaryDict['Guardian'] = {};

secondaryDict is the name of the dictionary
['Guardian'] is a "key" in that dictionary, Keys are a name that can be searched and that name returns any sub-keys or data, so if I printed out secondaryDict['Guardian'] right now I'd get a list of subkeys: ["Atmospheric_Composition", "Atmospheric_CompositionValues", "Dark_Composition", "Dark_CompositionValues", "Energy_Composition", "Energy_CompositionValues"].

I use ' which is a "single quote" and also called an apostrophe like in "there's" or "it's", I tend to reserve single quotes ' rather than double quotes " for key names, where " double quotes are reserved for "strings of text". it makes reading the code easier.

we wont get into combining the quote types as it will not be necessary for keying or data entry.

"= {};"
this tells it that secondaryDict['Guardian'] is a dictionary data type. = means this variable name = what I put after it, {} means dictionary, ";" means "end argument" it essentially tells it not to continue looking for more information to compute for this line on any further lines. it's like a javascript period meaning end of sentence.

fun lesson for those who don't know: dictionary keys can be written like this {keyname: value} so in example {"HP": 1200}, or {"Guardian": ["Atmospheric_Composition", "Atmospheric_CompositionValues", "Dark_Composition", "Dark_CompositionValues", "Energy_Composition", "Energy_CompositionValues"]}

"secondaryDict['Guardian']['Atmospheric_Composition'] = ["Charged Armor", "Gale Winds", "Grounding Shield", "Static Shield", "Steamy Mist", "Mass Energise", "Snow Storm", "Power Sink", "Freezing Rain"];"

this calls the dictionary named secondaryDict and grabs the value of guardian then from that list of values it specifies further that I only want to grab the value of "Atmospheric_Composition"

the "=" here is telling it that I wish to set the value for the key "Atmospheric_Composition" whatever is following it will be the key it returns when called.

"[];"

this is a "list" or "array", with an ; end sentence telling it "go no further for values of 'Atmospheric_Composition'".

["Charged Armor", "Gale Winds", "Grounding Shield", "Static Shield", "Steamy Mist", "Mass Energise", "Snow Storm", "Power Sink", "Freezing Rain"]

this list contains the power names as strings "" separated by commas , . this is as far as we are going at current, just inputting power names, in level order for the Archetype.


what do these lists do?

below the dictionary in the actual script I have code which checks a drop-down menu value in the webpage and then based on the name of that drop-down menu option it will return the list of powers with that powerset name.
then for each power in the list, in order, it creates a button in the space below the dropdown menu. these buttons will eventually allow users to select their powers.

what about the keys that say the powerset name followed by "Values"?

secondaryDict['Guardian']['Atmospheric_CompositionValues'] = ["Charged_Armor", "Gale_Winds", "Grounding_Shield", "Static_Shield", "Steamy_Mist", "Mass_Energise", "Snow_Storm", "Power_Sink", "Freezing_Rain"];

it's almost the same as the other list, but here there's no spaces, dashes, nor apostrophes in power names. this is important because these texts are used to create object IDs, object IDs are like names which can be used to select an element in the webpage document to then apply some action or code, so giving each button a unique ID is important. however IDs throw errors with things like spaces, -, ', in their name, the errors just cause the code to stop and the button will just be skipped(it wont make the button if you do "Executioner's Strike" or "X-ray Beam" as the ID name, instead we'd do "Executoners_Strike" removing the apostrophe and replacing the space with _ underscore, and "Xray_Beam" for the names of the IDs. this means creating a second list with the power names which I named 'powerset_nameValues'


that's what I'm doing right now. I've completed the entire primary powerset dictionary and the code to create primary power buttons.

for the secondary dictionary I've done blaster, controller, scrapper, defender, tanker, peacebringer and warshade, guardian, brute, and stalker. I still have the rest of the "villain" ATs secondary sets' to input. so that's where I am if people want to help. for me other than aracnos secondaries the rest will be alot of copy-pasta from other AT's primaries or secondaries with minor revisions(usually power availability order differs between ATs).
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).

Joshex

#6
OK so I decided to jump ahead and test math, Javascript cannot represent any number (int or decimal/float) longer than 17 digits,
so
12345678901234567
or
1.2345678901234567
or
12.345678901234567
or
123.45678901234567

you get the Idea, any number with that many digits just moves the decimal. and any number longer than that gets it's last number rounded up based on whats after it.

so
123.45678901234567890123
gets evaluated as
123.45678901234568

this means there may be inaccuracies even if I do convert floats to strings and int them then mathematically operate on them.

the most worrying calc would probably be determining duration of mez where mez protection is ((0.5*the number) / 10,000)+0.5*the number as that would leave only 12 trailing digits.

naturally most displayed numbers are 2 to 3 decimals, and this page is indeed just for user eyes to see "display" numbers that they'd expect to see displayed in game from a player point of view, so it shouldn't be that bad. however there is room for fault. especially because  I'll have to .round() the numbers to 2 or 3 decimals.  I just dealt with a similar issue in my game, but there there's no upper digit limit. there I used the python Decimal module. however the javascript Decimal modual is not native and I tried importing it and it gave an export error which means it's broken or written in neoJS.

I mean yeah I could probably spend a day looking it over and determining their methods (as I have the sourcecode) then simply applying those methods in my code, I did do some of that today, the js decimal converts a number into a string then operates on it without converting it back to an int or float, this way they can do the math digit by digit the same way you'd do manual math and deal with single digit integers as input. I suspect heavy use of number.valueOf() to cut off unreal float trails before stringing them up again and adding things back together, manually.

this gets rid of the 17 text-character/digit limit as strings can be any size, with-in reason. I doubt we'll need 50,000 decimals.

it does add extra workload, but I'll get to it eventually.
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).

Redlynne

Quote from: Joshex on Jan 26, 2025, 10:30 PMJavascript cannot represent any number (int or decimal/float) longer than 17 digits

Just as a Rule Of Thumb™ ... I'm thinking that 10 significant digits ought to be "sufficient" for most calcluations ... and that if necessary you might want to limit to 15 significant digits in all circumstances. The motivation behind that notion is that 15 significant digits gives you a "2 digit buffer" below the limit of 17.


Verbogeny is one of many pleasurettes afforded a creatific thinkerizer.

Joshex

Quote from: Redlynne on Today at 03:22 PM
Quote from: Joshex on Jan 26, 2025, 10:30 PMJavascript cannot represent any number (int or decimal/float) longer than 17 digits

Just as a Rule Of Thumb™ ... I'm thinking that 10 significant digits ought to be "sufficient" for most calcluations ... and that if necessary you might want to limit to 15 significant digits in all circumstances. The motivation behind that notion is that 15 significant digits gives you a "2 digit buffer" below the limit of 17.

sounds good, it will speed up the process, what I'll do is continue as normal and limit the precision to 15. If there are problems where things are totaling up wrong, then I'll make custom long-math calculators.
Ye cannie be dividin by zero! However, ye can be dividing 0.0 by a non-zero! that'd be a float.
always Decimal(str(your float)) before you int( your float).