Page 1 of 1

Damage Modifier

Posted: Sat May 06, 2006 11:55 pm
by Broadus
What determines how much damage AI do on certain difficulties?
Y'know, like what file/script/thing makes rifles do 5 (10?) damage to the player on easy, but 30 on hard.

Re: Damage Modifier

Posted: Sun May 07, 2006 6:50 am
by jv_map
Broadus wrote:What determines how much damage AI do on certain difficulties?
Y'know, like what file/script/thing makes rifles do 5 (10?) damage to the player on easy, but 30 on hard.
There must be some multipliers somewhere in the game code for the different skill levels, but principally the damage weapons do is specified in their .tik files (bulletdamage). For example, models/weapons/kar98.tik has bulletdamage 75.

It is possible to increase this value on a specific rifle without having to modify the file:

$someai weaponcommand mainhand bulletdamage 750

This'll make $someai's shots deadly on every skill level. :)

It may also be possible to adjust the player's damagemult ($player damagemult locationnumber multiplier), but I have not tried this yet.

Posted: Sun May 07, 2006 7:38 am
by Broadus
Well, I'm looking for the thing that would effect all AI. AI dont' seem to do different damage to other AI depending on the difficulty. They'll do the damage of whatever weapon they're using without any modifications. Like, the Kar98k will only hurt the player a very little bit, but will do the full 75 damage to friendlies.
You already played the demo of my Friendly Faces mod, JV. I decreased the health of everyone to the standard 100, which certainly makes the game more satisfying (because constantly shooting at the same enemy gets annoying), but that means that the enemy must actually be more challenging.
So far, I've lowered their aim time to almost nothing before they fire, which does a pretty good job. I think that if I can increase their damage, maybe I can modify the aim time to be a little bit higher and more realistic (but not as high as their original).
It's really not terribly important to be able to modify the generic damage. Although lowering the health makes the game more enjoyable, it does get annoying having five AI that I had to place manually be blown away by one grenade. It's also fun to watch! But still annoying.

Posted: Sun May 07, 2006 8:38 am
by jv_map
Ah I did some tests and found exactly what you want (I think) :)

Three results:
  1. damagemult command does not work.
  2. Instead, you can use max_health.

    $player max_health 50

    will make the player twice as sensitive to damage on any skill level, while the health bar still shows 100 pct. This can be done at any time (so you could adjust it to scenes in the map).
  3. The game features not 3 but 4 skill levels. I found coincidently that except for the 'hard' skill (skill 2), skill 3 is available. Just type 'skill 3' in console and restart the map with 'map <mapname>'. With this skill level, a rifle hit does 40 damage (this really makes it pretty difficult). I don't know why this difficulty is not available from the menu, maybe it was just forgotten.
Hope this helps :)

Posted: Sun May 07, 2006 10:59 am
by Rookie One.pl
jv_map wrote:
  1. damagemult command does not work.
Sorry, m8, you're wrong. :) It works perfectly, I've made a mod that allows stuff like headshots only, instagib etc., it just needs a little tweaking before releasing. :)

Posted: Sun May 07, 2006 12:21 pm
by lizardkid
jv... i have to ask... how did you manage to find out about a 4th skill level? i mean where is it documented? is that skill level buggy somehow?

sorry for hijacking but it seems there were three possible answers so i think this post should be alright...

Posted: Sun May 07, 2006 4:45 pm
by jv_map
Rookie One.pl wrote:
jv_map wrote:
  1. damagemult command does not work.
Sorry, m8, you're wrong. :) It works perfectly, I've made a mod that allows stuff like headshots only, instagib etc., it just needs a little tweaking before releasing. :)
Damn... I'm losing it :oops: :P ... I didn't notice a difference in sp but maybe in works in mp :? too lazy / busy to try right now but if you say so it's probably true :)

Lizard m8, you're not at all hijacking... I just typed in 'skill 10' for thrills and restarted the map... expected the game to reset it to 2 but to my amazement it was on 3. It's not documented anywhere but it seems to work...

Posted: Sun May 07, 2006 5:45 pm
by Broadus
Now what's all this damagemult I'm hearing so much about? I didn't think there literally was something called damage multiplier.
A fourth skill level certainly is interesting! I probably shouldn't have to modify the damage of enemies if there's already another skill level that makes enemies do more damage.
I could just put in the readme of the mod that the player should open the console, type "skill 3", then type "maplist" and choose "m1l1".
And the maxhealth thing you said would answer my damage question, too. I could make it 50 for Easy, 75 for Medium, 100 for Hard... Or however I plan on doing it.

Posted: Sun May 07, 2006 6:14 pm
by lizardkid
that can easily be scripted in, but some players might not like being forced to play on the 4th skill level.

saying "the 4th skill level" gives me little tingles of evilness inside.

Posted: Sun May 07, 2006 9:27 pm
by Broadus
Who said they would be forced?
What I meant was, if the player actually wanted a real challenge, they would need to do those above instructions. That wouldn't be forcing them. It's not like I'd catch them if they were secretly playing the game on a skill level lower than 3.

I tried to set the player's maxhealth to 50, but all that does is messes up the script.

Posted: Mon May 08, 2006 4:20 pm
by jv_map
Broadus wrote:I tried to set the player's maxhealth to 50, but all that does is messes up the script.
That's odd :? how the hell did you manage that? :P

Posted: Mon May 08, 2006 7:20 pm
by Rookie One.pl
Use the player's health property ($player.health), this will set both their maxhealth and current health to the value you want.

Posted: Mon May 08, 2006 7:24 pm
by jv_map
Ah, not a bad idea, either :)

Posted: Mon May 08, 2006 7:47 pm
by Broadus
Yeah, .health works fine, .maxhealth doesn't.
Problem solved. Hooray!

Posted: Mon May 08, 2006 8:31 pm
by jv_map
It's also max_health, not maxhealth :)