Damage Modifier

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Broadus
Captain
Posts: 235
Joined: Mon Jan 30, 2006 5:35 am

Damage Modifier

Post 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.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Re: Damage Modifier

Post 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.
Image
Broadus
Captain
Posts: 235
Joined: Mon Jan 30, 2006 5:35 am

Post 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.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 :)
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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. :)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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...
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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...
Image
Broadus
Captain
Posts: 235
Joined: Mon Jan 30, 2006 5:35 am

Post 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.
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Broadus
Captain
Posts: 235
Joined: Mon Jan 30, 2006 5:35 am

Post 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.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Ah, not a bad idea, either :)
Image
Broadus
Captain
Posts: 235
Joined: Mon Jan 30, 2006 5:35 am

Post by Broadus »

Yeah, .health works fine, .maxhealth doesn't.
Problem solved. Hooray!
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

It's also max_health, not maxhealth :)
Image
Post Reply