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.
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 Jason_Zombolt on Jan 29th, 2010
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.
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:
KindOf=”SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS SCORE VEHICLE CAN_BE_FAVORITE_UNIT T2_UNIT”
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.
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:
“Kills stuff with protons”
“DON’T CROSS THE STREAMS”
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