Re: Adding achievements to KaM
PostPosted: 21 Jun 2013, 11:32
First issue in designing achievements (Ach) has appeared- Achs can be per-mission and global. For simplicity let's take there could be an Ach to kill 100 enemies in a single mission and another one to kill 9999 on a global level.
In a single mission it is straightforward - we watch stats and as soon as there's 100 kills - grant an Ach to the player;
But global level Achs are not so simple. What if player has saved right before a fight and then loaded the savegame a couple of times, and a couple more, how do we count the right number of kills for the global Ach? One solution is to transfer stats from the mission to global Achs only on mission victory. Until mission is not won - keep the global Achs unchanged. That could work, but there's one more catch - how do we differentiate between mission won for the first time, mission won again from the savegame and mission won after restart .. we need to count kills only in 1 and 3 case (and probably count 2 case if number of kills was higher than in 1) ?
In a single mission it is straightforward - we watch stats and as soon as there's 100 kills - grant an Ach to the player;
But global level Achs are not so simple. What if player has saved right before a fight and then loaded the savegame a couple of times, and a couple more, how do we count the right number of kills for the global Ach? One solution is to transfer stats from the mission to global Achs only on mission victory. Until mission is not won - keep the global Achs unchanged. That could work, but there's one more catch - how do we differentiate between mission won for the first time, mission won again from the savegame and mission won after restart .. we need to count kills only in 1 and 3 case (and probably count 2 case if number of kills was higher than in 1) ?