Jump to content
shinyquagsire23

LOCO RF Unpacker Script

Recommended Posts

shinyquagsire23

Hi,

 

I wrote a Python2.7 script for unpacking te RFH/RFD files, I originally wrote https://github.com/shinyquagsire23/LEGO-LOCO-Decompression-Tool but that was an absolute hackjob apparently. Anyhow, the script seems to have no random issues with certain BMPs, audio, etc... everything unpacks perfectly. Script terminates with an error because I'm too lazy to add checks or whatever. No bitmap hackery is required, all files work.

 

https://gist.github.com/shinyquagsire23/20a86e65206ece28683a9b4c5597e172

Share this post


Link to post
Share on other sites
Tauka Usanake

I'm not familiar with Python. How do you run this? I've already tried running it in Windows through PowerShell and the system recognizes that it's a Python script so Python should be installed to some extent

Share this post


Link to post
Share on other sites
mumboking
4 hours ago, Tauka Usanake said:

I'm not familiar with Python. How do you run this? I've already tried running it in Windows through PowerShell and the system recognizes that it's a Python script so Python should be installed to some extent

Looks like you put it in the same folder as the RFH/RFD files then run it.
It won't work with Python 3.6, if that's what you have.

Share this post


Link to post
Share on other sites
Tauka Usanake
15 hours ago, mumboking said:

Looks like you put it in the same folder as the RFH/RFD files then run it.
It won't work with Python 3.6, if that's what you have.

Being on a campus computer (I do all my everything on campus now) it seems to have both 2.7 and 3.4 but it's installed through SPSS some statistics program. I don't think it would work either way. I'll try installing Python 2.7 on my own computer and try it out

Share this post


Link to post
Share on other sites
Tauka Usanake

So, I installed Python 2.6.6 on my machine and ran the script. Guess it didn't matter if it was a bit older but it pulled everything out. I don't remember ever a time we ever managed to get all the Loco resources ripped like this. Did I miss something with my years away from RRU?

Share this post


Link to post
Share on other sites
mumboking

As far as I know, we only were able to extract some of the stuff, with some images being unviewable.

Share this post


Link to post
Share on other sites
Tauka Usanake

So this came out of no where when no one else could get past those unreadables. I think I remember Cyrem saying that Game Extractor could pull from Loco but I never tried it.

 

Well, I'm happy either way. I have use for the sprites but it seems that love for Loco has died. That's kind of disappointing

Share this post


Link to post
Share on other sites
Andrey Mashinistov

Hello!

I've downloaded the tool and placed it with Resource. RFD and Resource.RFH in the art-res folder, but when I try to run it from command prompt or powershell I get this error:

C:\Users\andre>C:\Python27\python.exe "C:\Program Files\LEGO Media\Constructive\LEGO LOCO\art-res\rf-extract.py"
Traceback (most recent call last):
  File "C:\Program Files\LEGO Media\Constructive\LEGO LOCO\art-res\rf-extract.py", line 3, in <module>
    contents = open("resource.RFH", "rb").read()
IOError: [Errno 2] No such file or directory: 'resource.RFH'

Any help would be greatly appreciated, I'm looking forward to using this tool!

Share this post


Link to post
Share on other sites
grappigegovert

It sounds like the script expects the file to be in the current directory, so before you run the script, you'll need to either
Shift+right click in the art-res folder and select "open command prompt/powershell here"
or run the command 

cd "C:\Program Files\LEGO Media\Constructive\LEGO LOCO\art-res\"

and then run the python script.
Now that I think of it, you might run into permission errors because the game is in the program files directory.

If that happens, try running cmd/powershell as admin, or copy the RFH file to some other folder like your documents or desktop first.

Share this post


Link to post
Share on other sites
Andrey Mashinistov
On 4/27/2020 at 7:06 PM, grappigegovert said:

It sounds like the script expects the file to be in the current directory, so before you run the script, you'll need to either
Shift+right click in the art-res folder and select "open command prompt/powershell here"
or run the command 

cd "C:\Program Files\LEGO Media\Constructive\LEGO LOCO\art-res\"

and then run the python script.
Now that I think of it, you might run into permission errors because the game is in the program files directory.

If that happens, try running cmd/powershell as admin, or copy the RFH file to some other folder like your documents or desktop first.

 

Thank you, Grappigegovert, that worked perfectly. :D

 

However, I have had some problems with editing the BMP files and I'm sure I'm not alone. I created a topic about it, this is the link: https://www.rockraidersunited.com/topic/8757-editing-and-creating-loco-bitmaps

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.