Making unit experience worthwhile
Posted: 28 Aug 2016, 04:28
Is there any reason why unit experience hasn't been re-scaled yet? We all know the amount of kills needed to progress through the experience levels is ridiculous but has anyone attempted to change it? The campaign shouldn't be that much different than multiplayer. If anything, multiplayer game play should have priority over the few players that want to obtain hero units in campaign. Here's the code concerning unit experience:
I think these numbers are much more realistic for the # of kills needed per experience level, what do you think?Droid.cpp https://github.com/Warzone2100/warzone2 ... .cpp#L2235
static const struct rankMap arrRank[] =
{
{0, 0, N_("Rookie")},
{4, 8, NP_("rank", "Green")},
{8, 16, N_("Trained")},
{16, 32, N_("Regular")},
{32, 64, N_("Professional")},
{64, 128, N_("Veteran")},
{128, 256, N_("Elite")},
{256, 512, N_("Special")},
{512, 1024, N_("Hero")}
};
{Unit Kills, Commander/Sensor Kills}
static const struct rankMap arrRank[] =
{
{0, 0, N_("Rookie")},
{2, 3, NP_("rank", "Green")},
{4, 6, N_("Trained")},
{6, 10, N_("Regular")},
{8, 14, N_("Professional")},
{12, 18, N_("Veteran")},
{14, 22, N_("Elite")},
{16, 26, N_("Special")},
{18, 30, N_("Hero")}
};
The speed bonus can be reduced to: EXP_SPEED_BONUS 3Droid.h https://github.com/Warzone2100/warzone2 ... roid.h#L47
/* Experience modifies */
#define EXP_REDUCE_DAMAGE 6 // damage of a droid is reduced by this value per experience level, in %
#define EXP_ACCURACY_BONUS 5 // accuracy of a droid is increased by this value per experience level, in %
#define EXP_SPEED_BONUS 5 // speed of a droid is increased by this value per experience level, in %
Droid.cpp https://github.com/Warzone2100/warzone2 ... .cpp#L1594
// Factor in experience
speed *= (100 + EXP_SPEED_BONUS * level);
speed /= 100;
return speed;
Combat.cpp https://github.com/Warzone2100/warzone2 ... t.cpp#L179
// add the attacker's experience
if (psAttacker->type == OBJ_DROID)
{
SDWORD level = getDroidEffectiveLevel((DROID *) psAttacker);
// increase total accuracy by EXP_ACCURACY_BONUS % for each experience level
resultHitChance += EXP_ACCURACY_BONUS * level * baseHitChance / 100;
}
// subtract the defender's experience
if (psTarget->type == OBJ_DROID)
{
SDWORD level = getDroidEffectiveLevel((DROID *) psTarget);
// decrease weapon accuracy by EXP_ACCURACY_BONUS % for each experience level
resultHitChance -= EXP_ACCURACY_BONUS * level * baseHitChance / 100;
}