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

Code What ini to add EditPackages

Managed to compile a mutator. I needed to edit the stock sources and remove the references to the OnlineSubsystemSteamworks for now.
Thanks to Szeder for the help btw :)

Still only works with -full.

Anyone has anyidea how i could get my mutator to run on the server?

I tried placing the .u file in the cookedpcserver folder as well as in a script folder on the server (like i did with testing the mut in the UDK server)
Then i load a map appending ?mutator=PackageName.ClassName
The log says it cant find my package.

I added a ServerPackage line in the Engine.GameEngine section like in UT3.
Still no luck.

Any suggestions?
 
Upvote 0
Managed to compile a mutator. I needed to edit the stock sources and remove the references to the OnlineSubsystemSteamworks for now.
Thanks to Szeder for the help btw :)

Still only works with -full.

Anyone has anyidea how i could get my mutator to run on the server?

I tried placing the .u file in the cookedpcserver folder as well as in a script folder on the server (like i did with testing the mut in the UDK server)
Then i load a map appending ?mutator=PackageName.ClassName
The log says it cant find my package.

I added a ServerPackage line in the Engine.GameEngine section like in UT3.
Still no luck.

Any suggestions?

I've never gotten this far. Did you go into ever single source script and comment out any reference to OnlineSubsystemSteamworks? I tried doing that but then I saw that there were a bunch of references to it and I didn't want to break anything.

Also, were you able to test out your mutators locally? If you could do it locally, that means I can at least get started on testing some of the features I want to implement for F&M (the mod in my sig).
 
Upvote 0
yeah, went through all errors.

No wasnt able to start it locally so far. :/

Yeah, if that's the case, I seriously doubt were supposed to do a full recompile, so I'll just keep studying code.

What are you specifically trying to do by the way?

I've been busy with work so I haven't been able to study the code all that much, can you take a look at my mod in my sig and tell me if you have identified some of the code?

I have found the following;

Most of the weapon stuff (recoil, sway, spread, reloading)
SpecialMoveBandaging
A widget script that shows when a Hero is in rage for an added suppression bonus
 
Upvote 0
Trying to just recompile the ROGame.u with only some debug enabled (no other changes), but got the same problem.

The 64bit ROGame.exe launched from a shortcut with make argument just crashes... In fact it crashes even if launched without any argument... just a little later.

Am I supposed to delete the original *.u file, to make it recompiled ?
 
Upvote 0
Managed to compile some code (package) and... now I need a mutator and the code I try to compile is giving errors.

Basically I tried to check if some actor is a tank, and if yes, replace it with different tank. The ReplaceWith command gives en error on compile.

I'm not even sure if tanks can be replaced this way, or maybe I have to use some different method. Wanted to try if it works, but it even doesn't want to compile, not sure if that because it wouldn't work, or some more fundamental bug (this command doesn't work in this version of UT ?). (it's all somewhat different than in RO1)

"Error: 'ReplaceWith': Bad command or expression".

code:

if (Other.IsA('ROVehicle_T3476'))
{
ReplaceWith( Other, "AmiRO2Test_ROVehicle_T3476");
}

I would be gratefull if someone could show, how a MOST SIMPLE mutator, that would only replace two vehicles (and, optionally, two weapons) would look like for RO2 ?
 
Last edited:
Upvote 0
ReplaceWith is what was used when making UT3 mutators, however it was actually defined in UTMutator, not in any of the classes in the packages that TWI have included. My suggestion would be to go take a look at the UT3 source (which you can export from the UT3 editor, or can be downloaded from UDN) and have a look how they did it and implement a similar function.
 
Upvote 0
Code:
/* ReplaceWith()
 * Call this function to replace an actor Other with an actor of aClass.
 * @note: doesn't destroy the original; can return false from CheckReplacement() to do that
 */
function bool ReplaceWith(actor Other, string aClassName)
{
    local Actor A;
    local class<Actor> aClass;
    local PickupFactory OldFactory, NewFactory;

    if ( aClassName == "" )
        return true;

    aClass = class<Actor>(DynamicLoadObject(aClassName, class'Class'));
    if ( aClass != None )
    {
        A = Spawn(aClass,Other.Owner,,Other.Location, Other.Rotation);
        if (A != None)
        {
            OldFactory = PickupFactory(Other);
            NewFactory = PickupFactory(A);
            if (OldFactory != None && NewFactory != None)
            {
                OldFactory.ReplacementFactory = NewFactory;
                NewFactory.OriginalFactory = OldFactory;
            }
        }
    }
    return ( A != None );
}
 
Upvote 0