Talk:Level Costs: Difference between revisions
Jump to navigation
Jump to search
imported>Widgeon (New page: For what it's worth, here's the python script I used to generate the table: <pre> <nowiki> #!/usr/bin/python import math import locale def total_level_xp(level): return int(math.cei...) |
imported>Widgeon (The calculations were off by one level, I think this fixes them.) |
||
Line 3: | Line 3: | ||
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
#!/usr/bin/python | #!/usr/bin/python | ||
import math | import math | ||
Line 12: | Line 12: | ||
def next_level_xp(level): | def next_level_xp(level): | ||
return total_level_xp(level | return total_level_xp(level) - total_level_xp(level - 1) | ||
locale.setlocale(locale.LC_ALL, "") | locale.setlocale(locale.LC_ALL, "") |
Revision as of 03:11, 18 July 2008
For what it's worth, here's the python script I used to generate the table:
#!/usr/bin/python import math import locale def total_level_xp(level): return int(math.ceil( ((level + 5) ** 5 - (6 ** 5)) / 9.)) def next_level_xp(level): return total_level_xp(level) - total_level_xp(level - 1) locale.setlocale(locale.LC_ALL, "") for level in range(1,276): next_xp = next_level_xp(level) total_xp = total_level_xp(level) print "| %d || %s || %s" % (level, locale.format("%.*d", (1, next_xp), True), locale.format("%.*d", (1, total_xp), True)) print "|-"
--Widgeon 22:35, 7 July 2008 (CDT)