Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Probabilities for chaos scrolls
#7
I ran a debugger on the server stuff. Here's what I found. It's not bulletproof (pretty easy to find weaknesses in this algorithm I've posted), so I'll need more time with the function. Think of the following as a very good idea for how it should work.

Code:
def CalcRandStat(VariationType, StatOnWeapon):
  if VariationType == 0: # Gach item
    PossibleIterations = (StatOnWeapon / 5) + 1
    if PossibleIterations > 7:
      PossibleIterations = 7
  if VariationType == 1: # Regular weapon
    PossibleIterations = (StatOnWeapon / 5) + 1
    if PossibleIterations > 5:
      PossibleIterations = 5
  randStat = 0
  for Iter in range(PossibleIterations):
    randStat += getVariation()
  StatOnWeapon += randStat
  return StatOnWeapon

def getVariation():
  myVar = CRand32.Random()
  #complete guesses on these probabilities. But this is how the function works
  if myVar < 0.30:
    return -1
  if myVar < 0.70:
    return 0
  else:
    return 1
Reply


Messages In This Thread
Probabilities for chaos scrolls - by Noah - 2009-07-11, 07:30 PM
Probabilities for chaos scrolls - by Stereo - 2009-07-11, 07:35 PM
Probabilities for chaos scrolls - by Morgana - 2009-07-12, 05:36 PM
Probabilities for chaos scrolls - by Kalovale - 2009-07-13, 03:31 AM
Probabilities for chaos scrolls - by Cyanne - 2009-07-13, 10:37 AM
Probabilities for chaos scrolls - by EmuAlert - 2009-07-13, 01:23 PM
Probabilities for chaos scrolls - by Fiel - 2009-07-13, 01:55 PM
Probabilities for chaos scrolls - by Dusk - 2009-07-13, 02:20 PM
Probabilities for chaos scrolls - by Noah - 2009-07-13, 04:47 PM
Probabilities for chaos scrolls - by Fiel - 2009-07-13, 08:31 PM
Probabilities for chaos scrolls - by Noah - 2009-07-13, 11:02 PM
Probabilities for chaos scrolls - by EmuAlert - 2009-07-16, 10:28 PM
Probabilities for chaos scrolls - by Noah - 2009-07-17, 12:48 AM
Probabilities for chaos scrolls - by Freenhult - 2009-07-26, 11:00 PM
Probabilities for chaos scrolls - by chrisloup - 2009-07-27, 12:43 AM
Probabilities for chaos scrolls - by Freenhult - 2009-07-27, 01:35 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)