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

OK UO MATH IS BROKE!

Discussion in 'UO Siege Perilous' started by Tiberius, Nov 7, 2009.

  1. Tiberius

    Tiberius Babbling Loonie
    Stratics Veteran

    Joined:
    Jul 5, 2008
    Messages:
    2,269
    Likes Received:
    47
    So I go to imbue a weapon that has nada on it but scnp. I am putting 15 dci on this weapon. I have a 58 percent chance; It takes me 6 freakin trys.

    WTF. Oh well finnally got it but this is the second time i've been royally ****ed on inbuing something and had alot more failures than the math would suggest.
     
  2. Tiberius

    Tiberius Babbling Loonie
    Stratics Veteran

    Joined:
    Jul 5, 2008
    Messages:
    2,269
    Likes Received:
    47
    Too ad insult to injury; I go to imbue mage weap -21 and have a 29 % chance; it hits on the freakin second try. I leave this property till last BECAUSE IT DON"T COST RELIC FRAGS and I am supposed to get the massive failures here not in the near 60 percent range GRRRRRRRRRRRR.

    *rant off*
     
  3. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    There is no math involved, just the random number generator.

    $chance_roll = rand(0,100);

    $chances = 58;

    if ($chance_roll =< $chances){
    imbue();
    print 'You successfully imbued the item';
    $resources--;
    }
    else{
    print 'You failed to imbue the item';
    $resources--;
    }

    Do they make imbue talismen in heartwood yet?
     
  4. Lorddog

    Lorddog Crazed Zealot
    Stratics Veteran Stratics Legend

    Joined:
    Oct 25, 2004
    Messages:
    3,120
    Likes Received:
    305
    I get the same feeling. i seem to fail more then needed.


    hit 120 imbue thou! yehaaa

    I found for luck what u do is take the items your going to imbue and
    1) imbue them with all the properties u want
    lrc, luck maybe some lmc
    2) then enhance with spined leather

    that way u get 140 luck items every time (unless it breaks)

    in my case being a gargoyle
    1) convert to garg
    2) imbue with luck + lrc
    3) enhance with spined

    I was just fiddling around adding some things to my normal jewels

    Designer Jewels ROCK
     
  5. Tjalle

    Tjalle Grand Inquisitor
    Professional Stratics Veteran Campaign Supporter Gilfane

    Joined:
    May 12, 2008
    Messages:
    4,851
    Likes Received:
    1,317
    No math, just RNG...

    I remember making a Soulforge for a guildie a couple of weeks ago. I had a 98,4% chance to make it. Took me 4 or 5 tries until I made it... :p
     
  6. AEowynSP

    AEowynSP Certifiable
    Stratics Veteran

    Joined:
    May 13, 2008
    Messages:
    1,819
    Likes Received:
    3
    RNG is ebil; EBIL I telles ya!
    Someone on U Hell posted death might reset the RNG.
     
  7. Lorddog

    Lorddog Crazed Zealot
    Stratics Veteran Stratics Legend

    Joined:
    Oct 25, 2004
    Messages:
    3,120
    Likes Received:
    305
    whats RNG?
     
  8. Kiwillian

    Kiwillian Guest

    Random Number Generator.

    Also, even if you are at, say, 50% it doesn't mean it will work every 2nd try. That's why it's random :)
     
  9. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    I just made a quick page to demonstrate the RNG in action, it isnt pretty, but functional.

    http://www.unnaturalnature.com/uothief/RNG.php

    If you leave the settings on 50% chance to imbue, it is pretty close to 50% success. but you can play witht he numbers and see how well you do without risking losing in game resources.


    Code:
     
    <? 
    session_start();
    if (!isset($_SESSION['initial'])){
    $resources = 500;
    $_SESSION['resources'] = $resources;
    $items = 0;
    $_SESSION['items'] = $items;
    $attempts = 0;
    $_SESSION['attempts'] = $attempts;
    }
     
    $chance_roll = rand(0,100);
     
    $chances = $_POST['chances'];
    if (isset($_POST['chances'])){
    $_SESSION['chances'] = $chances;}
    else{
    $_SESSION['chances'] = 50;}
    if (isset($_SESSION['initial'])){
    if ($chance_roll <= $chances && $chance_roll > 0 ){
    $_SESSION['message'] = 'You successfully imbued the item';
    $_SESSION['resources'] = $_SESSION['resources'] -1;
    $_SESSION['items'] = $_SESSION['items'] + 1;
    $_SESSION['attempts'] = $_SESSION['attempts'] +1;
    }
    else{
    $_SESSION['message'] = 'You failed to imbue the item';
    $_SESSION['resources'] = $_SESSION['resources'] -1;
    $_SESSION['attempts'] = $_SESSION['attempts'] +1;
    }}
    $_SESSION['initial'] = true;
    ?>
    <html>
    <head>
    <title>RNG Imbue Example</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <div align="center"> 
      <p><b><font face="monospace" size="3" color="#000066">RNG Example</font></b></p>
      <p><b><font face="monospace" size="3" color="#000066">In this example, you start 
        with 500 imbuing resources. You can set your success chances before imbuing 
        attempt.</font></b></p>
      <form name="chances" method="post" action="">
        <p><b><font face="monospace" size="3" color="#000066"> 
          <input type="text" name="chances" maxlength="3" size="5" value="<? echo $_SESSION['chances'];?>">
          % Chance to imbue</font></b></p>
        <p><b><font face="monospace" size="3" color="#000066"><? echo $_SESSION['resources']; ?> Resources</font></b></p>
        <p><b><font face="monospace" size="3" color="#000066"><? echo $_SESSION['attempts']; ?> Attempts</font></b></p>
        <p><b><font face="monospace" size="3" color="#000066"><? echo $_SESSION['items']; ?> Successfully Imbued 
          Items</font></b></p>
        <p> <b><font face="monospace" size="3" color="#000066"> 
          <input type="submit" name="Submit" value="Imbue">
          </font></b></p>
      </form>
      <p><? echo $_SESSION['message']; ?></p>
    </div>
    </body>
    </html>
    
     
  10. Tiberius

    Tiberius Babbling Loonie
    Stratics Veteran

    Joined:
    Jul 5, 2008
    Messages:
    2,269
    Likes Received:
    47
    Just griping; I usually never fail 6 times with a near 60 percent chance....
     
  11. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    I know... I beefed up the code further for a mental exercise.

    Now it costs 5 resources to imbue, and failure costs between 1 to 5.

    It wont let you imbue if you dont have enough resources.

    I also added a display of actual success rate and a reset button.

    http://www.unnaturalnature.com/uothief/RNG.php

    :thumbup1: <---- Nightstalker the GEEKā„¢
     
  12. Ole Cheapy

    Ole Cheapy Guest

    Been trying totell you guys there are such things as UO gods and you cannot always go by the stratics formulas and math etc. but people seem to base their entire knowledge of the game on formulas and whatnot rather than experience.

    Example: Scuzzbucket: I know everytghing about UO cause I read the formula on stratics blah blah blah etc. etc. etc.

    Get the picture?
     
  13. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    Yes, you believe in digital gods and call us crazy who use rational and objective methods. Got it! :lol:

    :popcorn:
     
  14. AEowynSP

    AEowynSP Certifiable
    Stratics Veteran

    Joined:
    May 13, 2008
    Messages:
    1,819
    Likes Received:
    3
    My question still stands. Will death reset the EVIL RNG?
     
  15. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    Of course not, the RNG is just a number generator, there is nothing to reset.

    rand(0,100);

    Thats all it is basically, it is just a command telling the computer to pull a random number between 0 and 100.

    It may be possible that death can reset some variable that is used in a calculation with the RNG, making the variable number fall between 0 and 100, so that you have a chance at a gain again.

    If you feel that death is the right way to go, be sure to fill your pockets with lots of server rares and run around my house yelling, "I will l33t pwn'z u"... that should annoy me enough to satisfy you. * evil grin *
     
  16. Lorddog

    Lorddog Crazed Zealot
    Stratics Veteran Stratics Legend

    Joined:
    Oct 25, 2004
    Messages:
    3,120
    Likes Received:
    305
    actually you said "Will death reset the EBIL RNG?"
     
  17. Shakaja

    Shakaja Guest


    death of the application might, if they dont seed it.
     
  18. Shakaja

    Shakaja Guest

    however rand will not get you any random number. if you dont seed it, the output will always be the same.

    would be worth a try to test, otherwise you could basically work out a way to succeed 100%
     
  19. Ole Cheapy

    Ole Cheapy Guest

    Wow I didn't see that one coming, good one! :)
     
  20. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    Here is the new code I am using since updated, show me what you're talking about. I am not challenging you, I really don't know what you mean, it is working fine the way I have it.

    Code:
     
    <? 
    session_start();
    if (isset($_POST['reset'])){
    unset ($_SESSION['initial']);
    unset ($_SESSION['message']);
    $_SESSION['actual'] = 0;}
    if (!isset($_SESSION['initial'])){
    $resources = 500;
    $_SESSION['resources'] = $resources;
    $items = 0;
    $_SESSION['items'] = $items;
    $attempts = 0;
    $_SESSION['attempts'] = $attempts;
    }
     
    $chance_roll = rand(0,100);
     
    $chances = $_POST['chances'];
    if (isset($_POST['chances'])){
    $_SESSION['chances'] = $chances;}
    else{
    $_SESSION['chances'] = 50;}
    if (isset($_SESSION['initial'])){
    if ( $_SESSION['resources'] >= 5 ){
    if ($chance_roll <= $chances && $chance_roll > 0 ){
    $_SESSION['message'] = '<b><font face="monospace" size="3" color="#008000">You successfully imbued the item';
    $_SESSION['resources'] = $_SESSION['resources'] -5;
    $_SESSION['items'] = $_SESSION['items'] + 1;
    $_SESSION['attempts'] = $_SESSION['attempts'] +1;
    }
    else{
    $_SESSION['message'] = '<b><font face="monospace" size="3" color="#FF0000">You failed to imbue the item, you have lost some resources.';
    $resource_roll = rand(1,5);
    $_SESSION['resources'] = $_SESSION['resources'] - $resource_roll;
    $_SESSION['attempts'] = $_SESSION['attempts'] +1;
    }}
    else{
    $_SESSION['message'] = '<b><font face="monospace" size="3" color="#FF0000">You dont have enough resources to imbue.';
    }}
    $_SESSION['initial'] = true;
    if (!isset($_POST['reset'])){
    $_SESSION['actual'] = $_SESSION['items'] / $_SESSION['attempts'] * 100;}
    $_SESSION['actual'] = number_format($_SESSION['actual'],2);
    ?>
    <html>
    <head>
    <title>RNG Imbue Example</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <div align="center"> 
      <p><b><font face="monospace" size="3" color="#000066">RNG Example</font></b></p>
      <p><b><font face="monospace" size="3" color="#000066">In this example, you start 
        with 500 imbuing resources. Each successful attempt costs 5 resources and each failure may cost anywhere from 1 to 5 resources. You can set your success chances before imbuing 
        attempt.</font></b></p>
      <form name="chances" method="post" action="">
        <p><b><font face="monospace" size="3" color="#000066"> 
          <input type="text" name="chances" maxlength="3" size="5" value="<? echo $_SESSION['chances'];?>">
          % Chance to imbue</font></b></p>
        <p><b><font face="monospace" size="3" color="#000066"><? echo $_SESSION['resources']; ?> Resources</font></b></p>
        <p><b><font face="monospace" size="3" color="#000066"><? echo $_SESSION['attempts']; ?> Attempts</font></b></p>
        <p><b><font face="monospace" size="3" color="#000066"><? echo $_SESSION['items']; ?> Successfully Imbued 
          Items</font></b></p>
        <p> <b><font face="monospace" size="3" color="#000066"> 
          <input type="submit" name="Submit" value="Imbue">
          </font></b></p>
      </form>
      <form name="reset" method="post" action="">
              <input type="hidden" name="reset" value="true">
            <input type="submit" name="resetbutton" value="Reset">
          </font></b></p>
      </form>
     
      <p><? echo $_SESSION['message']; ?><br><br></p>
     
      <b><font face="monospace" size="3" color="#000066">Actual Success Rate: <? echo $_SESSION['actual']; ?>%
    </div>
    <?php include ('uotracker.txt'); ?>
    </body>
    </html>
    
     
  21. Shakaja

    Shakaja Guest

    i dont know the language you use, i only know c/c++. however id imagine that its pretty much the same function. and if you dont use the function seed (which will pretty much define the offset of the preset list) random will always give you the same list of numbers. so while you can use them as random numbers, there are actually situations where the pattern would show. as an example you could code a little game with 10 boxes and you put an object in one box completely randomly. so rand would give you a list of random numbers between 1 and 10. lets say the first time you play it, it will output the list (3,1,8,8,4,6,1,...). now if you dont seed the function, it will give you that very same order every time you start the program. the same will obviously happen if you just use a static variable as an offset, thats why you usually use systemtime as a variable for seed.
     
  22. nightstalker22

    nightstalker22 Lore Master
    Stratics Veteran

    Joined:
    Mar 13, 2007
    Messages:
    1,099
    Likes Received:
    8
    Very interesting. I shall run a few RNG simulations and see if such a pattern exists in PHP. I've always wanted to learn C++, but haven't had the time. If I had, I'd make a game very similar to UO, but maybe in modern times with guns, knives, and street thugs, more GrandTheftAuto style but with UO Skill advancement. Basically the only thing stopping me is lack of time and not having the artists needed for such a project, I could model everything in a 3D program and take 2D samples from them like UO did, but even that would take too much time solo. Our website ( my girlfriends and mine ) needs an artist really badly too, if anyone knows anyone who can draw a good comic book charatcer looking woman, get them in contact with me please! :D

    Maybe I'll make the example above, the 10 boxes for the test, and make it UO style with traps in 9 of them! :D
     
  23. Kiwillian

    Kiwillian Guest

    Pretty sure PHP auto-seeds the RNG these days (at the start of each "session" or page or w/e).
     
  24. Yes, most programs will auto-seed for the Random function. That's why Random Numbers in computer programs really aren't random.

    Lot of interesting reads about it if your a huge tech geek and like reading academic papers. :)
     
  25. Yea, I think the actual percentage on that is just off. Lot of people complaining about that.