[0.69.420-PUBLIC#1921] Eligible achievements don't activate

one_two

Well-Known Member
Jan 20, 2022
457
130
When existing save is loaded, following achievements don't activate, even though their conditions are fulfilled in the savefile:

  • FIRST
  • Probe-U-Later
  • Stellar Rusher
  • Dug Deep & Greedily
  • A Pirate's Life For Me
  • Korgonne Conclusion (guessing Doggone Tragedy as well)
  • Experienced Expeditioner
  • Syri-ous Gamer
  • Just Say Po

Not sure if it's a bug or just something that's not implemented, however two achievements --Expanding Horizons and Dog Days-- do activate, so mentioning it just in case.

Attached: a savefile with relevant parts of the game completed.
 

Attachments

  • Ava (F) - 7Hrs 33Mins, 369 Days - Tavros Station, Kalas.json
    1.2 MB · Views: 2
Last edited:

mikethor007

Well-Known Member
Jun 26, 2021
1,179
810
52
Which means that the triggers for those achievements probably only fire in the appropriate moment in the story/side quests.

And that they are not retroactive, meaning that there's no other checks to see if they happened (at game load, for example).

As some cheevos do seem to be retroactive, it'd seem that it's not unreasonable for the rest to also be coded that way.
 
Last edited:

OrangeBurner

Well-Known Member
Mar 13, 2022
305
72
(Keep in mind that I don't currently know how the achievement code fully works.)

It could possibly be that the achievements that don't show back up have a historicalUnlock and the ones that do show back up instead have a trackingFunctor in Achievements.js.

trackingFunctor is just a stat which the achievement continuously tracks to see if you have completed it (e.g. Expanding Horzions tracks to see if crew(true) > 0 is true at any point to see if you actually have a crewmate).

historicalUnlock seems to be pretty such the same but instead of tracking current stats/values it primarly checks to see if certain flags has been set or if certain flags are at a certain value. (e.g Probe-U-Later's historicalUnlock checks to see if flags["UNLOCKED_JUNKYARD_PLANET"] == 1 returns true)

And looking through Achievements.js trackingFunctor is used in the function: checkTrackedFunctions()
JavaScript:
static checkTrackedFunctions():void
{
    if (getGameState() == null) return;

    for (const value of Object.values(Achievements.achievementData))
    {
        // Skip anything already unlocked
        if (value.isUnlocked === true) continue;

        // If this entry has a tracked stat listed, check the value against the trigger value
        if (value.nativeTrackedStat !== null)
        {
            if (StatTracking.getStat(value.nativeTrackedStat) >= value.triggerValue)
            {
                if (IS_STEAM)
                {
                    Achievements.STEAM_triggerAchievement(value);
                }
                else
                {
                    Achievements.NATIVE_triggerAchievement(value);
                }
            }
        }

        if (value.trackingFunctor !== null) // Here.
        {
            if (value.trackingFunctor())
            {
                if (IS_STEAM)
                {
                    Achievements.STEAM_triggerAchievement(value);
                }
                else
                {
                    Achievements.NATIVE_triggerAchievement(value);
                }
            }
        }
    }
}

But historicalUnlock isn't used anywhere in the code.
Although, the devs might currently be undecided on what to do with it given the comments above historicalUnlock:
JavaScript:
/**
     * A hook to potentially allow unlocking the achievement based on historical flags.
     * Many achievements and their descriptions work better if they are called slightly differently from where the flag that ultimately
     * means the same thing are set, so we don't want to just use the flags themselves to primarilly drive our unlocking system.
     * That said, we should still offer some way of applying achievements for older saves, hence this hook.
*/
historicalUnlock:{ ():boolean }|null = null;
And the fact that those types of achivements are triggered manually, usually when the flag that historicalUnlock tracks is set (e.g. Probe-U-Later is manually triggered in rivalEncounters.js instead):
JavaScript:
// Encounter
if(flags["UNLOCKED_JUNKYARD_PLANET"] == undefined)
{
    flags["UNLOCKED_JUNKYARD_PLANET"] = 1; // This is the historicalUnlock for 'Probe-U-Later' (or ACH_MHENGAPROBE)
    Achievements.triggerAchievement("ACH_MHENGAPROBE");

But, on my understanding of the achievements code I don't understand why they can't just add historicalUnlock to checkTrackedFunctions() because of how similar they are in function.
JavaScript:
if (value.trackingFunctor !== null || value.historicalUnlock !== null) // Honestly, this if statement is pretty much uncessary (in this example).
{
    if (value.trackingFunctor() || value.historicalUnlock)
    {
        if (IS_STEAM)
        {
            Achievements.STEAM_triggerAchievement(value);
        }
        else
        {
            Achievements.NATIVE_triggerAchievement(value);
        }
    }
EDIT: This probably isn't good given that it'll mess with the timings of the manually triggered achivements (e.g A Pirate's Life For Me is meant to be triggered after you take the probe/access codes but it's historialUnlock is flags["SHOCK_HOPPER_DEFEATED"] != undefined meaning that under this it'll be actually unlocked before you're actually meant to get it.)
(Maybe I should've actually read the comments above historialUnlock)


So, possibly a better method could be that they can instead do an achievement check when a new save file is loaded which checks if the achievement's historicalUnlock returns true. (I don't fully understand how the game loads a file or I would've put an example.)
 

one_two

Well-Known Member
Jan 20, 2022
457
130
With the release of [0.9.000-PUBLIC#1940] this has been fixed, with one apparent exception -- Syri-ous Gamer achievement is supposed to activate after you "complete Syri's questline" but there seems to be a disagreement between the Quest Log and the achievement system what exactly constitutes as "completing Syri's questline":

1652172074585.png

1652172352191.png

1652172124679.png
 
  • Like
Reactions: BoofBoof1

mikethor007

Well-Known Member
Jun 26, 2021
1,179
810
52
  • Like
Reactions: BoofBoof1