Experience affects upgraded units

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
The "FreeExperience" field in the Policies table and "GlobalExperience" field in the Buildings table apply their experience when units are created or upgraded. This bug happens because upgrading creates a new unit and deletes the old one. These fields need to check if the unit is actually new, or was upgraded.
 
You're saying that when I have a 0 experience unit and upgrade it in a city with barracks and an armory that the upgraded unit will suddenly have 30 experience? And when I upgrade a 0 experience unit anywhere in my territory while I have the Total War Autocracy SP, taht this upgraded unit will get the 15 xp out of the blue?

I doubt it. THAT would have been noticed by myself and many others already. But I'll try to observe this in my future games and report the result.
 
Barracks use the "Building_DomainFreeExperiences" table, not the "GlobalExperience" field in the Buildings table. The bug with the "FreeExperience" field in the Policies table is only encountered in vanilla if you upgrade units after acquiring the finisher of the least-used policy tree (Autocracy), so it's rarely seen.

It doesn't matter where the units are upgraded. Upgrading always creates a new unit, and these fields give experience to all new units. It makes sense from a technical perspective but is probably not what the designers intended. :)
 
I tested this in a city with a barracks, armoury, military academy, brandenburg gate and the final policy in autocracy active.

Created an infantry and upgraded it to mech inf. It had 75 XP before and after the upgrade.
 
Well the unit must have been built before all those things were gotten, say it started at 60 or less xp and then would get the +15xp extra from autocracy. I'll try to keep this in mind and test it someday. However... guess what... I never ever find myself taking autocracy these days :D
 
I can't reproduce this bug. Started future era, quick. Bought an artillery and a sub on first turn, after deleting barracks. Next turn took full autocracy. Waited a turn (or few), then upgraded. Units still have zero XP.
 
Barracks are not associated with the issue. Here's what caused the bug:

  1. Unit built.
  2. Militarism and/or Brandenburg acquired.
  3. Upgrade order given anywhere on the map.
    1. Creates new unit.
    2. Global experience bonuses applied to new unit (Militarism and/or Brandenburg).
    3. Health, promotions, orders copied over.
    4. Deletes old unit.
Firaxis forgot to omit upgraded units from the global experience bonuses. I fixed the problem by not using Firaxis's version, and instead creating a new version which I manually apply to new units. Incidentally... this way upgrades are done (create new unit, delete old unit) is also why unit flags are glitchy. After upgrading a unit you can sometimes see 2 units on the same tile, the old one and new one.
 
Wait. Are you talking about in a vanilla game, or just with the mod? Because I could not reproduce this in a vanilla game.
 
It's a bug with the vanilla FreeExperience and GlobalExperience fields. If a policy or building has those fields, upgraded units got experience twice.
 
Top Bottom