Achievements?


#1

So these days, achievements are all the rage. Can’t have a game without em it seems. So what I’m wondering is, is this something that’s only available to published games that you add afterwards, or is there some code/command to add them? I know there’s a special button for them even. So I’m wondering about that.

Spontaneously, it feels like you would need a save system for them. Seeing as variables gets wiped on a restart.


#2

There’s been an overhaul to achievements recently, we really need to update the wikia with the details, but yes there are two commands iirc.

*achievement, which is used to define the achievements at the beginning of the game and *achieve which is placed at the point in the story/game where you want them to achieve it.

I can’t recall the syntax at this precise moment in time, but I think @Cataphrak 's used the new system in Mecha Ace, so perhaps he could help you. If not, I’ll be trying to update the wiki soon and will post a link here when it’s done.


#3

this goes where you want the achievement to fire:
*achieve achievementcodename

You list all achievements in startup.txt after the list of *creates like this
*achievment achievementcodename visible/hidden value achievementname
pre-earned achievement description
post-earned achievement description

Yes, you can look at Mecha Ace or Tin Star to see it in action.


How do i add achivements to my game?
How do i add achivements to my game?
#4

Do achievements remain earned once they are earned. I mean, if in a play you get an achievement, will you still have it the next time you play?

I think this is the right way to do it, especially if you can’t get them all in a single read.


#5

@Mayday
They’re just like a boolean, so they’d be erased if you restarted.


#6

Odd. In all the games I’ve bought, the achievements stay forever if I’ve completed them once. Is that a bug, then?


#7

@Wyrmspawn
Hmm…maybe I was wrong.


#8

In the app versions of the game they persist between restarts, though I’m not sure if they’re stored locally or whether they’re connected to your platform’s respective account.


#9

Can someone show me where I can see an example of an achievement creation line in startup.txt and the achievements tab in the adventure sheet?

By the way, @Cataphrak, amazing achievements, I think I am getting the app today. I just have to choose which device exactly I want it on :).


#10

Are achievements only for apps? Or could I use similar code for a PC game?


#11

I would definately prefer to see the wiki updated, that’s usually my *goto Place :wink: For when I need to refresh my memory. This made me wonder if there are any other commands I’m missing out on that haven’t yet been added to the wiki.


#12

It was my understanding that achievements are only for iOS, through Game Center. All of my games have achievements in the game itself as well, but that only shows for that playthrough, whereas Game Center achievements are permanent.


#13

@Lucid
The new achievements work inside the app (they’re not reliant on an external system) and on all platforms - well, they work on Google Play and PC for me, so I assume they’ll work everywhere.

@MutonElite
It’s on my ever-long and growing TODO list, I swear! ^^
If anyone else thinks they can spare the time to write it up before me, please feel free to hit me up with a PM and I’ll give you admin rights on the wiki :slight_smile:


#14

@Mayday
For a non-hidden achievement, the declaration is:


*achievement lonewolf visible 10 Lone Wolf
  Survive alone after leaving the Cathedral.
  Survived alone after leaving the Cathedral.

and the activation is


*achievement lonewolf

For a hidden achievement, the declaration is:


*achievement zombienightmare hidden 50 Zombie Nightmare
  hidden
  Ending 5 - Become a Zombie

and the activation is


*achievement zombienightmare

All of this passes Quicktest but the newest version of CS breaks my older game in other ways now :frowning:


#15

@JimD Mhm. So to state the (hopefully) obvious, the first part is the variable, and the last is the displayed name of the achievement, the indented text is what it says before activation and what it says after (unless it’s hidden, in which case it only displays the latter). But what’s the number for? Are those the 10nth and 50ieth achievements respectively? Is it neccesary to number them?

Also, when you get an achievement, you get a little pop-up at the bottom of the screen, are those customizable images or?

Edit: Also, how does one reset the achievements, if say one were to test them and then share the game with others?


#16

@MutonElite you have 1000 points max per game in achievements, and the number is how much you award for that achievement.

The achievement icons do not seem customizable.


#17

@JimD Ah. And resetting the achievements? Very much obliged btw. :slight_smile:


#18

You’re welcome. From what I can tell, the achievements are stored in Gamecenter for iTunes but reset in WIPs and browser-based games. I bought Mecha Ace for iPhone, so I only know how Apple-based games work. I am preparing a patch for ZE but haven’t gotten far yet.


#19

Thank you, guys!


#20

Hmm, just a note. It seems the activated indented text goes first for whatever reason, like so;


*achievement wolf visible 10 Wolf
   You befriended a wolf.
   Befriend a wolf.