New XP system

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

New XP system

Post by Adamo »

if anybody is crazy enough to apply it, I modified the code:

Code: Select all

-- xp data
xp_classes = 4
xp_subskills = {4, 4, 4, 4}
xp_classnames = { "FIGHTER", "NINJA", "PRIEST", "WIZARD" }
xp_levels = 72		
xp_levelnames = { "a NEOPHYTE", "b NEOPHYTE", "c NEOPHYTE", "d NEOPHYTE", "e NEOPHYTE", "f NEOPHYTE",
	"a NOVICE", "b NOVICE", "c NOVICE", "d NOVICE", "e NOVICE", "f NOVICE",
	"a APPRENTICE", "b APPRENTICE", "c APPRENTICE", "d APPRENTICE", "e APPRENTICE", "f APPRENTICE",
	"a JOURNEYMAN", "b JOURNEYMAN", "c JOURNEYMAN", "d JOURNEYMAN", "e JOURNEYMAN", "f JOURNEYMAN",
	"a CRAFTSMAN", "b CRAFTSMAN", "c CRAFTSMAN", "d CRAFTSMAN", "e CRAFTSMAN", "f CRAFTSMAN",
	"a ARTISAN", "b ARTISAN", "c ARTISAN", "d ARTISAN", "e ARTISAN", "f ARTISAN",
	"a ADEPT", "b ADEPT", "c ADEPT", "d ADEPT", "e ADEPT", "f ADEPT",
	"a EXPERT", "b EXPERT", "c EXPERT", "d EXPERT", "e EXPERT", "f EXPERT",
	"a MASTER", "b MASTER", "c MASTER", "d MASTER", "e MASTER", "f MASTER",
	"a ARCHMASTER", "b ARCHMASTER", "c ARCHMASTER", "d ARCHMASTER", "e ARCHMASTER", "f ARCHMASTER",
	"a DOMINATOR", "b DOMINATOR", "c DOMINATOR", "d DOMINATOR", "e DOMINATOR", "f DOMINATOR",
	"a DESTRUCTOR", "b DESTRUCTOR", "c DESTRUCTOR", "d DESTRUCTOR", "e DESTRUCTOR", "f DESTRUCTOR", }		
xp_levelamounts = { 100, 200, 300, 400, 500, 600,
	800, 1000, 1200, 1400, 1600, 1800,
	2200, 2600, 3000, 3400, 3800, 4200,
	5000, 5800, 6600, 7400, 8200, 9000,
	10600, 12200, 13800, 15400, 17000, 18600,
	21800, 25000, 28200, 31400, 34600, 37800,
	44200, 50600, 57000, 63400, 69800, 76200,
	89000, 101800, 114600, 127400, 140200, 153000,
	409000, 665000, 921000, 1177000, 1433000, 1689000,
	2201000, 2713000, 3225000, 3737000, 4249000, 4761000,
	5787000, 6809000, 7833000, 8857000, 9981000, 10905000,
	12953000, 15001000, 17049000, 19097000, 21145000, 23193000 } 
As you can see, there are 72 levels of experience.
a, b, c, d, e, f letters in the code means LO, UM, ON, EE, PAL and MON power values. Not only with MASTER level, as it`s in DM, but all the levels, because there are 72 of them and I didn`t have idea, which names to give all of them! ;)
First 6 levels, NEOPHYTE 1-6 (LO-MON), requires 100 points of experience each.
Second 6 levels (NOVICE) requires 200; next 6 - 400, next 6 - 800, next 6 - 1600, next 6 - 3200, next 6 - 6400, next 6 - 12800. Things are getting harder now: MASTER 1-6 requires 256000 points each, ARCHMASTER(s) - 512000, DOMINATOR(s) - 1024000, and most crazy last levels, DESTRUCTOR(s) - 2048000. So to gain the last exp level, you`d need over 23 millions points. This is only hypothetical, of course (ARCHMASTER level in DM requires over 8 millions points).

(I couldn`t find better names than DOMINATOR and DESTRUCTOR, sorry! ;) )
If anybody had names for 72 levels, I would be appreciated ;)

As there were only 15 levels originally, I though it`s a bit boring ;) so I made 72. But that means a player would get giantic advantage at first 15-30 minutes of the game, counted as additional calss points, comparing to the later gameplay when he wouldn`t gain next level so easily (on the beginning, a character could possibly get 1 level per minute or two, which would give a huge amount of additional points).

So I`ve got two questions to Sophia:
1. I`m not sure if I modified the code well. What is the biggest number of experience that can be used in DSB?
2. When character gains another lavel, he gets few points (3 or 4, as I remember), given randomly through the skills (strenght etc.), depending on the class (if it`s ninja, he probably get dexterity points, etc). Is it possible to differentiate the number of points given each level depending on the level for the reasons I gave before? For example for gaining LO-MON NEOPHYTE levels, character gets one point given randomly through skills, for APPRIENTICE(s) he`d get two, and for LO-MON DESTRUCTOR he`d get, say, 32 points.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: New XP system

Post by Sophia »

Adamo wrote:I`m not sure if I modified the code well. What is the biggest number of experience that can be used in DSB?
You can have 4-billion-some total XP. The most levels you can have are 255, so even this mighty 72-level system is far short.
Adamo wrote:When character gains another lavel, he gets few points (3 or 4, as I remember), given randomly through the skills (strenght etc.), depending on the class (if it`s ninja, he probably get dexterity points, etc). Is it possible to differentiate the number of points given each level depending on the level for the reasons I gave before? For example for gaining LO-MON NEOPHYTE levels, character gets one point given randomly through skills, for APPRIENTICE(s) he`d get two, and for LO-MON DESTRUCTOR he`d get, say, 32 points.
Yes, it is very possible. Indeed, it is necessary, because right now the leveling-up code is still the same as DM, which means you will still get DM-sized stat boosts, and your stats will be the equivalent of Archmaster-level stats midway through the "Apprentice"-level block (because you'll still have gained the same absolute number of levels)

The other problem, of course, is that the functions requiring the use of skills will still be expecting a DM scale as well. This is something I'll have to address, because the current methods are... hackish at best. :)
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: New XP system

Post by Sophia »

For 0.38, I've helped things like this work by making the following change (that anyone interested in having sooner than I get around to releasing 0.38 can also make to their own copy of the base code):

All references to dsb_xp_level were replaced with calls to determine_xp_level, and in base/xp.lua I defined the function as follows:

Code: Select all

function determine_xp_level(char, class, subskill)
	return (dsb_xp_level(char, class, subskill))
end
That is to say, it simply wraps the core function. However, the difference is that now that it's something that can be overridden, it doesn't have to just wrap the core function.

What I'd recommend doing for your 72-level system is putting something like this in your own startup.lua:

Code: Select all

function determine_xp_level(char, class, subskill)
	return (dsb_xp_level(char, class, subskill) / 4.0)
end
This will make the level returned be a number between 0 and 18, which will allow your ultra-high levels to be higher than DM's archmaster, but the game will still scale mostly like DM. In addition, it will be floating-point, and the decimals will be used in a lot of the underlying calculations-- a level 1.5 wizard will be marginally better than a level 1.25 wizard, even if the base code was only using integers in the vanilla DM model.

Depending on how closely your XP curve reflects DM's * 4, this factor of "4.0" might require some tweaking. But it's a start. :)
Post Reply