Jump to content

Expression randomizer fix 1.62


Recommended Posts

ever think that the same expressions seem to get picked more than others?  you're not wrong.  this is how base SL picks an expression:

 

let's say there are 10 total expressions (0 as the first and 9 as the last) and based on the animation tags the ones that qualify are expression 3, 4, and 6.  so our search array is going to look like this:

 

false false false true true false true false false false

 

SL will start at a random position on this array and use two functions: find and rfind.  find will start at the position given and search towards the end of the array until it finds a true.  rfind will start at the position given and search towards the beginning of an array until it finds a true.

 

to pick an expression SL starts with a random number with the total expression count as max, and then calls find at that position on it.  if it doesn't get a match, it then calls rfind on the last position of the search array.  so for our given search array, here's how the results work out:

 

expression 3 is picked 4/10 times:  from find 0, 1, 2, 3.

expression 4 is picked 1/10 times: from find 4.

expression 6 is picked 5/10 times: from find 5, 6, then as find 7, 8, 9 all don't match, rfind 9 3 times.

 

needless to say you won't see a lot of expression 4.

 

to make a long story short this is a patch of sslExpressionSlots to do a more thorough accounting and make valid expressions selected with equal probabilty to each other.  source and compile included.

sl expression rerandomizer LE 1.62.7z

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use