agrash on 6/7/2009 at 16:15
Quote Posted by DDL
Like I said, none of those choices really make any difference. Ultimately it'll be pretty easy to spot which choices actually are significant, since they're "do X to end the game" kinda choices.
In other words, you can kick the crap out of the order constantly and they'll still ask you for help. Likewise for the WTO.
Which is a failing of the game really, but hey: at least you can go crazy and not lose out! :D
Kinda unrealistic but cool i guess.. °_°"
to bad the wto have the good parts so far like that special weapon & now the greenhouse mission
Koki on 7/7/2009 at 19:18
Anyone else noticed that AI will not "work" unless you look in their direction?
Not "shoot-player-in-face" AI, but for example the battle between UNATCO and NSF during first visit to Battery Park - the soldiers won't actually attack unless you have them in the field of view.
Same thing for Anna in Castle Clinton - she won't react to NSF as long as you don't look towards the entrance.
Attention whore.
DDL on 7/7/2009 at 23:38
Tis a variable in scriptedpawn: bTickVisibleOnly, and it's defaulted to true.
Basically, it means they only tick() (and thus do a ton of enemyhandling/reaction code) when they're visible (or rendered recently), and it saved a shitload of processor time, back when that was important. Plus it means that you don't always arrive after everyone's dead and the battle is over. But yeah: looks silly. Specially since they don't set up their weapons until that happens, so you get a ton of standing troops facing standing NSF who SUDDENLY pull out guns as if surprised and then go all rambo.
Koki on 1/6/2011 at 16:17
Rise.
Does anyone(hi, DDL) have HP values for enemies and info about damage multiplier for headshots? I'd like to know which weapon can headshot, and when(skill-wise).
DDL on 1/6/2011 at 19:17
Health values:
Every human in the game has separate health values for head, torso, arms (each) and legs (each), so six total health 'slots'. They also have a globla value called 'health'.
To calculate actual death, every time the NPC takes damage the various current location values are evaluated to produce a new value for the global health, and if this is zero or below: u be ded.
Actually, screw it, I'll post the code commenting (tis easier):
Code:
// Scoring works as follows:
// Disabling the head (100 points damage) will kill you.
// Disabling the torso (100 points damage) will kill you.
// Disabling 2 1/2 limbs (250 points damage) will kill you.
// Combinations can also do you in -- 50 points damage to the head
// and 125 points damage to the limbs, for example.
// Note that this formula can produce numbers less than zero, so we'll clamp our
// health value...
Also note that while they refer to the various values as having "100 points", this is the default for NPCs, not necessarily the actual values individual NPCs might have.
Actual health values are as follows (value applies to all locations except where indicated)
Troops and general civvies (UNATCO, NSF, MJ12, Riot Cops, bums, doctors etc): 100
Jojo: 150 (head) 100 (everywhere else)
MIBs: 350
WIBs: 300
Commandos: 250
Anna: 400 (head) 300 (everywhere else)
Gunther: 600 (head) 400 (everywhere else)
Walton Simons: 900 (head) 600 (everywhere else)
Think that's most of the important ones. Oh, and animals/bots have a single value which you simply damage by shooting them anywhere, and in the case of bots, also have an EMP hitpoints value which you damage with EMPnades (obviously):
CleanerBot: 20 (EMP: 20)
MilBot: 600 (EMP: 200)
WalkerBot: 250 (EMP: 100)
SecurityBot: 150 (EMP: 40)
Big SpiderBot: 400 (EMP: 100)
Small SpiderBot: 80 (EMP: 25)
Greasel: 100
Gray: 50 (I had no idea it was this low)
Karkian: 400
Baby Karkian: 75
So that's health values. I'll post this and then start on damage code, coz it's a big confusing mess.
DDL on 1/6/2011 at 20:00
Ok, so damage.
First things first: Weapon damage itself.
A given weapon does a base amount of damage. This is then modified by your skill, and sometimes by augs too. The skill bonus is applied as follows:
Untrained: no effect
Trained: 1.2x damage
Advanced: 1.5x damage
Master: 2x damage
In addition, shooty weapons get a small damage bonus from augTarget, which is additive (0.1, 0.2, 0.3, 0.4), so the biggest damage boost for shooty weapons you could get is 2.4x base.
Hand to hand weapons get a damage bonus from augCombat, which again is additive, but better: (0.25, 0.5, 0.75, 1.0), so the maximum damage boost for close combat weapons is 3x base.
Hilariously, LAMs and the like are counted as hand to hand weapons for aug modifiers, so also get the augCombat boost...if you throw them. Placed grenades use weaponskill, so benefit from augtarget instead (DX code is silly).
Also, bear in mind that the DTS is AOE_Cone, so while it claims to do 100 damage, it actually does 5 smaller hits of 20 each, which is why you generally need at least SOME low tech skill before you can start ripping through doors with it.
Ok. Now for inflicting this damage on pawns.
There are several places in the pawn damage code where modifiers apply. Some of them are mutually exclusive (see opinion of DX code, above).
First they "modify" the damage based on various criteria: if a pawn is stunned (zapped with a prod, rubbing eyes), they take 4x damage. If they are NOT stunned, but you hit them from behind at very close range (the old small-of-the-back magic spot) they take 10x damage. Note that stunned takes precedence, so backstabbing NPCs reeling from teargas is unnecessary and possibly even counterproductive.
Modifydamage also checks for things like teargas, EMP etc, and reduces them to zero where appropriate. In the case of Anna (and only Anna) it also reduces stunned, knockedout, and tranq damage to zero (they really, really want you to kill her).
Then they check for 'shield damage' if appropriate: this is where gunther and co draw their silly blue ellipse effect. This can reduce or cancel out damage.
For reference:
Gunther: Flamed, Burned, Stunned, KnockedOut: all zero
Poison (tranq), PoisonGas, Shocked, Radiation: 0.1x
MJ12Commando: PoisonGas, TearGas: zero
Burned, Flamed, Poison: 0.5x
Walton: Flamed, Burned, Stunned, KnockedOut: all zero
Poison (tranq), PoisonGas, Shocked, Radiation: 0.1x
Next, damage is further modified by location:
Head: 8x damage, unless you're using a stunned/knockedout weapon (prod, baton) in which case its only 1x, because DX code is silly.
Torso, Legs, Arms: 2x. That's right, a default multiplier of 2x applies to basically all damage, except a facefull of riot baton or cattleprod.
So, a hit from behind at pointblank is a final 20x damage modifier (10x for back hit at close range, 2x for torso hit), so with a baton (7 damage), you're looking at potentially 140 torso damage even with no skills.
So, hypothetically, sticking a prod into some guy, then smacking them in the face with a dragon tooth sword with maxed aug combat and max low tech skill, results in the following:
Base damage: 20x5.
Aug/Skill mult: x3
Stunned: x4
Headshot: x8
Total damage: 9600
Which is pretty much a guaranteed kill. :)
Ostriig on 1/6/2011 at 21:24
Quote Posted by DDL
A given weapon does a base amount of damage. This is then modified by your skill, and sometimes by augs too.
Damn, all this time I'd thought Deus Ex got it right. I can understand why it might make for a good approach to convey character progression to the player, but in a game that gives you direct control over the aim of your weapon it just seems incongruous as a concept - what does it simulate? The modification of accuracy makes sense because it compensates for the unrealistic pinpoint targeting provided by the mouse, you can say it simulates the natural sway of the arm. The modification of reload times also makes sense, it makes the character's supposed familiarity with the weapon a factor in this automated action, the performance of which is outside the player's direct control. But damage? What, are the bullets getting faster? I guess that, to its credit, I didn't really take note with Deus Ex at least. I do remember Fallout 3 rubbing me the wrong way with it.
But yeah, interesting to know, thanks DDL.
Koki on 2/6/2011 at 06:31
Outstanding as always, thanks a lot mang.
Quote Posted by DDL
Untrained: no effect
Trained: 1.2x damage
Advanced: 1.5x damage
Master: 2x damage
Wow. So basically, the inventory screen lies
completely when it comes to damage? Are the accuracy values reliable at least? And one more thing about the damage - are the values integers rounded down(like the lying inventory screen shows) or is the game perfectly fine with, say, damage value of 3.6?
Quote:
Torso, Legs, Arms: 2x. That's right, a default multiplier of 2x applies to basically all damage,
except a facefull of riot baton or cattleprod.
So, a hit from behind at pointblank is a final 20x damage modifier (10x for back hit at close range, 2x for torso hit), so with a baton (7 damage), you're looking at potentially 140 torso damage even with no skills.
Ahhh, but wouldn't it also be 20x if hit anywhere else, i.e. legs? Why bother with standing up and going for the "small of the back" when you can just bees their knees? 'cause that's almost always one-hit KO too.
[Edit]Since you didn't list them, I assume the damage values for weapons shown in inventory are accurate, but at least tell me how many pellets do the shotguns fire since the value is quite meaningless otherwise.
DDL on 2/6/2011 at 12:53
Ok, takedamagebase() in scriptedpawn uses an int value for damage, so 3.6 would be treated as 4, as far as I'm aware (pretty sure unreal rounding is reasonably sensible).
Accuracy I'm not entirely sure about: they had to fudge an awful lot to make "what happens in game" somehow be reflected in "raw numbers you can understand".
Accuracy ranges from 1.0 (fucking terrible) to 0.0 (dead on). Weapons have a base accuracy, which can then be modified down by mods or skills (mods reduce by 0.1, skills by 0.0, 0.1, 0.25, 0.5 respecitively). AugTarget reduces by a further 0.2 at max.
If your inventory reports 100%, that means it's 0.0. If 0%, that means it's 1.0.
The way it is applied is as follows (and try not to laugh, coz it is really, really silly):
Calculate where bullet trace begins. This is the starttrace vector.
Now, move that point either up or down by 0-500 unreal units (determined randomly) multiplied by your accuracy.
Then move that point either left or right by 0-500 unreal units (determined randomly) multiplied by your accuracy.
Then extend that point forwards to the max range of your weapon, or 1024 units, whichever is larger.
This is the endtrace vector.
The gun then traces from start to end and applies damage to the first thing that line runs into.
So.
First thing to note: 500 uunits is a LOT: that's about 5 JC heights, or 30 feet.
Second thing: because the endtrace point is determined by weapon range, the longer this is, the more the deviation effects of inaccuracy are minimised. A short ranged weapon at 50% accuracy will be a LOT less accurate than a long ranged weapon at 50% acc.
A weapon with a max range of 1000000 or so would essentially make accuracy meaningless, since at that range small deviations in endpoint location are largely indistinguishable from 100% accuracy. The sniper rifle is 48000, the pistol 4800: max deviation angle is thus
Pistol: 8 degrees
Rifle: 0.8 degrees
Third thing: the "deviation range allowable" describes a square, not a circle as might be expected, so if your deviation is only straight up/down or straight left/right (which can happen, it's random after all), the above figures become 6 degrees and 0.6 degrees, respectively. Only if it's max up/down and max left/right does it become 8 degrees/0.8 degrees.
Silly, no?
Finally, sure, hitting the legs is fine. The way it's actually calculated (I shit you not) is raw distance between hitter and hittee, which (both being pawns) means roughly bellybutton to bellybutton distance. Pawn radius is 20 on average, meaning you have about 24 spare uunits of leeway to account for relative angle/distance between the two of you.
This theoretically means that if JC was a fat bastard, or was hitting a fat bastard (making the centre/centre distance greater than 64), it would be impossible to get stealth kills.
I only suggest hitting the torso because 140 damage to a 100 health torso will result in a kill/KO, whereas 140 damage to the legs will not (see damage calcs, prev post). If you've got some lowtech skill/aug combat, you might get away with leg shots: if you do more damage than they have legs (a sentence I never thought I'd write), the excess gets delivered to the torso.
A hit of 280 (max skill, or max augcombat, or a combination of lower values of the two) would take 100 points of the leg you hit, the next 100 points would be delivered to the adjacent leg (coz that's how it's coded), and the final 80 would be delivered to the torso, getting you above your magic "kill" threshold.
EDIT: almost forgot. Shotguns etc that are AOE_Cone weapons fire 5 traces. Each is treated in the same manner as a single shot. The inventory screen shows the summed damage, not the per shot damage, so 25 dam means each individual trace does 5 dam. This can be important for getting over door "mindamagethreshold" values.
Koki on 2/6/2011 at 14:12
Quote Posted by DDL
If your inventory reports 100%, that means it's 0.0. If 0%, that means it's 1.0.
Well shit, thank god for that. I wouldn't want to calculate this myself.
Quote:
I only suggest hitting the torso because 140 damage to a 100 health torso will result in a kill/KO, whereas 140 damage to the legs will not (see damage calcs, prev post). If you've got some lowtech skill/aug combat, you might get away with leg shots: if you do more damage than they have legs (a sentence I never thought I'd write), the excess gets delivered to the torso.
Ahhh, indeed. I forgot about the localized damage. That would explain why I thought batons weren't one-hit KO weapons - I always used the knees trick, but I did so with a prod(15 damage). So when I tried that with a 7 damage stick, of course it didn't produce the expected results. But 15x20=300, just enough to get rid of both legs and the torso.
Pity about the shotguns - that means they share the problem of assault rifle. Still, the damage is higher by default so it should scale better(especially if the rounding is "smart")and all the pellets hit at the same time so it's not that bad.