Endeavor Modifications

Please Help Support E-Mods.net by Donating


News:

Looking for Video Tutorials? Check out the Open Nod Development section of e-mods.net.

E-Mods.net also has CryEngine tutorials! Check out the Open CryEngine Development section too.

Author Topic: Redemption's Dice roll algorithm  (Read 1190 times)

Offline ORI

  • Team
  • Member
  • ******
  • Posts: 365
  • Karma: 1
Redemption's Dice roll algorithm
« on: 2008-07-25, 04:13:13 »
Do you know how it works and if its really completely random?

Heres why I ask, I know some players who claim the Redem[tion die roller chances in contested rolls will always be biased towards 50/50 odds regardless of how many dice are rolled and without knowing how the Algorithem work its hard to prove one way or the other.

Online Javokis

  • Horses Dick
  • Member
  • *****
  • Posts: 1948
  • Karma: 2
Re: Redemption's Dice roll algorithm
« Reply #1 on: 2008-07-25, 12:08:51 »
Redemption doesn't use dice rolling in the vanilla game. The code for discipline calculations is based on dot level. To hit is rolled as a solid random dexterity value + plus weapon and effect modifiers against defender's dexterity plus effect modifiers. Here's the equations:

To hit (Found in effect.ned notes):

  • [hit if random(Adex + weaponAccuracy) + Axoffense > random(Ddex) + Dxdefense]

To Damage (Found in effect.ned notes):

  • [dam is random(Astr + weaponDamage) + Apotence + Axdamage - random(Dsoak [+ Dstamina]) [-Dfortitude] - Dxsoak]

Cast Discipline (Found in Discipline.java):

Code: [Select]
public boolean Fizzled(int level)
{
// never fizzle a scroll cast
if((casterThing.GetActorFlags2() & THING_AF2_SCROLLCAST) != 0)
return(false);

if(Math.random() < ( (float)(5 - level) / 100.0f))
return(true);

return(false);
}

As you can see there is no PnP dice roller in vanilla Redemption.
« Last Edit: 2008-07-25, 12:11:28 by Javokis »
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Offline ORI

  • Team
  • Member
  • ******
  • Posts: 365
  • Karma: 1
Re: Redemption's Dice roll algorithm
« Reply #2 on: 2008-07-25, 15:09:18 »
Oh no, Javo,Im sorry I must have put the question incorrectly, I ment the thing that happen when you do '%' in the chatbox to roll dice..

Is it just a basic  'round(Math.random() * 10)' ? 

(or however the syntax actually goes)
« Last Edit: 2008-07-25, 15:18:22 by ORI »

Online Javokis

  • Horses Dick
  • Member
  • *****
  • Posts: 1948
  • Karma: 2
Re: Redemption's Dice roll algorithm
« Reply #3 on: 2008-07-25, 17:15:05 »
There's no source code for that so I couldn't say beyond what it does when you use it.  Since that feature is C++ coded, I would think it's using one of the built in C++ algorithms for random. I can't say which one they're using.
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo