Please Help Support E-Mods.net by Donating

e-mods.net

  • 2017-11-17, 15:02:03
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search

News:

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

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

ORI

  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 365
Redemption's Dice roll algorithm
« on: 2008-07-25, 02: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.
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Redemption's Dice roll algorithm
« Reply #1 on: 2008-07-25, 10: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, 10:11:28 by Javokis »
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

ORI

  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 365
Re: Redemption's Dice roll algorithm
« Reply #2 on: 2008-07-25, 13: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, 13:18:22 by ORI »
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2373
    • E-Mods.net
Re: Redemption's Dice roll algorithm
« Reply #3 on: 2008-07-25, 15: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.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo
 

Page created in 0.054 seconds with 17 queries.