Rounding down on certain calculations

Forum for general requests for support for players. Both staff members and veteran players can help new players with problems they encounter. No chatting in this forum, please.

Moderators: Public Relations Department, Players Department, Programming Department

User avatar
SumBum
Posts: 1903
Joined: Fri Jan 05, 2007 10:57 pm

Rounding down on certain calculations

Postby SumBum » Fri Jan 27, 2012 11:38 pm

It's a minor thing that seems to have started recently but still a little annoying.

First noticed this with sailing. At 100% you're fine, there is no change no matter how often you change direction. If you adjust your speed to, for example, 75 it changes to 74 after submitting it. If you then go back in to adjust your direction (not changing the speed) your speed is reduced to 73 once submitted. And so on each time you click continue from the Alter Sailing screen (you don't even have to change any settings - I just testing that with a sloop and it dropped the speed by 2% each time).

I haven't had a chance to test this on land travel.


Also occurs with projects, but a little differently. I did some testing and it seems that if you have more than enough materials in your inventory then it creates the project as requested. If you enter an amount equal to how much you have in your inventory then it rounds things down by 1.

Example 1: I had 275g meat and a lot of wood in inventory. Set the cooking project to use 275g of meat and let it automatically adjust for the wood etc. When I submitted it using the "only if I have everything" option, the project was set to 274g.

Example 2: I had 500g meat and a lot of coal in inventory. Set the cooking project to 225g of meat and followed the same steps as example 1. The project was created for 225g.

Sorry, I don't have a char I can test this using the "Select how much you want to make" field and ran out of ovens doing the projects above. :) And hopefully I got this worded clearly enough...
I don't know karate, but I know KA-RAZY!! - James Brown
User avatar
Addicted
Posts: 973
Joined: Thu Apr 08, 2010 2:42 pm
Location: Australia

Re: Rounding down on certain calculations

Postby Addicted » Sat Jan 28, 2012 12:25 am

I noticed both of these. I didn't realise it was new for sailing, but was perplexed by the growing of herbs when it was rounded down and not up. To my advantage, as I got more product for less input.
Reveal to me the mysteries
Can you tell me what it means?
Explain these motions and metaphors
Unlock these secrets in me
Describe the vision, the meaning is missing
Won't anybody listen?
User avatar
Henkie
Posts: 1689
Joined: Sun Oct 09, 2011 7:36 pm

Re: Rounding down on certain calculations

Postby Henkie » Sat Jan 28, 2012 12:46 am

It has to do with the math I believe. Some projects will cost you wood and meat and end you up with only 65% of the used meat actually smoked/cooked/grilled. If so, there is often a number with decimals in the end, forcing the script to round it off.
User avatar
SumBum
Posts: 1903
Joined: Fri Jan 05, 2007 10:57 pm

Re: Rounding down on certain calculations

Postby SumBum » Sat Jan 28, 2012 1:10 am

Henkie wrote:It has to do with the math I believe. Some projects will cost you wood and meat and end you up with only 65% of the used meat actually smoked/cooked/grilled. If so, there is often a number with decimals in the end, forcing the script to round it off.


I don't believe that's the issue. I'm not talking about the amounts of resources input versus how much is returned upon project completion. Rather, I'm talking about the amount of resources put into the project initially. This has only started recently and I've only seen the problem occur when you are holding the exact amount required by your requested project. If you hold more materials than you need, the requested amount isn't changed by the mechanics upon submission. I should have used the same sized projects in my testing but was working with limited resources.
I don't know karate, but I know KA-RAZY!! - James Brown
User avatar
psychowico
Posts: 1732
Joined: Wed Mar 02, 2011 9:57 am
Contact:

Re: Rounding down on certain calculations

Postby psychowico » Sat Jan 28, 2012 7:28 am

SumBum wrote:First noticed this with sailing. At 100% you're fine, there is no change no matter how often you change direction. If you adjust your speed to, for example, 75 it changes to 74 after submitting it. If you then go back in to adjust your direction (not changing the speed) your speed is reduced to 73 once submitted. And so on each time you click continue from the Alter Sailing screen (you don't even have to change any settings - I just testing that with a sloop and it dropped the speed by 2% each time).

viewtopic.php?f=35&t=22690
When planing to implement this in the moment, so this problem should dissaper.


About projects raws rounding you should speak with GreeK.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."

https://www.kinkykitty.pl
User avatar
SumBum
Posts: 1903
Joined: Fri Jan 05, 2007 10:57 pm

Re: Rounding down on certain calculations

Postby SumBum » Sun Jan 29, 2012 3:46 am

Thanks, psychowico. :)
I don't know karate, but I know KA-RAZY!! - James Brown
User avatar
EchoMan
Posts: 7768
Joined: Fri Aug 26, 2005 1:01 pm
Location: Stockholm, Sweden

Re: Rounding down on certain calculations

Postby EchoMan » Sun Jan 29, 2012 7:22 am

Sailing speed round-offs were covered in a global announcement some time back.

viewtopic.php?p=467579&f=1#p467579

There has been a slight change to the boat speed event handling. Previously, if you set the speed to 5% with a very slow vessel, the actual speed would have been rounded to 0%, but the event would still say 5%. This had the effect that some vessels didn't move at all, though the event led the sailors to believe they were in fact moving.

Now the event will communicate the actual speed after rounding, no matter what you originally tried to set the speed to.
User avatar
Addicted
Posts: 973
Joined: Thu Apr 08, 2010 2:42 pm
Location: Australia

Re: Rounding down on certain calculations

Postby Addicted » Sun Jan 29, 2012 9:22 am

SumBum wrote:First noticed this with sailing. At 100% you're fine, there is no change no matter how often you change direction. If you adjust your speed to, for example, 75 it changes to 74 after submitting it. If you then go back in to adjust your direction (not changing the speed) your speed is reduced to 73 once submitted. And so on each time you click continue from the Alter Sailing screen (you don't even have to change any settings - I just testing that with a sloop and it dropped the speed by 2% each time).


Yes, I understood that as a rounding due to the way it has been programed. It can't actually sail at 5% so rounds down. But SumBum is saying it rounds down each time which is not what that global announcement says. So we thought it was a new bug. But as it's being fixed/ changed, this is redundant.

What about the second point? Did that change also effect the amount of project resource used? It is different and uses less; rounding down instead of up. Before if you set up a project for just under the whole gram amount required it would take the whole amount. Now it takes less from your inventory. If you intended this or know about it, then it's fine, but we don't know that so we report what's different.

Return to “General Support”

Who is online

Users browsing this forum: No registered users and 1 guest