EISAchievements

Introduction

This plugin allows you to create, and monitor achievements in your game.

You can view each achievement, apply masks, and give the player rewards upon completing one using common events.

On PlayTesting for the first time an achievement file will be generated. The file will contain a single achievement with an example of the structure. To reset your achievements, simply delete the achievements.json file.

Plugin Commands

EISachUnlock idNumber – unlocks achievement by Id.

Example: EISachUnlock 1

EISachRemove idNumber – removes achievement by id.

Example: EISachRemove 1

EISachExclude idNumber boolean – exclude/include an achievement by id.

Example 1: EISachExclude 1 true

Example 2 EISachExclude 2 false

EISachOpen – opens the achievement scene.

EISachOpenCategory – opens the achievement category scene.

JSON Properties | Old

_title – title of the achievement.

_description – description of the achievement.

_iconNumber – icon number index used with the achievement.

_exclude – decides if the achievement shows up in the achievement scene.

_global – decides if the achievement is kept between save files.

_locked – decides if the achievement is locked or unlocked.

_reward – a number to run a common event when the achievement is unlocked.

_id – the id associated with the achievement.

@ – the type of achievement. Use: “Achievement” or “MaskedAchievement”.

JSON Properties | New

id – the id associated with the achievement.

title – title of the achievement.

titleMask – a unique mask for this achievement.

titleColor – the color of the achievement title in the scene.

description – description of the achievement.

descriptionMask – a unique mask for this achievement’s description.

iconNumber – icon number index used with the achievement.

iconMask – a mask for the icon before the achievement is locked.

category – the category of the achievement.

image – the path to the image used in the achievement detail window.

exclude – decides if the achievement shows up in the achievement scene.

global: – decides if the achievement is kept between save files.

locked – decides if the achievement is locked or unlocked.

reward – common event id; will run a common event when the achievement is unlocked.

masked – the type of mask used with the achievement.

Use “title”, “desc” or “both” to hide the title, description, or both.

scriptBox – the script calls that will run when the achievement is unlocked.

Example File

[ { " title " : " My First Achievement " , " description " : " An awesome achievement for my awesome game. " , " iconNumber " : 33 , " iconMask " : 0 , " image " : " img/pictures/Translucent " , " category " : " general " , " masked " : " both " , " titleColor " : 2 , " titleMask " : " ??????? " , " descriptionMask " : " ??????? " , " reward " : 2 , " scriptBox " : " $gameVariables.setValue(3, 300) " , " global " : true , " id " : 1 }, { " title " : " My Second Achievement Of Awesomeness " , " description " : " Run 200 miles. " , " iconNumber " : 22 , " iconMask " : 0 , " image " : " img/custom/arrow_compass " , " category " : " money " , " masked " : " both " , " titleColor " : 5 , " titleMask " : " ??????? " , " descriptionMask " : " Play your own game... " , " reward " : 0 , " scriptBox " : " $gameVariables.setValue(10, 100); " , " global " : true , " id " : 2 } ]

Script Calls

Adds a regular achievement to the JSON file.

EISAchieve . addAchievement ( title , description , iconNumber ) ; //Example EISAchieve . addAchievement ( "First Achievement" , "First game achievement" , 33 ) ; /* * Creates an achievement with the title, description, icon * "First Achievement, "First Game Achievement", icon 33 */

Adds a masked achievement to the JSON file.

EISAchieve . addMaskedAchievement ( title , description , iconNumber , maskType ) ; //Example EISAchieve . addMaskedAchievement ( "First Achievement" , "First game achievement." , 33 , "both" ) ;

Prevent/Allows an achievement to show up in the achievement scene.

EISAchieve . excludeAchievement ( id , boolean ) ; //Example EISAchieve . excludeAchievement ( 1 , true ) ;

Removes an achievement from the JSON file.

EISAchieve . removeAchievement ( id ) ; //Example EISAchieve . removeAchievement ( 1 ) ;

Unlocks/Locks an achievement and runs a common event when unlocked.

EISAchieve . unlockAchievement ( id , boolean ) ; //Example 1 EISAchieve . unlockAchievement ( 1 , true ) ; //Example 2 EISAchieve . unlockAchievement ( 1 , false ) ;

Unlocks/Locks an achievement while running JavaScript code (script calls).