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

RS How do i port a RO2 weapon to RS?

No experience at all...
IF YOU DO NOT HAVE A 64-BIT OPERATING SYSTEM YOU CANNOT COMPILE (You can still write code though, have someone else compile it for you :))
1. Finding the files
Here's what you'll need:
RoleInfo Classes for engineer, TL, etc
Should be something like this:
RSRoleInfoAxisCommander.uc
Find all the desired classes they'll be found in:
...\Steam\SteamApps\common\Red Orchestra 2\Development\Src\RSGame\Classes
Also grab RSRoleinfoAxisInfantry.uc
Copy all of these files create a folder in:
...\Documents\My Games\RedOrchestra2\ROGame\Src
Give this folder a name, make sure use _'s instead of spaces (alternatively don't use them at all)
Create a new folder in this folder, name it "Classes" move all the .uc files you copied to that folder.
2. Class Extension/Inheritance
Rename all the files, as they are copies.
Make sure all the Roleinfo classes extend to the AxisInfantry class
3. Modifying the Copied Files
Here's an Example:
// SECONDARY : DEFAULTS
SecondaryWeapons(0)=class'RSGame.RSWeap_M1911_Pistol'
// SECONDARY : FRONTLINE ENEMY
SecondaryWeapons(1)=class'RSGame.RSWeap_M1_Carbine'
NumSecondaryFrontlineEnemyWeapons=1
// SECONDARY : Veteran ENEMY
SecondaryWeapons(2)=class'RSGame.RSWeap_M12_Shotgun'
NumSecondaryVeteranEnemyWeapons=1
This is an example from the RSRoleInfoAlliedFlamethrower
You'll have to remove one of the weapons, as the game doesn't seem to like more than three.
Inorder to get the C96 we'll modify the code here:
SecondaryWeapons(#)=class'RSGame.RSWeap_Random_Gun'
To:
SecondaryWeapons(#)=class'ROGame.ROWeap_C96_pistol
 
Upvote 0
Rename all the files, as they are copies.
Make sure all the Roleinfo classes extend to the AxisInfantry class

Here's an Example:
This is an example from the RSRoleInfoAlliedFlamethrower
You'll have to remove one of the weapons, as the game doesn't seem to like more than three.
What should i rename them to? And how do i "extend".
 
Upvote 0
You could also create a .bat file for convenience. Here's mine:

Code:
@echo off

D:

cd "D:\Steam\steamapps\common\Red Orchestra 2\Binaries\Win64"

rogame make
Change the drive letters and Steam path to match your own, and make sure you have your mod folder name listed under ModPackages in ROEditor.ini.
It says steam is required to run this game.
 
Upvote 0