suXinjke / cruncheevos

Set of tools to deal with RetroAchievements achievement sets using JavaScript
MIT License
2 stars 0 forks source link
parser retroachievements

cruncheevos

cruncheevos are set of tools to deal with RetroAchievements achievement sets using JavaScript:

Follow individual package README for additional documentation and usage examples

Using these packages assumes familiarity with RetroAchievements workflow

Small demo

// sonic.js

import { AchievementSet, define as $ } from '@cruncheevos/core'
const set = new AchievementSet({ gameId: 1, title: 'Sonic the Hedgehog' })

function gotRings(amount) {
  return $(
    ['', 'Mem', '8bit', 0xfff0, '=', 'Value', '', 0],
    ['', 'Mem', '8bit', 0xfffb, '=', 'Value', '', 0],
    ['', 'Delta', '8bit', 0xfe20, '<', 'Value', '', amount],
    ['', 'Mem', '8bit', 0xfe20, '>=', 'Value', '', amount],
  )
}

set.addAchievement({
  title: 'Super Ring Collector',
  description: 'Collect 1000 rings',
  points: 50,
  conditions: $(
    gotRings(1000)
  ),
  badge: '250341',
  id: 1,
})

export default set

Achievement set examples

Contributing