1 (edited by Kaboem 03-Apr-2010 03:31:50)

Topic: OB cost function

Here a formula to calculate what it will cost to OB a planet. I did some tests and it seems to be accurate. Since ic uses some rounding the calculated cost and the real cost will slightly differ.

I am not 100% sure, so take a look and correct me where I am wrong, I learn from my mistakes so I might actually learn something here big_smile
Maybe there is a formula posted somewhere else, I didn't found it.

Given:
Max: Buildings this planet can easily support
Total: Total amount of buildings on the planet (before building)
Build: Amount of buildings you want to build

Asked: What will it cost to build what I want to build


Formula:
base = 1/Max * (Total * Build + (Build +1)*(Build/2) )

//example//

Ob your home planet with 100 Research centers

MaxSize = 250
Total = 100
Build = 250

base = 1/250 * ( 250 * 100 + (101) * (100/2) )
base = 120.2

endu= 120.2 *1 = 120 endu
cash = 120.2 * 100 = 12020 gc



//Appendix//
Max: Buildings this planet can easily support
Total: Total amount of buildings on the planet (before building)
Build: Amount of planets you want to build

Ob cost for 1 additional building =   (Total + 1) / Max   
OB cost for 2 additional buildings = (Total + 1) / Max + (Total + 2) / Max
OB cost for n additional buildings:

(Total + 1 / max) +  (Total + 1 / max) + (Total + 2 / max) + .... + (Total + n / max)
1/max * ( (Total + 1 ) +   (Total + 2 ) +  ... (Total + n )  )
1/max* ( n * total + (1+2+... n ) )

// (1+2+ .... n ) = (1+n) * (n/2)

1/max* ( n * total + (1+n) * (n/2) )

Dispo killed The riddle bar

2 (edited by Petrolstone 03-Apr-2010 05:50:19)

Re: OB cost function

Good work!

I solved what the formula was using an integral a while ago.  If you understand calculus you can see how I came up with it. If you don't you can still compare my formula with your formula to see if they agree

http://www.imperialconflict.com/forum/viewtopic.php?pid=805008#p805008

Rehabilitated IC developer

Re: OB cost function

Bah I should have searched better tongue The Formula is the same and and your "warning" is also applicable here.

Dispo killed The riddle bar