Project 1999

Go Back   Project 1999 > Class Discussions > Melee

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2025, 12:12 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 10,648
Default

I took the liberty of "wikifying" your calculator: https://wiki.project1999.com/Damage_Calculator. It's still quite rough, but it lets people see your work (and I got the sense that you weren't completely finished, so I didn't want to waste a lot of time on polish).

You can see the wiki code at https://wiki.project1999.com/MediaWi...eCalculator.js. As you can see there, I tried to leave your code as is, and just wrap it with form code (so it'd be easy to update with any new versions you make). However, I did have to modify your main function (RunDPSTest), to make it return an object containing the results, rather than logging them to the console (so I could display them).

P.S. It's also untested, so I make no promises about it being bug free [You must be logged in to view images. Log in or Register.]
__________________

Loramin Frostseer <Anonymous>, Hetch<Anonymous>, Tecla <Kingdom>, ...
Check out the "Where To Go For XP/For Treasure?" Guides

Anyone can improve the wiki! If you are new to the Blue or Green servers, you can improve the wiki to earn a "welcome package" of platinum and/or gear! Send me a forum message for details.
Reply With Quote
  #2  
Old 04-07-2025, 04:24 PM
DeathsSilkyMist DeathsSilkyMist is offline
Planar Protector

DeathsSilkyMist's Avatar

Join Date: Jan 2014
Posts: 8,576
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
I took the liberty of "wikifying" your calculator: https://wiki.project1999.com/Damage_Calculator. It's still quite rough, but it lets people see your work (and I got the sense that you weren't completely finished, so I didn't want to waste a lot of time on polish).

You can see the wiki code at https://wiki.project1999.com/MediaWi...eCalculator.js. As you can see there, I tried to leave your code as is, and just wrap it with form code (so it'd be easy to update with any new versions you make). However, I did have to modify your main function (RunDPSTest), to make it return an object containing the results, rather than logging them to the console (so I could display them).

P.S. It's also untested, so I make no promises about it being bug free [You must be logged in to view images. Log in or Register.]
Thanks a bunch for this Loramin! I'll see if I can polish it up a bit. I can modify this right? This is an awesome starting point. I don't have a ton of knowledge on how to do this sort of thing on the wiki, and a working example is the best way to learn.
Quote:
Originally Posted by Snaggles [You must be logged in to view images. Log in or Register.]
Sorry DSM. I thought this was in the other thread.

Kudos for making something folks can use [You must be logged in to view images. Log in or Register.]
No worries!
Reply With Quote
  #3  
Old 04-07-2025, 05:37 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 10,648
Default

Quote:
Originally Posted by DeathsSilkyMist [You must be logged in to view images. Log in or Register.]
I can modify this right?
Unfortunately only wiki admins can edit the Javascript, but if you want to send me a new version I'd be happy to update the wiki with it.
__________________

Loramin Frostseer <Anonymous>, Hetch<Anonymous>, Tecla <Kingdom>, ...
Check out the "Where To Go For XP/For Treasure?" Guides

Anyone can improve the wiki! If you are new to the Blue or Green servers, you can improve the wiki to earn a "welcome package" of platinum and/or gear! Send me a forum message for details.
Reply With Quote
  #4  
Old 04-07-2025, 06:19 PM
DeathsSilkyMist DeathsSilkyMist is offline
Planar Protector

DeathsSilkyMist's Avatar

Join Date: Jan 2014
Posts: 8,576
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
Unfortunately only wiki admins can edit the Javascript, but if you want to send me a new version I'd be happy to update the wiki with it.
Great! I'd say the main thing that needs improving at the moment is the display of the output arrays.

In playground.io the console.log() function shows the array index and the value. For example:

Index 0: 100,
Index 1: 22,
Index 2: 1,
...

The wiki version just shows the value:

100,
22,
1,
...

The wiki calculator should show the array index and value. For the damage arrays, the index is the damage number, and the value is the number of times the damage number was rolled. For the roll array, the index is the dice roll and the value is the number of times it was rolled.

The array variables I am referring to are:

uniqueMainHandDamageValueCountArray
uniqueOffHandDamageValueCountArray
uniquediceRollCountArray

If they were displayed in tables that would probably be easy to read as well.
Last edited by DeathsSilkyMist; 04-07-2025 at 06:30 PM..
Reply With Quote
  #5  
Old 04-08-2025, 02:43 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 10,648
Default

Quote:
Originally Posted by DeathsSilkyMist [You must be logged in to view images. Log in or Register.]
In playground.io the console.log() function shows the array index and the value ...

The wiki version just shows the value:

...

If they were displayed in tables that would probably be easy to read as well.
Those three result fields are now displayed as tables, with a header row of the indices (I assumed you wanted them 1-based and not 0-based).

Again, it's not the most beautiful, so if you want to provide some styling I'll be happy to update ... but at least people can see the indices now.
__________________

Loramin Frostseer <Anonymous>, Hetch<Anonymous>, Tecla <Kingdom>, ...
Check out the "Where To Go For XP/For Treasure?" Guides

Anyone can improve the wiki! If you are new to the Blue or Green servers, you can improve the wiki to earn a "welcome package" of platinum and/or gear! Send me a forum message for details.
Reply With Quote
  #6  
Old 04-08-2025, 02:49 PM
DeathsSilkyMist DeathsSilkyMist is offline
Planar Protector

DeathsSilkyMist's Avatar

Join Date: Jan 2014
Posts: 8,576
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
Those three result fields are now displayed as tables, with a header row of the indices (I assumed you wanted them 1-based and not 0-based).

Again, it's not the most beautiful, so if you want to provide some styling I'll be happy to update ... but at least people can see the indices now.
The tables are looking good! They are 0 based actually. 0 is misses. So one small fix there.

EDIT: Maybe name the 0 column "misses" so people know.
Last edited by DeathsSilkyMist; 04-08-2025 at 02:54 PM..
Reply With Quote
  #7  
Old 04-08-2025, 03:03 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 10,648
Default

Quote:
Originally Posted by DeathsSilkyMist [You must be logged in to view images. Log in or Register.]
The tables are looking good! They are 0 based actually. 0 is misses. So one small fix there.

EDIT: Maybe name the 0 column "misses" so people know.
Fixed.
__________________

Loramin Frostseer <Anonymous>, Hetch<Anonymous>, Tecla <Kingdom>, ...
Check out the "Where To Go For XP/For Treasure?" Guides

Anyone can improve the wiki! If you are new to the Blue or Green servers, you can improve the wiki to earn a "welcome package" of platinum and/or gear! Send me a forum message for details.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:36 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.