Unit experience points
Posted: Sat May 18, 2019 3:47 pm
This idea is well known in the community but I have not found a topic dedicated to it, so: instead of random giving veteranship, make certain actions increase a counter of XP for a unit that will give a veteranship level after reaching some value. This way the veteranship comes more predictable and "fair". We can use the same counter another ways: e.g. introduce "Min_Experience" requirement and use it on "Convert" action enabler, that results in Battle for Wesnoth-like "level-ups". The more advanced promotions system from Civ4+ is not only more difficult to code, it can be controversial as making unit system effectively too complicated.
Gaining of the experience: for example, in Wesnoth you gain 1xp per enemy level for just surviving and 8xp/lvl for a kill. In Civ5, there are XP amounts gained from attack and defence in different types of combat (melee 5/4, ranged (~bombardment but answerable by another ranged unit) 2/2) , that are modified from buildings and policies, as well as starting XP bonuses; actions on barbarians can't increase XP over 30. We can introduce effects "Combat_against_xp" and "Defeat_xp" with requirements on the other side of the combat, and "Experience_build" for initial unit modifier. Also, we need to do something with xp after converting/upgrading a unit (at gaining veteranship, it continues to accumulate), maybe single game setting "Convert_experience_pct" is enough.
Gaining of the experience: for example, in Wesnoth you gain 1xp per enemy level for just surviving and 8xp/lvl for a kill. In Civ5, there are XP amounts gained from attack and defence in different types of combat (melee 5/4, ranged (~bombardment but answerable by another ranged unit) 2/2) , that are modified from buildings and policies, as well as starting XP bonuses; actions on barbarians can't increase XP over 30. We can introduce effects "Combat_against_xp" and "Defeat_xp" with requirements on the other side of the combat, and "Experience_build" for initial unit modifier. Also, we need to do something with xp after converting/upgrading a unit (at gaining veteranship, it continues to accumulate), maybe single game setting "Convert_experience_pct" is enough.