Continuity and Achievement syntax


#1

So I was wondering about two things regarding programming parts of a CoG or HG. First off, I know that a save system where someone can save thier progress for future titles exists, but is this available for both CoG and HG? How does an author program his/her second release to pick up from the first’s progress?

Secondly, achievements. I know they are used, but how are they implemented coding side? Is there a function I missed in the tutorial?


#2

I know this is off topic, but are you making a game, and if you are whats it about?


#3

You setup the achievement in your startup.txt:

*ACHIEVEMENT nameofachievement visible # Proper Name
	Text shown before the achievement is awarded
	Text shown after the achievement is awarded

Above, the “visible” can be changed to “invisible” (I think, or be omitted?) to prevent the unawarded achievement from being seen and the # should be changed to the number of points the achievement is worth. “Proper Name” is the displayed name of the achievement while “nameofachievement” is the in-code reference.

Then to award the achievement:

*ACHIEVE nameofachievement

Can’t remember where I learned this though… probably viewing other game files. :grin:


#4

Work stopped for awhile but since I dropped from the CScomp I figured I’d chop at it here and there.

Side note: that name…I may have to rethink it, must have been tired…


#5

Will this have to be after all the *creates?


#6

I’m not sure if it has to be, but in my startup.txt it’s right at the end just before the output of any readable text.


#7

Gotcha. Now how would I set point values for each one? Also, is the achievement image customizable somehow?
Just noticed it’s a CoG trophy cup, I’m kinda curious what image a HG gets.


#8

It doesn’t have to be after *creates. The achievements can be placed at the beginning, end, or middle of the startup file as long as the correct syntax and indentation rules are followed.


#9

You can just put how many points it is worth (10 or 15 or whatever) and the system will tally up the total number of achievement points the reader can unlock. The system does all the maths thankfully.

Unfortunately, I don’t think you can customize an image with it as it just appears as a little pop-over in the bottom right of the screen, but I don’t know that for a fact as I haven’t tried going beyond simple implementation.


#10

You can see examples of achievement format along with points here:

https://www.choiceofgames.com/romance/scenes/startup.txt

You can look at the default achievement listing for that same game by clicking on the achievement button here: https://www.choiceofgames.com/romance/


#11

Thanks to both @Dominia and @dashingdon for achievement help.
Anybody have any idea how/when the save system can be accessed?


#12

On a related note to this-

I’ve put some achievements into my game, and have found that after I restart the game, those I’ve unlocked are still unlocked. (this is probably good)
But then, when I erased one of them, it was still showing up under the achievements menu. How can I ‘reset’ the achievements menu?


#13

CoG’s save system - Unless I’m very much mistaken (and if I am, someone please correct me as this topic could use an explanation on the Wiki page Publishing Your Game), the save system for the first game would not be implemented until the follow-up game is due for release, at which point the initial game would also be updated accordingly.