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.

Report article RSS Feed [C&C3] Beginning modder's guide (coding)

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

Posted by feillyne on Dec 16th, 2009
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 http://www.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

html4strict code:
(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

html4strict code:
    <!--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")

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

4) Notice the important changes:

html4strict code:
<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:

html4strict code:
<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
TotalSnappy
TotalSnappy Dec 16 2009, 1:56pm says:

great, now for ra3?

+2 votes     reply to comment
feillyne
feillyne Dec 16 2009, 1:59pm replied:

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

+1 vote     reply to comment
TotalSnappy
TotalSnappy Dec 16 2009, 2:08pm replied:

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

+2 votes     reply to comment
feillyne
feillyne Dec 16 2009, 2:51pm replied:

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

+1 vote     reply to comment
Jason_Zombolt
Jason_Zombolt Dec 31 2009, 4:38pm replied:

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

+2 votes     reply to comment
feillyne
feillyne Jan 3 2010, 4:58pm replied:

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

+1 vote     reply to comment
sam_23694
sam_23694 Jul 17 2010, 1:22am replied:

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

+2 votes     reply to comment
Elementalist
Elementalist Dec 16 2009, 2:00pm says:

You are a saint!

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

Bookmarked for when I can use it.

+2 votes     reply to comment
feillyne
feillyne Dec 16 2009, 2:56pm replied:

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

+1 vote     reply to comment
Ferkhat
Ferkhat Dec 16 2009, 4:32pm says:

This is very nice of you to post. Thanks!

+2 votes     reply to comment
feillyne
feillyne Dec 18 2009, 12:38pm replied:

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). = /

+1 vote     reply to comment
ruby92
ruby92 Dec 17 2009, 12:30am says:

wow.. complex.. but useful XD

+2 votes     reply to comment
n5p29
n5p29 Dec 17 2009, 1:05am says:

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

+2 votes     reply to comment
Bibber
Bibber Dec 17 2009, 7:30am replied:

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

+2 votes     reply to comment
feillyne
feillyne Dec 18 2009, 12:29pm replied:

Yep.

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

Bibber, thanks for such awesome extras. :-)

+1 vote     reply to comment
BigCheese256
BigCheese256 Dec 17 2009, 1:22pm says:

Wow thanks this should really help me. :D

+2 votes     reply to comment
feillyne
feillyne Dec 18 2009, 12:29pm replied:

I hope so. ;-P ;-D

+1 vote     reply to comment
Tehkrad
Tehkrad Feb 11 2010, 8:00pm says:

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.

+2 votes     reply to comment
sam_23694
sam_23694 May 8 2010, 6:46am says:

i dont hav ealamodstudio.exe form the download

+2 votes     reply to comment
sam_23694
sam_23694 May 21 2010, 8:50am says:

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

+2 votes     reply to comment
moinhusain
moinhusain May 28 2010, 7:30am says:

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

+2 votes     reply to comment
sam_23694
sam_23694 Jun 16 2010, 6:27am replied:

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

+1 vote     reply to comment
EITY10
EITY10 Jul 3 2011, 1:35pm says:

give to us homework!

+1 vote     reply to comment
smoking
smoking Jan 4 2012, 2:34pm says:

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

+1 vote     reply to comment
Guest
Guest Nov 21 2012, 9:32am says:

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

s963406
s963406 Mar 9 2013, 5:02pm says:

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

+1 vote     reply to comment
magachs
magachs Nov 4 2013, 6:52pm says:

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

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
C&C3: Tiberium Wars
Platforms
Windows, Mac
Developer & Publisher
Electronic Arts
Contact
Send Message
Official Page
Commandandconquer.com
Release Date
Released Mar 27, 2007
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
C&C3: Tiberium Wars
C&C3: Tiberium Wars Single & Multiplayer Real Time Strategy
Related Engines
SAGE (Strategy Action Game Engine)
SAGE (Strategy Action Game Engine) Proprietary Released Jun 14, 2001
Related Groups
C&C Paradise
C&C Paradise Fans & Clans group with 1,454 members
C&C Society
C&C Society Web & Community group with 211 members
Electronic Arts
Electronic Arts Developer & Publisher
SAGE 2D & 3D fans
SAGE 2D & 3D fans Fans & Clans group with 1,334 members