Achievements?


#41

I created an achievement list and the message appears, but there is no way I could watch them in an achievement button or something? Because if people can’t see them they are totally useless


#42

@poison_mara
I’m assuming that’s done on CoG’s end. I don’t think it’d show up in anything but a packaged app.


#43

Ah ok i was thinking i was doing something wrong with coding


#44

@Samuel_H_Young @poison_mara

No, in the latest versions of Choicescript the achievement button should appear for you (though only if you have some UNhidden achievements). Remember to swap out index.html and style.css as well as the all the web folder files.


#45

Thanks work now i just forgot change index last time :frowning:


#46

@CJW
Oh, cool!


#47

The more I think about it, the more I would love for achievements to work as permanent booleans, which they kinda technically do? It’s just that you can’t call them in an *if as far as I know. Think about it, unlocking other game modes on a second playthrough, ala New Game+, or maybe having a cheat menue appear. Or a gallery with pictures tied to the achievements! So many possibillities. Can it be done?


#48

Oops, forgot to tag. @dfabulich


#49

Finally started playing around with achievements to see how they might work in Choice of Rebels, and of course I immediately got an error: “Invalid *achievement, ${} not permitted in achievement description.”

@dfabulich, out of curiosity, how much coding hassle would it be to make ${variable} work in achievement descriptions? I’ve got some genderflipping characters whose names change with their sex, and not being able to name them directly in an achievement description would be a mild annoyance.

File under non-urgent and non-essential.


#50

@Havenstone, I have the same issue with Blackraven. You could perhaps use their family name.


#51

Apple and Steam only allow us to use pre-written strings as achievement descriptions.


#52

Hmm, had forgotten about that question. What about making them work as permanent booleans that you can call on? (See above).


#53

I think this could be the case for most platforms. I can’t remember any specific examples but I’m sure I’ve played some Xbox/Playstation games that cover similar situations by doing something like:

Become the Regent (50)
Be Crowned King or Queen of Awesome Land

I.e. Just expand on it in the description, and/or be careful about how you refer to a character, e.g. do it by title or position rather than name?

Another option is to actually have multiple sets (one for each gender), that might even encourage people to do multiple playthroughs.


#54

That actually almost works today with the *check_achievements command. This command creates temp variables named “choice_achieved_dragonslayer”, which you can use to detect whether the player has previously reached an achievement. You can use this in a few different ways.

Repeated achievements: Each time you call *achieve, a banner will appear to indicate that the player has earned the achievement. If the player reaches the same achievement multiple times, the banner will display each time.

If you want to prevent the banner from appearing multiple times, then you can do it like this:

*check_achievements
*if not(choice_achieved_dragonslayer)
	*achieve dragonslayer

Meta achievements: These are achievements that you achieve by achieving other achievements. They’re annoying to code, but they do work:

*check_achievements
*if ((choice_achieved_dragonslayer and choice_achieved_lover) and choice_achieved_secret)
	*achieve dragonmaster

Free purchases: You can give the player free IAP for playing well by assigning the player an achievement.

*check_achievements
*check_purchases
*if choice_purchased_goggles or choice_achieved_goggles
	You have the goggles! They're super effective!

But there’s a big caveat. Part of the reason there isn’t more public documentation about ChoiceScript achievements is that there isn’t a very reliable way of making sure that they stick around. On iOS and Steam, Apple and Valve provide official mechanisms for registering achievements that stay achieved. On Android and Chrome Web Store, the user installs the app, so as long as the app remains installed, the achievement stays unlocked. But on the web, it’s very easy to lose your achievements (e.g. if you clear cookies and local storage).

If we host the game on choiceofgames.com, we can try to take care of this for you, but not just anybody can put a game up on their website and have reliable working achievements.

At some point, I’d like to set up some code and instructions allowing players to register their games with Google Play Game Services, in which case Google will store your players’ achievements (but they’d still have to login first).

For now, it’s not totally possible/reliable to create a truly “permanent” boolean.


Achievements unlocking content
Playthrough > 1
Saving progress through restarts in ChoiceScript
#55

Oh wow, cool, didn’t know any of that, I was prepared to make a gosub_scene for the meta achievement thing, that’s great that it’s already in there! Okay, so it’s not 100% reliable, but then again what is. Merry christmas btw!


#56

These are my achievements from my wip game. Check this for other issues… Thanks!:

*achievement plotwise visible 20 Plotwise
Beat the game with original ending.
“You beat this game. But it’s more fun when you explore more.”
*achievement costed hidden 20 Costed by an Arm
hidden
"You beat this game, but something more different. So dramatic."
*achievement pyrrhic hidden Pyrrhic Victory
hidden
"You are not ready to die but… oh well… You’ve come this far."
*achievement pow visible 10 Ka-POW
Have a highest POW possible
"It’s a shame. I’ve got two fists, but you’ve only got one face." -Vi, the Piltover Enforcer
*achievement str 10 STR-ong
Have a highest STR possible
"The heart is the strongest muscle" -Braum, the Heart of Freijord
*achievement agi visible AGI-le
Have a highest AGI possible
"Swiftly!" -Teemo, the Swift Scout
*achievement acc visible ACC-ustomed by Scope
Have a highest ACC possible
"(Caitlyn’s Taunt)"
*achievement eff visible The EFF
Have a highest EFF possible
"It’s Super Effective-Pokemon quote"
*achievement daisy visible 30 The Bear-faced Mom
Compliment about Daisy’s Mom.
“Those eyes? I love bears!”
*achievement steph 30 Sparkling Pink
Get dazzled by Stephany’s aircraft.
“WOAH! Da plane! Da plane! That’s hod!”


#57

Mine (Notepad ++) says that achievement is only allowed in start-up. How do I activate it in game than?


#58