[TOOL] XRCatExtract .NET 2.0 cat/dat extractor

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

stk25
Posts: 33
Joined: Sun, 17. Nov 13, 11:44
x3ap

[TOOL] XRCatExtract .NET 2.0 cat/dat extractor

Post by stk25 »

Made this tool maybe an hour after release but didn't bother uploading it because people already made tools, but now I see people are having problems with most of them needing .NET 4 or Python so I decided to upload it:

Usage:

Code: Select all

XRCatExtract.exe <path to cat file / path to XR dir> [extraction path]

If you don't specify extraction path:
Cat file: files will be in <catpath>_extracted/
XR path: files will be in <xrpath>/extracted/
Only needs .NET 2.0 which most people already have, if you have a newer .NET installed it should include 2.0 too

Download
[ external image ]
Last edited by stk25 on Wed, 20. Nov 13, 01:28, edited 4 times in total.
dez505
Posts: 172
Joined: Wed, 6. Nov 02, 20:31
x4

Post by dez505 »

Thank you nice work.
Deleted User

Post by Deleted User »

it works the same as the python file? do they find the same files?
Seidr
Posts: 13
Joined: Thu, 14. Nov 13, 19:38

Post by Seidr »

Was actually putting together a .NET version of the script I wrote - I'll dump that now I guess ;)
Exy
Posts: 70
Joined: Sat, 1. Oct 11, 11:32

Post by Exy »

The program crashes after a while on Win 7 64 when I place it in the X Rebirth directory (where all .cat files are) and run it.

The error message is nondescript except this part: System.IO.PathTooLongException

Indeed, the last file name shown in the console is ridiculously long.
stk25
Posts: 33
Joined: Sun, 17. Nov 13, 11:44
x3ap

Post by stk25 »

Exy wrote:The program crashes after a while on Win 7 64 when I place it in the X Rebirth directory (where all .cat files are) and run it.

The error message is nondescript except this part: System.IO.PathTooLongException

Indeed, the last file name shown in the console is ridiculously long.
Hmm that's weird, could you get me a screenshot of the console? Also have you tried verifying game cache in steam? Maybe one of your cat files is corrupt somehow
Last edited by stk25 on Wed, 20. Nov 13, 01:27, edited 1 time in total.
socros
Posts: 43
Joined: Thu, 27. Aug 09, 22:16
x4

Post by socros »

Crash for me also. This happens during the extraction folder collectors_water in economy folder
stk25
Posts: 33
Joined: Sun, 17. Nov 13, 11:44
x3ap

Post by stk25 »

socros wrote:Crash for me also. This happens during the extraction folder collectors_water in economy folder
If you could get me a screenshot I can try and figure it out, I'm thinking that maybe you guys are playing with non-english versions, haven't managed to test any of them yet though
Last edited by stk25 on Wed, 20. Nov 13, 01:27, edited 1 time in total.
socros
Posts: 43
Joined: Thu, 27. Aug 09, 22:16
x4

Post by socros »

Seidr
Posts: 13
Joined: Thu, 14. Nov 13, 19:38

Post by Seidr »

I had this issue with my Python script also. I believe it's due to the limit of filename / path length on Windows - I could however be mistaken, but the filenames are exactly the same.
User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse »

Crashed at that same point, w7-64, English version.

The file in question appears to be in 02.dat

01 and 03-07 extract fine
Irrational factors are clearly at work.
socros
Posts: 43
Joined: Thu, 27. Aug 09, 22:16
x4

Post by socros »

It's 01.dat for me, 02-07 no extract
stk25
Posts: 33
Joined: Sun, 17. Nov 13, 11:44
x3ap

Post by stk25 »

Hmm I think I know what's going on...
The path of the file being extracted is
\assets\structures\Economy\collectors_water\unique\struct_econ_cw_ar_water_j_connector_02_data\assets_structures_economy_collectors_water_unique_struct_econ_cw_ar_water_j_connector_02-collision.xmf
(pretty hueg :roll:)
and I think most of you probably have steam installed to program files, so thats:
C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\extracted\
Putting them together makes:
C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\extracted\assets\structures\Economy\collectors_water\unique\struct_econ_cw_ar_water_j_connector_02_data\assets_structures_economy_collectors_water_unique_struct_econ_cw_ar_water_j_connector_02-collision.xmf
Which is a path with length 262 characters :o
The max length of a path in windows is 260 though afaik, guess that you'll have to copy the cat files somewhere else and then use the extractor...
I'll upload a new version now which'll warn you if the path is too long
Edit: actually I could probably just shrink the default path to \ext instead of \extracted, I'll add the warning too though
Last edited by stk25 on Wed, 20. Nov 13, 01:27, edited 2 times in total.
Coultar
Posts: 6
Joined: Tue, 3. Feb 04, 23:36
x3tc

Post by Coultar »

I can confirm that it works if you copy your .dat and .cat files into a directory that is shorter in length. My testcase was c:\a . ;)
stk25
Posts: 33
Joined: Sun, 17. Nov 13, 11:44
x3ap

Post by stk25 »

Alright managed to get a fix in place :D
Changelog:
- Checks if the path is too long before extracting, will exit if it is
- Extracts to <xrpath>/../XR_ext/ instead of <xrpath>/extracted
(e.g. If your path is C:\Program Files (x86)\Steam\SteamApps\Common\X Rebirth the extracted files will be in C:\Program Files (x86)\Steam\SteamApps\Common\XR_ext)

Check the OP for download link
Last edited by stk25 on Wed, 20. Nov 13, 01:27, edited 1 time in total.
Deleted User

Post by Deleted User »

thanks!
chill0r
Posts: 11
Joined: Sun, 28. Jul 13, 19:50
x3ap

Post by chill0r »

Good tool but your fix didn't work

Still raising the error while extracting
X-Tension: > 100h
X2 The Thread: > 100h
X3 (alle Teile): > 250h
Goekhan
Posts: 51
Joined: Thu, 23. Jul 09, 21:11
x4

Post by Goekhan »

Why are you putting people through a referral/redirect/ad?
snwboardn21
Posts: 236
Joined: Sun, 13. Nov 05, 02:08
x4

Post by snwboardn21 »

Can you not use wildcards such as *.cat ?
"It is better to keep ones mouth shut and be thought a fool, than to open it and remove all doubt"
xXPhantomFenix
Posts: 45
Joined: Sun, 24. Nov 13, 02:01

Post by xXPhantomFenix »

Link doesnt even goes directly to Nexus Mod site... how misleading..

Return to “X Rebirth - Scripts and Modding”