• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
RLS0812

How To Make Combat Formulas Work Better ?

9 posts in this topic

 I have been running combat simulations on and off for the last couple days, and I have been having issues making every thing "work" together to create a smooth running system.

 Here is what I have, maybe someone can figure out a better system than what I have.

( this is real time combat )

 

Combat Level - derived from several of the base skills ( haven't figured out a good way to calculate this yet )

HP - health ... regenerates based on combat level

MP - magic ... regenerates based on combat level

RP - religion ... regenerates based on combat level

Strength - how hard something can hit

Accuracy - percent added to damage

Agility - percentage chance of dodging some or all of an attack

Defense - amount of damage that can be absorbed

Armor - percentage of damage that can be absorbed

Luck - positive or negative random effect

 

* A difference of 3 or more combat levels between the combatants will change percentage of damage dealt and damage taken

* The level of MP & RP is the attack and defence level.

 

 

 Hit Given =  (Strength * (Accuracy bonus + luck) ) * combat level difference penalty or bonus percentage

 Hit Taken = (Hit Given - ( (Defense * armor bonus) * (agility bonus + luck) ) ) * combat level difference penalty or bonus percentage

Edited by Shippou
1

Share this post


Link to post
Share on other sites




Combat Level - derived from several of the base skills ( haven't figured out a good way to calculate this yet )

 

Since so many important numbers regenerate based on this one attribute, I'd say that finding a solid calculation is of the utmost importance.  None of the combat/dodge/absorb tests matter much if you are just regenerating health like the Wolverine on RedBull.

0

Share this post


Link to post
Share on other sites
My recommendation is a large collection of data tables that can be reloaded at runtime, and many hundred hours of tinkering. 

 

Excel (or open office) can be a very powerful tool here. And with some macro you can make your own basic "testing machine" that give you tables and graphics.

As a general advice, maybe try to figure out the general direction you cant to go, determine the maximum and minimum and adjust from here. For exemple you want that an average level 5 can kill a level 1 in three attack, so adjust the stats until you get this result in your simulations.

You also want two character level 5 with the same equipment and exact opposite stats (offensive, defensive) to be evenly matched. (except if you want otherwise)

About what you are exposing here, I think that the combat level can be redundant. As he is determined by your other stats, if you are already stronger than you opponent why using the combat level as a bonus? 

I would also use two phases for the fight (and as said slice4ever, you have 4 defensive stats, and only 3 offensive, is this intended?)

Phase 1 : does the attack connect?

If Accuracy > Agility then the attacker touch the defender
if Strength > Defense then the attacker touch the defender
 

Phase 2 : how many damage are dealt?

With Damage being another stat, weapon damage, or else

Damage dealt = Damage - Armor

Or something like that.


Edit : typo

Edited by Navezof
2

Share this post


Link to post
Share on other sites

My go to thought on something like this is that I want Robust mathematical formula, so that as long as the interacting parts have approximately similar numbers, everything kind of works out.

 

Using what you have here, I'd probably go something like this:

 

Damage = Strength

 

Reduction = Armor / (Armor + 100 - Defense) [ -10 < Defense << 100, 0 < Armor < 400]

Dodge = (1 + Accuracy) * (1 - Avoid) [ 0 < Avoid < Accuracy < 1]

 

Hit Taken = Damage * Reduction * Dodge

 

Something like this can take huge variance in inputs, and the results will still make sense. This allows you to experiment with your base values to find what fits best

Edited by BedderDanu
0

Share this post


Link to post
Share on other sites

Excel is really powerful for stuff like these.

 

Here are some formulas:

Player HP =(100*vitality)+(50*strength)

Boss HP =300*hero lvl

Player P Attack Power =5*(strength+accuracy+dexterity)

...

 

simulate fight and show you how many attacks you need to kill boss

physical_dmg =Boss_HP/(Player_P_Attack_Power + weapon_dmg - Boss_P_Defense)

...

 

I made this for my small text based RPG for learning purpose, i didn't have areas for monster levels but at the same time i wanted game to be challenging so i came up with linking hero level to rise monster difficulty.

It's far from balanced game but it's still balance laugh.png

 

Hope it helps...

 

 

edit: tried to put table from excel but i can'tsad.png sry...

Edited by V3ntr1s
0

Share this post


Link to post
Share on other sites

do I understand your thought process correctly?

 

 

Hit Given =  (Strength * (Accuracy bonus + luck) ) * combat level difference penalty or bonus percentage

                                    V                                                                   V

                         average dmg landed                             corrector based of fighting skill maturity

 

 

 

Hit Taken = (Hit Given - ( (Defense * armor bonus)     *    (agility bonus + luck) ) ) * combat level difference penalty or bonus percentage

                                                         V             

                                     average absorbing layer

                                     over body from the armour

                    

 

So what I am missing is basis for the average dmg landed it should be like 60% to hit (agility+luck)10 for example. It seems you inherently feel it thus the corrector. I would make the corrector based on comparison the basis with monsters (agility+luck) and start increasing that basis for the average dmg landed with Combat level. Armour bonus should be 0 - 1 where 1 means that the armour covers whole body.

 

What I dont like on your system is that you have two qualities - ability to hit and amout of dmg dealt and you are melting it into one quality average dmg landed. This makes characters generic...

Edited by Osidlus
0

Share this post


Link to post
Share on other sites

 I have been running combat simulations on and off for the last couple days, and I have been having issues making every thing "work" together to create a smooth running system.

 Here is what I have, maybe someone can figure out a better system than what I have.

( this is real time combat )

 

Combat Level - derived from several of the base skills ( haven't figured out a good way to calculate this yet )

HP - health ... regenerates based on combat level

MP - magic ... regenerates based on combat level

RP - religion ... regenerates based on combat level

Strength - how hard something can hit

Accuracy - percent added to damage

Agility - percentage chance of dodging some or all of an attack

Defense - amount of damage that can be absorbed

Armor - percentage of damage that can be absorbed

Luck - positive or negative random effect

 

* A difference of 3 or more combat levels between the combatants will change percentage of damage dealt and damage taken

* The level of MP & RP is the attack and defence level.

 

 

 Hit Given =  (Strength * (Accuracy bonus + luck) ) * combat level difference penalty or bonus percentage

 Hit Taken = (Hit Given - ( (Defense * armor bonus) * (agility bonus + luck) ) ) * combat level difference penalty or bonus percentage

Take a step back and discard as much as possible until you have no more things left, which you can take away without collapsing the combat system.

 

Example:

Hp - keep it

Mana,Relegion,Strength - just let's call it power for now (=how hard did an attack hit,regardless of its nature).

Accuracy- ditch it, just an modifier of damage, damage is derived from power

agility,defense,armor - just let's call it defense for now (=how good are you to avoid damage)

luck - random seed modifier, ditch it

 

Leaving for just combat related stuff:

Hp, Dmg, Def

While power is something special, either it is a resource like hp for casting spells etc. or it modifies the dmg output.

 

Now start building a simple system relying on these attributes, something like this:

hp' = max(0,hp - dmg/(1+def))

 

Now you need to think about a basic balancing. Start to set a fix value for one value, like hp is always 100. Then think about what avg dmg/def values would make sense to have a combat situation, like if you have X dmg and half of it as def, the defender should survive 5 hits.

 

The next step is to consider the effect of your combat level on the formula. Don't make it to complex. A linear effect would be a good start,something like this

hp'=max(0,hp*cl_d-dmg*cl_a/(1+def))/cl_d

with cl = combat_level factor, for attacker (cl_a) and defender (cl_d), if cl_a=cl_d, then you get

hp'=max(0,hp*cl_a-dmg*cl_a/(1+def))/cl_a=max(0,hp-dmg/(1+def))

 

Bevor we differentiate between different, more detailed attributes, add some modifiers, just ignore the combat level because it is linear:

hp'  = max(0, hp*f_hp - dmg * f_dmg / (1+def * f_def))/f_hp

 

This way you have the option to handle different combat situation more gracefully:

1. example:  a spell, which protects you vs 50% of any incoming dmg =>f_hp=2

2. example:  a spell, which ignores any defense value => f_def = 0

 

Now you can begin to differentiate between different influences on the basic attributes, that is, you derive the basic combat stats like hp,dmg,def on-the-fly, example:

dmg

= strength * factor * weapon_base_dmg, if basic melee attack

= magic * factor * spell_base_dmg, if basic spell attack

= relgion * factor * praying_base_dmg ...

Edited by Ashaman73
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0