41
Anything Else / Re: Finding Turok Series Weapon Damage / Enemy HP
« on: July 02, 2018, 04:38:27 PM »
For weapon damage properties:
To test enemy health and actual damage taken, you can add this to inside the TurokEnemy class in scripts/enemy/enemy.txt:
This will print out the enemy's current health, the damage they took, and what their health will be after the damage is processed to the console any time an enemy takes damage. Some enemies might have their own OnDamage() already defined, so you might need to add the print line to a few other files in scripts/enemy/. You might also find it useful to enter "seta con_alwaysshowconsole 1" in the console when testing. Enter the same command, but with 0, to disable it.
I've done some testing before that seemed to indicate that enemies take ~140% damage on easy, and ~70% on hard/hardcore.
- scripts/weapons.txt - look for file names ending in ".kfx". These are the projectiles fired by the player's weapons (as well as things like muzzle flashes and bullet casings).
- fx/*.kfx - look for the "onImpact" sections in the projectiles. 2 is for metallic enemies, 4 is for red-blooded enemies, and 5 is for yellow-blooded enemies. Take note of the "damageClass" properties.
- defs/damageInfo.txt - this is where damage classes are defined. Make sure you take the random factor into account. More info here.
To test enemy health and actual damage taken, you can add this to inside the TurokEnemy class in scripts/enemy/enemy.txt:
Code: [Select]
void OnDamage( kActor@ instigator, kDictMem@ damageDef, const int damage )
{
Sys.Print( ""+ self.Health() + " - " + damage + " = " + (self.Health() - damage) );
}
This will print out the enemy's current health, the damage they took, and what their health will be after the damage is processed to the console any time an enemy takes damage. Some enemies might have their own OnDamage() already defined, so you might need to add the print line to a few other files in scripts/enemy/. You might also find it useful to enter "seta con_alwaysshowconsole 1" in the console when testing. Enter the same command, but with 0, to disable it.
I've done some testing before that seemed to indicate that enemies take ~140% damage on easy, and ~70% on hard/hardcore.