Qbasicnews.com

Full Version: RPG formulas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on an RPG and I just wanted to know what forumlas to use during combat. E.G. If you have an attack of 9 and your opponent has a defence of 12, how much damage do you deal?


Also, how do you decide how much experience you need to reach the next level?

Thanks.
LOL

well, if YOU'RE making the RPG then YOU make up the rules. In m rpg that I am currently making the defence subtracts one point of damage for every 2 defence points.

as far as experience goes, that would depend on how much the enemies give you. if the enemies give you 10 at the beginning, then start out at say, 30 or 40 or something. if they give you 2, make it a lower number.

Essentially, there are no 'rules' if you make your own RPG, which is why it is fun! You can do W H A T E V E R you want!
Depends on how much HP the defender has. Since people make up such wildly varying stats (some games start off with min. 1000 HP) you'll probably have to make your own. But here is a few tips:

Use much greater values for attack and defense, and then scale them down and round them for when the user has to see them. Eg: make attack say 145 and defense 162, and divide them by 10 and round to get 14 and 16 respectively. Then use the 145 and 162 for damage. This way you can make the damage scale better.

Your formula must contain at some point the term attack/defense ie a ratio. So for example using the 145 and 162 example, you could have a formula like this: damage = myattack / enemydefense * mylevel, which if your level was 10 would deal 9 damage. But you will have to test your formula carefully - you may get wild results with certain combinations.

Exp: I put the exp that an enemy gives you into an array at the start of the game and just add that to the character's exp when they win the battle. Exp to the next level is easy as well, you just make a variable called nextlevelexp or similar, and put in it the character's exp + the amount they need to get to the next level, and at the end of each battle just compare the exp and nextlevelexp and if exp is greater then...

Hope that didn't sound like a ramble...