Forum rules - please read before posting.

Rewarding Steam Achievements only after buying the full game, and not during the demo

edited July 21 in Technical Q&A

Hi! A slightly puzzling question please - I'm prepping a Steam demo for Steam NextFest.
I've got Steam Achievements working (I think). In their Steamworks docs, Steam recommends not allowing achievements in a demo, and rather rewarding any achievements the player earned during the demo only once they load a save from the purchased full game:

[EDIT: Also adding this for context]

So, I think if the demo and full-game builds are both similar enough and share the same file type for saved games and if shared cloud sync is set up between them, then any saves in the demo game should work in the full game if I set up.

I've been trying to think how best to do this re Achievements, keeping track of what achievements the player earns in the demo, and then rewarding them only in the full game.

My guess is, when it comes time to unlock an achievement, first checking a global variable whether it's the full game or a demo - if it's the full-game, unlocking the achievement immediately, and if it's the demo, not unlocking the achievement but turning a variable to 'on' for that achievement, or something.

Then, to make sure all previously achieved but not rewarded achievements from the demo are rewarded in the full game, making an ActionList that triggers whenever someone loads a saved game: it would check whether it's the full-game or demo, and if it's the full-game, the ActionList would run through various variable checks and unlock various Steam achievements. Afaik, there's no risk re-rewarding already rewarded Achievements, as achievements will only unlock once on Steam's end.

I'm not sure if I'm overthinking this, but I think that might work?

My question is - how would I run an ActionList every time someone loads a game? And when best to do this - at the title screen, or maybe when a saved game is loaded?

Or is there a better way to only run an ActionList once and then never again (it would only need to be run once, the first time the player runs the full game) - maybe at the end of the 'full game steam achievements' ActionList it sets itself to 'off' or turns a global variable to off so that it only does run once and isn't checked again?

Normally I come up with overly-complex solutions to problems that I only discover much later have far simpler, more elegant and already-built solutions for what I'm trying to do, lol, so am trying to think of the simplest approach to how to reward Steam achievements only in the full version of the game, but still keep track of them during the demo, and using a loaded save file that's shared between demo and full game to also 'save' whether achievements should be rewarded.

Another option is to allow Steam achievements in the demo, but apparently this upsets some completionists, ie they play the demo, only get like 3 achievements, and then the locked achievements show up in their global achievements tally on Steam.

Thank you.

Comments

  • edited July 21

    Hmm, and then I've thought of another complication - a saved game from the demo version will also have saved that Global Variable of 'Is Full Game?' to 'no' so if a player runs the full game and loads up a saved game from the demo game, that variable will stay 'no' and so the game will still think it's in demo mode, unless there's some way to manually switch the variable to 'yes' no matter what saved game the player loads in the full game.

    I wouldn't know how to do it, but maybe the full game has an Event on Game Load that manually makes sure that 'Is Full Game?' variable is set to 'yes' even if it was saved with 'no'. I wouldn't want to be an unnecessary resource hog by eg putting something on the Full Game's PersistentEngine that switches that variable every 5 seconds or something.

    In the AC Settings I run a very basic ActionList when the game starts that has just one action in it - a Variable gets set that either turns 'is Full Game?' on or off, so maybe there's a way in the Full Game to run that AL shortly after a game is loaded to make sure that variable is set to 'on'?

  • So, I think I may have misunderstood this. Because a Steam game demo has its own appID, I think it has its own set of achievements (or none at all). I don't think the demo would be able to unlock achievements in the main game.

    The only thing a game demo would share with the full game would be the cloud save file I think.

    So, maybe it's more a case of: turning on variables during the demo that would trigger Steam achievements in the full game, and then in the full game, doing something like: run an ActionList that checks variables that would be in the demo save file, and unlock any Achievements that need to be unlocked. I guess this could even form part of the ActionList I have that runs when the game starts?

    I'm sure there's best practices for this, it's still a little messy in my head. I'm currently unlocking Achievements with a great custom action script on the AC Wiki.

    Maybe a neater way of doing things than having eg 14 new Global Variables for 14 Achievements? I saw someone mention compound variables recently, but might be a bit beyond me.

  • Going to try this tomorrow:

  • Yes, the "Save/Load/After" event can be used to run logic whenever loading a save-file.

    I would, however, recommend using Options-linked variables for this data - i.e. if it's the full game, and the unlocked state of the various achievements.

    Such data isn't typically tied to a single save-game, but instead the Player's Profile. I'd say it would be better to check these values in your Title screen, instead of after loading a specific save.

    Global Variables have a Link to option - setting this to Options Data will cause its value to be tied to the Profile, along with SFX volume, Language, etc - and will not be altered after loading a save file.

  • Hi Chris - thanks for the reply. The solution doesn’t immediately make sense to me but I’ll fiddle around when at comp.
    So the setup that you suggest would look like:

    • use global variables per achievement
    • Link each variable to options data
    • in the Full Game, Run an ActionList in Game Start that changes the ‘is Full Game?’ To ‘on’ and checks each Global Variable and awards Achievements if the variable is correct?

    That way even if a player loads a demo saved game that has ‘is full game?’ turned to off, when loaded in the full game, I can change that variable in the title screen actionlist to on, and because the variable is not saved to the save file it won’t be affected by the save data?

    Yes, I can see how this is better, thanks (if I’ve understood this correctly).

    Is the Options Data a file that AC saves locally too in the save game folder? And I can make that sync with Steam cloud sync too

  • Is the Options Data a file that AC saves locally too in the save game folder?

    If you opt to use OptionsFileHandler_SystemFile as we discussed in your other thread, then yes - it'll be its own file in the same place as save-games.

  • edited July 22

    Ah ok thanks, I’ll see if I can get that set up. Steam recommends not syncing Options data like music volume and resolution, but I just have music volume and imo it’s not a problem to sync, especially if it solves this issue, thanks so much for the continued help and support.

  • Thanks Chris - using the info you provided in this thread:
    https://adventurecreator.org/forum/discussion/16115/steam-cloud-saves-questions#latest

    I've got Options and the Steam Achievements Global Variables saving to a separate file. I run an ActionList check when the game begins to a) set the full game or not, b) check if it is the full game or not and c) award any achieved Steam Achievements that may have been set to 'on' during the demo.

    Haven't quite tested it 100% as I need to get further with Steamworks to get my demo build live on my page for at least myself to test, but I think it should work, thank you.

    I do remember reading though somewhere (in the manual maybe) that it's a good idea not to have too many global variables. I have 14 Steam Achievements and thus 14 Global Variables. I hope that's not too bad re performance.

  • That would be absolutely fine.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.