Rising Storm 2: Vietnam

Rising Storm 2: Vietnam

Not enough ratings
Intro to scripting
By henkman
This is a short intro to scripting RS2 with information I had to gather for making my mosin only mod
   
Award
Favorite
Favorited
Unfavorite
Intro
This is a short intro to scripting RS2 with information I had to gather for making my mosin only mod. I will use a few variables in this text to make it easier for me:
$GAMEDIR -> the directory where your game is installed $MODNAME -> the name of your mod $USERDOCS -> %userprofile%\Documents\My Games\Rising Storm 2
Installation
Go to library->tools in your steam client and install "Rising Storm 2 - SDK"
Developing
Setup
Create the directory $USERDOCS\ROGame\Src\$MODNAME. And in that directory create a directory named Classes. Your .uc files with your mod's scripts should be put into the Classes directory

Programming
The source files of the game are in $GAMEDIR\Development\Src. You will look into these a lot so better keep a window open for that.

I found it useful to check out already built mods for clues on how to build mine. Just subscribe to a few of them in the workshop that interest you and check them out. After you subscribed to them and ran the game once they should appear in $USERDOCS\ROGame\Cache

You can use UE-Explorer[eliotvu.com] to decompile .u files which contain the compiled sources and unpack .upk files with Unreal Package Extractor[www.gildor.org]

If you never programmed UnrealScript you can check out the UnrealScript reference[wiki.beyondunreal.com]

That should be enough for you to get started programming

Compiling
call the VNEditor with
$GAMEDIR\Binaries\Win64\VNEditor.exe make -user -useunpublished
It will give you a log of what has happened and write your compiled scripts to $USERDOCS\ROGame\Unpublished\CookedPC\Script if it was successful. If it was you can now run the game with your mod

Running
Open a cmd and run
$GAMEDIR\Binaries\Win64\VNGame.exe -log -nostartupmovies -useunpublished
Everything you write with `Log("text"); will be printed here. A good way to see if your scripts work

how configuration works
If you want to be able to configure your mod you need at least one class that has the config attribute like so:
class MosinOnlyMutator extends ROMutator config(MosinOnly);
That means that the game expects you to have a config file at $USERDOCS\ROGame\Config\ROMosinOnly.ini

Values that can be configured have to be annotated with the config attribute like so:
var config int NorthernRadiomenCount; var config int SouthernRadiomenCount;
Going by the two examples above the config file should look like this:
[MosinOnly.MosinOnlyMutator] NorthernRadiomenCount = 4 SouthernRadiomenCount = 4
The text before the . in group is the name of your mod and the one after it is the class that is configurable.

Localisation
If you create new classes that are exposed in the game you might need to create a localisation file or there will be no text for them. These kind of files should be in $USERDOCS\ROGame\Localization\INT. If for example you have a new class RORoleInfoNorthernCommanderMosinOnly you need to create a file $MODNAME.int in that directory and then set the value like so in that file:
[RORoleInfoNorthernCommanderMosinOnly] MyName="COMMANDER"
Releasing your Mod
Run $GAMEDIR\Binaries\SDKFrontend.exe and create a new profile for your mod. Add all the files necessary to use your mod and click Brew. If it didn't spew errors in your face you can give your mod a description, image and tags and upload it. It will be in the Steam Workshop but only visible to you until you press the button to release it for the public
3 Comments
SgtJoe 2 Jun, 2018 @ 1:10am 
You could've just asked in the RS2 discord lmao, we would've gladly assisted you.
Halrix 26 May, 2018 @ 12:41pm 
aid
It's over! 12 May, 2018 @ 5:20pm 
kool