Jump to content

Welcome to Rune Tips, the first ever RuneScape help site. We aim to offer skill guides, quest guides, maps, calculators, informative databases, tips, and much more to help you get the most from the Massive Online Adventure Game, RuneScape, by Jagex Ltd © 2009.

Report Ad

Welcome to Forum.Tip.It
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Player-Owned Ports: Voyage Calculator


  • Please log in to reply
108 replies to this topic

#101
Eevie
[ Display Name History ]

Eevie

    Chicken Feather

  • Members
  • 8 posts
  • Gender:Not Telling
  • Joined:19 April 2013

Okay, so finally after experiencing problems with this calculator for quite some time now, I've finally decided to come to the forums for help. Okay so a while back probably a few weeks to a month ago, when I used the calculator after I'd type in what was necessary for my voyage and hit calculate the whole calculator would freeze the page (As in I couldn't scroll up or down) while it calculated the voyage. Now lately when I've been using the calculator, it has stopped freezing the page when I click calculate and I'm able to scroll down the page but the calculator takes FOREVER.

Also not to mention, when the calculator has finished calculating my voyage, it now completely freezes the page in definitely and I end up having to close out the tab and re-open a new one and start the process all over again.


Hi TearGod, I'm fairly sure that the calculator is expected to freeze the page while it is calculating. Mine has always froze during that time and I am also unable to scroll. However, I never have any issues once it is finished with the calculations. If you have four ships, the first calculation takes a bit of time but it gets faster when you have less ships to check. I'd suggest just clicking on the tab to start the calculation and just wait it out before scrolling or clicking anything. Perhaps that will help. I'm sure Xena_Dragon will be notified and will get you all fixed. Good luck! :D

#102
Xena_Dragon
[ Display Name History ]

Xena_Dragon

    Coder

  • Members
  • 1,544 posts
  • Gender:Not Telling
  • Location:NL (GMT+1)
  • Joined:22 January 2005
  • RuneScape Status:P2P
  • RSN:Xena Dragon
The calculator freezing during a calculation is normal and to be expected. You can speed up the calculation in two ways:
1) When you can expect a certain crew member to be included in the result, use the 'force' checkbox to force that crew member to be included.
2) When you can expect a certain crew member to *not* be included in the result, uncheck the 'available' check box for that crew member. Do remember to set it back to available later of course.

Other than that I have no tips for you. The calculator has been tested on numerous platforms, and numerous browsers, and it always behaves the same. It takes some time to calculate voyages when lots of crew members are available, and speeds up as you assign crew to a ship and perform the calculation for the next ship, etc.

Xena_Dragon.png


#103
Eevie
[ Display Name History ]

Eevie

    Chicken Feather

  • Members
  • 8 posts
  • Gender:Not Telling
  • Joined:19 April 2013
Thanks, Xena. Calculating always takes time. Glad you confirmed it. Great job, as always! :thumbsup:

#104
I am Malazan
[ Display Name History ]

I am Malazan

    Chicken Feather

  • Members
  • 2 posts
  • Gender:Not Telling
  • Joined:2 May 2015
I love this calculator. Thanks so much!
 
However, since the last time it was updated (Feb 13, 2015 apparently), it's not been 100% accurate in its results. After triple checking that all my input is correct, I started looking through the code.
 
Let me first say, WOW that's a lot of variables!!
 
At line 444, you have this:
 
//Bonus %
moraleBonus = 1;
combatBonus = 1;
seafaringBonus = 1;
Then a bunch of if's for each of the different shipwrights. The first thing I noticed was ship #6 (which the select has as "luxurious") says this:
if (shipw == 6)
{
	moraleBonus = 1.05;
	combatBonus = 1.03;
	seafaringBonus = 1.03;
}
That's correct based on the game's description of Luxurious: Boosts ship stats by 3% + Boosts Morale stat by an additional 2%, so
Luxurious = Morale +5%, Combat +3%, Seafaring +3%.

However, percentages for numbers 8, 9 and 10 ("Ostentatious", "Battleship", and "Maritime", respectively) appear to be backwards (i added the comments myself):
if (shipw == 8) // ostentatious
{
    moraleBonus = 1.03;
    combatBonus = 1.05;
    seafaringBonus = 1.05;
}
if (shipw == 9) // battleship
{
    moraleBonus = 1.05;
    combatBonus = 1.03;
    seafaringBonus = 1.05;
}
if (shipw == 10) // maritime
{
    moraleBonus = 1.05;
    combatBonus = 1.05;
    seafaringBonus = 1.03;
}
 
Or...
Ostentatious = Morale +3%, Combat +5%, Seafaring +5%.
The problem is, Ostentatious' in game description says "Boosts ship stats by 5% and Morale by and Additional 3%.
 
To me that means:
Ostentatious = Morale +8%, Combat +5%, Seafaring +5%.
 
 
So yeah, just thought i'd point it out :) Thanks again for all the hard work you all do :)

(Also, not sure why the colors in the code sections look all weird, sorry about that.)

#105
Arceus
[ Display Name History ]

Arceus

    Araxyte Authority

  • Administrators
  • 7,092 posts
  • Gender:Male
  • Joined:7 December 2010
  • RuneScape Status:F2P

 

Done - was that all that was needed, or are there other things...? I was under the impression that it was a bit more complicated, but if that was all cheers, and sorry it took a bit! :)


"Fight for what you believe in, and believe in what you're fighting for." Can games be art?
---

 

cWCZMZO.png
l1M6sfb.png


My blog here if you want to check out my Times articles and other writings! I always appreciate comments/feedback.

#106
I am Malazan
[ Display Name History ]

I am Malazan

    Chicken Feather

  • Members
  • 2 posts
  • Gender:Not Telling
  • Joined:2 May 2015
Yeah, I think that's it. The percentage was the only thing I could find that was incorrect, and my numbers are matching now.

Thanks so much! :)


Also, if I were able to come up with a more efficient `calculator` function, could I post a link to it here? I'm working on one, but haven't finished it yet. I'll post run time complexity on both... Just curious. :)

#107
Arceus
[ Display Name History ]

Arceus

    Araxyte Authority

  • Administrators
  • 7,092 posts
  • Gender:Male
  • Joined:7 December 2010
  • RuneScape Status:F2P

Sure, you can feel free to post it (or PM me). My impression was that it was looked into before, but if there is a way to improve it without tearing the whole code apart..I'm open to suggestions :D.


"Fight for what you believe in, and believe in what you're fighting for." Can games be art?
---

 

cWCZMZO.png
l1M6sfb.png


My blog here if you want to check out my Times articles and other writings! I always appreciate comments/feedback.

#108
Negh_var
[ Display Name History ]

Negh_var

    Chicken Feather

  • Members
  • 9 posts
  • Gender:Male
  • Location:Adelaide, Australia
  • Joined:8 November 2013
  • RuneScape Status:P2P
  • RSN:negh_var
  • Clan:RSW

Hi,

 

I just started using this calc after it was mentioned ingame and I've noticed that some crew members are missing such as the drowned ghost. I've also noticed that the values for some crew members aren't correct at their level, usually by about 20 or 30 or so. Is there any way to add this info or suggest additions?

 

Also is it possible for the crew listing to be alphabetical to make it easier to find various crew members? If the current order is there for a reason, that's fine, but what is it?

 

Thanks :-)



#109
PDJ
[ Display Name History ]

PDJ

    Varrock Guard

  • Members
  • 1,313 posts
  • Gender:Male
  • Location:Bay Area, California
  • Joined:18 June 2004
  • RuneScape Status:None
  • RSN:Pker Dude Jr

Random low-priority bug report.

 

Calc got me 16333 M / 16183 S for 20485 M/S voyage, and called it 79%.

 

16183/20485 = 0.78999267756...

 

Jagex apparantly rounds (well floors) this down to 78%, while calc rounds up to 79%.

 

I'm too tired to check the source code, but I'm pretty sure that JS arithmetic is precise enough to handle that.

 

 

Also regarding the algorithm/efficiency discussion above -- last time I read the source code looking for ways to improve it (which admittedly may have been over a year ago), I remember that, although it is written with the obviously inefficient brute-force algorithm, it was very well optimized, and I really not sure if there is a better algorithm.


Pdj.png

[02] -RuneScript- *** [ END ]: You gained 444,384 prayer exp in 5secs. That's 319,956,480 exp/h.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users