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.

Report article RSS Feed RA3 Starters Guide Pt2

Continuing the Hooked on CnC Tutorial for RA3, We take a few more steps on making your unit yours Tutorial originally Posted by Jackal16, Tutorial written by EvilConker. *Warning! This Tutorial is outdated. Sorry.

Posted by Jason_Zombolt on Jun 11th, 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.


How to change unit icons
Ohai.
So, this, is, the, cameo tutorial. Cameos, in case you didn’t know, are those images that you use for the icons of units, so
when you train something at a building, or build a building, you know what you’re training. So as you see, this is very important
for new units, or editing existing ones. So, today we’re going to edit the cameo for a new unit, lets take that mytank one.
Currently, here’s it’s main settings:

xml code:
<GameObject
id=”mytank”
inheritFrom=”BaseVehicle”
SelectPortrait=”Portrait_AlliedAntiVehicleVehicleTech1″ !
ButtonImage=”Button_AlliedAntiVehicleVehicleTech1_on” !
Side=”Allies”
SubGroupPriority=”425″
EditorSorting=”UNIT”
HealthBoxHeightOffset=”25″
BuildTime=”10″
CommandSet=”mytankCommandSet”
KindOf=”SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS SCORE VEHICLE CAN_BE_FAVORITE_UNIT T2_UNIT”
WeaponCategory=”CANNON”
VoicePriority=”188″
EditorName=”mytank”
Description=”Desc:mytank”
TypeDescription=”Type:mytank”
UnitIntro=”Allied_GuardianTank_UnitIntro”>
<DisplayName
xai:joinAction=”Replace” xmlns:xai=”uri:ea.com:eala:asset:instance”>Name:mytank</DisplayName>

 

The two things that will change our cameos is the two areas:

xml code:
SelectPortrait=”Portrait_AlliedAntiVehicleVehicleTech1″
ButtonImage=”Button_AlliedAntiVehicleVehicleTech1_on”
 

Now, we just change both the things in the quotations to: “Portrait_mytank” Of course, the script asks for a button and a portrait,
and yes, you could do two different images, but for the sake of basics, we’ll make both the same portrait.

Now, close it, and we’re going to our images folder in: C:\RA3 MOD SDK\Art\images
If you see the harbringer portraits, you got the right place. Now, we’re going to copy the .xml which is SampleUpdatedPackedImages, lets
just call it SampleUpdatedPackedImages 2, now, open it up, and delete everything untill you got something that looks like this:

xml code:
<?xml version=’1.0′ encoding=’UTF-8′?>
<AssetDeclaration xmlns=”uri:ea.com:eala:asset” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

<Texture id=”Portrait_AlliedHarbingerGunship” File=”Portrait_AlliedHarbingerGunship.tga” OutputFormat=”A8R8G8B8″ GenerateMipMaps=”false” AllowAutomaticResize=”false”/>

<PackedTextureImage id=”Portrait_AlliedHarbingerGunship” Texture=”Portrait_AlliedHarbingerGunship” Rotated=”false”>
<Dimensions x=”128″ y=”128″/>
<Coords x=”0″ y=”0″/>
<TextureDimensions x=”128″ y=”128″/>
</PackedTextureImage>

</AssetDeclaration>
 

Ok, now, what we do is that we change every instance that says “Portrait_AlliedHarbringerGunship” to “Portrait_mytank” There are 4.

Once you’ve done all that, save and quit the .xml. Now, what we need to do, is actually make the portrait. Use your favorite drawing
program that can make tga’s (I made my picture in flash, then copied it over to gimp) but the important thing is THAT YOU NAME IT”Portrait_mytank” and you MUST save it in the images folder alongside the portrait for the allied harbringer.

Note: The dimensions are optimal at 128 X 128 or 76 X 106, in reality, it’s going to get resized anyway, but, I did it like that.

Now let me just explain what we just did, any new cameo assets MUST be taken in through the SampleUpdatedPackedImages, or else, they won’t be used.

Ok, one final step left here, go to your mod.xml, and at the bottom, before the /assetdeclaration tag, put this:

xml code:
<!– New sample portrait –>
<Include type=”all” source=”ART:Images/SampleUpdatedPackedImages2.xml” />
 

Now, build your mod, and enjoy, if it’s not working, go check your names, they must all be EXACTLY the same.


How to edit sounds
Ohai again, and welcome to the second tutorial I (EvilConker) am making for this fine site right here. Ok, so, today, we’re going to be changing unit
sounds (oh boy!) This is helpfull, if you want to make a unit, but don’t want to re-use any sound banks. Just a note, sound bank is a term for a unit’s sounds
and voices. Ok, we’re going to be using our new unit, mytank, that Jackal and Overmind helped you make in the last couple of tuturiols (see: Modding your first unit)

Now, what we do, is that we open up mytank.xml (or whatever you named it) and we’re going to go to the deep bottom of the file, you should see something
like this at the last lines of the file:

xml code:
<AudioArrayVoice>
<AudioEntry Sound=”ALL_Guardian_VoiceAttack” AudioType=”voiceAttack” />
<AudioEntry Sound=”ALL_Guardian_VoiceCreate” AudioType=”voiceCreated” />
<AudioEntry Sound=”ALL_Guardian_VoiceMoveAttack” AudioType=”voiceAttackAfterMoving” />
<AudioEntry Sound=”ALL_Guardian_VoiceMove” AudioType=”voiceMove” />
<AudioEntry Sound=”ALL_Guardian_VoiceRetreat” AudioType=”voiceRetreatToCastle” />
<AudioEntry Sound=”ALL_Guardian_VoiceSelectMS” AudioType=”voiceSelect” />
<AudioEntry Sound=”ALL_Guardian_VoiceSelectBattleMS” AudioType=”voiceSelectBattle” />
<AudioEntry Sound=”ALL_Guardian_VoiceSelectBattleMS” AudioType=”voiceSelectUnderFire” />
</AudioArrayVoice>
 

If you can’t find it, search for “AudioArrayVoice.”
Now we’re going to need to change all of these names, they just point to what MP3’s we want to use for the voices in SoundEffects.xml which we’ll get
to in a moment.

So, change all the things that say Gaurdian, to mytank, leave all the ALL’s and anything that comes after the mytank. So, it should look like this:

xml code:
<AudioArrayVoice>
<AudioEntry Sound=”ALL_mytank_VoiceAttack” AudioType=”voiceAttack” />
<AudioEntry Sound=”ALL_mytank_VoiceCreate” AudioType=”voiceCreated” />
<AudioEntry Sound=”ALL_mytank_VoiceMoveAttack” AudioType=”voiceAttackAfterMoving” />
<AudioEntry Sound=”ALL_mytank_VoiceMove” AudioType=”voiceMove” />
<AudioEntry Sound=”ALL_mytank_VoiceRetreat” AudioType=”voiceRetreatToCastle” />
<AudioEntry Sound=”ALL_mytank_VoiceSelectMS” AudioType=”voiceSelect” />
<AudioEntry Sound=”ALL_mytank_VoiceSelectBattleMS” AudioType=”voiceSelectBattle” />
<AudioEntry Sound=”ALL_mytank_VoiceSelectBattleMS” AudioType=”voiceSelectUnderFire” />
</AudioArrayVoice>
 

Ok, we’re done here, close, and go to the sample mod, here you’ll find a number of xml’s, we need the one called “SoundEffects.xml” Copy it, and bring it to
your mod’s folder.

So, I assume now that you have it open, so, you should see a ton of random stuff, DON’T DELETE ANYTHING I DON’T TELL YOU TO.

Delete everything from:

xml code:
<!– === ALLIED GUNSHIP HARBINGERGUNSHIP HARBINGER GUNSHIP EP1 === –>
 

To

xml code:
<!– ========================== ALLIED HARBINGER GUNSHIP HARBINGERGUNSHIP GUN SHIP EP1 ========================== –>
 

Because those are all for sound effects, which I’m assuming you don’t have. We’re focusing on voices here, but sound effects work almost exactly the same way.
So what we do is that we’re going to look at the first block:

xml code:
<AudioEvent id=”ALL_HarbingerGunship_VoiceAttack”
inheritFrom=”AudioEvent:BaseUnitResponse”
Volume = “110″ <— how high the voice goes, sometimes you have a low sound, and you need it to be more hearable.
MinVolume = “105″ <— If you noticed, when you scroll away from a unit, they’re voice gets quiter, this determines how quiet they can go.
Priority = “HIGH” <— Don’t touch this
Type = “WORLD PLAYER VOICE” <— Don’t touch this
SubmixSlider = “VOICE” > <— Don’t touch this
<PitchShift Low=”-1″ High=”1″ /> <— Don’t touch this
<!– EP1 –>
<Sound>AUHarbi_voiAttacka</Sound> <—jackpot
<Sound>AUHarbi_voiAttackb</Sound>
<Sound>AUHarbi_voiAttackc</Sound>
<Sound>AUHarbi_voiAttackd</Sound>
<Sound>AUHarbi_voiAttacke</Sound>
<Sound>AUHarbi_voiAttackf</Sound>
</AudioEvent>

 

This is the voice bank for the unit’s attack voice, when you tell it to go destroy something.
Now, what we’re going to first, change the name of the sound bank, just remove the Harbringer part, and replace it with “mytank” so it should read:

xml code:
<AudioEvent id=”ALL_mytank_VoiceAttack”
 

So, now we have a list of random text that has labeled around them.
Their names only hold organizational value, but, just to be organized, change the “AUHarbi” to “AUmyta” On each one, so you should now have a list of files saying:

xml code:
<Sound>AUmyta_voiAttacka</Sound>
<Sound>AUmyta_voiAttackb</Sound>
<Sound>AUmyta_voiAttackc</Sound>
<Sound>AUmyta_voiAttackd</Sound>
<Sound>AUmyta_voiAttacke</Sound>
<Sound>AUmyta_voiAttackf</Sound>
 

These tell the game which sounds it can randomly pick from when your clicking on a unit (since we’ve evolved since the 1990’s, units won’t say the same thing twice,) you can have more or less then the ones given.

So now you’re going to actually make the sounds, for skimming it purposes, unless you’re going to use them, delete every other little box of text under this one
but be carefull not to delete or bad things will happen.

Now, you have to make a bunch of Wav’s of your unit talking, a wav is just a sound file, most voice recording and sound recording programs can make them, while naming your files
I need to bring your attention to the last part of those names we just edited.

xml code:
<Sound>AUmyta_voiAttacka</Sound>
 

See where it says voiAttacka? Well, that last letter, as you might know, isn’t the last word in Attack, it’s the first letter in the alphabet, see how the
next one has a random b at the end of voiAttack, so the next one’s voiAttackb? Well, in case you didn’t notice what I’m getting at, it’s organized
so that each file has a different letter in the alphabet, this has numerous advantages, such as the fact that it keeps all your sound files in one place.

So I suggest you do it.

Anyways, back to making those unit sounds, so make some wavs of your unit saying stuff, and BE SURE TO SAVE THEM AT THIS ADRESS:

Your wrote:C:\RA3 MOD SDK\audio\Sounds

This points to your sound folder that’s in the audio folder that’s right under the art folder in the main MOD SDK folder.
THIS IS WHERE ALL YOUR SOUNDS SHOULD BE.
The harbringer probably has a couple there already, as they came with the mod sdk.

So, where were we?
Oh yes, so now that you have files labeled “AUmytan_voiAttack” with the last letter going from a-f, go to your audio folder in the main Mod SDK folder.

Here you’ll find two folder’s named ModkitMP3Examples, and Sound, which is where our unit speeches are located, you’ll also find a file called AudioAssets.
This is the file we’re looking for, now, we need to copy it, and name it “AudioAssets2″ Open it up, delete everything from:

xml code:
<?xml version=”1.0″ encoding=”utf-8″?>
<AssetDeclaration xmlns=”uri:ea.com:eala:asset” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<Tags />
<Includes>
</Includes>
 

to

xml code:
</AssetDeclaration>

 

BUT DO NOT DELETE THOSE.
Ok, now just paste this in the middle:

xml code:
<AudioFile id=”AUmyta_voiAttacka” File=”AUDIO:sounds\AUmyra_voiAttacka.wav” GUIPreset=”Default” />

<AudioFile id=”AUmyta_voiAttackb” File=”AUDIO:sounds\AUmyra_voiAttackb.wav” GUIPreset=”Default” />

<AudioFile id=”AUmyta_voiAttackc” File=”AUDIO:sounds\AUmyra_voiAttackc.wav” GUIPreset=”Default” />

<AudioFile id=”AUmyta_voiAttackd” File=”AUDIO:sounds\AUmyra_voiAttackd.wav” GUIPreset=”Default” />

<AudioFile id=”AUmyta_voiAttacke” File=”AUDIO:sounds\AUmyra_voiAttacke.wav” GUIPreset=”Default” />

<AudioFile id=”AUmyta_voiAttackf” File=”AUDIO:sounds\AUmyra_voiAttackf.wav” GUIPreset=”Default” />
 

Now, let me explain what these peices of codes are, I’ll break it down.

xml code:
<AudioFile id=”AUmyta_voiAttacka” - This is it’s ID, and you must call it that whenever you want to use this file.

File=”AUDIO:sounds\AUmyra_voiAttacka.wav” - This is the adress for the file, if you note, whenever we’re talking about a main SDK file, such as audio or sage, we just say it’s name in caps, and put: and then we say the rest of the adress.

GUIPreset=”Default” - I don’t honestly know, but, just don’t touch it, EVER.
 

So, now that we’re done here, lets GTFO the file, and go to mod.xml in our mod’s file.
And at the end of it, but not before AssetDeclaration , past this in:

xml code:
<!– Sounds for the Mytank –>
<Include type=”all” source=”DATA:<your mod name here>/Data/SoundEffects.xml” />
<Include type=”all” source=”AUDIO:AudioAssets2.xml” />
 

Then build, and we’re done.
If it doesn’t work, remember, you have to rewrite every quotation mark you copy from here.


Sorry for the long time between tut post, as I was learning myself. I'll have more sooner than last time. And Remember, Have Fun, and Happy Modding!

Post comment Comments
skyteks
skyteks Jul 24 2012, 7:21am says:

hey i have a question, you have ot sayd where i copy the SampleUpdatedPackedImages2.xml and the AudioAssets2.xml in,
in the folders with the originals or in the data folder of my mod ?

+1 vote     reply to comment
skyteks
skyteks Jul 24 2012, 7:57am says:

When i build mod it comes this:
[00:00:02.8681641] Critical: Attempted to commit non-existing asset AudioFile:AUmyta_voiAttacka [166b084d:118569ee]
I checked sound data names: corekt
I checked position in Audio/Sounds folder: corekt
I checked kind of data (.wav): corekt
I tested other sound: same ERROR
?_WHY_?
pls. help me.

+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&C: Red Alert 3
Platforms
Windows, X360
Developer & Publisher
Electronic Arts
Contact
Send Message
Official Page
Commandandconquer.com
Release Date
Released Oct 27, 2008
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
C&C: Red Alert 3
C&C: Red Alert 3 Single, Multiplayer & Co-Op Real Time Strategy
Related Engines
SAGE (Strategy Action Game Engine)
SAGE (Strategy Action Game Engine) Proprietary Released Jun 14, 2001
Related Groups
Electronic Arts
Electronic Arts Developer & Publisher