After years of conflict, the Allies are finally on the brink of victory. Cowering behind the walls of the Kremlin, the Soviets decide to turn to one last act of desperation - the use of an experimental time travel device. The mission: to go back in time to eliminate Albert Einstein before he creates the technologies that will lead the Allies to ultimate victory. After a successful mission, the Soviets return to the present and find the Allied position weakened. But before they can truly celebrate, they find out their actions have spawned a new threat and global superpower: the mysterious, technologically-advanced Empire of the Rising Sun. Welcome to World War III.

Post tutorial Report RSS RA3 Starters Guide Pt1

Jackal16 had a set of tutorials on Hooked on CnC, yet they went down. With help from my friend and some save files, it is back. This Guide is not made by me, yet I will Use it! *Warning! This Tutorial is outdated. Sorry.

Posted by on - Basic Client Side Coding

Mod SDK Guide
Please note that when copying code from the tutorials, you may have to replace the speech marks with your own as this has been known to cause problems.

Starting Off
This guide will show you how to create a new mod and add a new unit to Red Alert 3 using the RA3 Mod SDK.
By now you should have downloaded and installed the RA3 Mod SDK, if you havn't then you can download it here: Portal.commandandconquer.com
Find where the Mod SDK was installed usually my computer - local disk C (or what ever your hard drives letter is) - RA3 Mod SDK.
Once you have opened that folder double click the mods folder and note the samplemod that is there, ignore that for now.
Create a new folder there and call it mymod and within mymod create another folder called data.

Modding Your First Unit
If you have read starting off then you are ready for this tutorial where we will add the new unit.

First off nagivate back to the RA3 Mod SDK folder where you first clicked mods, but this time click SageXml, then Allied, then Units and copy the file called AlliedAntiVehicleVehicleTech1, paste it into the data file you created. Right click on it and choose properties and then untick the read-only attribute if it is ticked.

Once you have done that re-name the file to mytank.

Ok now open the file using notepad and scroll down a bit to the text that looks like this:

Guide wrote: AlliedAntiVehicleVehicleTech1
inheritFrom=”BaseVehicle”
SelectPortrait=”Portrait_AlliedAntiVehicleVehicleTech1″
ButtonImage=”Button_AlliedAntiVehicleVehicleTech1_on”
Side=”Allies”
SubGroupPriority=”425″
EditorSorting=”UNIT”
HealthBoxHeightOffset=”25″
BuildTime=”10″
CommandSet=”AlliedAntiVehicleVehicleTech1CommandSet”
KindOf=”SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS SCORE VEHICLE CAN_BE_FAVORITE_UNIT T2_UNIT”
WeaponCategory=”CANNON”
VoicePriority=”188″
EditorName=”AlliedAntiVehicleVehicleTech1
Description=”Desc:AlliedAntiVehicleVehicleTech1
TypeDescription=”Type:AlliedAntiVehicleVehicleTech1
UnitIntro=”Allied_GuardianTank_UnitIntro”>
Name:AlliedAntiVehicleVehicleTech1


Re-name the pink text above to mytank.

Now that we’ve down that we need two additional files. Go back to the RA3 Mod SDK folder and click SageXml, then GlobalData and then copy LogicCommand and LogicCommandSet into the data folder of your mod. As before untick read-only on both of them.

Open LogicCommand and paste the following line of text in. It doesn’t really matter where you paste it but for the sake of organisation scroll down a bit until you see the other unit builds and paste it there.

LogicCommand
Type=”UNIT_BUILD”
id=”Command_Constructmytank”>
<span class="mceItemObject" >mytank/Object>
</LogicCommand

Save that and open up LogicCommandSet. Scroll down until you see the Allied warfactory commandset shown below, and add the pink line of text.

Guide wrote:
Command_ConstructAlliedMiner
Command_ConstructAlliedAntiInfantryVehicle_Ground
Command_ConstructAlliedAntiAirVehicleTech1
Command_ConstructAlliedAntiVehicleVehicleTech1

Command_Constructmytank

Command_ConstructAlliedAntiStructureVehicle
Command_ConstructAlliedAntiVehicleVehicleTech3
Command_ConstructAlliedMCV
<!--–
–>


Under the logic command set for the warfactory add this:

<LogicCommandSet
id=”mytankCommandSet”>
<Cmd>Command_ToggleTargetPainter</Cmd>
<Cmd>Command_AttackMove</Cmd>
<Cmd>Command_MoveToPositionAndCollect</Cmd>
</LogicCommandSet>

Save the file.

Creating the mod.xml file
The mod.xml file tells the game engine what files we want to add to the game and hence all mods require one. Open up the sample mod that game with the Mod SDK and copy the xml file entitled Mod to the data folder of your mod. Next delete everything from the middle of it until it looks like the one below and paste in the pink text.

<?xml version=”1.0″ encoding=”UTF-8″?>
<AssetDeclaration xmlns=”uri:ea.com:eala:asset” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance“>
<Tags></Tags>
<Includes>
<!–
mod.xml is the central include for mod setup data. 
–>
<!– These includes need to be in all mod.xml files –>
<Include type=”reference” source=”DATA:static.xml” />
<Include type=”reference” source=”DATA:global.xml” /> 
<Include type=”reference” source=”DATA:audio.xml” />

<Include type=”all” source=”DATA:mymod/Data/LogicCommand.xml”/>
<Include type=”all” source=”DATA:mymod/Data/LogicCommandSet.xml”/>
<Include type=”all” source=”DATA:mymod/Data/mytank.xml”/>


</Includes>

</AssetDeclaration>

Save the file.

Creating the mod.str file
The mod.str file is used to tell the game engine what the names of the units are, allows you to write a short description about each one and to specify its type. Copy the mod.str file from the sample mod into the data folder of your mod. Open it up using notepad and you should see something that looks like what is below:

Guide wrote: Name:AlliedGunshipAircraft
“Harbinger Gunship”
END

Desc:AlliedGunshipAircraft
“Kills stuff with protons”
END

Type:AlliedGunshipAircraft
“DON’T CROSS THE STREAMS”
END


Change the pink text to mytank and write what ever you want in the name, description and type lines between the speech marks.

How to build your mod
Ea has provided a handy tool which allows you to build your mod relatively easily. Go to the RA3 Mod SDK folder and run the application called EALAModStudio. In the dropdown box choose the name of the mod, in this case mymod. Tick all the boxes down the side and enter the version of the game you have in the bottom box, then press build. The mod should then go ahead and build, hopefully without errors.

How to play your mod
Now that the mod has built we're ready to play our mod. To do this open the RA3 Contol Centre and click game browser. Then click the mods tab and then the name of the mod. Finally click launch and the mod should play. Go into skirmish and play as the Allies, you should notice that out tank shows up there and can be built. Now you have the knowledge to add your own units.

I Hope this Guide helps you out as much as it has helped me. I will continue to post the other tuts to keep ra3 modding going-Jason Zombolt

Post comment Comments
PsychoticLoner
PsychoticLoner - - 1,011 comments

Thank you, guys! I was considering tinkering with SDK, but without the tutorial's from Hooked on CnC, I felt too lost to try.

Reply Good karma Bad karma+2 votes
Jason_King_of_Salt Author
Jason_King_of_Salt - - 2,364 comments

More of that tut is to come :D

Reply Good karma+2 votes
Redcomet95
Redcomet95 - - 97 comments

If you want i can get all the writing off hooked cnc i think i have it somewhere.

Reply Good karma Bad karma+2 votes
samirabaza
samirabaza - - 10 comments

i made a unit which is a modified unit actually of AlliedAntiVehicleInfantry as a test and it works just fine but in skirmish mode the AI player do not build the unit both the co and enemy AI player so i got to the skirmishAI folder and i found a file named AlliedBaseStates.xml that seems to control AI player but i failed to edit it
so any ideas?
Please help!

Reply Good karma Bad karma+2 votes
danieldot
danieldot - - 2 comments

We Want More :D

Reply Good karma Bad karma+2 votes
mpa12120
mpa12120 - - 139 comments

Second is out, i just realized. In the mod sdk do we change the game build to the current one or just 1.09?

Reply Good karma Bad karma+2 votes
Pvt.Grif
Pvt.Grif - - 118 comments

I wanted to makea MiG bomber for the soviets but how do i change the weapons and whatever?

Reply Good karma Bad karma+2 votes
ApornasPlanet
ApornasPlanet - - 4,117 comments

IT DOESN'T WORK! I have the game patched to 1.12 and I try to make the mod for this version but it doesn't show up in the mod viewer!!!

Reply Good karma Bad karma+2 votes
ApornasPlanet
ApornasPlanet - - 4,117 comments

I'm wondering about the following step in particular:

"Open LogicCommand and paste the following line of text in. It doesn’t really matter where you paste it but for the sake of organisation scroll down a bit until you see the other unit builds and paste it there."

LogicCommand
Type=”UNIT_BUILD”
id=”Command_Constructmytank”>
<span class="mceItemObject" >mytank/Object>
</LogicCommand

Should it look like this?

<LogicCommand
Type=”UNIT_BUILD”
id=”Command_Constructmytank”>
<Object>mytank</Object>
</LogicCommand>

How should I do it?

Reply Good karma Bad karma+2 votes
ApornasPlanet
ApornasPlanet - - 4,117 comments

should I save the build log somewhere? the mod doesn't show up!

Reply Good karma Bad karma+3 votes
ApornasPlanet
ApornasPlanet - - 4,117 comments

I can't understand what this is or what to do with it... Iäm now working with a xml-editor:

<span class="mceItemObject" >mytank/Object>

Reply Good karma Bad karma+2 votes
Jason_King_of_Salt Author
Jason_King_of_Salt - - 2,364 comments

You are right, this is outdated.

Reply Good karma+2 votes
Guest
Guest - - 689,528 comments

This comment is currently awaiting admin approval, join now to view.

biroyski
biroyski - - 12 comments

How do you edit/modify the downloaded mod. I downloaded this mod from some website, it's good mod, except for there is a limit on how many apoc tank you can create. I'm wondering if I can atleast increase the limit from 6 to 10 units and change the build time as well. Please someone can assist me on how to that, or if someone can edit that mod for me, that would be much appreciated. Thanks in advance.

Reply Good karma Bad karma+1 vote
Skyteks
Skyteks - - 29 comments

I tried to add the special Mirage tank and the Coastel Gun from Aliied Campain but both doesnt work. WHY ?

Reply Good karma Bad karma+1 vote
s10055072
s10055072 - - 59 comments

My EALAModStudio.exe still got the BinaryAssetBuilder.exe stopped working, WHY? Can anyone help me?

Reply Good karma Bad karma+2 votes
ForceAssaulter
ForceAssaulter - - 1 comments

I got an error when I tried to build Mod. I have tried to use the samplemod without editing anything but still I got error: Error: System.ArgumentOutOfRangeException: startIndex must be less than length of string.

Reply Good karma Bad karma+1 vote
DNZI
DNZI - - 1 comments

anybody have a working link for the binary asset builder *64 tool file?

Reply Good karma Bad karma+1 vote
DeluxeAuthorised
DeluxeAuthorised - - 1 comments

running steam version of ra3. after multiple failures (where the mod builds w/o any errors; only fail to be run by the game as changes are not applied), i the unedited samplemod provided in the sdk. samplemod is built using the sdk without any errors. however upon running the game, mod changes that should be changed by samplemod are not applied. I can assure you the mods are placed in the correct folder and my machine had installed/enabled the min requirements for the sdk to run properly.

I am thinking, seeing AssetDeclaration tag, is it possible by any chance "uri:ea.com:eala:asset" has values that affect any back end scripts? or its simply because i need to use a 32bit cpu?

was simply was trying to reduce kirov cost/build time and increase speed - to relive in a dream that i once had 12 years ago...

Reply Good karma Bad karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: