RetroAchievements / docs-archive

RADocs
https://docs-archive.retroachievements.org
52 stars 10 forks source link

Rich presence suggestion: add a lookup value range feature #35

Closed timFElarsson closed 4 years ago

timFElarsson commented 4 years ago

EDIT: Sorry, this was meant to go in the RAIntegration section! For some reason it ended up here! While working on one game I came across a feature I was missing. The game in question had a bunch of different room ID's for the same dungeons or towns for example, and instead of writing:

Lookup:Location
350=[Oedo Town]
351=[Oedo Town]
352=[Oedo Town]
353=[Oedo Town]
354=[Oedo Town]
355=[Oedo Town]
356=[Oedo Town]
357=[Oedo Town]
358=[Oedo Town]
359=[Yamashiro / Zazen Town]
360=[Yamashiro / Zazen Town]
361=[Yamashiro / Zazen Town]
362=[Yamashiro / Zazen Town]
363=[Yamashiro / Zazen Town]
364=[Yamashiro / Zazen Town]
365=[Yamashiro / Zazen Town]
366=[Yamashiro / Zazen Town]

I think it would be nice to define a range of values, like this:

Lookup:Location
350:359=[Oedo Town]
360:366=[Yamashiro / Zazen Town]

It would save a lot of space in cases like this, and it could also be used together with scores for example:

Lookup:Score
0:1000=Noob
1001:2000=Amazing

This could be done with conditional outputs of course, but if that wouldn't be a viable option for some reason... yeah.