Verified:

nah1986 Game profile

Member
61

May 8th 2023, 12:38:49

So in my Gitlab-project, I can't understand what "EXP" means, when I try to understand how advanged enemy's weapons are
in the formula
Tech% = BaseTech%+(MaxTech%-BaseTech%)*GvtTech*(1-EXP(-GvtEff*TechPts/(C1+C2*Land)))
found on page. https://wiki.earthempires.com/...x.php/Technology_Formulas

I have written on gitlab in file "goverments.cpp", in fuction GovermentWeaponsTech
(1.0+(1.50*GvtTech-1.00)GvtTech*(1-) TODO

How do I fix this formula?

nah1986 Game profile

Member
61

May 8th 2023, 17:10:21

Okay, so

//std::cout << "military tech " << (1.0+(1.50*GvtTech-1.00)*GvtTech*(exp(2.71828)-1.0*points/(780+5.75*land)) << std::endl;
Where
(1.0+(1.50*GvtTech-1.00)*GvtTech*(exp(2.71828)-1.0*points/(780+5.75*land))

is the value military technology double. (meaning like 1.31 or 1.21, but minimum 1.0)

Tertius Game profile

Member
EE Patron
1645

May 8th 2023, 19:47:01

exp => the exponential function (e to the power of the argument):

https://support.microsoft.com/...45-4c37-bc8c-329660a63abe

Celphi Game profile

Member
EE Patron
6349

May 8th 2023, 20:18:24

@nah1986

1000 * 1. = 1000
1000 * 1.5 = 1500
Resistance is futile. You will be assimilated.

Bug Game profile

Member
EE Patron
1539

May 9th 2023, 11:56:00

exp is the function that comprises of Euler's number e raised to a particular number's power. The Exponent function is a particular power series, that is based around a rather classical explanation of The sum of all x to the power of k divided by k factorial such that it is equal to 1 + x + x^2/2 + x^3/6 + x^4/24 + ... and so on to infinity.

https://wikimedia.org/...656be748452cac36e329be85d

if you need a visual.

Also your program needs some help, exp(2.71828) is just e^e, which is a constant and wont do anything for that formula.

you need something like exp(points/..land..etc)

consult the game wiki if you need the formula, it's in pretty easy to read Wiki language for anyone who cares to look.

nah1986 Game profile

Member
61

Sep 12th 2023, 13:25:00

I got it to work.