
I know you can set minimum functions and maximum functions using (X,Y)dl1 and (X,Y)dh1, but I'm in a situation where my code needs to set a minimum and a maximum function to work. I need to create an equation that produces a 0 from level 1-7, a 1 from level 8-11, a 2 from level 12-15. and 3 from level 16-20. I have found that if I take floor(CL/4-1), I can produce the number range I need. But I need to set a minimum of 0 and a maximum of 3, else the code goes out of bounds at level 20. The current out-of bounds code is as follows: [[4+{floor((@{spellclass-0-level-total}/4)-1), 0}dl1]] An attempt to add a maximum produces an error: [[4+{{floor((@{spellclass-0-level-total}/4)-1), 0}dl1, 3}dh1]] I am looking for a solution to set a maximum and a minimum on a function.