How to disable a mutator?

Discussions about Coding and Scripting
Post Reply
UTX
Skilled
Posts: 214
Joined: Fri Aug 28, 2015 3:39 am

How to disable a mutator?

Post by UTX »

I'm working on a weapon that is a child class of a Nali Weapon, and Nali Weapons automatically add the Bloody Mess mutator most commonly known as the Ultra Gore mutator. I made my own version of the Bloody Mess mutator which I use on this new weapon I am making, but I don't want the old Bloody Mess mutator to be added to the game, so instead of modifying each Nali Weapon to get rid of that line of code, can I make a mutator that takes the Bloody Mess mutator out of the base mutator list?
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How to disable a mutator?

Post by MrLoathsome »

It would probably be better for you to extend NaliWeapons itself to something new, and take out or modify the
gore mutator at that point, and then have your new weapon be a child of that class.

(Take out anything else your new weapon doesn't need also....)

Could be better ways to do it, but that is how I would approach it I think.
blarg
UTX
Skilled
Posts: 214
Joined: Fri Aug 28, 2015 3:39 am

Re: How to disable a mutator?

Post by UTX »

I understand what you're saying, but the thing is, my weapon works, it does not need to be made as "new".
The thing is, the other Nali Weapons will still add the old Bloody Mess mutator to the game, that's what I need to avoid, but I don't want to subclass every Nali Weapon just to stop them from adding the mutator to the game, I would rather fix this in a single class to keep it short and sweet, and so people can still use their other Nali Weapons along with mine without any issues or extra work.
-=SoP=-axewound
Average
Posts: 63
Joined: Wed Apr 30, 2008 9:17 pm

Re: How to disable a mutator?

Post by -=SoP=-axewound »

You could extend the core source and create your own NWBloodyMess class, or maybe you already did this in your own version?

Did you try turning everything off under the [NWCoreVIII_SRC.NWBloodyMess] settings in NWConfig.ini?
Image
User avatar
EvilGrins
Godlike
Posts: 9697
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: How to disable a mutator?

Post by EvilGrins »

Find an earlier version of NW3. The UltraGore effect wasn't added to the weapons until the final version.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
Chris
Experienced
Posts: 134
Joined: Mon Nov 24, 2014 9:27 am

Re: How to disable a mutator?

Post by Chris »

Oh yeah, the great "modify a weapon story" lol.
So your idea is basically to let NaliWeapons add a mutator, and after that you want to remove it again right away in a hackish way? Not a great model but that's your choice for taking the lazy road. :loool:

You could just iterate through all mutators, destroy the one you want and then weld the chain back together.
Or do as EvilGrins suggested and base it on an earlier version.
Mar
Novice
Posts: 26
Joined: Tue Aug 27, 2013 1:04 am

Re: How to disable a mutator?

Post by Mar »

You just need to set enableHeadshotFX and enableBodyshotFX to false in your NWConfig.ini
It is under [NWCoreVIII.NWBloodyMess] as axewound already said.

Code: Select all

class NWBloodyMess expands Mutator config(NWConfig);
[...]
static function bool isEnabled()
{
	return (default.enableHeadshotFX || default.enableBodyshotFX);
}
[...]
UTX
Skilled
Posts: 214
Joined: Fri Aug 28, 2015 3:39 am

Re: How to disable a mutator?

Post by UTX »

Did ANY of you actually read what I wrote?
Nali Weapons 3 By Default adds the BloodyMess mutator to the game, I am not doing that, FeraliDragon coded them that way. Now, I made my own version of BloodyMess that adds new blood colors, blue, cyan, magenta and yellow, because I need them for the Nyan Cat Launcher I am making, I want everything with colors, even the blood.
Now, I want the Nali Weapons to be able to be used along with the Nyan Cat Launcher, but I need to remove the old BloodyMess mutator that the Nali Weapons add from the game so that my own version works properly.
I don't want to downgrade Nali Weapons because it should be able to work with the latest version.

Can I do this? Or do I really need to subclass every single Nali Weapon to remove that line of code that adds the BloodyMess mutator to the game?
-=SoP=-axewound
Average
Posts: 63
Joined: Wed Apr 30, 2008 9:17 pm

Re: How to disable a mutator?

Post by -=SoP=-axewound »

UTX wrote:Did ANY of you actually read what I wrote?
Yes, everyone that replied was legitimately trying to help you, however none of us are mind readers (I am not, maybe one or more of the others are :) ), the answers are in the details as provided by the person asking the question.

If you've extended the NWBloodyMess class to make your own, also extend the NaliWeapons class and change the reference to NWBloodyMess to your own version:

Change

Code: Select all

if (Class'NWBloodyMess'.static.isEnabled())
		AddAuxMutator(Class'NWBloodyMess');
to

Code: Select all

if (Class'NWBloodyMess'.static.isEnabled())
		AddAuxMutator(Class'UTXBloodyMess');
Regardless, Feralidragon made this so it was extensible... no need to re-invent the wheel. I thought you got it when you did the crossbow mutator.

Edit: I didn't check your code, I just assumed you extended the chaos and nw3 classes...
Image
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: How to disable a mutator?

Post by MrLoathsome »

I am a dumb guy.
blarg
User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

Re: How to disable a mutator?

Post by Gustavo6046 »

MrLoathsome wrote:I am a dumb guy.
THIS!
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
UTX
Skilled
Posts: 214
Joined: Fri Aug 28, 2015 3:39 am

Re: How to disable a mutator?

Post by UTX »

UTX wrote:"... Instead of modifying each Nali Weapon to get rid of that line of code...
-=SoP=-axewound wrote:... Also extend the NaliWeapons class and change the reference to NWBloodyMess to your own version...
Image
Like I said already, that's exactly what I am trying to avoid, I don't want to subclass anything and I don't want to subclass every single Nali Weapon.
Anyway, I dropped the idea since this was not helpful and I don't know how to do this yet, perhaps I can do this another time.
-=SoP=-axewound
Average
Posts: 63
Joined: Wed Apr 30, 2008 9:17 pm

Re: How to disable a mutator?

Post by -=SoP=-axewound »

You might want to read again... you only have 2 options; extend the ONE (not all of the weapon classes) class mentioned or turn off the settings in the ini as clearly described in the posts.

I only offered to help as I have done a few modifications with NW3 already, no worries though I won't make that mistake again :tu:
Image
Post Reply