Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

[Tool] LOL Decoder - For decompiling LOL script files

The 2016 reincarnation of Carmageddon! Thanks, SCi!
Post Reply
User avatar
Trent
mindless
Posts: 3269
Joined: Wed Apr 05, 2000 9:08 am
Contact:

[Tool] LOL Decoder - For decompiling LOL script files

Post by Trent »

(update 26th June 2014)
LOL Decoder v1.50

Here is a small but important update: http://trent.incarnated.co.uk/downloads/LOLDecorder-v1.5.rar

This fixes the problem with it using , as the decimal point marker if you're in a country which doesn't use . for the decimal point. Now everyone should be able to decompile LOL files without it breaking the whole script because of misplaced commas.

Previous update 8th April 2014


Spoiler:


LOL Decoder v1.45

Small update to LOL Decoder, fixing the problem with new lines being incompatible with notepad and a performance issue which was making large LOL files take bloody ages to decompile (thanks Errol for tracking that down!)


Get LOLDecoder v1.45 here: http://trent.incarnated.co.uk/downloads/LOLDecoderv1.45.rar


I still haven't implemented the Local Variable guessing yet, that will hopefully come in v1.5



a.k.a. Brent
User avatar
Trent
mindless
Posts: 3269
Joined: Wed Apr 05, 2000 9:08 am
Contact:

[Tool] LOL Decoder - For decompiling LOL script files

Post by Trent »

Bump for the update above ^
a.k.a. Brent
User avatar
TheCarsThatAteParis
pedestrian
Posts: 14
Joined: Fri May 15, 2015 7:39 pm

[Tool] LOL Decoder - For decompiling LOL script files

Post by TheCarsThatAteParis »

Hi Trent,

Thanks for the excellent tool! :D

After decoding the .lol and editing (Notepad ++ is my preference), can it just be put back in the .ZAD or does it need to be re-encoded somehow? Just thought I'd ask before I do something silly that requires a reinstall....
User avatar
Trent
mindless
Posts: 3269
Joined: Wed Apr 05, 2000 9:08 am
Contact:

[Tool] LOL Decoder - For decompiling LOL script files

Post by Trent »

You don't need to recompile it, but you shouldn't alter the original ZAD files. Instead you should create a new ZAD file to put your modified files in. The game loads ZAD files alphabetically so if you make a ZAD called something like zmod_MyScripts.zad to put your modified scripts in, the game will load those scripts instead of the original ones in Scripts.zad.

You don't have to pack files up to test your modes though. If you have extracted all the data with ZADFucker then if you rename the ZAD folder (e.g. to ZAD_backup) the game will use the extracted data instead.
a.k.a. Brent
User avatar
KakkaHousu
speed freak
Posts: 566
Joined: Fri Nov 15, 2013 5:53 pm

[Tool] LOL Decoder - For decompiling LOL script files

Post by KakkaHousu »

Why LOL files are compiled at all? If decoded files work, why Stainless compiled they? They don't want prevent modding, so I don't understand.
User avatar
Trent
mindless
Posts: 3269
Joined: Wed Apr 05, 2000 9:08 am
Contact:

[Tool] LOL Decoder - For decompiling LOL script files

Post by Trent »

Because compiled bytecode loads faster than raw text scripts which need to be read, interpreted and compiled into bytecode at load time.
a.k.a. Brent
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

[Tool] LOL Decoder - For decompiling LOL script files

Post by starbuck »

Just tried using it today because I am "unzipping" everything to get a look at the files structure etc.

Dragging and dropping showed it worked in the DOS screen but no TXT files showed up in the folders.

Tried in command line to and the DOS window said it decoded it to TXT and nothing happened. Even was running a file change program under the directories and nothing at all changed or was added.

I was running the precompiled executable.

Tried it on vehicle_setup and Annihilator_layout.lol for the Annihilator and it said expects byte 6 to be 95 or 0.

same folder setup.lol and vfx_anchors.lol it said 1 decoded but nothing found.
User avatar
Trent
mindless
Posts: 3269
Joined: Wed Apr 05, 2000 9:08 am
Contact:

[Tool] LOL Decoder - For decompiling LOL script files

Post by Trent »

The tool doesn't make a text file, it replaces the compiled script you dropped onto LOLDecoder with the decompiled script which you can edit in a text editor. That way you don't need to bugger around renaming or moving files around, you just run the script through LOLDecoder from it's place in the unzadded file structure and the game will load the decompiled script with no fuss.
a.k.a. Brent
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

[Tool] LOL Decoder - For decompiling LOL script files

Post by starbuck »

I knew you would reply quick :)

I saw the words "As if by magic they will all be converted to text!" so I assumed TXT files. I am so screwy sometimes I didnt even think of just opening them in notepad.

I just saw your post and tested two of them of course it worked perfectly.

Thanks.
User avatar
MrDeviance
turbo bastard
Posts: 419
Joined: Wed May 28, 2014 7:30 pm

[Tool] LOL Decoder - For decompiling LOL script files

Post by MrDeviance »

Trent, version v1.50 link doesn't work and the link on your site is for an older version.
User avatar
Trent
mindless
Posts: 3269
Joined: Wed Apr 05, 2000 9:08 am
Contact:

[Tool] LOL Decoder - For decompiling LOL script files

Post by Trent »

Just use Minge, you can one click decompile all the lol scripts in Data_Core with it.
a.k.a. Brent
Post Reply

Check who’s online

Users browsing this forum: No registered users and 186 guests