ALE Editing 101

There is 1 reply in this Thread. The last Post () by mknote.

  • Heres what youll need:


    MS Paint (or something similar; this is to get an RGB value for a certain color)
    A hex editor (I use Xvi32)
    A float converter (I suggest this one)


    Im going to use the unused effect ku_tachyon_01.ale for this. Open up that ALE in the hex editor and dear lord, what a mess. The values were looking for are located on the line 32A; the exact values are (note I started midway through the line):


    2F 90 3E F2 F0 70 3F 95 94 14 3F 9F 9E 9E 3E 00 02


    The bold values the ones we are looking for. They are three separate numbers indicating RGB:


    F2 F0 70 3F (Red)
    95 94 14 3F (Green)
    9F 9E 9E 3E (Blue)


    The numbers in the ALEs (and most everywhere in non-ini Freelancer files, for that matter) are, oddly, backwards. Lets plug in the numbers for red into our float converter.


    F2 F0 70 3F => 3F70F0F2 = 0.941177


    Multiply this decimal by 255 and youll get the value for red that you plug into MS Paint. Repeat for green and blue, and you should see the color that youd see ingame (or something close to it). Change it to another color (purple, lets say), and do the reverse process.


    219, 49, 238 = 3F 5B DA 51, 3E 44 D0 14, 3F 6E EC C0


    Which would be entered as:


    51 DA 5B 3F 14 D0 44 3E C0 EC 6E 3F


    This will change that part of effect to the desired color! You need to do this for all of the appearance parts of the ALE (such as ku_tachyon_01_flash.app, ku_tachyon_01_proj.app, etc.). I suggest using the colors that the ALE provides to modify your color accordingly (as thats difficult and vague, Ill be a bit more specific; if you used purple, as I did, you would slide the cursor in MS Paint over to purple while keeping the height the same as the original color; this produces a better effect). The section for colors always comes about 70-80 blocks after the weaponname.app appears, so use that to make it go faster.

    signew.jpg


    cfmoddblogo.png5904.png5904.png
    http://www.moddb.com/scripts/topsite.php?ts=4766


    Only dead fish swim with the stream.
    Don't discuss with idiots. They only drag you down to their level and then beat you with experience there.


    This is ten percent luck,
    Twenty percent skill,
    Fifteen percent concentrated power of will,
    Five percent pleasure,
    Fifty percent pain,
    And a hundred percent reason to remember the name!

  • Hmmm, looks familiar... :D


    Anyway, I'll go ahead and post part two of this, which is cloning ALEs.


    What you'll need:


    CRCCalc (which can be found in this pack)
    A hex editor (see above, I highly recommend XVI32)


    Open up your ALE in XVI32. Go to where it says ku_tachyon_Idontcarewhatfollows.app, and type what is there into CRCCalc. What we will use is the hex value (starts with 0x) of the text portion (upper left, in other words). Let's say it says this:


    0xAaBbCcDd


    Go into the editor and search for this value backwards, i.e.:


    Dd Cc Bb Aa


    If you get more than one result (unlikely), use the entry that's just after ku_tachyon_Idontcarewhatfollows (note that the .app part is not present). Now, go down to ku_tachyon_Idontcarewhatfollows.app and rename it, say, hi_tachyon_Idontcarewhatfollows.app (keep the same length, it makes it simplier). Don't use upper-case letters, they screw up CRCCalc and there's no reason to use them. Take the output (upper left again) and replace the entry you found in the ALE with the new number (again, backwards). Rinse and repeat for all .app entries (you could do it for the .emt entries, but there's no point).


    Well, that's taken care of. The final step is to get our new CRC for the ALE. Go up to the part with no suffex, and rename it (same length again). Put that into CRCCalc. The CRC it gives you (upper right) is unsigned, and we need it signed. Take the upper left value and put it into a row of zeros in the hex editor. If you're using XVI32, go to Tools/Data Inspector and get it up. What you need is the longint value; if that isn't there, go to Tools/Options/Data Inspector and click the checkbox next to longint. The number that shows up in the data inspector is the correct, signed CRC value for that particular part of the ALE. Put that into your .ini, repeat for all of the parts that need CRC values, and you're done.


    What does this do? It means that your new effect as well as the original effect will be able to be shown at the same time. As always, post questions if you have them.


    MK

    [GLOW=green]"If knowledge is power, then to be unknown is to be unconquerable." -Star Trek: Birth of the Federation[/GLOW]