Site hosted by Angelfire.com: Build your free website today!

Adding a New Unit to Red Alert 2

This tutorial will guide you through the process of adding a new unit to Red Alert 2. This will only go over the rules.ini part, so that means that it will not cover adding new graphics for a unit (you'll be using graphics from another unit). Refer to other tutorials on adding new graphics for units.

Also, using the program StrEdit (which is used to create and edit RA2 CSF files) is not covered in this tutorial. In the tutorials section, there's a tutorial on adding strings with StrEdit.

This tutorial will show you how to add an infantry unit, but you can apply what you learned from this to add a vehicle or building (sincethe process is almost identicle).

Files that you need:

Microsoft Notepad
Red Alert 2 INI Files
StrEdit
FinalAlert DLLs

Open the INI file

In Microsoft Notepad, click on File, then Open, and find where you downloaded the Red Alert 2 rules.ini file. It may say that the file is too large to open in Notepad, and ask you if it can open it in Wordpad. Click Okay.

Add your unit to list of infantry

For this tutorial, we'll be making a unit called Rocketman.
Scroll down to (or search for by holding Ctrl and pressing F) the text

[InfantryTypes]

Beneath it is a list of all of the Infantry in Red Alert 2. Scroll down to the bottom of the list (it should end with 45=JOSH). If the last unit's number is 45, add the following text below it:
46=ROCKETMAN

Making the INI code for your unit

This won't be covered in much detail in this tutorial, but I will havea guide up on making INI code for units.
For this tutorial, what we'll do is copy the code from the Conscript. Scroll down the the following text:

; ******************************
; ******* infantry types *******
; ******************************

Below it you will add the code for your unit. Since this tutorial doesn't cover the coding of units, just copy the following text and insert it below the infantry types header:

; Rocket Man
[ROCKETMAN]
UIName=Name:ROCKETMAN
Name=Rocket Man
Image=CONS
Category=Soldier
Primary=M1Carbine
Occupier=yes
Prerequisite=NAHAND
CrushSound=InfantrySquish
Strength=125
Armor=flak
TechLevel=1
Pip=white
Sight=5
Speed=4
Owner=Russians,Confederation,Africans,Arabs
Cost=100
Soylent=20
Points=5
IsSelectableCombatant=yes
VoiceSelect=ConscriptSelect
VoiceMove=ConscriptMove
VoiceAttack=ConscriptAttackCommand
VoiceFeedback=ConscriptFear
VoiceSpecialAttack=ConscriptMove
DieSound=ConscriptDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
;MovementZone=InfantryDestroyer
ThreatPosed=5
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToVeins=yes
Size=1
ElitePrimary=M1CarbineE
IFVMode=2

Note that when you test the unit, it will look exactly like the Soviet Conscript (and you must play as a Soviet country for this unit to work), including the icon on the side bar.

Save rules.ini

Click on File then Save As. Go to the Red Alert 2 directory (normally C:\Westwood\RA2). Save the file as rules.ini and the file type as Text Document.

A common error is incorrectly saving the document as a file type other then an .ini without any text formatting. If there's any text formatting, it won't work (choosing Text Document will remove any formatting).

Add the unit to a CSF file

In Red Alert 2, the programmers made all of the text in the game be in CSF files, so that if they were to make a version of the game in a different language, the changes to text would be made right in the CSF file (without having to go through the code of the program and change everything). This made translation much easier, but a little harder for us editors.
Refer to the tutorial Creating a New String Using StrEdit on how to use the program StrEdit (which is used for editing CSF files).
In StrEdit, insert a new string. Make the string ID Name: ROCKETMAN, leave the flag as it is, and make the content of the string Rocket Man.

Save the CSF file

Click on File then on Save As. Save it in the Red Alert 2 directory (usually C:\Westwood\RA2) as rocketman.csf and exit the program.

Thanks to ra2.tiberiansunfactory.com for this tutorial