March, 2047. A massive nuclear fireball explodes high in the night sky, marking the dramatic beginning to the Third Tiberium War. The infamous Kane has returned to lead the Brotherhood of Nod in a massive global assault on the Global Defense Initiative and the few remaining Blue zones left on the planet. Only you can stop him. The fate of humanity – and the planet – is in your hands.

Post tutorial Report RSS [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:
Files.ea.com
Cncmods.net (Source Cncmods.net)
And install them all. ;-)

3. Download additional tools, i.e. C&C3 Extras:
Bibber.bplaced.net
(Source Bibber.bplaced.net)
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.
5)
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
BuildCost="300"
to
BuildCost="50"
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
Personality:Mac
"Sample Modded AI"
END

3) Change
NAME:GDIElfWarrior
to
NAME:GDIRiflemanSquad
4) Change
"Elven Warrior"
to
"Cheap Riflemen Squad"

5) Change
TYPE:GDIElfWarrior
to
TYPE:GDIRiflemanSquad
6) Replace
"Super Advanced Infantry. Strong vs. Everything"
with
"Ultra cheap GDI infantry"

7) Change
DESC:GDIElfWarrior
to
DESC:GDIRiflemanSquad
8) Replace
"Abilities: \n »None"
With
"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"
and
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"/>

DATA:FirstMod/Data/GDIRifleSoldier.xml
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"/>

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)

3.
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.)

Post comment Comments
Elementalist
Elementalist - - 732 comments

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 Author
feillyne - - 5,816 comments

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
Ferkhat - - 1,116 comments

This is very nice of you to post. Thanks!

Reply Good karma Bad karma+2 votes
feillyne Author
feillyne - - 5,816 comments

Np.

The second one is here: Moddb.com

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

Reply Good karma+1 vote
ruby92
ruby92 - - 4,565 comments

wow.. complex.. but useful XD

Reply Good karma Bad karma+2 votes
n5p29
n5p29 - - 8,538 comments

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:
Forum.falloutstudios.net

Reply Good karma Bad karma+2 votes
Bibber
Bibber - - 260 comments

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 Author
feillyne - - 5,816 comments

Yep.

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

Bibber, thanks for such awesome extras. :-)

Reply Good karma+1 vote
BigCheese256
BigCheese256 - - 2,241 comments

Wow thanks this should really help me. :D

Reply Good karma Bad karma+2 votes
feillyne Author
feillyne - - 5,816 comments

I hope so. ;-P ;-D

Reply Good karma+1 vote
Tehkrad
Tehkrad - - 118 comments

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
sam_23694
sam_23694 - - 949 comments

i dont hav ealamodstudio.exe form the download

Reply Good karma Bad karma+2 votes
sam_23694
sam_23694 - - 949 comments

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
moinhusain
moinhusain - - 13 comments

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
sam_23694
sam_23694 - - 949 comments

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
GEN.ZOOL
GEN.ZOOL - - 946 comments

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
DukeOfJudea
DukeOfJudea - - 1,957 comments

give to us homework!

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

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
Guest
Guest - - 689,185 comments

I would like to modify more than one unit and build it in one mod.
How can I do that? I changed the mod.str but the compiler gave an error.
By the way I couldn't change the GDIFireHawk unit.
Can anybody help me?
Thx

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

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

Reply Good karma Bad karma+1 vote
Tomah_Errazurih
Tomah_Errazurih - - 239 comments

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
GEN.ZOOL
GEN.ZOOL - - 946 comments

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

Reply Good karma Bad karma+1 vote
GEN.ZOOL
GEN.ZOOL - - 946 comments

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
yur.rise1111
yur.rise1111 - - 4 comments

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
sevenman2345
sevenman2345 - - 8 comments

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

Reply Good karma Bad karma+1 vote
moizez102
moizez102 - - 4 comments

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
Steliosnev
Steliosnev - - 3 comments

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

Reply Good karma Bad karma+1 vote
Steliosnev
Steliosnev - - 3 comments

I opened the str file with notepad.

Reply Good karma Bad karma+1 vote
Steliosnev
Steliosnev - - 3 comments

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

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,185 comments

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

Guest
Guest - - 689,185 comments

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

lancerevo790
lancerevo790 - - 5 comments

/Guys if you are using EALA program to build MODS just check in 4 option boxes:
Build global data;
Build static data;
Copy additional files;
Create big and skudef files;

and after press create mod

P.S. don't forget to update mod version as you add additional changes....

!!!Never forget to add '.xml' to all files listed 'Include' in 'Mod.xml'!!!

Reply Good karma Bad karma+3 votes
lancerevo790
lancerevo790 - - 5 comments

thx for guide took me few hours to understand what i missed when creating mod...

Reply Good karma Bad karma+1 vote
DanielK00
DanielK00 - - 2 comments

For those who cant find ealamodstudio Cnclabs.com Install Modsdk Expansion from this link

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,185 comments

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

D32A
D32A - - 127 comments

NOT WORKING FOR ORIGIN AND WINDOWS Xp

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,185 comments

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

Guest
Guest - - 689,185 comments

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

Post a comment

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