Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411487 Posts in 69371 Topics- by 58427 Members - Latest Member: shelton786

April 24, 2024, 11:57:13 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Damage Formula based on Flat/Percentage reduction
Pages: [1]
Print
Author Topic: Damage Formula based on Flat/Percentage reduction  (Read 2412 times)
neutonm
Level 0
***


Elusive Slacker


View Profile WWW
« on: August 29, 2014, 04:04:55 AM »

Hey all,

I'm seeking for an advice. I just noticed that the game i'm working on has tiny cheating feature and that is... damage formula. There are "hit points" and "shield points". There are two types of armor - flat and percentage. Flat armor reduces the rest of the damage (when shield depleted ) by X points. Before damage deals up with hit points it must pass through the shield first. Shield has its own resistance but it measures in percentage.

So basically we have object with 3 flat armor and 10% shield armor; when object has 100 hp / 10 sp and receives 20 damage points - the shield will reduce damage by 2 points thus leaving 18 damage on the side. This makes shield depleted (after subtracting) leaving only 8 points of damage which goes straight to the hit points. There we have flat armor reduction (8 - 3) thus in final second object ends with 95 hp / 0 sp.

I guess the information above doesn't need such explanation since it's usual for most rpg games but still... just in case Smiley

The Problem: Let's just say that player has super ultra shield which has 90% reduction. Player has 100 hp and 1 shield point!!! This means if he receives mega blast that deals 100 damage he will end with 91 hp / 0 sp. That one shield point might save his arse for sure and that's basically not very fair. The question is how to find balance in this situation? Perhaps a golden mean? (Shield always regenerates itself).

I really regret my old days when i literally slept on math classes. I thought of bizarre solutions but at the end i decided to post here.
Logged

Adam_
Level 1
*



View Profile WWW
« Reply #1 on: August 29, 2014, 09:55:44 AM »

How about applying the shield percentage only to the portion of damage that is actually consumed by the shield?

In you first example, this would mean the following:
  • 20 damage will deplete all ten shield points, so they'll be zero after the attack
  • Since the shield was dealt 10 damage, the 10% reduction amounts to 1 and leaves 19 damage.
  • Next, the ten damage points which were dealt to the shield will be subtracted, so that's 9 damage.
  • After reducing the flat armor, you'll end up with 6 hitpoint damage.

In your second example, it's like this:
  • 100 damage deplete the one shield point
  • Since the shield was dealt 1 damage, the 90% reduction amounts to zero or one, leaving a minimum of 99 damage.
  • Next, the ten damage points which were dealt to the shield will be subtracted, so that's 98 damage.
  • After reducing the flat armor, you'll end up with 95 hitpoint damage.

Alternatively, you could apply the shield percentage modified by how much percent of the shield are currently available. Let's say, you have 1 / 100 sp, then your 90% damage reduction will actually be 0.9% damage reduction. Or, if you have 50 / 100 sp, that would be 45% damage reduction. Actually, this solution is probably better than the one above.

Also, I wouldn't reduce damage by the amount of shield points lost, because you already have flat armor and the shield already does a percentage reduction, so that just sounds like more complexity without a real gain..? Undecided
« Last Edit: August 29, 2014, 10:06:33 AM by Adam_ » Logged

SimplyRivet
Level 0
**



View Profile
« Reply #2 on: August 29, 2014, 11:55:48 AM »

Another way of handling it is to have the shield durability only be affected by the damage that it absorbs.

So in your first example it would work like this:
  • We have 20 damage coming in, and the shield blocks 10% of the total or 2 points
  • The shield is now at 8sp, and the other 18 goes through
  • After the flat reduction the object takes 15 points of damage, and now has 85hp/8sp
This would mean that the shields last longer across hits, if that's a desirable result.
Logged
neutonm
Level 0
***


Elusive Slacker


View Profile WWW
« Reply #3 on: September 01, 2014, 04:47:28 AM »

Another way of handling it is to have the shield durability only be affected by the damage that it absorbs.

How about applying the shield percentage only to the portion of damage that is actually consumed by the shield?

Both methods are favorable but still my mind flows in doubts. Perhaps i'll throw a coin.

Also, I wouldn't reduce damage by the amount of shield points lost, because you already have flat armor and the shield already does a percentage reduction, so that just sounds like more complexity without a real gain..? Undecided

This is sort of double-layered armor system. Gameplay won't allow "90% damage reducer" shields but anyway... solution might be handy.

First i thought about lastly proposed method but that gave me doubts because it would leave shield "alive". eg: 100/10 with 50% with 14 dmg = 93/3. But what the heck... let it be.

Thanks for advises guys.
If anyone would have alternative extra-sneaky solution i'll be happy to hear it.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4 on: September 01, 2014, 01:28:05 PM »

It looks like encounter design more than specific stat. What I mean is that designing a stat is meaningless outside of the general encounter design, aka how do the player deal with a series of opponent. In rpg the player generally evolve into staircase while enemy encounter is more "linear" (meet weak enemy, meet glass canon enemy, meet tank enemy meet boss), generally items progression is based on smoothing the staircases. But that's assuming a very boring progression with one type of defense (ie not elemental or based on weakness swapping), even though the same applies as it became a trade off game (balanced vs specialized and level design encounter pacing among those weakness).

there is agreat talk, it's about mmo but apply to all rpg, this is the basics but it is easy to understand how to expend.
http://twvideo01.ubm-us.net/o1/gdc_china/2011/slides/S-O-1113-3-EN-Sara%20Jensen%20Schubert-EnPPT.flv

Another part not showed there is the production management gameplay, aka trick and debuff, ie how resource flow in the strategy into an encounter (for example techniques that are weak but augment exponentially so after x times they became worthwhile if you manage to pay the cost)
Logged

JamesK
Level 0
**



View Profile WWW
« Reply #5 on: September 04, 2014, 11:28:56 AM »

Nice video, saving for future use.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic