#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    448
    Rep Power
    12

    statistical formulas


    I have never been very good at math, so this area is not one of my strong points. I am building an on-line turn based role playing game. A loose combination of the old door games LORD and Usurper, mixed with some aspects of MUDs. I have the basic database structures down, but for some of the stats that require it, i am having a bit of trouble thinking up a formula to calculate them. Perhaps some folks who have had some experience with this sort of thing could lend a quick hand.

    First I will list all the stats.

    Player Level
    Player Max HP
    Player Max Mana
    Player Max Weight (Encumberance)
    Player Armor Class
    Player Defense
    Player Attack
    Player Strength
    Player Constitution
    Player Speed
    Player Intellect
    Player Wisdom
    Player Charm

    Some are straight forward. Str, con etc. but others i would like to be dependent on other stats. For instance

    Max HP is dependent on Level and Constitution
    Max mana is dependent on intellect and wisdom

    Defense is dependent on armor class and speed and strength
    attack is dependent on strength speed and intellect (mildly)
    Max weight is dependent on strength and level.

    After these, combat. wewww. that's gonna be a bitch. =)
    -Sotonin
  2. #2
  3. Senior Member
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2000
    Location
    Enschede, The Netherlands
    Posts
    1,527
    Rep Power
    16
    Sounds great but do you want help on how to use PHP with this or how to formulate your algorithms?
    There are 10 types of people in this world - those who understand binary and those who don't...

    PHP | MySQL | DevShed Forum Search | Google Search
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    448
    Rep Power
    12
    oops, sorry for not being more specific. Just how to formulate the algorithms, I already have the php in place as for the game and continually working on it.
    -Sotonin
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    448
    Rep Power
    12
    doh. now that this has been moved to algorithms, itll never be seen =(

    dang you!
    -Sotonin
  8. #5
  9. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    Well, I think your question is a bit broad. I don't really think anyone can give you a good answer with what you've provided because unless you're doing an exact port of a game that already exists, the math part is going to be the most important part. It is going to be the foundation of the game balance and how the game is supposed to be played and how players will play your game to most abuse the math in their favor.

    Maybe a little bit more info will help, like the scale of things. For example are hit points/mana, damage, spell mana cost, etc. On the order of 10s, 100s, 1000s etc. How much should character stats affect these things, are there any other factors (race, class, etc)? What should the pace of combat, levelling, etc. be?

    If you know what you like already, how about modelling your rules off of what you like from pre-existing rule sets and then tweaking to come up with the balance you envision.

    One last thing, the algorithm forum is where this type of post belongs (and not PHP), as it's probably where you'll get the best feedback as the people viewing your posts will be those that have an interest in algorithms and not finding out why their sessions aren't working for their content management system.

    Your project sounds interesting, when/if you need a beta tester let me know as I'm always interested in game development.

    -b
    PostgreSQL, it's what's for dinner...
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    448
    Rep Power
    12
    Cool. ya i guess i should be a bit more specific. hehe.

    All this could be subject to change. but so far

    the game has 100 player levels.

    There are a number of races, but currently your race only affects which stats you will start with. 50 total points distributed across the 5 different base stats. str, con, speed, int, wis, charm.
    I have a basic structure to add in race specific attributes, such as regen for a troll, damage shield for a fire elemental type race, etc. lots of room to expand.

    Each lvl you get 5 stat points to distribute. equalling 500 points when you are lvl 100. so you could in essence have 100 in each stat if you distributed it even. (but who will? hehe)

    a lvl 1 would start with around 20 - 30 hps and a magic caster about the same in mana.

    Weapons have 2 main attributes, damage and delay. this is another area i am kind of sketchy as to how i will make them play a factor. any suggestions welcome. armor has armor class attribute.

    Player's Armor class attribute is the total number of AC of the armor they are wearing. + any natural AC bonus from their chosen race.

    As you progress in level i want maybe 10 hps added just for each level. then more on top of that depending on your constitution. maybe 1500 - 3000 total hps at lvl 100. again. rough estimate. nothing is set in stone.

    The pace of leveling starts out quite fast, to allow the player to really get into it, gain like 4 lvls with the starting amount of fights granted upon creation. and around lvl 20-30 it slows a bit so you only make 1 lvl a day and then up to where you get 1 lvl every 2 or 3 days.

    The game itself is turn based. every half an hour the turn ends and you receive additional forest fights (where you go to fight enemies) and player fights. Your bank account gains interest and you get all your skill points back.

    As a lvl one the creature you fight will have more of less very close to the same hps as you. but they will have poor attack so you can win unless you get the rare roll thats higher lvl than yourself. You will be doing generally 5 - 15 dmg at lvl 1 with the starter weapon. killing a creature in as few as 2 combat rounds.

    Hehe. sorry bout last comment. I usually have luck with people helping out in the PHP forums. Didn't realise there was a forum just for this. =) hehe

    I would definatly let you in on the beta testing, just shoot me an email ... kevin@lordnet.net .. and i will keep it on file when i open up for closed beta.
    Last edited by Sotonin; April 21st, 2003 at 04:58 PM.
    -Sotonin
  12. #7
  13. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    1,189
    Rep Power
    18
    At work right now so I'll shoot you an email later on. Off the top of my head regarding the HP, instead of a straight additional 10 per level you might want to base it off of char class/race and have the constitution either have a set addition bonus, or multiplier bonus. I'll put together some small number examples with what you provided.

    Also, reading over your first post, you say mana is based on both wisdom and intellect, what else differentiates the two stats? For example, why would you want to put more points in one vs the other?

    -b
    PostgreSQL, it's what's for dinner...
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    448
    Rep Power
    12
    What i was trying to do with int and wis is make there be a balance. what i mean is this.

    Shamans are wise beyond their years and such this would be the stat that they have a lot of points into and which determines their mana pool. Shamans may not be very intelligent however, (troll shaman) so a low or non existent int skill would not hinder their mana pool if their wisdom was a high value.

    Same goes for a wizard that doesnt have quite as high a wisdom, but has substantial intelligence.

    I wasn't quite sure how to go about this. perhaps i could completely rethink the way it will work, and have one stat have another purpose. hmm maybe i could add a system in which you have a chance at fizzling your spell casting and the higher the wisdom the less chance at fizzling. that might work. And have the shamans depend on wisdom for mana pool and int for fizzling. have the wizards mana pool depend on int and wis for fizzling. or something like that.

    I like the idea about the hp based off of the race instead of level. I suppose a set bonus for the con could be like every point of con gives you +5 to hps. would work ok i think.
    Last edited by Sotonin; April 21st, 2003 at 05:32 PM.
    -Sotonin

IMN logo majestic logo threadwatch logo seochat tools logo