Why's Guide to Duplicating ALE Effects
-
I made this post some time ago, but seeing as everyone is getting tutorial happy I figure I may as well put this in its own thread for easy findage.
Why’s Guide to Duplicating Effects!
Duplicating effects is one of the most important things an effects modder needs to do as it is always the first step to creating a separate, new ALE. It took me a long while to figure out the full process, but I know it now, and here goes.
First off, pick your effect. For this tutorial I will use the ku_missile02_drive.
First things first, extract the ku_missile02.ale from FX. ALE files actually tend to contain multiple effects, so you will typically not find exactly the effect name you are looking for, but something very close.
With the ALE extracted, you now have two files. The ANL, and AEL. The AEL is your structure file. This defines what your components are, and their orders. I recommend you do not touch these numbers, as it is very easy to screw the entire effect up. What we are interested in though is duplicating the effect. You can mess around all you want later. For my example, I am going to make an effect called gf_supermissile02_drive.
Open up the AEL first. Simplest way, replace (Ctrl-H in Notepad) all references of ku_missile02 with gf_supermissile02_drive. Here’s an example of a couple lines.
Type = Layer0
[Section]
; ==> 1Effect_Name = ku_missile02_drive
ULParams = 0, 0, 1
; *** Param #1
ANL_Nickname = Main_Node ; 0xEE223B51 3995220817
Parent = NULL
FX_Slot = 1
Slot_Flag = 0
; *** Param #2
ANL_Nickname = ku_missile02_drivethrust#1 ; 0xFF03EA94 4278446740
Parent = NULL
FX_Slot = 3
Slot_Flag = 0And here is after.
Type = Layer0
[Section]
; ==> 1Effect_Name = gf_supermissile02_drive
ULParams = 0, 0, 1
; *** Param #1
ANL_Nickname = Main_Node ; 0xEE223B51 3995220817
Parent = NULL
FX_Slot = 1
Slot_Flag = 0
; *** Param #2
ANL_Nickname = gf_supermissile02_drivethrust#1 ; 0xFF03EA94 4278446740
Parent = NULL
FX_Slot = 3
Slot_Flag = 0Simple enough. Now do the same for the ANL. Simply replace all references to ku_missile02 with gf_supermissile02.
Pack up the files using hte ALE editor to create your TALE. Simply rename this to ALE and you are good to go. Plop your ALE into whatever relevant folder, in my case, this would be the DATA\FX\WEAPONS folder.
Not done yet! You have an ALE and effect, but the game does not know how to use it. So open up the relevant folder’s ini. In my case, this would be DATA\FX\WEAPONS\weapons_ale.ini. In this file is a list of all effects and their associated ALEs. Since I copied the ku_missile02_drive, I will find the entry for ku_missile02_drive, and duplicate it.
[VisEffect]
nickname = ku_missile02_drive
alchemy = fx\weapons\ku_missile02.ale
effect_crc = 81439903
textures = fx\smoke.txm
textures = fx\planetflare.txm
textures = fx\sarma.txmAnd this then becomes…
[VisEffect]
nickname = gf_supermissile02_drive
alchemy = fx\weapons\gf_supermissile02.ale
effect_crc = 3980468032
textures = fx\smoke.txm
textures = fx\planetflare.txm
textures = fx\sarma.txmDO NOT FORGET THE EFFECT CRC. This is extremely important and easy to miss. Using the CRC and Hash code generator that you can find on Digital Brilliance, you must generate a CRC value for your effect. Copy and paste the name of your effect, not ALE, into the CRC generator. Then copy and paste the second value that appears in either the Unsigned CRC (highlighted in red) fields.
Ok, so now we have a visible effect. The game still doesn’t know how to use it yet though. Now we need to go the general effects.ini which is found in DATA\FX\effects.ini. As before, I find the entry of the effect I duplicated and then copy and paste it, then change the name to match my stuff.
[Effect]
nickname = ku_missile02_drive
effect_type = EFT_MISSILE_DRIVE
vis_effect = ku_missile02_drive
vis_generic = min_missile01_driveBecomes…
[Effect]
nickname = gf_supermissile02_drive
effect_type = EFT_MISSILE_DRIVE
vis_effect = gf_supermissile02_drive
vis_generic = min_missile01_driveAnd that should be all. From there, Freelancer should recognize your newly duplicated effect. Use the effect on whatever you need it to by calling it like you would any other effect.
-
I’d only like to make a specific remark, which you pointed out well already: please use Lancer Solurus’ CRC and Hash code generator! The older ones, such as the CRC Calc, are case insensitive, which means anytime you use a capital in a name the CRC will NOT match!
In any case, excellent tutorial Why
-
Good info, Why485
But… Uhhh… Nothing like confusing the unwary, is there…
Just to clarify, where did you get this…
[VisEffect]
nickname = gf_supermissile02_drive
alchemy = fx\weapons\gf_supermissile02.ale
effect_crc = 3980468032???
The CRC code (CRC Tool calls it UTF ID) for gf_supermissile02_drive is 4044587318
(I know the answer but please explain it yourself so others don’t get confused)
And…
Using Lancer’s tool, the unsigned CRC and unsigned Hash codes do NOT change with lower/upper case inputs, only the SIGNED ones change with case. Try it.
SO - which of the four codes should you use?
{Heheheheheh… sort THAT one out!}
-
Try yourself and see which one CTDs? ::)
-
Well done bud.