• Hail Guest!
    We're looking for Community Content Contribuitors to Stratics. If you would like to write articles, fan fiction, do guild or shard event recaps, it's simple. Find out how in this thread: Community Contributions
  • Greetings Guest, Having Login Issues? Check this thread!
  • Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
  • Hail Guest!
    Please read the new announcement concerning the upcoming addition to Stratics. You can find the announcement Here!

OK UO MATH IS BROKE!

Tiberius

Babbling Loonie
Stratics Veteran
Stratics Legend
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.
 

Tiberius

Babbling Loonie
Stratics Veteran
Stratics Legend
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*
 

nightstalker22

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
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?
 

Lorddog

Crazed Zealot
Stratics Veteran
Stratics Legend
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
 

Tjalle

Grand Poobah
Stratics Veteran
Stratics Legend
UNLEASHED
Campaign Supporter
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
 

AEowynSP

Certifiable
Stratics Veteran
Stratics Legend
RNG is ebil; EBIL I telles ya!
Someone on U Hell posted death might reset the RNG.
 
K

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 :)
 

nightstalker22

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
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>
 

Tiberius

Babbling Loonie
Stratics Veteran
Stratics Legend
Just griping; I usually never fail 6 times with a near 60 percent chance....
 

nightstalker22

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
Just gripping; I usually never fail 6 times with a near 60 percent chance....
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™
 
O

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?
 

nightstalker22

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
My question still stands. Will death reset the EVIL RNG?
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 *
 
S

Shakaja

Guest
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 *
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%
 

nightstalker22

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
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%
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>
 
S

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.
 

nightstalker22

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
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.
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
 
K

Kiwillian

Guest
Pretty sure PHP auto-seeds the RNG these days (at the start of each "session" or page or w/e).
 
E

Essence of Siege

Guest
Pretty sure PHP auto-seeds the RNG these days (at the start of each "session" or page or w/e).
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. :)
 
E

Essence of Siege

Guest
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. :)
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
Yea, I think the actual percentage on that is just off. Lot of people complaining about that.
 
Top