Add referencing Rollable table entries in formulas, serving as lookup tables #12025
Description
User Experience
After stumbling over a usecase, needing a way to map stat dependent values to ranges (1-8->1, 9-11->2, 12-... ->3), my first instinct was to turn to rollable tables, since they already provide that logic, a number value goes in, a result is returned.
It seems like using rollable tables in this way is not supported via UI/Formulas in this way, but somewhat supported via scripting.
ex:
@rollabletable.name[d20]
for a random element, @rollabletable.name[1]
for the first entry, @rollabletable.name[@abilities.con]
for values that scale depending on constitution for dnd5e characters.
I could see this feature be very useful to easily and natively represent more complex dependencies, stats, abilities, scores, etc.
Some systems provide their own LUTs, some also helpers for this type of logic (Starfinder I hear?), but switching system or creating one's own system just for adding LUTs seem practical for most users.
If I've overlooked or missed something, please let me know.