Topic: Research Formula

Science% = 100 * (1 - exp(-RP / (100 * networth) ) ) <--- this is wrong

if i put this into excel. (tested over 4 ticks)

Networh 1720
Research points 49.1K 

you get 24.83 so round to 25 or by changing to a % cell  2483% <---- wildly out

i been playing with the formula and found that putting this:

sad(100*(1-EXP((-RP)/(100*NW))))/100)-0.01
into a % cell gives the accurate Research %

however not using % cell the code would be

sad(100*(1-EXP((-RP)/(100*NW))))-1)
and this would give the same figure but not % wise

so wiki be wrong!!! lol or updating would be fine.

War doesn't decide who is right, it decides who is left.

Re: Research Formula

doh the sad should be "= ("


no space

War doesn't decide who is right, it decides who is left.

Re: Research Formula

I don't see the problem.

Rev wrote:

Science% = 100 * (1 - exp(-RP / (100 * networth) ) ) <--- this is wrong
if i put this into excel. (tested over 4 ticks)
you get 24.83

Untill there your calculations are correct. No need for giving the cell a percentage format since 24.83 is already the science percentage (by definition).Rounding of the research points or science percentage could give a discrepancy (+/- 1%).

The game will round the science percentage down for presentation purpose. In practive it will calculate with the real percentage.
Suppose a regular building time of 5. With 25.00% research it will go down to exactly 4 ticks (5/(1+25%)). With just 24.83% your built time would be 4.005447 ticks, which is more than 4 ticks, thus it will built at tick 5. Rounding up would lead people to think built times are calculated wrong.

~Attacking is a Skill~
~Defending is an Art~

Re: Research Formula

Yes but in excel it rounds up which is why people are getting confused. This code removes that issue.

War doesn't decide who is right, it decides who is left.

Re: Research Formula

I don't see why the rounding of Excel is a valid argument here. Excel can round down if you tell it to.

Your code actually creates issues as it introduces rounding where the game does not round. Allthough you will see whole percentages under your research tab, everything is calculated internally with the actual research percentage (for instance 24,831123%)

After calculation:
- Buildtimes get rounded down
- Income / resoruces do not get rounded (ingame presentation is rounded to 1 gc)
- ingame presentation of research percentage is rounded to a whole %

Just calculate with the exact percentage (including decimals) and round up or down accordingly.

Note: if you rewrite the science equation as RP as a function of Science% the default rounding of excel will be inveterted and do what you are expecting it to do by default.

~Attacking is a Skill~
~Defending is an Art~