Post tutorial Report RSS Ra3 mod sdk tutorial section 1 beginner

Part 1 of a tutorial on how to do some basic things with the sdk

Posted by on - Basic Other

RA3 mod sdk section one beginner

This tutorial will be broken up into Sections that i will post as i complete them

This tutorial will show you how to do some basic things in the mod sdk for Ra3 i will try to keep it as easly as possible and as newbie friendly as i can if you know this aready feel free to skip to the next section.

### -Some tips before we start- ###
1.You should have the sdk im hoping by now.
2.Download notepad ++ (this isn't 100% required but good luck without)
3.Most of the files have read only active remember to turn it off before editing them.
4.Remember upper case and lower case letters are not interchangeable the compiler will see "newtank" and "Newtank" and different things.
5.The file type used by the SDK is space aligned don't add any extra spaces to the file doing so will cause the SDK to complain about errors.
6.Check to make sure you don't accidentally delete any symbols like the ">" again case errors

(Point 5 and 6 will be the cause of most of the errors you get)

Section-1 beginner

On Installing the mod SDK you will get a program called Red alert 3 buildstudio and folder called Ra3 MOD SDK.
Inside the folder there should be a large list of folders including one called Mods and another called sageXml.
In side sageXml file there will be a large number of xml files these are the files were going to be adding to your mod and editing.

In the folder called Mods there should be one folder called "samplemod".
(*Note the samplemod is a great thing to look through when your trying to setting up your own mod as its shows how to use and setup a lot of the xml files*)

Ok so now create and file inside the folder Mods you can call it what ever you want.
(*Note There maybe a letter limit to the name over which will cause errors but i haven't looked into it)
So inside this folder make another folder called data this is the basic setup for the mod done.

So now we will do a simple edit. Go into "sageXml" then the folder called "soviet" and then the folder called "units" Inside this folder copy the file called "SovietAntiInfantryVehicle" go back to your mod and inside the data folder paste the file.
(*Note Remember to right click it go to properties and uncheck the Read-only)

Now for the editing part open "SovietAntiInfantryVehicle.xml" up in notepad++ or just notepad if you didn't download it.
You should now have a file with a lot of code on it.
(*Note don't worry if you feel a little overwhelmed looking through it you will get use to it)

Not that far from the top of the you should see something like the code shown below.
You should be able to guess what some of the tags do like "buildtime".

Warning most if all the "<" and ">" symbols are missing below as i cant include them without losing the colors i selected.

!-- AKA 'The Sickle' --
GameObject
id="SovietAntiInfantryVehicle"
inheritFrom="BaseVehicle"
SelectPortrait="Portrait_SovietAntiInfantryVehicle_big"
ButtonImage="Button_SovietAntiInfantryVehicle_small"
Side="Soviet"
SubGroupPriority="305"
EditorSorting="UNIT"
HealthBoxHeightOffset="20"
BuildTime="10"
CommandSet="SovietAntiInfantryVehicleCommandSet"
KindOf="SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS SCORE VEHICLE CAN_BE_FAVORITE_UNIT"
ThreatLevel="10"
WeaponCategory="GUN"
VoicePriority="176"
EditorName="SovietAntiInfantryVehicle"
Description="Desc:SovietAntiInfantryVehicle"
TypeDescription="Type:SovietAntiInfantryVehicle"
UnitIntro="Soviet_Sickle_UnitIntro"

DisplayName
xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:SovietAntiInfantryVehicle /DisplayName

ObjectResourceInfo
BuildCost Account="=$ACCOUNT_ORE" Amount="900"/
/ObjectResourceInfo

ArmorSet
Armor="SovietAntiInfantryVehicleArmor"
DamageFX="VehicleDamageFX" /

Ok so now try changing some of them like the BuildTime and Amount.
If you haven't guessed BuildTime is how long it takes to build and Amount how much it costs.
If your feeling brave have a go looking for the tag that controls the health remember to be careful not to delete anything you didn't mean to.
(*Note If your Wondering what Armor does it tells the game how much damage a unit takes from a certain kind of attack)

Your mod is all most complete Save the file and Exit out.
The final step is to create a *MOD.xml* this will tell the compiler which files to include when building your mod.
This is were the samplemod becomes useful go into the samplemod's data folder and copy the file called *MOD.xml* be carefull not to take the mod.BABPROJ by mistake.
Ok now paste it inside your mods data file (Again remember to check the read-only) Then open it.
You should have something like this.

 <!--
   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" />
  
<!-- *Note from writer these 3 files static global and audio aways need to be in your mod.xml file so dont delete these* 
-->   

   <!-- Editing the barracks -->
   <Include type="all" source="DATA:SampleMod/Data/AlliedBarracks.xml"/>    

   <!-- Including the Harbinger Gunship from Uprising --> 
   <Include type="all" source="DATA:SampleMod/Data/AlliedGunshipAircraft_Collapse.xml"/> 
   <Include type="all" source="DATA:SampleMod/Data/AlliedGunshipAircraft_Dying.xml"/>
   <Include type="all" source="DATA:SampleMod/Data/AlliedGunshipAircraftWeaponProjectile.xml"/>

............And so on down the page...............

OK so now delete everything from "!-- Editing the barracks --" line down to Include "type="all" source="AUDIO:AudioAssets.xml" /" line.
Now include this line below were it says "Include type="reference" source="DATA:audio.xml" /" .

<Include type="all" source="SovietAntiInfantryVehicle" />

(*Note Remember to write in upper cases in the correct places*)

So now save and exit out and open up RED Alert 3 build-studio then select your mod and build it.

If your mod built without any errors and works in game then well done you have finished your first simple edit.
Remember to keep messing around and learn more.

If your mod fails to build or crashes the game when used then there is something wrong in one of your ".xmls" files so go through them and double check everything you changed most of the time it will be a silly mistake on your part.
Most importantly remember keep at it you will get there in the end (it took me over 15 tries to get my very first edit to work).

So now its time for you to move on to section 2 More Tanks


Comments
samirabaza
samirabaza

how to prevent unite from going on water for example:
AlliedAntiInfantryVehicle
i want to prevent it to go to water

Reply Good karma Bad karma+1 vote
The_splat
The_splat

Change its locomotor.

Reply Good karma Bad karma+2 votes
GearsGoAwryMan
GearsGoAwryMan

ask zombolt or phoenix^^, they will be glad to help

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Tutorial
Tags
Tutorial
Browse
Tutorials
Report
Report
Share
Related Groups
C&C Paradise
C&C Paradise Fans & Clans
C&C Society
C&C Society Web & Community
Echo Productions
Echo Productions Developer