Comment on page
Achievements
These "recipes" give you examples of various achievements with different levels of complexity. All of them could be altered to apply to similar situations. Hopefully these will give you a better idea of what you can do with r4nkt.
For this example, we will imagine that we have an achievement that is to be awarded to your player the first time they close a sale.
Only one action is required with the following properties:
- custom_id: close.sale
- name: Close a Sale
Only one criterion is required with the following properties:
- custom_id: closed.a.sale
- name: Closed a Sale
- custom_action_id: close.sale
- type: sum
- rule: gte:1
Only one criteria group is required with the following properties:
- custom_id: closed.a.sale
- name: Closed a Sale
- criteria (custom criteria IDs):
- closed.a.sale
Your achievement should have the following properties:
- custom_criteria_group_id: closed.a.sale
For this example, we will imagine that we have an achievement that is to be awarded to your player when they post an article between midnight and 4 AM.
Only one action is required with the following properties:
- custom_id: post.article
- name: Post Article
Only one criterion is required with the following properties:
- custom_id: posted.article
- name: Posted Article
- custom_action_id: post.article
- type: sum
- rule: gte:1
Only one criteria group is required with the following properties:
- custom_id: posted.article.in.middle.of.night
- name: Posted Article in the Middle of the Night
- criteria (custom criteria IDs):
- posted.article
- criteria_conditions:
- groups:
- conditions:
- betweenHours:0,4
Your achievement should have the following properties:
- custom_criteria_group_id: posted.article.in.middle.of.night
For this example, we will imagine that we have an achievement that is to be awarded to your player when they schedule a meeting on Tony Stark's birthday, May 29.
Only one action is required with the following properties:
- custom_id: schedule.meeting
- name: Schedule Meeting
Only one criterion is required with the following properties:
- custom_id: scheduled.meeting
- name: Scheduled Meeting
- custom_action_id: schedule.meeting
- type: sum
- rule: gte:1
Only one criteria group is required with the following properties:
- custom_id: scheduled.meeting.on.tony.starks.birthday
- name: Scheduled Meeting on Tony Stark's Birthday
- criteria (custom criteria IDs):
- scheduled.meeting
- criteria_conditions:
- groups:
- conditions:
- month:5
- dayOfMonth:29
Your achievement should have the following properties:
- custom_criteria_group_id: scheduled.meeting.on.tony.starks.birthday
Here we will imagine that we have an achievement that is to be awarded to your player when they delete 100+ files in a single day.
Only one action is required with the following properties:
- custom_id: delete.file
- name: Delete File
Only one criterion is required with the following properties:
- custom_id: deleted.100.files.in.single.day
- name: Deleted 100 Files in Single Day
- custom_action_id: delete.file
- type: sum
- rule: gte:100
- criteria_conditions:
- groups:
- conditions:
- sameDay
Only one criteria group is required with the following properties:
- custom_id: deleted.100.files.in.single.day
- name: Deleted 100 Files in Single Day
- criteria (custom criteria IDs):
- deleted.100.files.in.single.day
Your achievement should have the following properties:
- custom_criteria_group_id: deleted.100.files.in.single.day
Here we will imagine that we have an achievement that is to be awarded to your player when they log in to your game each day of a given week.
Note that this will define when a player has performed the action for each day of a single week...that is, Sunday through Saturday. This is not the same as performing an action for seven straight days, nor is it the same as performing an action on each day of the week, but not necessarily the same week.
Only one action is required with the following properties:
- custom_id: log.in
- name: Log In
Seven criteria are required for this recipe, one for each day of the week. They should like like the following, but with adjustments made to
custom_id
, name
, and rule
for each respective day of the week:- custom_id: logged.in.on.sunday
- name: Logged In on Sunday
- custom_action_id: log.in
- type: sum
- rule: gte:1
- criteria_conditions:
- groups:
- conditions:
- dayOfWeek:1
Only one criteria group is required with the following properties:
- custom_id: logged.in.each.day.of.week.for.one.week
- name: Logged in each Day of Week for One Week
- criteria (custom criteria IDs):
- logged.in.on.sunday
- logged.in.on.monday
- logged.in.on.tuesday
- logged.in.on.wednesday
- logged.in.on.thursday
- logged.in.on.friday
- logged.in.on.saturday
- criteria_conditions:
- groups:
- conditions:
- sameWeek
Your achievement should have the following properties:
- custom_criteria_group_id: logged.in.each.day.of.week.for.one.week
Here we will imagine that we have an achievement that is to be awarded to your player when they close a sale for $100,000 or more.
This recipe requires that whenever you report that your player has closed a sale that the price is attached via the activity's
custom_data
field.- custom_id: close.sale
- name: Close a Sale
Only one criterion is required with the following properties:
- custom_id: closed.a.sale
- name: Closed a Sale
- custom_action_id: close.sale
- type: sum
- rule: gte:1
Only one criteria group is required with the following properties:
- custom_id: closed.a.sale.for.100000.or.more
- name: Closed a Sale for 100000+
- criteria (custom criteria IDs):
- closed.a.sale
- criteria_conditions:
- groups:
- conditions:
- activityData:price,gte,1000
Your achievement should have the following properties:
- custom_criteria_group_id: closed.a.sale.for.100000.or.more
Here we will imagine that we have an achievement that is to be awarded to your player when they sell a car to a customer for the second time.
This recipe requires that whenever you report that your player has sold a car that the customer ID is attached via the activity's
custom_data
field.Only one action is required with the following properties:
- custom_id: sell.car
- name: Sell a Car
Only one criterion is required with the following properties:
- custom_id: sold.at.least.two.cars
- name: Sold at least Two Cars
- custom_action_id: sell.car
- type: sum
- rule: gte:2
Only one criteria group is required with the following properties:
- custom_id: sold.a.second.car.to.same.customer
- name: Sold a second Car to the Same Customer
- criteria (custom criteria IDs):
- sold.at.least.two.cars
- criteria_conditions:
- groups:
- conditions:
- activityData:customer.id,eq,{activity.customer.id}
Your achievement should have the following properties:
- custom_criteria_group_id: sold.a.second.car.to.same.customer
Here we will imagine that we have an achievement that is to be awarded to your player when they enroll someone in their 20s.
This recipe requires that whenever you report that your player has enrolled someone that the age of the enrollee is attached via the activity's
custom_data
field.Only one action is required with the following properties:
- custom_id: enroll.person
- name: Enroll Person
Only one criterion is required with the following properties:
- custom_id: enrolled.person
- name: Enrolled Person
- custom_action_id: enroll.person
- type: sum
- rule: gte:1
Only one criteria group is required with the following properties:
- custom_id: enrolled.twenty.something
- name: Enrolled Twenty-Something
- criteria (custom criteria IDs):
- enrolled.person
- criteria_conditions:
- groups:
- conditions:
- activityData:customer.age,gte,20
- activityData:customer.age,lt,30
Your achievement should have the following properties:
- custom_criteria_group_id: enrolled.twenty.something
Here we will imagine that we have an achievement that is to be awarded to your player when they defeat the boss at the end of the game on their birthday.
This recipe requires that whenever you store your player's birthday in the player resource's
custom_data
field.Only one action is required with the following properties:
- custom_id: defeat.boss
- name: Defeat Boss
Only one criterion is required with the following properties:
- custom_id: defeated.boss
- name: Defeated Boss
- custom_action_id: defeat.boss
- type: sum
- rule: gte:1
Only one criteria group is required with the following properties:
- custom_id: defeated.boss.on.birthday
- name: Defeated Boss on Birthday
- criteria (custom criteria IDs):
- defeated.boss
- criteria_conditions:
- groups:
- conditions:
- month:{player.birthday.month}
- dayOfMonth:{player.birthday.day}
Your achievement should have the following properties:
- custom_criteria_group_id: defeated.boss.on.birthday
Last modified 2yr ago