HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Money Building Formula

11-14-2004, 04:22 AM#1
Oo.h3ih02.oO
I think this is in the right place, if not please move it. Well in a lot of maps they have a certain building that gives you a certain amount of money at a periodic event and you can upgrade it to give you more money. This is just a formula i am using for my TD map im making to decide how much money the buildings will give you. You find how much the first level tower is going to be, i will use 2. The formula to find level 2 looks like this(G is Gold): X * 2 + Y = G, and Y = A + (B * C). The way it works is this. X is 2 because it is the starting amount of the level 1 tower. A starts as 0, B starts as any number you want(i will use 1), and C is 1. So in my example it would be: 2 * 2 + (0 + (1 * 1)) = 5. Then you use the same formula for level 3, except, now A = Y, C increases by 1 and X = G. So for third level it would be: 5 * 2 + (1 + (1 * 2)) = 13, forth level is: 13 * 2 + (3 + (1 * 3)) = 32, fifth level is: 32 * 2 + (6 + (1 * 4)) = 74. This was hard to explain and i dont know if anyone would understand so im gunna put my example down in a little data chart:

Formula: X * 2 + Y = G, Y = A + (B * C)
Level 1
--G = 2
Level 2
--X = G
--A = 0
--B = 1
--C = 1
--Y = 1
--2 * 2 + (0 + (1 * 1)) = 5
--G = 5
Level 3
--X = G
--A = Y
--B = 1
--C = 2
--Y= 3
--5 * 2 + (1 + (1 * 2)) = 13
--G = 13
Level 4
--X = G
--A = Y
--B = 1
--C = 3
--Y = 6
--13 * 2 + (6 + (1 * 3)) = 32
--G = 32
Level 5
--X = G
--A = Y
--B = 1
--C = 4
--Y = 10
--32 * 2 + (10 + (1 * 4)) = 74
--G = 74

Hope this helped someone!
11-14-2004, 04:32 AM#2
AntJAB
Personaly I don't understand why this would be needed.
It seems like alot of work for something so simple.
Also, the only two variables you describe are G (almost self explanitory) and X.

It seems like all you need to figure out a gold income is:
Player Gold = [Player Gold] + [Number of Level1 Towers * x] + [Number of Level2 Towers * x] + etc...
X being, of course, the value of each tower.

However you may have some rhyme or reason to your formula that I don't know about.
Just my two cents.