NW3 Health Modifier issue

Search, find and discuss about Mutators!
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

NW3 Health Modifier issue

Post by Aldebaran »

For MonsterHunt with Nali Weapons 3 I have this server configuration: No friendly fire, but self damage.
So you can't make damage to other players, but you can hurt yourself with your own weapons if you not watch out.

I would like to use the health modifier in this way:
If a player uses it, he should not get self damage and should not be healthed also.

You can set up this in the NWeaponsCfg.ini:

[NWCoreVIII.NaliWeapons]
canHealOwner=True
healMultiplier=0.000000
healFixedValue=0

The self damage part works, but the problem is although I have set healMultiplier=0 and healFixedValue=0, the player gets health as if I have set healFixedValue=1.
Especially using the Flametracker the player can health himself enormous in a very short time (looks like cheating for others), so this configuration makes no sense. The health modifier can be abused too easy (by using the flametracker with health modifier and hurting yourself in a room corner).

I have tried so many different configurations now, I am sure it is not possible to fix this by doing changes in the ini files.

Is it possible to fix this "bug" without compiling the whole Nali Weapons 3? Perhaps only one part of it should be renewed?
Last edited by Aldebaran on Fri Sep 21, 2018 8:09 pm, edited 1 time in total.
User avatar
OjitroC
Godlike
Posts: 3605
Joined: Sat Sep 12, 2015 8:46 pm

Re: NW3 Health Modifier issue

Post by OjitroC »

Try setting
healMultiplier=0.000000
healFixedValue=1
From the docs, it seems to me that this would only increase health by 1 point as it should 'turn off' the weapon's damage heal multiplier and just used the fixed value of 1 health point.
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

I have tried all this already.
Getting 1 health point per shot would be the lesser evil, but as I mentioned before the problem weapon then is the Flametracker. With that configuration you can reach over 1000hp in a few seconds.
RocketJedi
Inhuman
Posts: 850
Joined: Wed Mar 12, 2008 7:14 pm
Personal rank: I.T Master
Location: New York
Contact:

Re: NW3 Health Modifier issue

Post by RocketJedi »

hmm interesting. #followingthread
https://www.vulpinemission.com
Image ROCKET-X8 Server
Image MONSTERHUNT w/ NALI WEAPONS 3 + RX8
Image BUNNYTRACK NY
Image SNIPER DEATHMATCH
Image InstaGib + ComboGib + Jailbreak
Image ROSEBUM ROCKET-X RB
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

I have to correct me little bit.
I thought the healing with flametracker only works in a room corner by hurting yourself. But it works in general. Perhaps I had a different configuration that I lost. So it is not really a cheat but the problem still exists: after setting the values healMultiplier=0 and healFixedValue=0 you can get very fast many health points using the flametracker although I only want to disable self damage.
Last edited by Aldebaran on Fri Sep 21, 2018 8:28 pm, edited 1 time in total.
User avatar
OjitroC
Godlike
Posts: 3605
Joined: Sat Sep 12, 2015 8:46 pm

Re: NW3 Health Modifier issue

Post by OjitroC »

Aldebaran wrote:.. I only want to disable self damage.
There is a mutator, NoSelfDamage, that does that - I haven't tried it with NW so I don't know if it works (in fact, I don't remember using it at all) - here it is if you would like to try it
NoSelfDamage.zip
(3.15 KiB) Downloaded 50 times
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

You understand me wrong. I want no self damage if the player uses the health modifier with his weapon. In general self damage should be active on the server.
User avatar
OjitroC
Godlike
Posts: 3605
Joined: Sat Sep 12, 2015 8:46 pm

Re: NW3 Health Modifier issue

Post by OjitroC »

So you want to use the Health Modifier to prevent self damage but not to give any health? From my reading of the NW docs, I don't think this can be achieved. The healMultiplier has a minimum value of 1hp even if set to 0. If the healFIxedValue is set to 0, it uses the value of 1 from the healMultiplier.

What about the bBurnInstigator property for the FlameTracker? If that is set to True, does it make a difference?
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

OjitroC wrote:So you want to use the Health Modifier to prevent self damage but not to give any health?
Yes.
OjitroC wrote:What about the bBurnInstigator property for the FlameTracker? If that is set to True, does it make a difference?
No, it makes no difference :-(
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: NW3 Health Modifier issue

Post by Feralidragon »

Yep, the health modifier is programmed so that it still heals for a minimum of 1, even if you set 0 or even a number below that, and there's no way to modify this directly at all.
My line of thought back then was that the health modifier is meant for healing, so it should always heal, and I never thought of that use-case.

A workaround which could be made, without recompiling the package into a new one (which is a bit more complicated than a normal package compilation as well), would be the following:
1 - Set canHealOwner to False;
2 - Then create a mutator which detects self-damage, and prevents it if the player is currently using a weapon with the health modifier active (it's a boolean property from the NaliWeapons class iirc).

There are some edge cases with this though, like if by the time the player gets damaged, they switched to a weapon without the health modifier, but generally speaking it should work just fine.

Now, I am not sure what you feel about healing your teammates, since while this would prevent the player from healing himself, other teammates would still be healed, even if just with 1 health per shot.
I believe there's also a workaround for this, by creating a specific NW3 mutator (extending the NWMutator class), which has a function you can implement to check whether or not a player belongs to the same team as another player, and there you could always return False, to make NW3 believe they are enemies, thus never healing them, while you can them use the damage check to prevent things like players getting pushed by it if the health modifier is being used (you can use the same mutator for everything as long as you extend from this one).
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

Feralidragon wrote:A workaround which could be made
Thank you for that idea, I think I will try to make such a mutator with my little unreal script knowledge.
Any help for programming that would be appreciated.
Feralidragon wrote:I am not sure what you feel about healing your teammates
Hmm, never tried to heal a teammate by using the health mutator. In which case do this work?
In my test right now I shoot a teammate with some weapons using health modifier and he did not get more health points...
Last edited by Aldebaran on Sat Sep 22, 2018 1:29 pm, edited 1 time in total.
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: NW3 Health Modifier issue

Post by Feralidragon »

Aldebaran wrote: Any help for programming that would be appreciated.
Any doubts you may have, you can just post away. :)
Aldebaran wrote: Hmm, never tried to heal a teammate by using the health mutator. In which case do this work?
In my test right now I shoot a teammate with some weapons using health modifier and he did not get more health points...
It should always work. If it doesn't, that probably means NW3 isn't detecting your teammates as actual teammates for some reason (probably different teams), but that could be corrected with such a mutator in that case as well.
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

I think the variable to be checked is NaliWeapons.HealthGiver (boolean).
Is it true the weapon uses the health modifier.
I will use the MutatorTakeDamage() function and variable InstigatedBy from type Pawn.
What is the right "if" clause to access/check the weapons modifier variable?

Code: Select all

if (!InstigatedBy.Weapon.HealthGiver)
does not work...
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: NW3 Health Modifier issue

Post by Feralidragon »

Yes, that's probably it, but you need to cast the weapon into a NaliWeapons so you can use or check its properties:

Code: Select all

if (NaliWeapons(InstigatedBy.Weapon) == None || !NaliWeapons(InstigatedBy.Weapon).HealthGiver)
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: NW3 Health Modifier issue

Post by Aldebaran »

Thank you very much for your help Feralidragon!
It works fine now, also I have no teammate healing because of my configuration.
The health modifier now simply prevents self damage only (with the weapon in use) and the flametracker is no problem anymore...

EDIT: The Miner seems to be little bit problematic, because you can place mines and you can get hurt later if they explode if you have not the weapon active anymore with the health modifier. Same can happen with rockets I think if they fly afterwards of an object that comes in your closeness. You mentioned such situations already. So it's not perfect but better than nothing.

EDIT2: Hmm, if I use the boltrife in water with the health modifier I die immediately (normal shot, alt fire is ok).

EDIT3: If I use my mutator with the health modifier, you lose all your armor when shooting. So there exist some issues why this mutator isn't useful at this time.
Post Reply