Why won't my mutator work ?
Why won't my mutator work ?
Without even posting code, everything compiles no complaints, but almost 2 identical mutates, one won't work.
Just look at the code for NoRedeemer, or NoPowerups. all I did was replace "redeemer" with SniperRifle.
I also tried the no powerups code and replaced text for other items.
I made the .U file and the int file, it all shows up, but just won't work.
I even seen an example online, they put the, return false; in it's own brackets, and that didn't work either.
I am making a new class under mutators, is that wrong ?
Just look at the code for NoRedeemer, or NoPowerups. all I did was replace "redeemer" with SniperRifle.
I also tried the no powerups code and replaced text for other items.
I made the .U file and the int file, it all shows up, but just won't work.
I even seen an example online, they put the, return false; in it's own brackets, and that didn't work either.
I am making a new class under mutators, is that wrong ?
Binary Space Partitioning
Re: Why won't my mutator work ?
It probably has only a few lines, why didn't you post it?Red_Fist wrote:Without even posting code
Let's see. Original:all I did was replace "redeemer" with SniperRifle.
NoRedeemer.uc
Code: Select all
//=============================================================================
// NoRedeemer.
// removes all redeemers
//=============================================================================
class NoRedeemer expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('WarHeadLauncher') )
return false;
return true;
}
defaultproperties
{
}
SniperRifle.uc
Code: Select all
//=============================================================================
// SniperRifle.
// removes all SniperRifles
//=============================================================================
class NoSniperRifle expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('WarHeadLauncher') )
return false;
return true;
}
defaultproperties
{
}
![Wink ;)](./images/smilies/icon_wink.gif)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Re: Why won't my mutator work ?
I was going to just post the code.(s)
But I sure don't see what you did or are doing, they look the same other than it will still only remove the warhadlauncher ?
And I tried this from the NoPowerUps, mutator
go ahead and laugh, but I tried it with one or 2 changed,
Neither work
I am trying to get it so a map starts out with no inventory.
But I sure don't see what you did or are doing, they look the same other than it will still only remove the warhadlauncher ?
Code: Select all
//=============================================================================
// NoItemz6.
//=============================================================================
class NoItemz6 expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('SniperRifle') )
return false;
return true;
}
defaultproperties
{
}
And I tried this from the NoPowerUps, mutator
Code: Select all
//=============================================================================
// NoItemz.
//=============================================================================
class NoItemz expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('HealthPack') || Other.IsA('UT_Shieldbelt') || Other.IsA('UT_Invisibility') || Other.IsA('UDamage') || Other.IsA('HealthVial') || Other.IsA('Health') || Other.IsA('MedBox') || Other.IsA('RazorAmmo') || Other.IsA('Eightball') || Other.IsA('ShellBox') || Other.IsA('ASMD') || Other.IsA('PAAmmo') || Other.IsA('ASMDAmmo') || Other.IsA('FlakBox') || Other.IsA('RifleAmmo') || Other.IsA('FlakShellAmmo') || Other.IsA('RifleRound') || Other.IsA('RocketCan') || Other.IsA('Sludge') || Other.IsA('Clip') || Other.IsA('Shells') || Other.IsA('StingerAmmo') || Other.IsA('BioAmmo') || Other.IsA('BladeHopper') || Other.IsA('BulletBox') || Other.IsA('RifleShell') || Other.IsA('FlakAmmo') || Other.IsA('Miniammo') || Other.IsA('EClip') || Other.IsA('RocketPack') || Other.IsA('ShockCore') || Other.IsA('SuperShockCore') || Other.IsA('Bandages') || Other.IsA('SuperHealth') || Other.IsA('NaliFruit') || Other.IsA('Amplifier') || Other.IsA('AutoMag') || Other.IsA('FlakCannon') || Other.IsA('GESBioRifle') || Other.IsA('Minigune') || Other.IsA('QuadShot') || Other.IsA('Razojack') || Other.IsA('Rifle') || Other.IsA('Stinger') || Other.IsA('ChainSaw') || Other.IsA('enforcer') || Other.IsA('Doubleenforcer') || Other.IsA('minigun2') || Other.IsA('PulseGun') || Other.IsA('Ripper') || Other.IsA('SniperRifle') || Other.IsA('ut_biorifle') || Other.IsA('UT_Eightball') || Other.IsA('UT_FlakCannon') || Other.IsA('WarHeadLauncher') )
return false;
return true;
}
defaultproperties
{
}
go ahead and laugh, but I tried it with one or 2 changed,
Neither work
I am trying to get it so a map starts out with no inventory.
Binary Space Partitioning
Re: Why won't my mutator work ?
Just add some debug log lines, run a map and after that have a look into UnrealTournament.log to see if your Mutator is used at all. (The second log() will add a lot of lines.)
Code: Select all
class NoItemz6 expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant) {
if ( Other.IsA('SniperRifle') )
{
log(Other @ "denied");
return false;
}
log(Other @ "allowed");
return true;
}
defaultproperties {
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Re: Why won't my mutator work ?
Maybe you forgot to compile the script?Red_Fist wrote:Without even posting code, everything compiles no complaints, but almost 2 identical mutates, one won't work.
Just look at the code for NoRedeemer, or NoPowerups. all I did was replace "redeemer" with SniperRifle.
I also tried the no powerups code and replaced text for other items.
I made the .U file and the int file, it all shows up, but just won't work.
I even seen an example online, they put the, return false; in it's own brackets, and that didn't work either.
I am making a new class under mutators, is that wrong ?
- Attachments
-
- Буфер обмена02.png (7.57 KiB) Viewed 2994 times
- sektor2111
- Godlike
- Posts: 6410
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Why won't my mutator work ?
Makes no sense... really. First of All "minigune" doesn't even exist. Then... you will have no weapon, then why all these ??? For insanity I'll show you something simple:Red_Fist wrote://=============================================================================
// NoItemz.
//=============================================================================
class NoItemz expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('HealthPack') || Other.IsA('UT_Shieldbelt') || Other.IsA('UT_Invisibility') || Other.IsA('UDamage') || Other.IsA('HealthVial') || Other.IsA('Health') || Other.IsA('MedBox') || Other.IsA('RazorAmmo') || Other.IsA('Eightball') || Other.IsA('ShellBox') || Other.IsA('ASMD') || Other.IsA('PAAmmo') || Other.IsA('ASMDAmmo') || Other.IsA('FlakBox') || Other.IsA('RifleAmmo') || Other.IsA('FlakShellAmmo') || Other.IsA('RifleRound') || Other.IsA('RocketCan') || Other.IsA('Sludge') || Other.IsA('Clip') || Other.IsA('Shells') || Other.IsA('StingerAmmo') || Other.IsA('BioAmmo') || Other.IsA('BladeHopper') || Other.IsA('BulletBox') || Other.IsA('RifleShell') || Other.IsA('FlakAmmo') || Other.IsA('Miniammo') || Other.IsA('EClip') || Other.IsA('RocketPack') || Other.IsA('ShockCore') || Other.IsA('SuperShockCore') || Other.IsA('Bandages') || Other.IsA('SuperHealth') || Other.IsA('NaliFruit') || Other.IsA('Amplifier') || Other.IsA('AutoMag') || Other.IsA('FlakCannon') || Other.IsA('GESBioRifle') || Other.IsA('Minigune') || Other.IsA('QuadShot') || Other.IsA('Razojack') || Other.IsA('Rifle') || Other.IsA('Stinger') || Other.IsA('ChainSaw') || Other.IsA('enforcer') || Other.IsA('Doubleenforcer') || Other.IsA('minigun2') || Other.IsA('PulseGun') || Other.IsA('Ripper') || Other.IsA('SniperRifle') || Other.IsA('ut_biorifle') || Other.IsA('UT_Eightball') || Other.IsA('UT_FlakCannon') || Other.IsA('WarHeadLauncher') )
return false;
return true;
}
defaultproperties
{
}
Code: Select all
// NoItemz.
//=============================================================================
class NoItemz expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if ( Inventory(Other) != None ) //if ( Other.IsA('Inventory')) - or Pickup ? USE A
// SINGLE PARENT INSTEAD of PROCESSING a MOUNTAIN OF CRAP.
/// Map might have various items (like Minigun
// not <minigune> which won't be removed ) and whatever Saber
// XanRifle which are SEPARATE classes but Inventory type
return false;
return true;
}
defaultproperties
{
}
Aside, use notepad++ and UMake for your safety at working at these. For future debugging, please post a log about game-type...
Re: Why won't my mutator work ?
As for gametype I tried MH DM SP and a pure sever, with or without oldskool, no work.
but yet the ones they have work on the same map and same gametype tests.
All I did was change ONE word of an existing working UT mutator, compiled perfectly, made an int file, we should not have to look in logs or wonder why it don't work. AND using perfectly legit UT item classes AND compiles, AND shows up in-game.
It's not like I am creating the code, or a huge programing effort.
I will try the log though, but it seems like the new mutator isn't being found.
but yet the ones they have work on the same map and same gametype tests.
All I did was change ONE word of an existing working UT mutator, compiled perfectly, made an int file, we should not have to look in logs or wonder why it don't work. AND using perfectly legit UT item classes AND compiles, AND shows up in-game.
It's not like I am creating the code, or a huge programing effort.
I will try the log though, but it seems like the new mutator isn't being found.
Binary Space Partitioning
- sektor2111
- Godlike
- Posts: 6410
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Why won't my mutator work ?
If you are using NotePad++ you'll have no pain. If you are using Editor perhaps things are not nice, and... you have to SAVE Package Compiled, unless at closing/crashing Editor you'll have nothing else in System than an Editor.log file. I'm using Editor at doing MyLevel Stuff and... some stock fixing for conforming packs operations. I'll give you a sample which can be compiled but not than much from Editor.Red_Fist wrote:I will try the log though, but it seems like the new mutator isn't being found.
Code: Select all
class DeathMatchPlus expands BotPack.DeathMatchPlus;
For such a mutator you might want to forget Editor and use UCC and Text Editors...
Re: Why won't my mutator work ?
I did the first 3 or 4 with UCC, the others I used the editor, edited code, compiled, clicked on package checkbox, and saved the .u
but the dang thing should work right away.
I will try the log entry thing and see what it says. probably blank nothing![mad 2 :mad2:](./images/smilies/Mad.gif)
but the dang thing should work right away.
I will try the log entry thing and see what it says. probably blank nothing
![mad 2 :mad2:](./images/smilies/Mad.gif)
Binary Space Partitioning
-
- Adept
- Posts: 426
- Joined: Tue Feb 21, 2012 7:29 pm
Re: Why won't my mutator work ?
This is a simple mutator from what I'm reading. I'm guessing you have another mod conflicting or you are just not setting this mutator up the right way.
- sektor2111
- Godlike
- Posts: 6410
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Why won't my mutator work ?
Perhaps INT file is wrong or other stuff... Else... I might be doing something like this and... sharing it if you don't mind, because... it do looks simple... Or Not ?
Edit:
It's DONE ! However, I don't see any purpose for such things
Drop it in System and... pick mutator called No Items Mutator V1.00
In MonsterHunt you are dead by default... and Bot is retarded.
![No Idea :noidea](./images/smilies/keinPlan.gif)
Edit:
It's DONE ! However, I don't see any purpose for such things
![Omfg! :omfg:](./images/smilies/omfg.gif)
Drop it in System and... pick mutator called No Items Mutator V1.00
In MonsterHunt you are dead by default... and Bot is retarded.
[attachment=0]NoItems_SK.zip[/attachment]
![No Idea :noidea](./images/smilies/keinPlan.gif)
- Attachments
-
- NoItems_SK.zip
- Bad Idea ? Purpose ?
- (1.27 KiB) Downloaded 85 times
Re: Why won't my mutator work ?
LoL, it is weird,
I will check it out, this whole code programing thing always makes me feel like there is some OTHER thing wrong, like syntax or if the brackets are surrounding the wrong things, or spelling stupid minigun wrong.![Embarassed :oops:](./images/smilies/icon_redface.gif)
I will check it out, this whole code programing thing always makes me feel like there is some OTHER thing wrong, like syntax or if the brackets are surrounding the wrong things, or spelling stupid minigun wrong.
![Embarassed :oops:](./images/smilies/icon_redface.gif)
Binary Space Partitioning
- sektor2111
- Godlike
- Posts: 6410
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Why won't my mutator work ?
Hey, if this is an attempt to solve bad setup (removal with any matter) and it doesn't do entire job, I went to another solution base on "patience", so even maps with static items are properly slapped down.
Now, a bit of... reversal. Mutator making weapons to show up at some mutate command after a previous removal - in case of bad feelings, allowing user to restore weapons back. Huh ? Or... by admin... and/or removal on demand
.
Hint: Actually I don't think is necessary to remove all weapons from Level... just owned ones, the rest can be sent to... rest, LOL.
Now, a bit of... reversal. Mutator making weapons to show up at some mutate command after a previous removal - in case of bad feelings, allowing user to restore weapons back. Huh ? Or... by admin... and/or removal on demand
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
Hint: Actually I don't think is necessary to remove all weapons from Level... just owned ones, the rest can be sent to... rest, LOL.
Re: Why won't my mutator work ?
Nope it's working,,, too good,
But one must be able to keep default weapon, just the pickups-weapons-health need be gone.
I didn't look at your code yet, but whatever you did works, However running with the other mutator MobDrops his oldskool hack won't allow yours to work.
viewtopic.php?f=8&t=12151
your mutator is too powerful![Razz :P](./images/smilies/icon_razz.gif)
Actually using an ini to check off which items you don't want (ALL gametypes), but always keep the default weapon in hand at start.
Like "replace" with "None" of which includes all the old Unreal weapons as well.
![thumbsup :tu:](./images/smilies/thumbsup.gif)
But one must be able to keep default weapon, just the pickups-weapons-health need be gone.
I didn't look at your code yet, but whatever you did works, However running with the other mutator MobDrops his oldskool hack won't allow yours to work.
viewtopic.php?f=8&t=12151
your mutator is too powerful
![Razz :P](./images/smilies/icon_razz.gif)
Actually using an ini to check off which items you don't want (ALL gametypes), but always keep the default weapon in hand at start.
Like "replace" with "None" of which includes all the old Unreal weapons as well.
Binary Space Partitioning
- sektor2111
- Godlike
- Posts: 6410
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Why won't my mutator work ?
Me saying:
The way of removing weaponry using CheckReplacement might be pretty much outdated. Given my Not noob coding knowledge but Extra-Noob rank, I think I can do a mutator which can remove and restore weapons on demand. Agree with default weapon part, this feature can go in account and... I'm not sure if old way of removing items will be answer. Probably destroying items is not an answer - like in real life, if you ruin things you might feel sorry and you'll want them back at a moment. Weaponry (like monsters) can be deactivated and reactivated as needed... Code is probably simple to do, harder was idea...
The way of removing weaponry using CheckReplacement might be pretty much outdated. Given my Not noob coding knowledge but Extra-Noob rank, I think I can do a mutator which can remove and restore weapons on demand. Agree with default weapon part, this feature can go in account and... I'm not sure if old way of removing items will be answer. Probably destroying items is not an answer - like in real life, if you ruin things you might feel sorry and you'll want them back at a moment. Weaponry (like monsters) can be deactivated and reactivated as needed... Code is probably simple to do, harder was idea...