• Advertisement
Sign in to follow this  

Unity Stat Leveling System

This topic is 3877 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Community, I am curious if there is an example leveling system out there that I can use. The type of leveling system is for a RPG game and will get a person from level 1 to 40. Any suggestions thanks.

Share this post


Link to post
Share on other sites
Advertisement
I, for one, would answer your question, but there's not enough "stuff" to go on. I need more information than "for a RPG game". Go back, include some more details, and maybe we can help you out.

Share this post


Link to post
Share on other sites
Thanks for your response :)

I want to create a leveling system where a hero can gain points for each kill he gets. After a certain amount of points he will level up to level 2. The cap off is 40. I have a great idea on how I can do it but would like to view stuff on proven ways that works. I would like for the code to be in C++ even though the game I am programming is not in C++ I use C like scripting. The game I am making is 3D. What specific information would you need in order to assist me better?

Share this post


Link to post
Share on other sites
EDIT:
Never mind, you said not c++. But you would have to call c++ functions anyway for your scripting language, so why not just add script functions that call c++ code?


It wouldn't be that difficult. You could do something like this where cCharacter is your character's class:

void cCharacter::killNPC(/*input*/)
{
//Do the regular kill stuff
xp+=NPC.level; //where xp is your characters experience points nad NPC is the person you killed
CheckXP(); //Check to see if level up is necessary
return;
}

void cCharacter::CheckXP()
{
int xp_needed = 100; //You can change that
if(xp>=xp_needed && level <= 40) {
level++; //Increment level
xp=0; //Reset experience
}
return;
}

Share this post


Link to post
Share on other sites
Most leveling systems are not a linear distribution of experience vs levels, usually the distribution is exponential increase of some sort until it possibly tapers off in the upper levels (assuming you want them to max out the character)

This should also increase the reward the person gets while settling into the game, quickly achieving goals, and allowing them to quickly increase character stats will greatly increase their drive to further develop their character. By weening them off the speed of achieving rewards, it should draw them further into the game, increasing their desire to be rewarded.

Also as the character increases level and achieves more skill points, the enemies they could encounter would generally be tougher and give more experience. So increasing exponentially experience required may still only give a linear distribution of time/level. I would think you would want time/level to increase exponentially as well, so you would have to take into account this as well.

your experience per level would depend entirely on the amount of experience the player gets from each kill, as well as the length of the game/number of killable (experience gaining) things within the game. If your game is only a few levels long, being able to only reach level 3 at the end makes the rest of the leveling pointless.

I haven't made anything more than a simple rpg though (stunning state of the art 2-d graphics, green dot for the hero, and red for the enemies), so there might be someone else on here more knowledgeable who will be able to help you more.

Share this post


Link to post
Share on other sites
I just set mine up so the player had three stats (STR/DEX/INT). Each level required N * 1000 points to achieve (so you needed 2000 experience points to get to level 2, 3000 to level 3 on top of that, etc) and gave you three points to spend how you wish on your stats.

The problem, of course, is that it's not really an experience "curve" so much as it is an experience line...

Share this post


Link to post
Share on other sites
The easiest thing to do is play a few games and take elements you like from them. Diablo 2 and World of Warcraft have decent leveling systems. Guild Wars is good too (although much faster to max level than the previous two). Or, you could check out the old Dungeons & Dragons Player's Handbook and see how it's implemented there. All of the systems are very similar anyway..

Share this post


Link to post
Share on other sites
Have to agree with thesilencer, look at old pen and paper RPGs. They are the giants that we are standing on the shoulders of. I have a closet filled with RPG books from ages ago (1991-ish) that I still go back to sometimes to look at how other people have done their leveling systems, damage systems / charter generation systems.

..And, well truthfully, allot of them sucked, palladium games was full of great ideas backed up my bad systems. Those bad systems are just as useful though- to see how NOT to have characters level up / calculate damage etc.

Another note: if your RPG has strict classes (ie magic users will never be good at swords and fighters are not gonna ever through fireballs) you might look into some sort of fixed stat distribution per level then have a tree of skills per level, just a thought.

Share this post


Link to post
Share on other sites
I am sorry about the confusion of what language that I use. I use C++ and do C like scripting to clear that up. Thanks for the examples shown above. I played and still play games listed up above. I know what systems I like but liking and applying them to your own game is a whole different animal in itself. Experimentation is what I am doing but I will go back and redesign a flow chart with some psuedo code to help out a bit better.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Now

  • Advertisement
  • Similar Content

    • By Atwo Studios
       
      Hey guys,

      Anthony here from Atwo Studios bringing you some new updates for the new year!
      In this video I go over our game ROY, the new games and some general updates to the company!

      If you have not checked out ROY feel free to give it a try! Many people have said they enjoyed the game thus far!
      ROY: https://goo.gl/o6JJ5P
       
    • By Affgoo
      https://play.google.com/store/apps/details?id=com.NE.Alien
      still a lot of work to do, but its pretty stable  please let me know what you think <3
      Atlas Sentry is a game of destroy everything. Using your turret, simply swivel and shoot your way to victory, upgrading your weapons to unleash destruction on the variety of spaceships. The bigger your combo’s the more score you get! Earn silver as you play and then purchase new weapons and abilities to better deal with your enemy. Different enemies use different tactics and weapons, work out your own priorities in their destruction order. 

      Features: 
      **2 different game modes 
      **A level select mode with 20 difficult levels including a final boss, can you defeat it? **Arcade mode of endless destruction, how long will you last? 
      **High scores to compete against others, see who can take the top spot. 
       
    • By Chamferbox
      Chamferbox, a mini game asset store has just opened with some nice game assets, 
      Here you can find a free greek statue asset 

      Also check their dragon, zombie dragon and scorpion monster out:



      They're running the Grand Opening Sale, it's 30% off for all items, but for gamedev member, you can use this coupon code:
      GRANDOPEN
      to get 50% off prices What are you waiting for, go to
      http://chamferbox.com
      and get those models now!

      View full story
    • By Dafu
      FES Retro Game Framework is now available on the Unity Asset Store for your kind consideration!
      FES was born when I set out to start a retro pixel game project. I was looking around for an engine to try next. I tried a number of things, from GameMaker, to Fantasy Consoles, to MonoGame and Godot and then ended up back at Unity. Unity is just unbeatable in it's cross-platform support, and ease of deployment, but it sure as heck gets in the way of proper retro pixel games!
      So I poured over the Unity pipeline and found the lowest levels I could tie into and bring up a new retro game engine inside of Unity, but with a completely different source-code-only, classic game-loop retro blitting and bleeping API. Months of polishing and tweaking later I ended up with FES.
      Some FES features:
      Pixel perfect rendering RGB and Indexed color mode, with palette swapping support Primitive shape rendering, lines, rectangles, ellipses, pixels Multi-layered tilemaps with TMX file support Offscreen rendering Text rendering, with text alignment, overflow settings, and custom pixel font support Clipping Sound and Music APIs Simplified Input handling Wide pixel support (think Atari 2600) Post processing and transition effects, such as scanlines, screen wipes, screen shake, fade, pixelate and more Deploy to all Unity supported platforms I've put in lots of hours into a very detail documentation, you can flip through it here to get an better glimpse at the features and general overview: http://www.pixeltrollgames.com/fes/docs/index.html
      FES is carefully designed and well optimized (see live stress test demo below). Internally it uses batching, it chunks tilemaps, is careful about memory allocations, and tries to be smart about any heavy operations.
      Please have a quick look at the screenshots and live demos below and let me know what you think! I'd love to hear some opinions, feedback and questions!
      I hope I've tickled your retro feels!



      More images at: https://imgur.com/a/LFMAc
      Live demo feature reel: https://simmer.io/@Dafu/fes
      Live blitting stress test: https://simmer.io/@Dafu/fes-drawstress
      Unity Asset Store: https://www.assetstore.unity3d.com/#!/content/102064

      View full story
    • By DevdogUnity

      Ho ho ho
      Tis the season of Christmas surprises, and we have a awesome one for you! 🎅  
      Sponsored by all your favorite Unity Asset Store developers, Nordic Game Jam, Pocket Gamer Connects, and co-hosted by Game Analytics, we (Joris and I – Devdog) are launching the second edition of our yearly Christmas Giveaway Calendar for all Unity game developers!
      You can already now sign up right here.
       
      So what’s this all about?
      For the past weeks, we’ve been collecting sponsored gifts related to Unity (asset vouchers, product keys, conference tickets etc.), and throughout each day of December leading up to Christmas Day on the 25th, we will be sending out these sponsored gifts as early gamedev Christmas presents via e-mail to hundreds of lucky winners.
      The total prize pool is at $35,000, with over 1200 presents donated by the awesome sponsors!
       
      Merry Christmas from Devdog, Game Analytics, and every single one of the sponsors.

      View full story
  • Advertisement