View previous topic :: View next topic |
Author |
Message |
ajay

Joined: 29 Oct 2004 Posts: 295 Location: Swindon, UK
|
Posted: Mon Oct 27, 2008 5:26 pm Post subject: armour |
|
|
I know where the pick up is defined in items.qc, but, to save me searcing through everything, can someoen tell me where the efefcts of having armour is defined?
cheers _________________ my site |
|
Back to top |
|
 |
Spirit

Joined: 20 Nov 2004 Posts: 476
|
|
Back to top |
|
 |
Supa

Joined: 26 Oct 2004 Posts: 122
|
Posted: Mon Oct 27, 2008 6:20 pm Post subject: |
|
|
http://inside3d.com/browse.php?show=combat.qc
Should you need to change anything, the armour damage save effect is applied early on in T_Damage. Look for .armortype and .armorvalue. |
|
Back to top |
|
 |
Wazat
Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA
|
Posted: Mon Oct 27, 2008 6:24 pm Post subject: |
|
|
Spirit: Well, the place in the code where armor affects damage is combat.qc, in T_Damage. Looks like Supa ninja'd me on that though.  _________________ When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work. |
|
Back to top |
|
 |
ajay

Joined: 29 Oct 2004 Posts: 295 Location: Swindon, UK
|
Posted: Mon Oct 27, 2008 6:39 pm Post subject: |
|
|
Cheers The reason for my question; I'm wanting to implement a simplistic food/nutrtition system, which affects the amount of damage you take, e.g. if 'malnurished' you're less able to take physical harm, and the speed you can move at / how long you can run etc.
I'd prefer to have your 'nutrition' displayed on the HUD, but as I've no intention (or skill) to mess with that to much, I, planning to hack the armor system to use that. _________________ my site |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Mon Oct 27, 2008 8:33 pm Post subject: |
|
|
So in reading http://wiki.qwdrama.com/Armor I couldn't help but notice that in the chart yellow has 0.5 damage absorption, but in the listing at the bottom it has 3/5. Is this an oversight or am I missing out on some juicily wonky math?
I always recall the YA being 60% absorption... |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Mon Oct 27, 2008 9:45 pm Post subject: |
|
|
It's two separate measurements. The first is how much damage is subtracted, for the yellow armor it is 50% of the damage removed from health. Then the next factor is how much the armor decays as a result of being damaged which occurs at 3/5 of the damage amount.
I cannot verify this against code right now but I have no reason to suspect the article is incorrect about its stats. |
|
Back to top |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Tue Oct 28, 2008 5:58 am Post subject: |
|
|
FrikaC wrote: | It's two separate measurements. The first is how much damage is subtracted, for the yellow armor it is 50% of the damage removed from health. Then the next factor is how much the armor decays as a result of being damaged which occurs at 3/5 of the damage amount.
I cannot verify this against code right now but I have no reason to suspect the article is incorrect about its stats. |
I see nothing in the QuakeC that supports that. I see yellow giving 0.6 which is 60%.
Preach made a nice post at func_ about how armor works. Might be useful.
ajay: If you're using that area, remember that you have 4 potential images to be displayed there (including the blank), as well as a number. |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Tue Oct 28, 2008 4:07 pm Post subject: |
|
|
Oh well. I was explaining what the article said, apparently they're wrong. |
|
Back to top |
|
 |
|