Thank you for this. It took me a while to figure it out, but this is nice to have. I did notice one problem though.
* Using Constant as an example, the formula "n * 100" has the player start with 100 EXP already acquired, even though they haven't done anything. Ideally the player should start with 0 exp. I managed to get past this this by changing the formula to "( n - 1 ) * 100" but I don't think one should have to do this.
That's the only issue I could find.
Now, I wanted to set it up so that I needed to gain 100 XP to get from lv 1 to 2, then 200 more XP to get from 2 to 3. The formula I used was "( n - 1 ) * ( 50 * n ) This worked, somehow(?). So, if anyone reading this wants to use the same formula; there it is.