|
-
Flash Incompetent
RPG-style stats...
Well I've been fooling around with an RPG-style battle engine that I'm making, in its very early stages; I don't plan to use it for an actual RPG, but I am having some trouble with stats and battle mechanics. I am not sure if this is something I should be asking for help or just one of those things I should buck up and try to figure out on my own, feel free to let me know. Basically what I'm referring to is stuff like Strength, Vitality, Agility, Dexterity, Int, and maybe Luck... Where I'm running into my issues is how to calculate stuff like success rates for hitting the enemy etc. I used to play a game called Ragnarok Online so I'm getting my ideas from them. My original plan is to have those be the base stats, which lead to 'sub-stats' such as Hitrate (chance to hit, based off dex), Flee (chance to evade, based off vit), Magic Defence (magic tolerance, based off int), Attack (how hard you hit, based off str), Defense (how well you take the damage, based off vit). All of these substats I was wanting to have secondary causes, such as class modifiers (if you are a thief/ninja, whatever, your flee based off agi will be higher than if you were a knight).
Anyways I'm just having trouble figuring out how to make good formulas for all this stuff, I figure it will take a lot of testing to get everything right; however, does anyone have any suggestions as to where to look for ideas for these kind of formulas? Is it even okay to "steal" stat formulas?
I was fooling around with my calculation of checking if a hit will succeed but I don't know, my calculation seems... so.. not how it should be lol...
Code:
hitfactor = (50+user_dex) - vic_agi;
chance = random(101);
if (chance < hitfactor){
hit = true;
} else {
hit = false;
}
Anyways, feel free to tell me I'm a jerk and shouldn't need help with this, even though I'm hoping that's not the case!
Thanks in advance,
ChaseNYC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|