Creature exp is miscalculated?

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Creature exp is miscalculated?

Unread postby Beholder » 07 Nov 2009, 18:52

Yeap... I think it is.

I`ve set the max exp (rank 10) to be 20 000. Rank 1 is 5% of that so we should get 1000 but we get 1142. That's about 5,7%. Now why is that? I understand if that would to be 4,5% out of 18 746 or something but 20 000 * 5 / 100 is not likely to get any kind of rounding issues. What the hell? I`ve checked other ranks too and it seems that all values are incorrect by 0,1-0,7% (except rank 0 and 9).
Beholder

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 07 Nov 2009, 19:45

What a shame they missed it by 0,1%...Definitely WoG team was a bunch of amateurs. :devil:

User avatar
Pol
Admin
Admin
Posts: 10056
Joined: 29 Nov 2005
Location: IN SOMNIS VERITAS
Contact:

Unread postby Pol » 07 Nov 2009, 21:41

Salamandre wrote:What a shame they missed it by 0,1%...Definitely WoG team was a bunch of amateurs. :devil:
That, ahem but everyone in this thread (so far) is WoG Team member. :D
"We made it!"
The Archives | Collection of H3&WoG files | Older albeit still useful | CH Downloads
PC Specs: A10-7850K, FM2A88X+K, 16GB-1600, SSD-MLC-G3, 1TB-HDD-G3, MAYA44, SP10 500W Be Quiet

User avatar
Warmonger
Pixie
Pixie
Posts: 125
Joined: 15 Dec 2007
Contact:

Unread postby Warmonger » 09 Nov 2009, 09:47

I guess it may be result of Learning skill combined with error of approximation?
VCMI : the future of Heroes 3!
People just don't care.

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 11 Nov 2009, 15:47

Learning skill has nothing to do with exp that creatures gain.

Like I`ve said you can get 1142 instead of 1000 which is about 14% difference and that`s a lot when you try to give some creature a specific rank.
Well, I'll have to make some workaround.
Beholder

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Unread postby GrayFace » 21 Nov 2009, 07:53

Rank 1 is 5.7143% of full exp.
Here are requirements of each rank to level up:
1000,1000,1200,1400,1600,1800,2000,2200,2500,2800
17500 in total.
Rank 1 is 1000/17500*FullExp.
Rank 2 is 2000/17500*FullExp.
Rank 3 is 3200/17500*FullExp. (3200 is 1000+1000+1200)
....
Rank 10 is FullExp.
Rank 11 is (17500 + R11Exp)/17500*FullExp (I suppose Rank 11 is maximum exp a creature may have?).

More precisely:
Rank 1 is floor(1000.01/17500*FullExp).
Rank 2 is floor(2000.01/17500*FullExp).
...
Rank 10 is floor(17500.01/17500*FullExp).
Rank 11 is floor((17500.01 + R11Exp)/17500*FullExp) (I suppose Rank 11 is maximum exp a creature may have?).
So, 0.01 is added to the first value to make sure rounding is ok.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
Beholder
Scout
Scout
Posts: 150
Joined: 27 Feb 2006
Location: Poland, Kraków
Contact:

Unread postby Beholder » 25 Nov 2009, 18:08

yeah, so everything's fine unless you change the max exp...
Beholder


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 7 guests