Experience bug/feature?

Field of Glory: Empires is a grand strategy game in which you will have to move in an intricate and living tapestry of nations and tribes, each one with their distinctive culture.
Set in Europe and in the Mediterranean Area during the Classical Age, experience what truly means to manage an Empire.

Moderator: Pocus

Post Reply
storeylf
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Tue Oct 06, 2015 8:27 pm

Experience bug/feature?

Post by storeylf »

(been drinking wine so sorry for any tipsy typos)

Been playing a campaign (well obviously, I wouldn't be here otherwise :) ), and at first I thought there was a bug in max experience, it used to be 150 yet nothing was getting over 120. I was putting that down to the Peria DLC maybe changing exp rates etc (and ignored the issue).

Then I noticed that after exporting and importing a battle to FOG my units with 120 experience were now experience 75. WTF?

So i did a bit of debugging, and sure enough the script for importing a battle back into Empires after FOG was showing that experience was being added to each unit, but that 118 + 3 = 75? WTF (again)!

Then I noticed that actually that was not on all units, it's maths on some units was correct. I reloaded and let empires resolve the battle (rather than export) and sure enough the experience still plumetted, so it wasn't the FOG battles, but any battle.

Following the code, I've ascertained the following.

When a unit's experience is set via Unit_SetXP (which is where all exp changes seem to go) then there is a check to ensure that you do not set the exp higher than the max. This seems to be the issue. That check accounts for faction mods like being glorious etc. This may be a case that I happened to spot this at a specific point in my game. I had just become a glorious empire a few turns before, and hence my experience per level had improved. Prior to this my modifier was a 20% bonus, and 20% bonus from the default max of 150 exp is indeed 120 - that was why may exp was stuck at 120 exp on many of my units. Having become glorious my exp to reach max level was now 75 (50% bonus). This did not immediately change any of my units; until they 'gained' some exp and then the logic to check against max exp kicked in and set my uber vets to 75 exp. Hence 118 + 3 = 75. A pretty massive drop, and one I noticed very much as I have modded the export to use the exp points rather than level, losing that amount of unit experience was noticeable. Though not as much as hovering over the units in the Empires game and wondering where the points had gone?

This may not be so bad within the main game itself; which is more star based rather then points based. But, my leader who is giving my a nice bonus is about 70 years old and due to croak. At that point my units will not get their max experience back and they will suddenly be level 3 rather than 4. So units that were 120 exp (level 4) drop to 75 (level 4) and then stay at that (level 3) when the leader dies.

Obviously I can fix this issue myself locally, but can the default game please not nobble my units experience points in said way. The leader and factions mods are meant to alter the level I'm at based on Exp points not change on a whim the exp point themselves, least of all at the point I just gained experience. I haven't spotted this before, and I'm sure I used to have units with 150 exp even if the faction mods altered the points per level. Though it could be a timing thing I'd missed before, where you only notice at certain points after the mod changes and then you have a battle.

PS I'm sure I haven't edited the scripts them selves, I did get Steam to check the files and run against what it thought were the correct versions etc.
Pocus
Ageod
Ageod
Posts: 7115
Joined: Tue Oct 02, 2012 3:05 pm

Re: Experience bug/feature?

Post by Pocus »

Good catch, I'll check to fix the code.
AGEOD Team - Makers of Kingdoms, Empires, ACW2, WON, EAW, PON, AJE, RUS, ROP, WIA.
Post Reply

Return to “Field of Glory: Empires”