Little Formulary

Here is enough space for all players to ask questions about the game.

Moderator: moderators

Guest

Post by Guest » 08.08.2009, 12:01

*searches through files for a specific spreadsheet containing a wide variety of data on Kapilands*

I'm mad all my data that I have personally researched throughout my lifetime on Kapilands is gone (there are two copies but both were lost from uncontrollable circumstances). Among the data was research I conducted that I used to find the near perfect 24 hr sale time for a product on any amount, any quality, and any size (that is a multiple of 10). The generated formulas were accurate but not perfect due to a slightly inconsistent value. I could start up the research to create a formula for calculating the (near) exact price that will sell the product in 24 hours with 40k ad points.

For anybody who is interested, here is a list of every variable used in stores to calculate the sale time.

Product (Increase per Quality varies between products), Average Price, Average Quality, Product Quantity, Product Quality, Product Price, Store Size (Only Max Capacity assuming size is multiple of 10 for maximum efficiency), Ad Points (Don't know have any data to know exact influence).

The secret is that the average quality and price is the quality and price for selling a full store with no ads in 24 hrs. This makes the baseline a linear function and the average stats real a point on the graph. You need a second point to find the linear function so you just have to fill your store with the product and adjust the price to make it as close to 24 hours as possible. If you want to fill a store partially, just multiply 24 by (Filled Capacity/Max Capacity) and you have how many hours you need to find the right price for that specific quality for the day. Now you have two points that the linear function intersects and all that is left is the slope. (Price-Average Price)/(Quality-Average Quality) and you have your increase per quality. The increase per quality shouldn't change (much) each day but it helps to update every month or so.

Formula: (Base Price+[Increase per Quality*Quality])/(Filled Capacity/Max Capacity)=Price for 24 Hour Sale of Entire Stock

PS: The Base Price is the price for q0 for the day before and changes every 24 hours.
(Average Price-[Increase per Quality*Average Quality])=Base Price

Guest

The exact formula...

Post by Guest » 21.07.2011, 17:48

The exact formula for production is...

( 1/(E+E*E*0.005)*E*E*O ) / (OPT_LOOKUP) * (30/LEVEL_LOOKUP)

Where E is the number of employees and O is the original production, which you have to guess at, but it's not hard, you can also find the original production by using kapitools and then the formula to divide by the factor.

So, for example, at Merchent, a Plantation with 1 employee produces 447.76 seeds per hour. A good guess is that the original O = 450.

To test the formula, we'll use 10 employees. Kapitools tells us at Merchant level and 10 employees, we'll produce 4285.71 Seeds per hour (we wont need to know OPT_LOOKUP or LEVEL_LOOKUP for now).

So 1/(10+10*10*.005)*10*10*450 should equal 4285.71

Obviously 10*10 is 100 so we'll plug that in...

1/(10+100*.005)*100*450

100*450 is 45000 of course and we'll do the inside of the parenthesis

1/(10.5)*45000

1/(10.5) = 0.095238095

And 0.095238095 * 45000 = 4285.714286, which is right on the money with kapitools.

Now you can use the formula in your spreadsheets.

As far as optimizations...

400 = 15/16 = .9375
800 = 14/16 = .875
1200 = 13/16 = .8125
1600 = 12/16 ...
2000 = 11/16
...
3200 = 8/16 = .5

or... ( 16 - floor(E/400) ) / 16

Now once you calculate the production of a 400E building, you take that and divide it by .9375 to get the actual output. .9375 is our OPT_LOOKUP

So for a 400-799 E building the formula is...

(1/(E+E*E*0.005)*E*E*O) / .9375

for a 800-1199 the formula would be...

(1/(E+E*E*0.005)*E*E*O) / .875

And thanks to Drvic enterprises we know that...

ad percentages depending on the level

Merchant = 30
Retailer = 34
Trader = 36
Small Businessman = 38
Businessman = 39
Upmarket Businessman = 40
Manager = 41
Entrepreneur = 42
Large Scale Manufacturer = 43
Industrialist = 44
Billionaire = 45
Big Industrialist = 46
Tycoon = 47
Financial Mogul = 48
Capitalist = 49
Trillionaire = 50


production = Merchant's production * 30 / level

So for a Tycoon , we get 30/47 = 0.638297872, 47 is our LEVEL_LOOKUP

So for a Tycoon producing seeds with 800 employees we plug in the numbers...

( 1/(800+800*800*0.005)*800*800*450 ) / .875 * 0.638297872

Let me know if you run across any problems...

Guest

Post by Guest » 21.07.2011, 18:39

Nicely laid out FLC...

I picked up a few shortcuts for use on my own spreadsheets..

thanx allot!!!

:mrgreen:

Post Reply