PDA

View Full Version : Anyone able to help me with some math?



Talakeal
2012-04-08, 06:55 AM
I need to plot out a treasure curve and am terrible with this sort of math, anyone know a formula I could use? (Or better yet do the math for me, but that's a lot of work).

I need to create a chart for GP value by encounter over 150 encounters.

The first 30 encounters need to average 100g each
31-60 average 1,000gp
61-90 average 10,000 gp each
91-120 average 100,000 gp each
and the last 30 average 1 million gp each

I need each encounter to award more than the last and I would like the progression to be as smooth as possible. I hope I was clear with what I meant.

Thank you very much.

ChaoticBroth
2012-04-08, 07:23 AM
I can actually do it for you, but I kinda need to know what the gold for your very first encounter (first in each set, actually. 31st, 61st, 91st and 121st) would be. It's kind of easy to do once you know that, but it's just time consuming.

Edit: And the 150th value. This just makes it easier.

mattie_p
2012-04-08, 07:29 AM
Using some help from this pdf http://wcherry.math.unt.edu/math1650/exponential.pdf and an assumption, I came up with the following formula, which you should be able to use with excel.

gold = 31.6 * (10 ^ x/30), where x = the encounter you are on.

The assumption I used was that the gold at encounter 15 (the midpoint of the range you gave) should equal 100gp, the gold at encounter 45 (the midpoint) should equal 1000, etc.

When creating a chart in excel, use two columns, encounter, and gold. The encounter is easy, just 1-whatever, proceeding linearly, starting in cell A2. The formula in column B is
=31.6*POWER(10,(A2/30)) Fill down in column B, and you are done.

Talakeal
2012-04-08, 07:41 AM
Thanks Mattie, that works great. Just need to figure out how to get the numbers a little more "round" so they look better on a chart.

And thank you for the response Chaotic. It looks like I got what I needed from Mattie, but I appreciate your time nonetheless.

Edit: Actually, I take that back, there is a slight problem. The average appears to be about 25% higher than expected. Any idea why that is?

mattie_p
2012-04-08, 07:57 AM
Thanks Mattie, that works great. Just need to figure out how to get the numbers a little more "round" so they look better on a chart.

Make a third column, use the formula
=ROUND(B2,1-INT(LOG10(ABS(B2)))) Bingo, rounds to 2 significant digits. Enjoy. (Also more google-fu)

Sorry, based on my assumption, it actually didn't average to 100 (has to do with the sum over time of the exponential factor). Use 24.6 as the multiplier instead of 31.6 and it will now average to 100 over the course of each span of encounters.

ChaoticBroth
2012-04-08, 07:58 AM
Actually, mattie, it's gonna be 30.432... as opposed to 31.6. It won't seem like much at the low levels, but it's gonna stack up quickly. It's because the midpoint of 1-30 isn't 15. It's 15.5.

30.43219887 is actually going to be the most accurate. The median of each segment (15.5, 45.5, 75.5, 105.5, 135.5) actually are at 100, 1000, 10000, 100000 and 1 million respectively. 31.6 comes out with about 3.8% more wealth.

So, in my case, the equation comes out to be y=30.43219887(10^x/30)

As for making the values work, Just round them up/down and make sure you've got an even number of those in each section.

Edit: Damn, mattie, you're awesome at getting these sort of things.

Mad Wizard
2012-04-08, 08:02 AM
You want an exponential function. W(t) = 333.6e^0.07675t, where t is the number of encounters that have passed and W(t) is the total treasure. The coefficients aren't quite precise enough to make it perfect, but they work pretty well.

Don't ask how long it took me to stop screwing around with polynomials and realize I should be using an exponential function...

Acanous
2012-04-08, 08:02 AM
you want that in just gold, or in items the enemies have?

Talakeal
2012-04-08, 08:05 AM
you want that in just gold, or in items the enemies have?

Just gold. I am working on a "bounty" system rather than a "kill them and take their stuff" system.

Acanous
2012-04-08, 08:16 AM
Oh. Well in that case I believe the Excel spreadsheet formuli posted will suit your needs.
Here I was about to embark upon an awesome quest to gear out 150 encounters :<

ChaoticBroth
2012-04-08, 08:20 AM
Oh, and Talakeal, you'll actually want to do the rounding by hand. Using the method mattie provides works at lower amounts (below 100), but after that, it falls apart. That's because it's rounding to two significant digits. I'm no Excel expert here, so I have no idea how to change that.

And here's the table of the first 30 encounter/gold values from the method I used to get it (y=30.43219887*10^(x/30), manual rounding)
{table=head]Encounter|Gold
1|33
2|35
3|38
4|41
5|45
6|48
7|52
8|56
9|61
10|66
11|71
12|76
13|83
14|89
15|96
16|104
17|112
18|121
19|131
20|141
21|153
22|165
23|178
24|192
25|207
26|224
27|242
28|261
29|282
30|305
[/table]

Acanous
2012-04-08, 08:24 AM
could also be fun to make an XP chart for these 150 encounters, and average that out for a party to go from 1-20. Then you could cherry-pick enemies that gave the right kind of XP, and give them equiptment based on the GP...

Talakeal
2012-04-08, 08:28 AM
could also be fun to make an XP chart for these 150 encounters, and average that out for a party to go from 1-20. Then you could cherry-pick enemies that gave the right kind of XP, and give them equiptment based on the GP...

Oh yes, that is the plan. I have already calculated the XP so that the PCs will hit epic level after the 150th encounter and am will fight every enemy in the bestiary on the way. But I think I already have the math down for that part and am now working on the treasure.

mattie_p
2012-04-08, 08:32 AM
Oh, and Talakeal, you'll actually want to do the rounding by hand. Using the method mattie provides works at lower amounts (below 100), but after that, it falls apart. That's because it's rounding to two significant digits. I'm no Excel expert here, so I have no idea how to change that.



Using the revised formula for the first calculated column (24.6*10^(x/30)) and the rounding formula for the second calculated column, it works out pretty well, I think.

I extended my excel formula to 150 encounters, and found that for each span (1-30, 31-60), the un-rounded gp worked out to multiples of 2996.7 gp for each span, and the rounded gp worked out to multiples of 3003 gp for each span. I believe this is close enough to what Talakeal requested that it should work fine.

Also, ChaoticBroth, I agree that 15.5 is the median, and yours would better meet his needs, if that was what he was asking.

However, both you and I misread his question, or we used an assumption that turned out to be flawed, if we were trying to average 100gp for the first 30 encounters. I hand-waved that, and used 15 as the breakpoint to get to 100gp. But he wanted precision, and my formula granted 3800 and change gp for the first 30 encounters, exceeding his guidelines. In order for the sums to work out, the breakpoint should be something like 18.3, which is reflected in my (revised) formula.

Anyway, enough maths for now. Enjoy your bounty program!

EDIT: There is one minor note of interest, encounters 19 and 20 in each span both give the same calculated gp in my formula, due to the way the rounding is handled. This could be fixed by using three significant digits, or changing the rounding formula to
=ROUND(B2,2-INT(LOG10(ABS(B2)))) The total gp is more precise, and then you don't get the same amount of gp for two encounters in a row.

ericgrau
2012-04-08, 11:49 AM
I'm confirming the constant of 24.6270906237355 to give exactly the average you want. Apparently that got fixed eventually (24.6 is close enough).

Talakeal
2012-04-08, 09:58 PM
Thanks for the help everyone, entering the data now and so far everything seems to be going perfect.

One more quick question, in Excel, how do I make a column have the sum of the entries in the previous column? For example c1=b1, c2=b1+b2, c3=b1+b2+b3, c4=b1+b2+b3+b4, etc?

Thanks again!

Bakkan
2012-04-08, 10:38 PM
Set c1=b1, then set c2=c1+b2, c3=c2+b3, and so forth. After setting those last two, you can just click and drag in Excel to copy the formula down for all 150 encounters.

Talakeal
2012-04-08, 11:38 PM
Set c1=b1, then set c2=c1+b2, c3=c2+b3, and so forth. After setting those last two, you can just click and drag in Excel to copy the formula down for all 150 encounters.

Thank you, works great.