RPG Expirience Points

This forum is currently in read-only mode.
From the Asset Store
Over 1700 16x16 pixel art RPG icons for item and skills
  • Hello I've just started a basic RPG that is coming along well but I need some help getting started with the Expirience Points (XP) system. I already know how to create private variables for health, mana, energy etc... but I want levels to gradually require more XP after every level up to gain another level. For example to get to level 2 you will need 50 XP, to get to level 3 you will need 75. As the levels go higher more XP will be needed but without a set pattern. I want to be able to have the players level up their character to the max level of 100 but will take awhile to get there. I dont have any complete maps, npcs, quests or skills that will grant XP since I'am just creating the "Engine", I just want to start the XP system then add the options for objects to give XP later on. Sorry if my explanations are confusing.

  • This is how i would do it, however, I'm sure there is a better way so you might want to wait for more replies .

    Anyway, your going to need 3 variables, the players Current Level, his current XP and the amount of XP required to gain the next level.

    So obviously, when the player does something that grants XP, you just add whatever amount he gets to the current XP variable, then when the current XP variable is equal or greater than the required XP, increase the players level by 1 and reset the current XP back down to 0.

    As for working out how much XP will be needed for each level without having a set pattern, i think you will need to work out a formula that will work for you. For example you might go:

    Required XP = Current Level * 10 + 100

    This would mean at level 4 you would need 140 XP to get level 5. Or at level 20 you would need 300.

    You will obviously want to work out your own formula however.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • alrighty thankyou very much. I started with using some different variables for levels and expirience just after I posted my question and got something basic working. You did give me some ideas though. My method will be very tedious to manually set the XP variables for each level.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)