Forums

Forums of BattlesofNorghan.com

1.12 version released in October 2016!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   

Strength and weapon damage

 
Post new topic   Reply to topic    Forums of BattlesofNorghan.com Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Mon Jan 09, 2006 5:47 am    Post subject: Strength and weapon damage Reply with quote

Which weapons have there damage increased by strength?
What is the strength required, and how does it affect the damage done?
Back to top
Tertsi
Mitorah Games Studio Head


Joined: 29 Aug 2004
Posts: 331
Location: Finland

PostPosted: Tue Jan 10, 2006 12:23 pm    Post subject: Reply with quote

You can read each weapon's strength requirement from the Str req. field at Jardel's Weaponry.

All melee and ranged weapons have their damage affected by strength.
Strength affects ranged weapon damage 50% less than melee weapon damage.

If you understand the below, it tells you how much strength affects melee damage.
strengthfactor = (damage * 0.05 + 0.5) * 0.5 + 0.25;
if(strengthfactor >= 1) damage += strength-6;
else damage += strengthfactor * (strength-6);


Last edited by Tertsi on Wed Jan 11, 2006 5:24 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Andrew Williams
Member


Joined: 11 Dec 2005
Posts: 19
Location: Leicestershire, UK

PostPosted: Tue Jan 10, 2006 7:03 pm    Post subject: Reply with quote

I did a Maths degree at University. Let's see what I can fathom...

First, for future reference, you'd get the same result in the first line with the formula

strengthfactor = damage*0.025 + 0.5;

This is basically 1/40th of your damage value, plus an extra half point.

If, by some miracle, this value is greater than 1 (or, if your blow inflicts more than 20 damage) then we add the strength of the character and subtract 6 (so, a bad thing on characters with strength less than 6).

If your blow is weedier than 20, we multiply strengthfactor by (strength-6) and add that.

The basic pattern here is that, if your blow does 20+ damage, you get an extra (strength-6) points of damage. If your blow does less than that in damage, you get a proportionate increase - so, if you do 10 damage, then you get half of that (strength-6) added on.

In Summary:
* Strength less than 6 penalises your damage.
* Strength equal to 6 has no effect.
* Strength above 6 increases damage.

My question is more advanced - is this formula worked out before or after the effect of armour is considered?
Back to top
View user's profile Send private message Visit poster's website
Tertsi
Mitorah Games Studio Head


Joined: 29 Aug 2004
Posts: 331
Location: Finland

PostPosted: Wed Jan 11, 2006 5:26 am    Post subject: Reply with quote

Andrew Williams wrote:
If your blow is weedier than 20, we multiply strengthfactor by (strength-6) and add that.


Correct.
Before the effect of armour.

Edited.


Last edited by Tertsi on Sat Apr 23, 2016 2:40 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Andrew Williams
Member


Joined: 11 Dec 2005
Posts: 19
Location: Leicestershire, UK

PostPosted: Wed Jan 11, 2006 8:08 pm    Post subject: Reply with quote

Tertsi wrote:
Andrew Williams wrote:
If your blow is weedier than 20, we multiply strengthfactor by (strength-6) and add that.

- Actually it means that you add strength - 6 to the damage.


Nope, at least, not according to this formula.

strengthfactor is determined according to the damage caused, and does not involve character strength at all - damage of >20 will produce strengthfactor>1, while damage<20 will produce 0<strengthfactor<1.

The if statement at the end merely caps strengthfactor off at 1. In other words, the most extra damage you'll ever get is (strength-6) - and, if you strike a weaker blow (<20) then the extra damage is reduced - for instance, a blow with damage 10 will produce strengthfactor=0.75 and hence will cause 0.75*(strength-6).

Weak blows get less bonus. Strong blows get more.

Apologies to any readers who are getting lost in the maths here - go look at the Tactics page, which is far more fun.
Back to top
View user's profile Send private message Visit poster's website
Tertsi
Mitorah Games Studio Head


Joined: 29 Aug 2004
Posts: 331
Location: Finland

PostPosted: Thu Jan 12, 2006 9:08 am    Post subject: Reply with quote

EDIT: Seems I just didn't understand the word "weedier" correctly earlier.

Last edited by Tertsi on Sat Apr 23, 2016 2:37 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Andrew Williams
Member


Joined: 11 Dec 2005
Posts: 19
Location: Leicestershire, UK

PostPosted: Fri Jan 13, 2006 5:14 pm    Post subject: Reply with quote

I quite agree. Arguments lead to headaches.

Did you find my optimisation earlier to be any use?
Back to top
View user's profile Send private message Visit poster's website
Tertsi
Mitorah Games Studio Head


Joined: 29 Aug 2004
Posts: 331
Location: Finland

PostPosted: Fri Jan 13, 2006 5:25 pm    Post subject: Reply with quote

Nope, optimizations like that do not affect speed at all even if there was 100 of those near each other and in this case the compiler should optimize it to that line if it's faster. I do have the tendency to over-optimize code anyway but it's a bad habit. :/
Back to top
View user's profile Send private message Visit poster's website
andersonalex
New member


Joined: 17 Apr 2007
Posts: 2

PostPosted: Tue Apr 17, 2007 1:11 am    Post subject: Reply with quote

Out of simple curiosity, I was also wondering about changing that line. But instead of changing the math, I was wondering why it wasn't skipped and just stated, "If Damage > 20 Then... Else..."

btw, I'm extremely impressed with your game, and I purchased the full Gold version recently. Congratulations on some very innovative work.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Forums of BattlesofNorghan.com Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group