zarqon
Well-known member
I'm trying to make a map of combat items, and originally I designed a map of records where one of the fields was the average damage. But so many of the items do highly variable damage based on whatever formula.
I'm wondering if there is a way to evaluate strings as math, i.e. take a string containing a formula, such as "(x/1.5)+2", replace x with the current value of x, and then solve it. to_int() merely strips out the numbers and puts them together, and I don't see anything else in ashref that looks promising.
Or, is there some other way of accessing this data than building a map?
I'm wondering if there is a way to evaluate strings as math, i.e. take a string containing a formula, such as "(x/1.5)+2", replace x with the current value of x, and then solve it. to_int() merely strips out the numbers and puts them together, and I don't see anything else in ashref that looks promising.
Or, is there some other way of accessing this data than building a map?