Agent Posted September 30, 2016 Share Posted September 30, 2016 The previous guides were written before the SDK was released, and consequently included extremely out-of-date information. So here's a new guide in hopes that someone might find it useful. Setup Before you can get started on creating any content, you will need to download the Software Development Kit from the Downloads section. Once the download is completed, extract the zip file to whatever location you prefer. With the SDK installed, the following steps will setup an extremely basic mutator that does nothing: Navigate to the SDK's /Development/Src/ directory, and create a folder named MyPackage (or whatever you want your mutator's package name to be). Create a directory named Classes in your new MyPackage directory. This is where all of your source files should go. Create an file named MyMutator.uc in MyPackage/Classes/. Write and save the following contents to MyMutator.uc: class MyMutator extends Rx_Mutator; Navigate to the SDK's /UDKGame/Config/ directory, and open DefaultEngineUDK.ini. Navigate to the UnrealEd.EditorEngine section in the file, and at the bottom of the section add: +ModEditPackages=MyPackage Now you need to compile your mutator. Simply create a compile.bat file, then write and save the following contents to it: start /Binaries/Win32/UDK.exe make Run compile.bat to compile your mutator. Some IDEs (such as the nFringe plugin for Visual Studio) allow you to compile directly inside of your editor. There is also compile scripts using /Binaries/UnrealFrontend.exe Your compiled mutator package will be named MyPackage.u, and can be found in /UDKGame/Script/. You're done! You've now created an extremely basic mutator that does absolutely nothing. To load your mutator, simply copy your MyPackage.u file to your game/server client's UDKGame/CookedPC directory, then add ?mutator=MyPackage.MyMutator when starting a server/match. For example in-game you might press F5 and type: open CNC-Field?mutator=MyPackage.MyMutator. On a server, you can add ?mutator=MyPackage.MyMutator to your server's batch script. If you have multiple mutators, simply add commas as necessary: ?mutator=MyPackage.MyMutator,MyPackage.MyOtherMutator,RenX_ExampleMutators.InfiniteAmmo You can have as many mutators in an individual package as you wish, but you have to load each one separately (as shown above) or create a mutator to load the other mutators automatically. Self Loading It is also possible to load a mutator directly inside of a level. To do such a thing, you would have to create a dumby Actor and then call AddMutator on your actual mutator class from PostBeginPlay, and place this dumby Actor somewhere in your level. For example: class MyMutatorLoader extends Actor; function PostBeginPlay() { WorldInfo.Game.AddMutator("MyPackage.MyMutator", false); } Then you just place MyMutatorLoader somewhere in your level. Notes Alright, now that initial setup is out of the way, you can actually start making your wonderful mutator. You can use the mutators located in your SDK's /Development/Src/RenX_ExampleMutators/Classes/ for references as to how to add some basic features such as giving every weapon infinite ammo or giving sniper rifles to Stealth Black Hands. There's also plenty of resources and references available for UnrealScript in general, and are extremely relevant when working on RenX, which I've included at the bottom of this post. You will also probably have to look at the classes in RenX_Game/Classes quite a bit for interacting with Renegade X specific content and systems. The 'Rx_Mutator' class differs from the 'UTMutator' class only in that it adds a function named 'InitRconCommands', which is called when RCON commands are first initialized. RCON commands are only initialized once, and that is during the initialization of the first level. RCON commands are persistent between levels. Be careful with that, because if there are any non-null Actors references in your command at the end of the level, your game/server WILL crash. Resources https://wiki.beyondunreal.com/ http://udn.epicgames.com/Three/UT3Mods.html#Mutators http://udn.epicgames.com/Three/GameplayProgrammingHome.html My favorite of the above references is the Unreal Wiki (wiki.beyondunreal.com). 3 Quote Link to comment Share on other sites More sharing options...
Totem Arts Staff TK0104 Posted September 30, 2016 Totem Arts Staff Share Posted September 30, 2016 This will probably help me with some of my own mutators Quote Link to comment Share on other sites More sharing options...
Agent Posted September 30, 2016 Author Share Posted September 30, 2016 It may also be possible to load a mutator through the level. To do such a thing, you would have to create a dumby Actor and then call AddMutator on your actual mutator class from PostBeginPlay, and place this dumby Actor somewhere in your level. Something along these lines: class MyMutatorLoader extends Actor; function PostBeginPlay() { WorldInfo.Game.AddMutator('MyPackage.MyMutator', false); } Then you just place MyMutatorLoader somewhere in your level. Quote Link to comment Share on other sites More sharing options...
Ruud033 Posted September 30, 2016 Share Posted September 30, 2016 Do you have to unload the mutator at game end? Quote Link to comment Share on other sites More sharing options...
Agent Posted September 30, 2016 Author Share Posted September 30, 2016 It should unload itself automatically. Quote Link to comment Share on other sites More sharing options...
Mahmoud AL Gin Posted May 3, 2017 Share Posted May 3, 2017 Hi , that's great thing , but may I ask you something about mutators Quote Link to comment Share on other sites More sharing options...
Mahmoud AL Gin Posted May 15, 2017 Share Posted May 15, 2017 Hi , that's great thing , but may I ask you something about mutators how to add the class to yuor server I have classes for my servers but I don't know to add the class on my servers to use it Quote Link to comment Share on other sites More sharing options...
Mahmoud AL Gin Posted May 15, 2017 Share Posted May 15, 2017 Do I have to add class name to server setting like mutators or do what to use class on my server and how to change the class on the server Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.