View previous topic :: View next topic |
Author |
Message |
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Sun Sep 06, 2009 12:33 pm Post subject: Damage calculator. |
|
|
It's a pretty fun equation, you can edit the hero's level then roll the dice.
It's a 6 sided irrational die, meaning it can land anywhere between 1 and 6, with infinite possibilities.
(2.66862, 4.523633, etc.)
|
|
Back to top |
|
|
hcavolsdsadgadsg I'm a spammer Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Sep 06, 2009 8:45 pm Post subject: |
|
|
apparently 1000x4.70 x butt is not a number... news to me.
|
|
Back to top |
|
|
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Mon Sep 07, 2009 2:40 pm Post subject: |
|
|
NaN can be considered a backfire.
|
|
Back to top |
|
|
False Prophet Expert Cheater Reputation: -1
Joined: 28 May 2006 Posts: 121
|
Posted: Thu Oct 15, 2009 2:39 am Post subject: |
|
|
Easier approach would be something like:
Code: | cLvl = 10; // Character level
cStr = 5; // Characters Strength
Dice = 5+(Random(5*5)); // Some random dice calculation I made
cDmg = cLvl*(Dice/cStr); // Even more random damage calculation I made
|
But that's kind of simple . And will probably make no sense after I have had some rest.
|
|
Back to top |
|
|
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Thu Oct 15, 2009 10:47 am Post subject: |
|
|
Oggy wrote: | Easier approach would be something like:
Code: | cLvl = 10; // Character level
cStr = 5; // Characters Strength
Dice = 5+(Random(5*5)); // Some random dice calculation I made
cDmg = cLvl*(Dice/cStr); // Even more random damage calculation I made
|
But that's kind of simple . And will probably make no sense after I have had some rest. |
But that will give you the same damage every time, it's not random at all.
|
|
Back to top |
|
|
Cheat Engine User Something epic Reputation: 60
Joined: 22 Jun 2007 Posts: 2071
|
Posted: Thu Oct 15, 2009 12:41 pm Post subject: |
|
|
Thees a bit more to it.
Strength, armor, resistance, power of impact, defence, weapon, limbs..
|
|
Back to top |
|
|
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Thu Oct 15, 2009 2:43 pm Post subject: |
|
|
Nintendo 64 wrote: | Thees a bit more to it.
Strength, armor, resistance, power of impact, defence, weapon, limbs.. |
Those are all just -'s.
|
|
Back to top |
|
|
False Prophet Expert Cheater Reputation: -1
Joined: 28 May 2006 Posts: 121
|
Posted: Thu Oct 15, 2009 6:07 pm Post subject: |
|
|
Cryoma wrote: | Oggy wrote: | Easier approach would be something like:
Code: | cLvl = 10; // Character level
cStr = 5; // Characters Strength
Dice = 5+(Random(5*5)); // Some random dice calculation I made
cDmg = cLvl*(Dice/cStr); // Even more random damage calculation I made
|
But that's kind of simple . And will probably make no sense after I have had some rest. |
But that will give you the same damage every time, it's not random at all. |
Whoops, I see the mistake. I had my sleep now though.
Code: | // Better code, with critical amounts or min/max, whichever you want to call it.
// cStr and cLvl can be changed to whichever you like.
cLvl = 5; // Character level, critical strike value. Also slightly increases damage
cStr = 12; // Characters Strength, main source of damage
eAC = 5; // Enemy Armour Class
Dice = (Random(5)*eAC); // Dice calculation which takes enemy AC into the calculation(eAC)
cDmg = (cLvl*cStr)/(Dice+(cLvl+1)); // Damage calculation I made, turns the characters level into a critical strike chance or min/max value, whichever you prefer.
|
This should be much more consistent. Let me know what you think =)
If it's still not what you like, just change cStr and eAC to a float.
Last edited by False Prophet on Thu Oct 15, 2009 7:09 pm; edited 1 time in total |
|
Back to top |
|
|
Cryoma Member of the Year Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Thu Oct 15, 2009 7:07 pm Post subject: |
|
|
Slight problem in your calculation, eAC should reduce the amount of damage, not multiply it.
Code: | cLvl = 5; damage
cStr = 12;
eAC = 5;
Dice = (Random(5)); //Typo was there
cDmg = (cLvl*cStr)/(Dice+(cLvl+1))-eAC; |
That seems right.
|
|
Back to top |
|
|
False Prophet Expert Cheater Reputation: -1
Joined: 28 May 2006 Posts: 121
|
Posted: Thu Oct 15, 2009 7:10 pm Post subject: |
|
|
Cryoma wrote: | Slight problem in your calculation, eAC should reduce the amount of damage, not multiply it.
Code: | cLvl = 5; damage
cStr = 12;
eAC = 5;
Dice = (Random(5)); //Typo was there
cDmg = (cLvl*cStr)/(Dice+(cLvl+1))-eAC; |
That seems right. |
It actually doesn't multiply the damage. Check by changing eAC to 20, or more and leave cStr and cLvl the same. You should constantly get 0, and rarely 1 with the exception of a critical.
It basically does this: AC time 1-5. Then I need to Divide that by the Characters level times his strength. This will also prevent the damage from being a negative number.
I know this isn't a normal dungeons and dragons dice, since the more sides the lower the damage can be.
|
|
Back to top |
|
|
|