1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

imbuing why are the points off??

Discussion in 'UHall' started by aarons6, Mar 23, 2011.

  1. aarons6

    aarons6 Certifiable
    Stratics Veteran

    Joined:
    Oct 14, 2007
    Messages:
    1,897
    Likes Received:
    31
    so i am making a suit, and the points arent adding up right..
    i should be 500/500 and im at 502/500

    110 hp5
    95 lmc7
    95 mana 7
    100 max resist
    100 mr2


    its even 500??

    its bs that they cant even make this game add correctly?
     
  2. Lord Obsidian

    Lord Obsidian Journeyman
    Professional Stratics Veteran Campaign Benefactor

    Joined:
    Mar 8, 2009
    Messages:
    202
    Likes Received:
    74
    Weight of lmc 7 and Mana 7:
    110 / 8 (max) * 7 = 96.25
    Rounded 96... ;)
     
  3. RawHeadRex

    RawHeadRex Slightly Crazed
    Stratics Veteran

    Joined:
    Jan 6, 2010
    Messages:
    1,324
    Likes Received:
    12

    what material are you making it out of ?
     
  4. RaDian FlGith

    RaDian FlGith Babbling Loonie
    Stratics Veteran Stratics Legend

    Joined:
    Jun 19, 2002
    Messages:
    2,442
    Likes Received:
    323
    I encountered something similar a long time ago... think I posted it here and submitted it as a bug...

    Essentially there's a rounding issue somewhere, and it doesn't actually display it. So even though it's displaying only an integer, there's a decimal screwing something up in the system.
     
  5. aarons6

    aarons6 Certifiable
    Stratics Veteran

    Joined:
    Oct 14, 2007
    Messages:
    1,897
    Likes Received:
    31
    so if its 96 why does it say its 95 in the window??

    thats a huge bug that SHOULD be easy to fix yet they ignore it?
     
  6. Raptor85

    Raptor85 Certifiable
    Stratics Veteran

    Joined:
    Jul 23, 2007
    Messages:
    1,712
    Likes Received:
    224
    I see one possibility here, most stuff in uo is truncated to 1 digit past the decimal point

    so 110/8 = 13.75, truncate to 13.7
    13.7 * 7 = 95.9, but if converting it to a string for display is expecting an integer value 95.9 will display as 95. (a cast of 95.9 to an integer would drop the .9)

    Other than that I don't see any other ways to come out with 95 from this.
     
  7. Zero Day

    Zero Day Guest

    Its pretty simple.

    Since everything that has a decimal rounds down.


    So Take LMC.

    It has a property weight of 1.1

    7/8 = 87.75 * 1.1 = 96.25

    But actually what you are getting is 87 * 1.1 = 95.7 or 95
    Since the int is being rounded at every step.

    HP is 5/8 = 62.5 * 1.1 = 68.75 (68.2) when rounding at each point.)

    For a small total of 96.25 + 68.75 = 165
    But factoring both separately its 95 + 68 = 163
    So when you finish adding up, the calculator for Total intensity is probably lumping everything together for the calculation then rounding at the end, but the individual imbuing is hitting that rounding at every point.
     
  8. popps

    popps Always Present
    Stratics Veteran Stratics Legend

    Joined:
    Feb 27, 2004
    Messages:
    13,445
    Likes Received:
    461

    Uhu ??

    Seven divided by 8 does not equal to 87.75 (or better say 0.8775 x 100), but it makes 0.875 which, multiplied by 100, makes 87.50 .....

    Where did you get the additional 0.25% from ??
     
  9. Surgeries

    Surgeries Grand Poobah
    Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    6,107
    Likes Received:
    92
    This exact type of processing (i.e. allowing rounding of integers at each step in a calculation cycle) rather than rounding them all at the end causes the exact same errors in getting proper numbers after multiple calculations within my payroll program.

    If the numbers are rounded at all during the computations, and prior to the end, it can definitely cause .01 to .02 disparities in the totals, and cause my GL postings to fail due to unbalanced Journal Entries.

    In short: I agree.

    :)
     
  10. TheMac

    TheMac Guest

    This is an exact explanation of why I am not a crafter....
     
  11. Annonymous User

    Annonymous User Journeyman
    Stratics Veteran

    Joined:
    Mar 16, 2009
    Messages:
    159
    Likes Received:
    0
    more then likely its of float type rather then decimal type. and just fyi anytime you cast from decimal to integer you lose the faction. so if the end variable containing the result is of type int then the whole point is moot.
     
  12. aarons6

    aarons6 Certifiable
    Stratics Veteran

    Joined:
    Oct 14, 2007
    Messages:
    1,897
    Likes Received:
    31
    i still think its pretty stupid that when you are making a set armor piece that has 500 total points and you add up everything you want to put on it and its 500 pts and when you actually do it, it doesn't fit cause its 502 pts.

    it wasn't the only part too.. i just got lucky on one and it was 499 instead of the 498 i thought it would be.

    the other thing that is stupid is why does my legendary crafter make armor with only 35 durability :( this should be bumped up to at least 150


    maybe like have gm arms lore add 10 pts of durability for every 10 or 20 pts of skill??
     
  13. Lord Obsidian

    Lord Obsidian Journeyman
    Professional Stratics Veteran Campaign Benefactor

    Joined:
    Mar 8, 2009
    Messages:
    202
    Likes Received:
    74
    While I totally agree that there is a display / calculation bug for some properties in the upper left part of the imbuing gump, this armor piece will indeed sum up to 502:

    hpi5: weight 1.1 @ max. intensity = 100% * 1.1 = 110
    lmc7: weight 1.1 @ 7/8 = 87.5% * 1.1 = 96.25, rounded down to 96
    mi7: weight 1.1 @ 7/8 = 87.5% * 1.1 = 96.25, rounded down to 96
    one resist @ max. intensity: weight 1.0 = 100% * 1.0 = 100
    mr2: weight 1.0 @ max. intensity = 100% * 1.0 = 100

    110 + 96 + 96 + 100 + 100 = 502

    I have found many rounding glitches in UO up until now, but imbuing basically works as intended (? *g*) - it is just the upper left part of the gump that displays erroneous values.