Forum

armour

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

armour

Postby ajay » Mon Oct 27, 2008 5:26 pm

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
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby Spirit » Mon Oct 27, 2008 6:15 pm

http://wiki.qwdrama.com/Armor
It's focused on QW but the rules are the same in Quake. :)
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Postby Supa » Mon Oct 27, 2008 6:20 pm

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.
User avatar
Supa
 
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Postby Wazat » Mon Oct 27, 2008 6:24 pm

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.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Postby ajay » Mon Oct 27, 2008 6:39 pm

Cheers :D 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.
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby scar3crow » Mon Oct 27, 2008 8:33 pm

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...
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby FrikaC » Mon Oct 27, 2008 9:45 pm

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.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby Lardarse » Tue Oct 28, 2008 5:58 am

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.
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Postby FrikaC » Tue Oct 28, 2008 4:07 pm

Oh well. I was explaining what the article said, apparently they're wrong.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest