• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

[Mutator] No bandages

FBX

Grizzled Veteran
Aug 17, 2006
238
42
Simple mutator to more or less provide an example. I wanted to give the option to earn bandages by killing people but it looks like the ScoreKill function doesn't appear to work.

Code:
class NoBandages extends Mutator;

// variable declarations go here
 
// hooks go here

function PostBeginPlay()
{
  Super.PostBeginPlay(); // Run the super class function (Mutator.PostBeginPlay).
}
 
function ModifyPlayer(Pawn Other)
{
    local ROPawn MyPawn;
    MyPawn = ROPawn(Other);
    MyPawn.NumBandages = 0;
    super.ModifyPlayer(Other);
}

defaultproperties
{
  GroupName="NoBandages"
  FriendlyName="No Bandages"
  Description="Removes bandages"
}
To install (listen server):
unzip to:
Code:
My Games\RedOrchestra2\ROGame\Published\CookedPC\Script
To test (listen server):
Open console with ~
Type the following:
Code:
Open te-fallenfighters?minplayers=14?maxplayers=14?mutator=NoBandages.NoBandages
To install (dedicated server):
unzip to:
Code:
ROGame\CookedPCServer
To test (dedicated server):
restart the server if its already running
When selecting a map, add "?mutator=NoBandages.NoBandages" to the "Additional URL Variables" field
Note: server will become unranked if its ranked

Credit goes to Ducky for being first to figure out how to get this stuff running on a dedicated server
 

Attachments

  • NoBandages.zip
    1.1 KB · Views: 0
Last edited:
You can't earn bandages in this. It just changes the bandage inventory from 2 to 0. Very simple. I said I wanted that to be an optional feature but it looked like the ScoreKill Mutator function wasn't ever registering. I bet there's a way to do it I just don't think there's going to be enough interest to merit putting the time into finding out how.

To install:
unzip to:
Code:
My Games\RedOrchestra2\ROGame\Published\CookedPC\Script

"My Games" is a subfolder of My Documents (or just "Documents" in Windows 7)

I've heard some people have had trouble installing mutators on dedicated servers. I haven't tried myself.
 
Upvote 0
ROGame.exe :)

Just add "make" as a command line argument to a shortcut. You can't use the steam shortcut, it has to actually be the game.

I made a thread in the coding section that I hope to complete so that everyone's common mutator questions get answered. Still waiting on someone having success getting a mutator on a dedicated server.
 
Upvote 0
I tried it, but for some reason I can't extract the mutator from the zip file. I can not even open the zip file. The extractor (Win 7's default zipper) reports an error when I try to open it.

Works fine over here. Don't use the default zip program of windows, it's horrendous. I recommend 7zip http://www.7-zip.org/
 
Upvote 0
Works fine over here. Don't use the default zip program of windows, it's horrendous. I recommend 7zip [url]http://www.7-zip.org/[/URL]

The built-in one should work fine for most zip files - in fact, I'd say if you can't open a .zip file with it, then that file is actually compressed with one of 7Zip's own algorithms, and incorrectly saved with the "standard" .zip extension :) They should really have .7z extensions, to highlight the difference. The built-in W7 tool won't process the custom 7z algorithms, as I understand it.
 
Upvote 0
The built-in one should work fine for most zip files - in fact, I'd say if you can't open a .zip file with it, then that file is actually compressed with one of 7Zip's own algorithms, and incorrectly saved with the "standard" .zip extension :) They should really have .7z extensions, to highlight the difference. The built-in W7 tool won't process the custom 7z algorithms, as I understand it.

I don't know about that, but I just tested opening the mutator zip with window 7's own zip archiver and it worked just fine also. Chances are that Ducky's download got corrupted somehow.
 
Upvote 0
I don't know about that, but I just tested opening the mutator zip with window 7's own zip archiver and it worked just fine also. Chances are that Ducky's download got corrupted somehow.

Small chance it got corrupted. I donwloaded it more than once and all with the same result. I tried it on my other rig, and there it works, but with WinRAR.
 
Upvote 0
Sorry to take it down a notch. Will this work on a the pub server i run or is it just a test?

If yes, please give simple instructions on how to install.

If not, love the idea and double thumbs up for your work.

I did unzip the mutator and placed the .u file in the cookedpcsever folder on our server. Next went to the change map screen in the web-admin tool and added
?mutator=NoBandages.NoBandages at the Additional URL variables field before changing the map.

The map did change and the server did become unranked (as expected when a mutator is active), but this is what I found in the server log:
Code:
[0105.43] Log: ########### Finished loading level: 7.184723 seconds
[0105.43] OfficialGameServer: Initializing game server ranking
[0105.43] WebAdmin: Creating team chat proxies
[COLOR=Yellow][0106.36] Log: NoBandages.u Failed - Removing Ranked Status[/COLOR]
[0106.37] OfficialGameServer: Removing ranked status: IS_RANKED_UPDATE returning FALSE

It does refer to the NoBandages.u file (see marked line), so I guess it did find it, but it seems that it somehow failed to load or execute it, though the ranking was removed.
 
Upvote 0
Maybe your server needs to be unranked from the start

Sounds like this is happening:

Logic sequence:
Load Mutator
Check if Server is Ranked
If it is, mutator load failed
Check if server is attempting to load mutators
It is, so changed ranked status from ranked to unranked
Server is attempting to load mutators so set to unranked

Which would be a bug. It should be this:
Check if server is attempting to load mutators
It is, so changed ranked status from ranked to unranked
Server is attempting to load mutators so set to unranked
Load Mutator
Check if server is ranked
It isn't, so continue loading
Mutator loaded

Or maybe it was supposed to re-attempt to reload the mutator after changing the server ranking.

Like so:
Attempt to load white-listed mutators
If non-white-listed mutator set to unranked [MISSING CODE: and try reloading mutators again]
 
Last edited:
  • Like
Reactions: Ducky
Upvote 0
What I noticed in the web-admin tool was that:
  • Server did become unranked
  • It said in the Change Map screen: No active mutators
  • I could not select it in the Mutators page in the web-admin tool
I did start the mutator on my server by adding
Code:
?mutator=NoBandages.NoBandages
at the Additional URL field on the Change Map page in the web-admin tool. Normally a mutator should be selected from teh Mutators page, but that list is empty. I expect that I need to add the mutator somewhere in the ini files on my server, but the question is which one? I think it's the ROGame.ini (cos there we add the entries for the custom maps), but not sure how and where. Any idea?

I will give it a try again later on when I'm back home (I'm at my work now). I will 1st make my (test) server unranked and then activate the mutator. I will let you know the result (never did give a penny for that ranking system anyway).

By the way, my RO2 (on my PC, not on my server) can't load the mutators if they sit in the Unpublished\CoopedPC\Scripts folder. It can only load them if I put them in the ROGame\CookedPC\Scripts folder of the RO2 installation folder. Same if I try it with your mutator. I can't load it if it sits in the Unpublished folder, but I can if sitting in the CookedPC folder of the RO2 installation.
 
Upvote 0