Experience Calculator

We are always looking for new tools to create to help facilitate the table top gaming experience. Let us know if you have an idea for a new gaming tool you'd like to see. (Note: this is NOT for feature requests on existing tools!)

Moderators: dorpond, trevor, Azhrei

Post Reply
DrAwkward
Giant
Posts: 139
Joined: Mon Sep 17, 2007 12:25 am
Contact:

Experience Calculator

Post by DrAwkward »

Not sure if this is built into the InitTool (It could be, you have all the information there you need), but calcuating experience in 3.5 is one of the biggest pains in the butt.

Features needed:

Party "sets" (with an APL calculation shown, just for reference)
Encounter "set" (with a EL calculation shown, for reference)

Checkboxes down the party list for what characters participated.

Checkboxes down the encounter list for what monsters were defeated.

Total % mulitplier for the encounter's XP (encounters where the monsters had an unfair advantage from terrain might award an extra 25% XP, for example, so the DM would set this to 125%)
A good friend will bail you out of jail.
A great friend will be in the cell with you, saying "That was frickin awesome!"

User avatar
giliath
RPTools Founder
Posts: 275
Joined: Tue Jan 31, 2006 11:10 am
Location: Austin, TX

Post by giliath »

Have you seen anything that explains the math behind XP calculations? So far all I have seen is tables and I haven't really had the chance to reverse engineer the equations from the tables.
~Giliath

DrAwkward
Giant
Posts: 139
Joined: Mon Sep 17, 2007 12:25 am
Contact:

Post by DrAwkward »

giliath wrote:Have you seen anything that explains the math behind XP calculations? So far all I have seen is tables and I haven't really had the chance to reverse engineer the equations from the tables.
Yes. there is a formula to it.

I wrote my own in LabView, and I'll be happy to share the math as soon as I get home and can pick apart my code.
A good friend will bail you out of jail.
A great friend will be in the cell with you, saying "That was frickin awesome!"

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Init Tool itself wouldn't have that functionality since it is specific to D&D. But there isn't any reason why this functionality can't be scripted. I'll add a tracker to do that.

DrAwkward
Giant
Posts: 139
Joined: Mon Sep 17, 2007 12:25 am
Contact:

Post by DrAwkward »

DrAwkward wrote:Yes. there is a formula to it.
I lie, there is a trend riddled with enough exceptions that it was easier for me to hardcode the table. If I had wanted to deal with the exceptions, the code would have looked like...

Code: Select all

int GetXP( ECL, CR, Party_Size)
{
    // ECL is Effective Character Level
    // CR is Challenge Rating
    // Party_Size is the number of active party members in this encounter

    if (Abs( ECL - CR) > 8) return 0;

    if (Abs( ECL - CR) %2)
    { 
        //Mult = 282.8427124;  //an approximation.
        Mult = 100 * 2^1.5;  // Aha! figured it out finally.
    } else {
        Mult = 300;
    }
    return = Round2int( (ECL / Party_Size) * Mult * 2^(CR/2) / 2^(ECL/2) );  //no kidding!
}
exeptions fall in most of the level 1-3 range.
Last edited by DrAwkward on Fri Sep 21, 2007 10:00 pm, edited 1 time in total.
A good friend will bail you out of jail.
A great friend will be in the cell with you, saying "That was frickin awesome!"

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Post by Hawke »

Code: Select all

// no kidding!
That killed me. My favorite of my own, that I was absolutely furious I had taken the time to write was:

Code: Select all

// Good luck remembering WTF you did....
I mean, I knew that it was convoluted, prolly bad form, and that I would not remember it when I had to go back. I must've secretly been hoping that I died before ever having to revisit. I'm so mad at myself.

DrAwkward
Giant
Posts: 139
Joined: Mon Sep 17, 2007 12:25 am
Contact:

Post by DrAwkward »

If you want a quick peek of this in action:

In Excel:
Column A is 0,1,2, ... 20
Row 1 is 0, 1, 2, ...20 (where A1 is the 0)

drop this bad boy in B2 and drag to fill...

Code: Select all

=IF(ABS(B$1-$A2) > 8, 0, IF( MOD(ABS(B$1-$A2),2), 2^1.5*100, 300) * $A2 * POWER(2,B$1 / 2) / POWER(2, $A2 /2 ))
A good friend will bail you out of jail.
A great friend will be in the cell with you, saying "That was frickin awesome!"

DrAwkward
Giant
Posts: 139
Joined: Mon Sep 17, 2007 12:25 am
Contact:

Post by DrAwkward »

I also have a formula for figuring out the equivalent EL (Encounter Level) of a mixed group of monsters.

It'll give a fractional answer for those that really want to fine tune.

Lemme know if its worth reverse engineering from my LabView source (a graphical language that doesn't cut&paste)
A good friend will bail you out of jail.
A great friend will be in the cell with you, saying "That was frickin awesome!"

User avatar
EvilSqueegee
Cave Troll
Posts: 81
Joined: Wed Dec 05, 2007 4:53 pm

Post by EvilSqueegee »

DrAwkward wrote:
giliath wrote:Have you seen anything that explains the math behind XP calculations? So far all I have seen is tables and I haven't really had the chance to reverse engineer the equations from the tables.
Yes. there is a formula to it.

I wrote my own in LabView, and I'll be happy to share the math as soon as I get home and can pick apart my code.

the experience table and experience-dependant benefites aren't open gaming liscence, sadly. They're property of Wizards, rather than being just part of the SRD.

The math, however, is something I've already reverse-engineered:

Level 1 begins at 0 EXP, naturally. Then level 2 takes 1,000 experience.

The reasoning behind it: Your current level, times 1,000, equals the experienece needed to get the next level.

For instance, 45,000 is level 10.
To get to 11th level, you need 55,000 (10,000 more experience than what was needed for 10th level.)

To then get from 11 to 12th level, you need 11,000 more experience (placing level 12 at 66k EXP.)

The formula lies in EXP till-next-level, rather than (from what I can tell) a base derivative of the actual levels themselves.
"Always Make New Mistakes."

User avatar
torstan
Great Wyrm
Posts: 1887
Joined: Wed Sep 27, 2006 6:50 am
Contact:

Post by torstan »

That's the easy bit. The question is how to figure out the experience from defeating a monster of a given challenge rating. This is the part that doesn't seem to have a straightforward mathematical formula.

User avatar
EvilSqueegee
Cave Troll
Posts: 81
Joined: Wed Dec 05, 2007 4:53 pm

Post by EvilSqueegee »

torstan wrote:That's the easy bit. The question is how to figure out the experience from defeating a monster of a given challenge rating. This is the part that doesn't seem to have a straightforward mathematical formula.
Well, the process is:

1) compare the average party level to the CR of the obstacle overcome.
2) Find that amount of EXP on the table.
3) devide by the number of people in the party and that's how much each person gets.

Looking at the chart on page 38 of the DMG, I see the following patterns:

If a party who's average level is X defeats a CR X, the amount of EXP awarded increases by 300 for each increase of X.

A 10th level party kills a CR 10 monster, they get 3000 EXP.

An 11th level party kills a CR 11 monster, they get 3300 EXP.

12th is 3600.
13th is 3900.

According to the information at the bottom of the chart, if a monster is 8 levels blow the party, no EXP is awarded. It doesn't support experience for 8 levels higher than the party, either, since that shouldn't be happening anyways.

Finally, it says that for monsters over CR 20, double the reward for a CR two levels lower. Thus, a CR 21 is double the rewards of a CR 19. At the moment I'm slightly preoccupied in building the map for our next game session, but I'll check to see if this is the formula the rest of the chart is built on as soon as I'm done with the game preparation.

Edit: Would it make sense to expand it to include random treasure generation? For instance, rather than EXPTool, could bump it to be RewardsTool and have it calculate experience and treasure (the treasure part would be easily done if you don't count the big database, since generating random treasure via dice is already written out in the DMG.)
"Always Make New Mistakes."

User avatar
EvilSqueegee
Cave Troll
Posts: 81
Joined: Wed Dec 05, 2007 4:53 pm

Post by EvilSqueegee »

Okay, so if I take a look at the level 10 experience bar on the chart:

Code: Select all

Experience Rewards Clip: levels 10-12, CRs 10-16

    +-----------------------------CR of monster-----------------
    |        10       11      12     13    14     15      16
Party Level-----------------------------------------------------
    10      3000    4500    6000    9000  12000  18000   24000
    |
    11      2200    3300    4950    6600  9900   13200   19800
    |
    12      1800    2400    3600    5400  7200   10800   14400
    |
    +------------------------------------------------------------
    
    
If party level is Y, X is CR, and experience is Z

Z is, in fact, equal to the rewards for (X-2)*2. If you look at the rewards for a party level of 10 killing a CR 12... that's 6000 EXP. A party of 10 killing a 10th CR is worth 3000.

Based on that fact and the pattern of a party achieving a reward of a CR equal to it's level (the Z for when Y=X) increasing by 300 for each increase to X, and the (X-2)*2 formula, I have enough information (not counting party levels or CR's of 1-3, which seem to be exempt from the pattern) to reconstruct the chart.

(Edit: Had to fix the chart, it showed wonky :P)
"Always Make New Mistakes."

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Post by Azhrei »

There is a formula for calculating XP from Monster CR and PC ECL. I believe it's exponential, but I don't recall where I saw it. Probably on ENworld.org ...

User avatar
PillBox
Dragon
Posts: 253
Joined: Thu May 17, 2007 4:07 pm
Location: London, England

Post by PillBox »

Don't know if this will help, but its and excel spreadsheet that calculates XP.

http://www.guild.net/~nytmare/XPCalc/XP ... ulator.xls

Post Reply

Return to “Ideas for New Applications”