• 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/

Help compiling a mutator!

boxman500

Member
May 2, 2015
19
0
Hello,

Not sure if anyone can help me, but I can't seem for the life of me to get my script to compile correctly. So I have the script I want to compile located in

Documents\My Games\RedOrchestra2\ROGame\Unpublished\CookedPC\Script

Located there I have a simple text document that I renamed to .u in hopes it could compile it to run in RO2

When I try and run, to compile my script with this cmd

.\ROGame.exe brewcontent Myscript -platform=pc

Then I get an error after it trys and compiles the script with UDK.

However when I go to

My Games\RedOrchestra2\ROGame\Published\CookedPC\Script

It has a copy of my uncompiled .u script...

Any idea how to get my script to compile or what I might be doing wrong?

Regards
 
I will explain the steps by using an example mutator. The mutator will be named MyFunMut.

  1. Create a folder with the name MyFunMut under: <Documents>\My Games\RedOrchestra2\ROGame\Src
    Thus the final path will be:
    <Documents>\My Games\RedOrchestra2\ROGame\Src\MyFunMut

  2. Create a file with the name MyFunMut.uc in the folder that you created in the above step. This file need to contain the mutator script code.

  3. Open the ROEditor.ini file and look for the section [ModPackages]. In that section you add a new line as like ModPackages=MyFunMut.

  4. Build the mutator with the command:
    rogame make
    or:
    rogame brewcontent

More details can be found here
 
Last edited:
Upvote 0
If the UC file is in the right place, and the ROEditor.ini has the correct line added... opening the SDK will trigger a compile of outdated or unbuilt U files.

It tried to compile it then crashes?

Here is the code i'm trying to compile

class ROMaxPlayers extends Info
config(MaxPlayers)
transient;

var config int ForcedMaxPlayers;
var config bool bConfigsInit;

function Tick( float Delta )
{
local OnlineGameSettings GameSettings;

if( !bConfigsInit )
{
bConfigsInit = true;
ForcedMaxPlayers = 16;
SaveConfig();
}
WorldInfo.Game.MaxPlayers = ForcedMaxPlayers;
GameSettings = WorldInfo.Game.GameInterface.GetGameSettings(WorldInfo.Game.PlayerReplicationInfoClass.default.SessionName);
if( GameSettings!=None )
GameSettings.NumPublicConnections = ForcedMaxPlayers;
`Log("Set new max players:"@ForcedMaxPlayers);
Destroy();
 
Upvote 0
It tried to compile it then crashes?

Here is the code i'm trying to compile

class ROMaxPlayers extends Info
config(MaxPlayers)
transient;

var config int ForcedMaxPlayers;
var config bool bConfigsInit;

function Tick( float Delta )
{
local OnlineGameSettings GameSettings;

if( !bConfigsInit )
{
bConfigsInit = true;
ForcedMaxPlayers = 16;
SaveConfig();
}
WorldInfo.Game.MaxPlayers = ForcedMaxPlayers;
GameSettings = WorldInfo.Game.GameInterface.GetGameSettings(WorldInfo.Game.PlayerReplicationInfoClass.default.SessionName);
if( GameSettings!=None )
GameSettings.NumPublicConnections = ForcedMaxPlayers;
`Log("Set new max players:"@ForcedMaxPlayers);
Destroy();
after an update it stopped "working" it works fine, just crashes, check your folder for a .u file.
 
Upvote 0