Jump to content

LOCO RF Unpacker Script


shinyquagsire23
 Share

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

Link to comment
Share on other sites

  • lol username featured this topic
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

Link to comment
Share on other sites

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.

Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...
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?

Link to comment
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

Link to comment
Share on other sites

  • 1 year later...
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!

Link to comment
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.

  • Like 1
Link to comment
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

Link to comment
Share on other sites

  • Guest unfeatured this topic
 Share

×
×
  • 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.