This group contains a lot of stuff of the C&C community. Mod news, game screen shots and C&C humor(funny c&c moments). Join us if your a great fan of C&C!

Post tutorial Report content RSS feed [C&C3] Beginning modder's guide (coding)

C&C3 Beginner's guide - how to mod C&C3 (coding only).

Posted by on - Basic Client Side Coding

I) Colours:
Existing or required or created by game devs
User-created / to create or copy
Other important

II) The preparation for making a mod:
1. Update your C&C3 to the latest version.

2. Download the latest C&C3 Mod SDK and SDK required apps: (Source
And install them all. ;-)

3. Download additional tools, i.e. C&C3 Extras:
Copy the content of the archive to your C&C3 MOD SDK folder, you can find it in your main game folder, e.g. D:\Program Files\Electronic Arts\Command & Conquer 3\MOD SDK
If it asks you to overwrite some of the files, agree.

4. Preparing the mod folder:
1) go to Mods folder inside MOD SDK folder
2) create a folder called FirstMod
3) inside FirstMod create a folder data, go back to main Mods folder
4) then choose already existing SampleMod folder
5) go to data folder
6) copy files Mod.xml and mod.str to your data folder in FirstMod directory

III) Main modding:
1. Copying interesting files.
1) Go to MOD SDK main folder, then choose CnC3Xml
2) choose GDI folder
3) then Units folder
4) Copy GDIRifleSoldier.xml and GDIRifleSoldierSquad.xml to your FirstMod data folder (to DATA folder, not to main FirstMod folder)
5) select both of them, right-click them, choose Properties, uncheck Read-only if checked (otherwise you won't be able to save anything changed in these files)

2. Browsing files
1) open GDIRifleSoldier.xml with a text editor
2) scroll down to a code line id="GDIRifleSoldier"
(All other lines, which contain "include" at the beginning of them, are telling the mod creator to include these art files when compiling/creating a mod.)
3) id="GDIRifleSoldier" equals to UnitNameInsideTheGame=GDIRifleSoldier (one soldier only, not entire squad)
4) inheritFrom="BaseInfantry", the unit inherits various infantry properties from BaseInfantry.xml file & the set found in there.
A) SelectPortrait="Portrait_GDIRiflemanSquad"
B) ButtonImage="Portrait_GDIRiflemanSquad"
These specify the portrait for the unit when A) selected and B) on GDI Barracks sidebar.
6) Side="GDI", pretty self-explanatory ;-)
7) EditorSorting="UNIT"
World Builder sorting, e.g. "UNIT" or "STRUCTURE".
8) TransportSlotCount="1"
How much transport space the unit will take (change rather squad's TransportSlotCount)
9) BuildCost="50"
The cost of the unit (as above, rather look at squad files).
10) BuildTime="0.5"
Build time of the unit (0.5 half a second).
11) We skip some of the unit properties and look up these:
A) KindOf= specifies unit abilities (e.g. SELECTABLE CAN_ATTACK, it's selectable, can attack)
B) ProductionQueueType=
the unit can be found on the specific tab of units/structres (e.g. "INFANTRY", "AIRCRAFT", "MAIN_STRUCTURE" and so on)
C) EditorName="GDIRifleSoldierSquad"
World Builder name.
D) Description="Desc:GDIRiflemanSquad"
The full description of the unit.
E) TypeDescription="Type:GDIRiflemanSquad"
The short description of the unit.
F) Name:GDIRiflemanSquad

(between <DisplayName> </DisplayName> tags)

The name of the unit in-game.

Note: GDIRifleSoldierSquad as EditorName is different from GDIRiflemanSquad as the in-game name (Name:GDIRiflemanSquad)!

3. Editing files:
1) open GDIRifleSoldierSquad.xml
2) change
3) save and close the file.
If you can't save it, without closing the file, right-click the file, choose file properties, untick "read only" if left ticked.

Note: every file copied from CnC3Xml is read-only, and it should be made writable (by you), i.e. with the read-only option unticked!

4. Editing text/lang files:
1) open mod.str
2) Delete:
// String file for Command & Conquer 3

// comment: DO NOT TRANSLATE
"Sample Modded AI"

3) Change
4) Change
"Elven Warrior"
"Cheap Riflemen Squad"

5) Change
6) Replace
"Super Advanced Infantry. Strong vs. Everything"
"Ultra cheap GDI infantry"

7) Change
8) Replace
"Abilities: \n ┬╗None"
"The ultra cheap infantry of GDI, you can spam the entire map with them! These basic infantry squads really enjoy taking civilian buidings, haha!"

Note: \n makes a break between lines.

5. Editing main Mod.xml file
1) open file Mod.xml
2) delete

		<!--UI Mod-->
		<Include type="reference" source="DATA:SampleMod/Data/AptUI/MainMenu.xml" />
		<Include type="reference" source="DATA:SampleMod/Data/AptUI/TacticalHUD.xml" />

		<Include type="all" source="DATA:SampleMod/Data/SoundMod.xml" />

		<!--Artwork include for Elven Warriors Portrait-->
		<Include type="all" source="ART:Images/SampleUpdatedPackedImages.xml" />
		<!--Sample AI-->
		<Include type="all" source="DATA:SampleMod/Data/AI/SampleNodOpeningMoves.xml" />	  
		<Include type="all" source="DATA:SampleMod/Data/AI/SampleNodPersonality.xml" />
		<Include type="all" source="DATA:SampleMod/Data/AI/SampleNodStates.xml" />
		<Include type="all" source="DATA:SampleMod/Data/AI/SampleAITargetHeuristics.xml" />	
		<!--Files for Elven Warrior Addition-->
		<Include type="all" source="DATA:SampleMod/Data/SampleUpdatedWeapons.xml" />
		<Include type="all" source="DATA:SampleMod/Data/SampleUpdatedArmor.xml" />
		<Include type="all" source="DATA:SampleMod/Data/SampleUpdatedLogicCommand.xml" />
		<Include type="all" source="DATA:SampleMod/Data/SampleUpdatedLogicCommandSet.xml" />	
		<Include type="all" source="DATA:SampleMod/Data/GDIElfWarrior.xml"/>

3) Add between Includes tags:
(Preferably after
Include type="reference" source="DATA:static.xml"
Include type="reference" source="DATA:global.xml")

<Include type="all" source="DATA:FirstMod/Data/GDIRifleSoldier"/>
<Include type="all" source="DATA:FirstMod/Data/GDIRifleSoldierSquad"/>

4) Notice the important changes:

<Include type="all" source="DATA:FirstMod/Data/GDIRifleSoldier.xml"/>
<Include type="all" source="DATA:FirstMod/Data/GDIRifleSoldierSquad.xml"/>


In SampleMod mod folder, the basic infantry unit, Elf Warrior, has a different file path:

<Include type="all" source="DATA:SampleMod/Data/GDIElfWarrior.xml"/>


So FirstMod/SampleMod depends on the folder name of your mod!

Also note: white spaces (breaks between lines and before tags) and lower-case letters inside .xml files don't affect the mod functionality in any way (but avoid the file name with white spaces, e.g. Riflemen Squad.xml, instead use e.g. RiflemenSquad.xml).

5) Save the file.

IV) Creating the mod.
1. Return to MOD SDK main directory

2. Run ealamodstudio.exe (RA3 icon)

1) Below Mod Build in the upper left corner there's a field to choose the mod you want to create
2) select FirstMod
3) click Build Mod
4) wait until the build process ends, you should see:
Build Completed

V) Testing of the mod.
1. If you have a localised version of your C&C3, e.g. Italian, German, etc. you need to go to My Documents folder, search for a folder called Command & Conquer 3 Tiberium Wars, then copy the folder called Mods (or just your mod folder inside it, in this case FirstMod) to a folder called e.g. C&C3 Tiberiumkriege or Command & Conquer 3 : Les Guerres du Tiberium (or any other localised folder of your game actually used by C&C3) or FirstMod folder to folder Mods inside it. If Mods folder doesn't exist there, create one.

Note: if you have a localised version of C&C3, you must remember about constant updating your mod folder, i.e. copying the mod folder from Command & Conquer 3 Tiberium Wars to your localised one!
Otherwise you won't see the updated version of your mod!

2. Run C&C3 control panel, choose Game Browser (or any localised one ;-P) button, then Mods tab, choose FirstMod and start & test it! ;-D
(Especially check GDI Riflemen Squad unit.)


great, now for ra3?

Reply Good karma Bad karma+2 votes
feillyne AuthorSubscriber

Soon. Off to post a beginner's guide how to add Tesla Tank in a few hours + how to add other things, taking Tesla Tank as an example. :-)

Reply Good karma+1 vote

or if you find the hooked on C&C tut then you coukld use the guardian

Reply Good karma Bad karma+2 votes
feillyne AuthorSubscriber

Well, many people start a mod from adding Tesla Tank. :-D That's why I'd rather use it as an example. ;-)

Reply Good karma+1 vote

When is this one coming out?
Hooked on CnC is broken...

Reply Good karma Bad karma+2 votes
feillyne AuthorSubscriber

Not soon, I fear... but I'll try to make one. You can use these C&C3 tutorials to learn how to mod RA3.

To be sincere, I didn't read any C&C3 tutorials for coding... I've learnt it from reading RA3 tuts. O.o

Reply Good karma+1 vote

i copied this exactly then go to test it and evrything is exactly the same no chages the the riflemansquad :(

Reply Good karma Bad karma+2 votes

You are a saint!

... Even though... You just put elves in CnC3? But good tutorial. xD

Bookmarked for when I can use it.

Reply Good karma Bad karma+2 votes
feillyne AuthorSubscriber

No, EALA put them in SampleMod. ^^ Files Mod.xml and mod.str are copied from their mod containing ├ťberwarrior Elf (from BFME2).

Reply Good karma+1 vote
Ferkhat Creator

This is very nice of you to post. Thanks!

Reply Good karma+2 votes
feillyne AuthorSubscriber


The second one is here:

I forgot to link it properly to groups (that's why there was no new update for them). = /

Reply Good karma+1 vote
ruby92 Creator

wow.. complex.. but useful XD

Reply Good karma+2 votes
n5p29 Creator

CNC3 SDK mod compiler is little more confusing rather than RA3 mod compiler because it still uses command prompt interface. also CNC3 mod compiler have several bugs/errors on it.

I suggest you to use codecat's enhanced buildmod.bat
you can read more info here:

Reply Good karma+2 votes

The GUI from the RA3 SDK is included in my extra files. So, there is no need of a batch file anymore. :P

Reply Good karma Bad karma+2 votes
feillyne AuthorSubscriber


"Run ealamodstudio.exe (RA3 icon)" = P

Bibber, thanks for such awesome extras. :-)

Reply Good karma+1 vote
BigCheese256 Creator

Wow thanks this should really help me. :D

Reply Good karma+2 votes
feillyne AuthorSubscriber

I hope so. ;-P ;-D

Reply Good karma+1 vote

im having trouble updated the main menu.

all I want to do is replace OR add in a edited background image like Tiberium Essence mod. D: !

HELP lol, thanks for this tutorial though.

Reply Good karma Bad karma+2 votes

i dont hav ealamodstudio.exe form the download

Reply Good karma Bad karma+2 votes

i followed this perfectly but my mod doesnt do antything when i test it
i think there might be somthin wrong with the binaryassetbuilder..:(

Reply Good karma Bad karma+2 votes

how to use mods as tibarium essence, talon mod
pls help when i patch my game with patch 1.9
and chose a mod by game browser in mod
error '
pls insert the original CD \DVD
pls help

Reply Good karma Bad karma+2 votes

maybe a cd crack?
not quite sure of ur problem but if its wants a cd then get a cd crack

Reply Good karma Bad karma+1 vote

To fix this, uninstall all MOD and the original game.
Then re-install the C&C3; game and Patch it (get 1.9 patch before installin the MOD's).
I know this because it happend to me the first time I got a MOD.

Reply Good karma Bad karma+1 vote

give to us homework!

Reply Good karma Bad karma+1 vote

I have the new windows i7 and I am having trouble finding the sample mods. I have never moded before

Reply Good karma Bad karma+1 vote

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


i cant find the ealamodstudio.exe!!Where is it????

Reply Good karma Bad karma+1 vote

For ealamodstudio.exe: You need to download "C&C3 Mod SDK Expansion" from Bibber's Website and extract to the mod SDK folder. (Apparently "C&C3 Extras" got either removed or renamed, I'm not sure.)

Reply Good karma Bad karma+1 vote

How do I create .BIG files, as my current program (provided by CnCLabs) doesn't work.

Reply Good karma Bad karma+1 vote

How do I make the HUD custom for each of my 6 faction.
I use .XML/.HTML/.CSS as they are readable to me.
I want to do this in 100% code as using any sort of MOD creating software, just crashes.
Is it posible to do in just code.
I can use the following file types: .CSS .HTML .XML .PNG .JPEG .TGA .MAX* (*only with a given template as I can't use the program easily)
I have Notepad ++, so if there is a way to get a plugin so I can manually code .MAX files for 3DSMax that would be appritiated.

Reply Good karma Bad karma+1 vote

What to do if the C & C3 Mod SDK does not see my steam version of the game?

Reply Good karma Bad karma+1 vote

I need help, for some reason I can't open the mod.str file.

Reply Good karma Bad karma+1 vote

hello... i know this game are not more suported for the mods comunity because the c&c 4 its here, but i wanna create my own mod for me and my friends but: "Download additional tools, i.e. C&C3; Extras" the link below that is broken so can anyone give me the additional tools? tanks for read and sorry for my horrible english

Reply Good karma Bad karma+1 vote

Hello, i can't find the ealamodstudio.exe also the link for the extras is not working is there any other link or wedsite i can download these two?

Reply Good karma Bad karma+1 vote

I opened the str file with notepad.

Reply Good karma Bad karma+1 vote

I found the ealamodstudio.exe and the extras in the CnClabs

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.

Open to all members
Send Message
Join group
Group watch
Start tracking
Related Games
C&C3: Tiberium Wars
C&C3: Tiberium Wars Real Time Strategy
Related Engines
SAGE (Strategy Action Game Engine)
SAGE (Strategy Action Game Engine) Proprietary
Related Groups
C&C Paradise
C&C Paradise Fans & Clans with 1,526 members
C&C Society
C&C Society Web & Community with 223 members
Electronic Arts
Electronic Arts Developer & Publisher with 8 members
SAGE 2D & 3D fans
SAGE 2D & 3D fans Fans & Clans with 1,350 members