• 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!

Random Number Generator Questions

Uriah Heep

Grand Poobah
Alumni
Stratics Veteran
Stratics Legend
UNLEASHED
Wouldn't it be awesome if Luck actually affected your RNG rolls?
um ... not really, no.

If I have X% chance of success, I'd sort of like to have X% chance of success.

.
Agreed...
In fact, I wouldn't have my feelings hurt at all if lluck was removed completely from the game...
One less mathematical problem to deal with, more playing and mystery.
 
G

guum

Guest
Thanks for the answers, Draconi. This has been a very enlightening thread (and confirmed many of my suspicious). I'm sure I'm in the minority, but I have to say that once the RNG is "fixed", I may be hit by a bout of nostalgia -- the streaky RNG is, for me, one of the things that always made UO UO.
 

Rumil of Lorain

Journeyman
Stratics Veteran
Stratics Legend
Draconi there is a certain tree I have GM'd lumberjacking on three character's, I get about 60 or so chops on it before it loses its resource also it never goes past regular wood Granted I think it isn't supposed to work that way. I have checked on other shards and the tree is there but doesnt work the same as on my shard. was just wondering if it is just a gliche or are there other situations where the RNG doesnt take into account the total resources an area has
 

Draconi

Most explosive UO Legend
VIP
Stratics Veteran
Stratics Legend
Okay for the computer-literacy impaired of us (or dummies like me)

Go back to fishing, and give an example.
Moving slow north, gives more reward than sitting still. Is this in fact because each time the boat hits a new tile, the RNG resets?
Or is it because there are only at any given time so many rewards spawned per subserver, and the mere act of moving takes you to them? Like finding the T-chest...its there , you just have to get to it.
Not sure if that's clear, but best way I can think of at the moment to word it...
This is less the RNG, and more about the resource system.

Let's break down Trammel, for instance. Trammel is 7,168 x 4,096 tiles (including the dungeon areas east of the oceans).

One thing you'll notice in common amongst all the maps is that they're evenly divisible by 8. We call 8x8 areas of the map "chunks", and this is where the ever popular old "8x8'ing" got its name.

What we do is divide every map into these chunks, and assign each chunk its own set of resources. These resources can be anything from a given amount of ore, lumber, water, fish - even skillpoints. When a player performs a related action, like fishing, the following things happen:
  • Is the tile the player chose a water tile?
  • Does this kind of water tile have a resource type associated with it? Like fish?
  • Query the entire chunk to see if there are any fish left. If so, give one and subtract from the total available to the 8x8 area.

When the chunk runs out of fish, you need to move to a new chunk to get more. Obviously, chunks refresh their resources over time, or the world would be very quickly fished out.

There are many reasons the resources are handled this way, but would be as equal in scope as explaining the RNG (the topic of the day). Just think of it as way easier for the server to handle 450,000+ chunks instead of assigning resources directly to nearly 29,000,000+ tiles.

---

P.S. YAY 400!
 

Farsight

Crazed Zealot
Stratics Veteran
Stratics Legend
Thanks for the answers, Draconi. This has been a very enlightening thread (and confirmed many of my suspicious). I'm sure I'm in the minority, but I have to say that once the RNG is "fixed", I may be hit by a bout of nostalgia -- the streaky RNG is, for me, one of the things that always made UO UO.
I agree with everything guum just said.

It also added a couple new suspicions on my part.

But I do like, and sometimes rely, on the RNG streakiness. UO wouldn't be the same without it. Besides, the streaky RNG is actually somewhat realistic, i.e. "Bad things happen in threes" and that sort of thing.
 
M

Merik

Guest
When stealing balms I ran a test on certain monsters. One monsters which is pretty low end I think Always every single time gives you a balm if you successful steal from it. (I'm not allowed to say which one because I was given this in confidence but, this is what I found.)

Is that about right for the Balms? As I said each success is a Balm and also each failure is a fail to steal from the creature but, it is always a Balm for a successful steal.

We also tested to see if Disco helped changed the numbers and not really but, they did make the monster a heck of allot easier to deal with. Heheh I may be the first Disco Stealer on our shard. *smiles*

success
success
fail
Success
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
success
success
fail
fail
success
Success
success
fail
fail
success
fail
fail
fail
fail
success
success
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
success
success
Success
success
fail
fail
fail
fail
fail
fail
fail
fail
fail
success
fail
fail
fail
fail
fail
fail
Success
fail
fail
fail
fail
fail
fail
success
 

Draconi

Most explosive UO Legend
VIP
Stratics Veteran
Stratics Legend
I agree with everything guum just said.

It also added a couple new suspicions on my part.

But I do like, and sometimes rely, on the RNG streakiness. UO wouldn't be the same without it. Besides, the streaky RNG is actually somewhat realistic, i.e. "Bad things happen in threes" and that sort of thing.
Heh, streaks are as much a part of real random numbers as pseudo-random numbers, so I'm sure you'll still be hitting your good times and bad regardless of what we change.

Just, from here on, at least you'll know it was more about fate than "cycling low-order bits."
 

Lord Gareth

UO Content Editor | UO Chesapeake & Rares News
Alumni
Stratics Veteran
Stratics Legend
Wiki Moderator
While moving, certainly. This is also related to how many resources are available per "chunk" of the world.
SLOW FORWARD!


Thanks Draconi and nice to see you posting all these replies. You have refreshed allot of peoples fears that UO is going down hall. Can't say that now from this thread *smiles*

Side note. That RNG thing you have setup. Gareth will crash while going to the homare-Jima moongate if he rolls a six needs to be taken out :p
 

GalenKnighthawke

Grand Poobah
Stratics Veteran
Stratics Legend
In most places it's not, but let's not confuse the RNG itself with the Reward systems we build around it. Doom is on the same point system now as the Treasures of Tokuno. This is more like a pack of cards where you need to choose the right one, but every time you choose wrong, the bad card is removed from the deck, making your chances better the next time.

There are many such solutions that better reward players than just relying purely on dice rolls, and while we're going to fix the core RNG problems, we're keeping these things in mind.
My post was intended to specifically refer to Doom as it was after the AoS release (as in soon after), not how it is now....I know that there's a cumulative point system in effect now.

But for several years after the AoS launch, conventional wisdom, at least among frequent Doom runners on the LS shard, was that once you got one or two artifacts, they would drop more frequently.

This could just be perception.

This could be that artifacts boosted damage output and survivability.

Or, we speculated at the time, the RNG was "rigged" to favor those who had already benefited from it.

You've ruled out the last possibility, and I don't know that damage output had much to do with it before the point system was implemented.

So that leaves perception.

Wouldn't it be awesome if Luck actually affected your RNG rolls?
No.

First of all, Luck in general is a rather nutty feature to my mind, and it rewards tamers far too much.

Now imagine if you made Luck a factor in random number generation.

Now imagine a high-luck tamer, with a greater dragon, in PvP.

Good "luck" (ho ho!) trying to sneak around the dragon and nail the tamer. "Hey why am I missing so much? Oh no here comes that fire breath! Oh no here comes that bleed!"

Not to mention that a good number of us seem to think that Luck is broken as it is, at doing what it's supposed to do now, let alone giving it more to do.

-Galen's player
 
N

Noobish Noob

Guest
I tend to notice streaks more in crafting since it is such a repetetive action. Banging out hammers regularly makes streaks of mage weps and/or of the same type of slayer. I have even made identical weapons back to back a few times. My poor miner gets no love when it comes to mining black rock. I have never pulled up even one piece. Gems and stone are no problem but not a single blackrock yet in almost 2 years. I mined like crazy during the Moonglow event but ended up buying blackrock off vendors instead. It doesn't matter where I mine either..Fel, Tram, Ilsh, Brit....never a one. People tell me that I probably just miss it in my pack but I mine with an almost empty pack. When they announced the blackrock infecting was turned off I just assumed that maybe blackrock mining was turned off as well. Maybe it is, or the RNG hate me in ways I can't even fathom.
 

Lefty

Lore Keeper
Stratics Veteran
Stratics Legend
So eating effects HCI and Spell casting in a positive way with the RNG
 
C

Connor_Graham

Guest
What we do is divide every map into these chunks, and assign each chunk its own set of resources. These resources can be anything from a given amount of ore, lumber, water, fish - even skillpoints.
How often do the skillpoints in each chunk regenerate? This is important for skills that you don't really want to move around with such as Inscription or Cartography, where you'd want to be stationary next to either an NPC or a trash can.
 

Kaleb

Lore Master
Stratics Veteran
Stratics Legend
I always thought it would be sweet if the RNG's result was displayed (like watching a dice roll at your DnD game) when the RNG was used.

The screen would say something like: "Numbers 1 thru 100. You need a 90+ to get the artifact. You roll: 89"

Any chance of this ever happening in certain situations? Or am I looking at this too simplistically?

(Edit: you could make this something that one could toggle off or on, for those that like it or dislike it. Also, congrats on the SA milestone!)
If we wanted something like that we would be playing D&D yes? If i had constant text of rolls i surly would not log in again as I would find that real annoying. Plus the simple fact if they were to waste time codeing FLUFF instead of working on PvP balance that would almost be the straw that broke the camels back for me.
 
G

guum

Guest
If we wanted something like that we would be playing D&D yes? If i had constant text of rolls i surly would not log in again as I would find that real annoying. Plus the simple fact if they were to waste time codeing FLUFF instead of working on PvP balance that would almost be the straw that broke the camels back for me.
I think it would be a neat option. I'd definitely want to be able to turn it off though.
 

GalenKnighthawke

Grand Poobah
Stratics Veteran
Stratics Legend
Wouldn't it be awesome if Luck actually affected your RNG rolls?
I was too dismissive of this earlier.

Let me point out one area in which such a change, Luck having an impact on the RNG, could be of great potential benefit: Crafting.

-Galen's player
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
How often do the skillpoints in each chunk regenerate? This is important for skills that you don't really want to move around with such as Inscription or Cartography, where you'd want to be stationary next to either an NPC or a trash can.
I have said before that 8x8 (chunking) still works and nobody would listen
 
G

guum

Guest
I was too dismissive of this earlier.

Let me point out one area in which such a change, Luck having an impact on the RNG, could be of great potential benefit: Crafting.

-Galen's player
Yeah, I think this would actually be pretty good -- as of right now, for a Smither/Tailor/Tinkerer there's no reason to mess with a suit at all, aside from the talisman. My non-magic crafter mule rides around naked. It'd be cool to actually give him a reason to put together a decent suit.
 
F

Foolio the Bard

Guest
If we wanted something like that we would be playing D&D yes? If i had constant text of rolls i surly would not log in again as I would find that real annoying. Plus the simple fact if they were to waste time codeing FLUFF instead of working on PvP balance that would almost be the straw that broke the camels back for me.
I wasn't suggesting a constant text of rolls. I said in my original post, and I think Draconi shares the same sentiment, that it would be used sparingly and in places that would ADD to the enjoyment of the game.

And in many ways, especially since AOS, this is a game of numbers... LRC, HCI, DCI, Luck, the coming Imbueing system... your skills are displayed in decimals... numbers are everywhere!

Showing an occasional important roll (and having it be something that was up to the person to see or not, like with a special item as Draconi said) would not affect you in any way since you could choose to never use that item. I think it would make a perfect vet reward.
 
W

Whinemaker

Guest
Thank you Draconi for doing this on a Sunday!
I must say I'm impressed. :thumbsup:

Look forward to your essay.
 

Nystul

Lore Master
Stratics Veteran
Stratics Legend
Why is the RNG when paired up w/ luck and loot always put into "fail mode"? (IE: It don't work unless it's on a peerless boss).
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
Yeah, I really am liking the idea of an 11th year veteran reward only usable by 11th year vets.

It would be a powerful artifact that only the wisest and eldest could use to pierce the very fabric of reality! But not too much of the fabric, no, just a peek.
as a long time vet I agree :D
 

WildWobble

Sage
Stratics Veteran
Stratics Legend
My question has to do with lower regent cost.

How does it calculate the chance to cast a spell is it one roll for the spell or is it one roll per regent needed for the spell. Though my observations with less then 100 lower reg cost could be due to the streaky nature we all seem to witness i have found that often times with 90+ but less then 100 lrc that i get more reg's required, with spells needing lots of regents more often then ones with less regents needed.
 

Flutter

Always Present
Alumni
Stratics Veteran
Stratics Legend
Awards
1
What are the odds.
I know it's not 50/50 as simple as "yes" you win a roll and "no" you don't.
What are the odds of:
Getting a gain when casting a spell at different levels. (or working some other skill...)
Getting a doom artifact
Getting a pink scroll vs a white one
Getting a scroll at all
Getting a replica
Getting a minor artifact
Getting additional mods/items based on luck

:)
 
U

uoBuoY

Guest
There is one instance of the RNG per subserver. Each UO shard is divided up into many smaller subservers which each handle a portion of the seamless world (much like zones in other games, but with better connection tech). Each subserver is completely independent from the others, and they coordinate with a central server for the shard.

So, yes, it's quite possible to leave one area and have a completely different experience with the RNG.
I'm confused...if everyone and everything on a subserver is drawing from the same RNG module, how can a single char experience streakiness? Wouldn't the streakiness be spread out over a whole lot of different chars, actions and things?

Let's say a char makes and fails 10 taming attempts. Between the first attempt and the last there could be 1,000s and 1,000s of other calls on the RNG module. In fact the odds of a char making 2 consecutive calls on the RNG must be extremely low.
 

Arrgh

Sage
Stratics Veteran
Stratics Legend
Can an entire account be RNG "cursed"? I have tried 4 or 5 different templates on spawns and have not even received one SOT (or any other drop) in 30 or so spawns even doing tons of damage. Seems strange that the blacksmith can make some crazy wicked weapons and armor though and he's on the same account.
 

Basara

UO Forum Moderator
Moderator
Professional
Governor
Stratics Veteran
Stratics Legend
Wiki Moderator
UNLEASHED
Campaign Supporter
No, but you can sure scroll the mouse wheel to the next post, or hit the back button pretty damn easy. :thumbsup:
It's your choice to not read the whole discussion.

I will summarize my post:
Basara asked about the order of the checks used to determine BODs. I explained, with examples, why that information is unnecessary and that we only need to know if they are truely independant of one another.

I provided my opinion on Basara's suggestion of a BOD change.

I asked a question regarding RNG streakiness.

Stayin Alive,

BG
Barry, your version of the math breaks down at one point.

At the 110, and 120 Smith levels, the colored check changes.

AS a result of the weapon/armor check being above the color check, ALL color results for the weapon side get turned to iron BODs.

so you end up with it being 75% iron, 25% colored at 109.9 or less
65% iron, 35% colored at 110.0-119.9
55% iron, 45% colored at 120.0

If the colored check was BEFORE the weapon check, and either deflected the check into the armor section if colored, or the weapon side had colored items (such as the non-combinables), the numbers be
50/50, as advertised, at 109.9 or less
30/70 at 110-119.9
10/90 at 120

Note that the chances that improves are described as the latter, even though because of the weapon/armor split, it really becomes the first set of numbers.

I personally find the colored non-combinables much more desirable if they were in the weapon side, because the helms & female plate is useful to fill while training, and there are desirable rewards for turning in single smalls of ex DC/Shadow, normal gold/agapite (and 20 normal Bronze), and exceptional from Gold-valorite.

I ALREADY get too many iron smalls to fill for new BODs.

As for Hanse's BOD test, someone mentioned earlier; it showed balanced results because it WAS so large. With the RNG prone to streaks at all points, having a sufficiently large sample size allows streaks from all levels to balance each other out.

And, we STILL don't have the numbers for the cloth/leather/colored leather amounts, with the normal/ex check appearing to be broken, on top of it...
 
C

Cloak&Dagger

Guest
I'm confused...if everyone and everything on a subserver is drawing from the same RNG module, how can a single char experience streakiness? Wouldn't the streakiness be spread out over a whole lot of different chars, actions and things?

Let's say a char makes and fails 10 taming attempts. Between the first attempt and the last there could be 1,000s and 1,000s of other calls on the RNG module. In fact the odds of a char making 2 consecutive calls on the RNG must be extremely low.
Well Draconi sorta answer this when he answered that the way the current RNG works is by simply pulling a random 32 bit number and transforming it into the RNG. given that this is the fact, and depending on the shard you play on, some shards you could be the only person on that subserver at any one time, or at least very limited number of people, in fact i think its safe to assume no one shard will have thousands and thousands of calls on the RNG on any particular sub server, so with the number being more in the hundreds you can see that pulling a streak of numbers is actually highly likely when 323959235 and the number 234583743 are in fact the same number as far as the RNG is concerned. I don't think 120 seconds is enough for more than a couple hundred rng calls on any one subserver, I could be wrong about the subserver situation but for whatever reason the rng still experiences streaks.
 

Basara

UO Forum Moderator
Moderator
Professional
Governor
Stratics Veteran
Stratics Legend
Wiki Moderator
UNLEASHED
Campaign Supporter
Note, for example, that if 2 or more people get a Marti, Leviathan drop, or Doom point system Artifact drop from the same creature, they will get the SAME artifact. It's because the system makes the one check for the item to be dropped, then it is awarded to everyone flagged for a drop from that creature.
 

Cogniac

Grand Inquisitor
Stratics Veteran
Stratics Legend
I was going to ask for pseudocode, but if, as you say, it really is just
srand(time(NULL));
myRandomNumber = rand();
then I guess that's not really necessary.

Instead, I'll ask this: Are the recent quests to fix things such as the RNG (and the loot table re-evaluation you mentioned a few weeks back) indicative of a slow shift in developer focus to finally refactor the woefully old server codebase instead of just piling more and more new content on top of it?
 
S

Stratic Fanatic

Guest
Is this not open source... :p

Randomlib.h
-----------
void RandomInitialise(int,int);
double RandomUniform(void);
double RandomGaussian(double,double);
int RandomInt(int,int);
double RandomDouble(double,double);

Randomlib.c
------------
#define FALSE 0
#define TRUE 1

/*
This Random Number Generator is based on the algorithm in a FORTRAN
version published by George Marsaglia and Arif Zaman, Florida State
University; ref.: see original comments below.
At the fhw (Fachhochschule Wiesbaden, W.Germany), Dept. of Computer
Science, we have written sources in further languages (C, Modula-2
Turbo-Pascal(3.0, 5.0), Basic and Ada) to get exactly the same test
results compared with the original FORTRAN version.
April 1989
Karl-L. Noell <[email protected]>
and Helmut Weber <[email protected]>

This random number generator originally appeared in "Toward a Universal
Random Number Generator" by George Marsaglia and Arif Zaman.
Florida State University Report: FSU-SCRI-87-50 (1987)
It was later modified by F. James and published in "A Review of Pseudo-
random Number Generators"
THIS IS THE BEST KNOWN RANDOM NUMBER GENERATOR AVAILABLE.
(However, a newly discovered technique can yield
a period of 10^600. But that is still in the development stage.)
It passes ALL of the tests for random number generators and has a period
of 2^144, is completely portable (gives bit identical results on all
machines with at least 24-bit mantissas in the floating point
representation).
The algorithm is a combination of a Fibonacci sequence (with lags of 97
and 33, and operation "subtraction plus one, modulo one") and an
"arithmetic sequence" (using subtraction).

Use IJ = 1802 & KL = 9373 to test the random number generator. The
subroutine RANMAR should be used to generate 20000 random numbers.
Then display the next six random numbers generated multiplied by 4096*4096
If the random number generator is working properly, the random numbers
should be:
6533892.0 14220222.0 7275067.0
6172232.0 8354498.0 10633180.0
*/

/* Globals */
double u[97],c,cd,cm;
int i97,j97;
int test = FALSE;

/*
This is the initialization routine for the random number generator.
NOTE: The seed variables can have values between: 0 <= IJ <= 31328
0 <= KL <= 30081
The random number sequences created by these two seeds are of sufficient
length to complete an entire calculation with. For example, if sveral
different groups are working on different parts of the same calculation,
each group could be assigned its own IJ seed. This would leave each group
with 30000 choices for the second seed. That is to say, this random
number generator can create 900 million different subsequences -- with
each subsequence having a length of approximately 10^30.
*/
void RandomInitialise(int ij,int kl)
{
double s,t;
int ii,i,j,k,l,jj,m;

/*
Handle the seed range errors
First random number seed must be between 0 and 31328
Second seed must have a value between 0 and 30081
*/
if (ij < 0 || ij > 31328 || kl < 0 || kl > 30081) {
ij = 1802;
kl = 9373;
}

i = (ij / 177) % 177 + 2;
j = (ij % 177) + 2;
k = (kl / 169) % 178 + 1;
l = (kl % 169);

for (ii=0; ii<97; ii++) {
s = 0.0;
t = 0.5;
for (jj=0; jj<24; jj++) {
m = (((i * j) % 179) * k) % 179;
i = j;
j = k;
k = m;
l = (53 * l + 1) % 169;
if (((l * m % 64)) >= 32)
s += t;
t *= 0.5;
}
u[ii] = s;
}

c = 362436.0 / 16777216.0;
cd = 7654321.0 / 16777216.0;
cm = 16777213.0 / 16777216.0;
i97 = 97;
j97 = 33;
test = TRUE;
}

/*
This is the random number generator proposed by George Marsaglia in
Florida State University Report: FSU-SCRI-87-50
*/
double RandomUniform(void)
{
double uni;

/* Make sure the initialisation routine has been called */
if (!test)
RandomInitialise(1802,9373);

uni = u[i97-1] - u[j97-1];
if (uni <= 0.0)
uni++;
u[i97-1] = uni;
i97--;
if (i97 == 0)
i97 = 97;
j97--;
if (j97 == 0)
j97 = 97;
c -= cd;
if (c < 0.0)
c += cm;
uni -= c;
if (uni < 0.0)
uni++;

return(uni);
}

/*
ALGORITHM 712, COLLECTED ALGORITHMS FROM ACM.
THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
VOL. 18, NO. 4, DECEMBER, 1992, PP. 434-435.
The function returns a normally distributed pseudo-random number
with a given mean and standard devaiation. Calls are made to a
function subprogram which must return independent random
numbers uniform in the interval (0,1).
The algorithm uses the ratio of uniforms method of A.J. Kinderman
and J.F. Monahan augmented with quadratic bounding curves.
*/
double RandomGaussian(double mean,double stddev)
{
double q,u,v,x,y;

/*
Generate P = (u,v) uniform in rect. enclosing acceptance region
Make sure that any random numbers <= 0 are rejected, since
gaussian() requires uniforms > 0, but RandomUniform() delivers >= 0.
*/
do {
u = RandomUniform();
v = RandomUniform();
if (u <= 0.0 || v <= 0.0) {
u = 1.0;
v = 1.0;
}
v = 1.7156 * (v - 0.5);

/* Evaluate the quadratic form */
x = u - 0.449871;
y = fabs(v) + 0.386595;
q = x * x + y * (0.19600 * y - 0.25472 * x);

/* Accept P if inside inner ellipse */
if (q < 0.27597)
break;

/* Reject P if outside outer ellipse, or outside acceptance region */
} while ((q > 0.27846) || (v * v > -4.0 * log(u) * u * u));

/* Return ratio of P's coordinates as the normal deviate */
return (mean + stddev * v / u);
}

/*
Return random integer within a range, lower -> upper INCLUSIVE
*/
int RandomInt(int lower,int upper)
{
return((int)(RandomUniform() * (upper - lower + 1)) + lower);
}

/*
Return random float within a range, lower -> upper
*/
double RandomDouble(double lower,double upper)
{
return((upper - lower) * RandomUniform() + lower);
}
 
M

mutau

Guest
Wouldn't it be awesome if Luck actually affected your RNG rolls?
If luck would perhaps ..... bump up the number of extra slots you "could" receive, would be sweet. Such as if you are wearing a 2000 luck suit and are working with .................lets say, a bronze and +30 ash hammer, and are able to get some crafted items with more slots on it that would be comparable to those made with a Gold or Agapite hammer, for instance?

Just a thought.
 

Draconi

Most explosive UO Legend
VIP
Stratics Veteran
Stratics Legend
Instead, I'll ask this: Are the recent quests to fix things such as the RNG (and the loot table re-evaluation you mentioned a few weeks back) indicative of a slow shift in developer focus to finally refactor the woefully old server codebase instead of just piling more and more new content on top of it?
Yes, this has been a focus of the Design and Engineering teams since we moved out to Virginia.

There's always the philosophy of "if it ain't broke, don't fix it." This doesn't really work out well for a 12 year old game that *still* has things most MMOs long ago gave up on achieving. We have to understand and improve our own systems if we hope to improve the experience for everyone.

The RNG is one of those areas. It was originally implemented in the simplest way possible, because UO was, after all, an experiment and the RNG *worked* (or had the appearance of working) and they moved on to more important things, like, say, reducing lag between client/server messages.

I see that one minor improvement occurred when they moved the servers to Linux, but the wrapper code around the call to the RNG was still poorly implemented, skewing the results. We recently discovered that just fixing the wrapper code solves the visible problems without having to replace the entire RNG.

In fact, for the programming-inclined folks out there, here's a fantastic article (short, to the point, and correct) about using rand() properly: Using rand()
 

LeBaiton

New Player Protector
Stratics Veteran
Stratics Legend
Yes, this can really happen, and multiple players doing different things can break it out of its funk. This seems counterintuitive, but it's a consequence of the naive way the original RNG was being used.
I'll probably be burried somewhere in this thread, but I wonder if this also applies to treasure/MIB chest loot...

When you where digging or fishing up a chest, the loot at first seems to be ok'ish, but the more chests you dig up, the worse the loot gets...

Though I no longer play, it always boggled my mind if this could hold true...
 
F

Foolio the Bard

Guest
We recently discovered that just fixing the wrapper code solves the visible problems without having to replace the entire RNG.
So, just to be clear here, are you saying that the RNG was changed recently on the production shards? Or are the changes still forthcoming?
 

DevilsOwn

Stratics Legend
Alumni
Stratics Veteran
Stratics Legend
for myself, I'm always hesitant to fix things..... it generally breaks three others ;)
 
J

Jhym

Guest
7) We know we have been told that doing "things" doesn't actually modify your rolls (like eating, skipping servers, etc) -- if so, why WASN'T this implemented. Eating food gives a 50/50 chance it will reset the RNG with a new seed. Or skipping to a new subserver switches which bits are pulled to do the rolls. Or emoting *dances for luck* adds 1 to the next random rolls.
Hmm, I disagree with that previous assertion. Anything you do that calls the RNG can affect future rolls.
Well, yes, because many things pull a new random number off the queue (or generate one or whatever) I can see that anything you do affects the RNG -- however HOW would that pull affect future rolls in a determined way? Or are you speaking of the current RNG procedure, which definitely means it's borked. RNG rolls should never have past, reproducible dependencies, other than the initial seed value.

I had it in my head that there WERE definite coded structures affecting the RNG after I had my character touch a "Luck Tree" in the wilds of Chesapeake many years ago. For months afterward I would miss on the most ridiculous creatures or fail barding a dozen times in a row -- and sometimes succeed on things I shouldn't have. Of course that was before the difficulty was added to provoking. It definitely made me think I'd "cursed" my character lol.

Thanks for answering btw, I am always interested in coding situations even if I may not ever use something like this myself. Accountant types that I work with tend to like their numbers to add up in neat little rows, not to be randomly added to trees and birds to end up with a squirrel.

Layering interface and entity objects on top of others in a framework sometimes leads to effectively random behavior if the triggering events aren't clear. I've run into that many times in trying to code more complex screens.


I knew of the 8x8 resource pools, but it is interesting that there may be MANY things that are part of those pools that we don't commonly think of.
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
I see that one minor improvement occurred when they moved the servers to Linux,
/dev/random :D

In fact, for the programming-inclined folks out there, here's a fantastic article (short, to the point, and correct) about using rand() properly: Using rand()

Thank you ... interesting, I've so rarely touched C code directly that I didn't even realize rand() itself wasn't already returning uniform deviates.
hunh. I learn something new every day :)
 
Top