This thread is meant for me to present the new soldier stat increase system and for everyone else to discuss it.
BASICSThe new system is an implementation of
this wiki proposal. Soldiers gain "experience" in combat vor performing various actions. As a result, their stats will rise, at an increasingly slower rate. Experience is gained and stored for every individual stat.
ASSUMPTIONSThese are the assumptions I made when writing the proposal and the code. Important to note is that these assumptions ar of the finished version of the game - not 2.2! So if an assumption clearly conflicts with 2.2, don't go off telling me I'm wrong, because I'm not talking about 2.2 here.
- Soldiers have an expected career length of 100 missions. That is to say, a soldier that is in active service, going on a majority of the missions, is expected to participate in about 100 of them over the course of the game, without being killed.
- There will be missions with less than or more than 8 aliens.
- XP will increase even outside missions, as a result of training facilities. Most XP should be earned in combat, however.
CAPSThese are the XP caps. A soldier can never gain more XP on a mission than the XP cap, no matter how much XP he earns from his actions. The caps are based around a "target" increase for the skill over 100 missions. For example, speed is set to increase by 15 points. To find the amount of XP x the soldier must earn to increase by 15 points the calculation is:
log 15 / log x = 0.6
log x = log 15 / 0.6
x = 10 ^ (log 15 / 0.6)
x = 91 (rounded)
This would mean an average of 0.91 per mission. Unfortunately, code limitations disallowed me from using floating point numbers for the XP values, so I do the division by 100 internally, and work with the calculated value.
Laziness, so here's the switch from the code (comments added here only):
case ABILITY_POWER:
return 46; //target 10
case ABILITY_SPEED:
return 91; //target 15
case ABILITY_ACCURACY:
return 290; //target 30
case ABILITY_MIND:
return 290; //target 30
case SKILL_CLOSE:
return 680; //target 50
case SKILL_HEAVY:
return 680; //target 50
case SKILL_ASSAULT:
return 680; //target 50
case SKILL_SNIPER:
return 680; //target 50
case SKILL_EXPLOSIVE:
return 680; //target 50
case SKILL_NUM_TYPES: /* This is health. */
return 2154; //target 100
USABLE STATISTICSIn an attempt to prevent people from suggesting unworkable alternatives, here is the struct of statistics that is used to calculate the XP values. If it isn't in here, it isn't counted. I took the liberty of removing a few lines for stuff that can't be used, for the sake of brevity.
/* Movement counts. */
int movedNormal;
int movedCrouched;
/** Kills & stuns @todo use existing code */
int kills[KILLED_NUM_TYPES]; /**< Count of kills (aliens, civilians, teammates) */
int stuns[KILLED_NUM_TYPES]; /**< Count of stuns(aliens, civilians, teammates) */
/**
* Hits/Misses @sa g_combat.c:G_UpdateHitScore. */
int fired[SKILL_NUM_TYPES]; /**< Count of fired "firemodes" (i.e. the count of how many times the soldeir started shooting) */
int firedTUs[SKILL_NUM_TYPES]; /**< Count of TUs used for the fired "firemodes". (direct hits only)*/
int hits[SKILL_NUM_TYPES][KILLED_NUM_TYPES]; /**< Count of hits (aliens, civilians or, teammates) per skill.
* It is a sub-count of "fired".
* It's planned to be increased by 1 for each series fo shots that dealt _some_ damage. */
int firedSplash[SKILL_NUM_TYPES]; /**< Count of fired splash "firemodes". */
int firedSplashTUs[SKILL_NUM_TYPES]; /**< Count of TUs used for the fired "firemodes" (splash damage only). */
int hitsSplash[SKILL_NUM_TYPES][KILLED_NUM_TYPES]; /**< Count of splash hits. */
int hitsSplashDamage[SKILL_NUM_TYPES][KILLED_NUM_TYPES]; /**< Count of dealt splash damage (aliens, civilians or, teammates).
* This is counted in overall damage (healthpoint).*/
int skillKills[SKILL_NUM_TYPES]; /**< Number of kills related to each skill. */
int heal; /**< How many hitpoints has this soldier received trough healing in battlescape. */
FORMULASPower: Currently fixed at 46. I didn't see a point in coming up with a formula as long as power is unused.
Speed: 1 point for every space moved. 2 points for every space moved while crouched. 1 point for every 10 TUs spent using weapons.
Accuracy: 20 points for every hit scored on an enemy. Only one hit can be scored per use of a weapon, except for splash weapons. 30 points for hits with sniper weapons.
Mind: 100 points for every enemy kill.
Close: 150 points for every hit on an enemy. One hit per weapon use, except splash.
Heavy: 200 points for every hit on an enemy. One hit per weapon use, except splash.
Assault: 100 points for every hit on an enemy. One hit per weapon use, except splash.
Sniper: 200 points for every hit on an enemy. One hit per weapon use, except splash.
Explosive: 200 points for every hit on an enemy. One hit per weapon use, except splash.
Health: The sum of all other experience gained (after caps), divided by two.
CALCULATIONAfter a mission, the XP counts are calculated as follows. The soldier then receives XP equal to to the earned value or the cap, whichever is smallest. Then the stats are updated as follows:
new value = start value + (total XP / 100) ^ 0.6
Where "start value" is the value the soldier had when he was recruited.
NOTES- The system is not intended to force the player into action or into a specific strategy. The XP cap is there to prevent "training abuse", and the formulas are intended to allow any soldier who pulls his weight to reach the cap easily. In short, if the player plays normally, his soldiers should grow at an optimal rate. But soldiers sitting around in the dropship will not get free buffs.
- I will not get away from the XP system or the power of 0.6. I like the system, it's flexible and I think it's a good game mechanic. The power of 0.6 makes sure no veteran soldier will ever be surpassed by a newer soldier, even if the newer one had better initial stats, as long as the veteran keeps training.
- I will, however, adjust the formulas according to suggestions made in this thread, if I think it's an improvement. If I do not, no amount of arguing will convince me, so please don't keep hammering on the same idea.
- There is discussion about changing the actual set of abilities. I am aware of this, so please don't bring that into this discussion if possible. If such a change comes to pass, the relevant formulas will be added or removed.