xdanieldzd / scarlet Goto Github PK
View Code? Open in Web Editor NEWGame data conversion/export/import helper libraries - UNMAINTAINED
License: Other
Game data conversion/export/import helper libraries - UNMAINTAINED
License: Other
Some file formats lack a reliable magic number at the start, and have no clear file name pattern.
In these cases it would be good to have an attribute that takes a delegate which can be used to check, given a Stream (or EndianBinaryReader), if the format would be able to process the file in question., for example by reading in a header and doing a sanity check on the values.
The game contains several sprites in .cmp format, which are compressed .stex files
I am trying to unpack the YU-NO Vita .mpk files
In doing so I came across the discussion here #18 (comment)
So I decided to try Scarlet, but ended up with this message for some reason.
Adding file 'bg.mpk'...
Parsing files...
File 'bg.mpk'... unsupported file.
I can see that support has been added to them in the change log, can anyone tell me what might be causing this response?
EDIT: Researching it further, it looks like offset doesn't have the right string label. I'm not sure what could be causing that. Do I need to get the .mpk files directly from the pkg before they're installed on the Vita?
Thank you for making this tool.
I found a txp file in game かみがみのあそび
made by Nippon Ichi
.
This file's color count is zero. The sample is as below.
Here's the header of this file.
E0 01 10 01 00 00 00 00 00 00 00 00 00 00 01 00
FC 56 56 56 E6 49 03 29 00 55 55 55 64 39 03 29
00 55 55 55 64 39 03 29 AA 55 55 55 84 41 03 29
00 55 55 55 84 39 03 29 00 55 55 55 64 39 03 29
00 55 55 55 64 39 03 29 20 55 55 55 85 39 03 29
00 55 55 55 85 39 03 29 00 55 55 55 85 39 03 29
I try to analyze this file but didn't success.
Here's the texture view.
Would it be possible to add .png to .tex support? I would like to try to mod some games, but there's NO tools availible for this conversion...
Hi can you please explain me the correct way to convert a .gbix(uvr) to png from the game K-on Houkago Live, An if just in case you know how convert the .uno files from the game to any readable 3d format.
Hello xdanieldzd, would it be possible for you to add a parameter (--quiet or -q for example), which would skip having to press any key after Scarlet has finished converting a texture?
I ask because I have a folder full of hundreds of textures that I need converted, and so far your tool has been the only one that doesn't fail on some of them 'thus far.
I'd like to write a batch script to convert every texture in the folder automatically, but the seemingly impassable "Press any key to exit." at the end of runtime ruins that because I'd have to sit there and press any key to continue 827 times (that's how many textures I have).
Thank you if you read this, and I really hope you add this option!
I wanted to convert a kslt file from the game Blue Reflection to see if I could change the button prompts to PS4 button prompts. (Lucky for me it seems I found the correct file)
The magic number seems to be different for the kslt files for this game and maybe other newer koei tecmo games as well (The new magic number being TLSK3100 rather than TLSK1100)
I tried simply changing the magic number attribute to see if the conversion would still work but it unfortunately didn't.
Would you be able to give me any tips on how to analyse the file so I could add code to handle this new case or would you like to handle it yourself?
Sorry, I know you said that your tool is still incomplete, but I want to ask you if you are going to make possibile to convert the ".PNG"s back to "GXT" and "BXT".
Trying to convert a Terraria GXT file. Doesn't seem to parse properly.
Output:
Adding file 'filename.gxt'...
Parsing files...
File 'filename.gxt'... unsupported file.
Operation completed in 29 milliseconds.
Press any key to exit.
How is the PixelDataFormat.PixelOrderingSwizzledVita format flag used?
I'm trying to decode swizzled BGRA8888 images. I have code that goes something like this:
pixelFormat = PixelDataFormat.FormatBgra8888;
if (someFlag) pixelFormat |= PixelDataFormat.PixelOrderingSwizzledVita;
The resulting values for pixelFormat are 0x60c20325 (for PixelDataFormat.FormatBgra8888
) and 0x80060c20325 (for PixelDataFormat.FormatBgra8888 | PixelDataFormat.PixelOrderingSwizzledVita
).
So far, so correct. However, when trying to convert the ImageBinary where the InputPixelFormat has been set to the second value, to a Bitmap with GetBitmap()
, I get an exception in ImageBinary.ValidateImageProperties(), where it checks for
if (!inputPixelFormat.IsValid()) throw new Exception("Invalid input format");
This is because the Pixel format I created is not a value in the enum itself and so the IsValid function only sees and checks the numerical value, which fails.
How do I properly decode a Swizzled image?
There are lots of images in Danganronpa 1, 2 and Another Episode for PSVITA that are encrypted, so I was wondering whether you could add to your tool the code done by BlackDragon --> https://github.com/BlackDragonHunt/Danganronpa-Tools/blob/master/dr_dec.py
That way it won't be necessary anymore to use dr_dec.py before using your tool and users won't need to install python either.
In ScarletWinTest MainForm
Method: public List GetFormatInfos(Type baseFormatType)
extension = Path.GetExtension(pattern).Replace("$", "");
Path.GetExtension(pattern)
throws System.ArgumentException - - Illegal Character in path
if
string pattern = (fnPatternAttrib as FilenamePatternAttribute).Pattern = ^.*.(btga|lga)$
because it it about the Pipe-Symbol "|"
Temporary fix for me of your course was to set
string pattern = "^.*$";
Can modified PNG be compressed again?
It looks like Danganronpa Another Episode: Ultra Despair Girls for PC uses slightly modified SHTXFS format for sprites with headers SHTXFs or SHTXFf. Sprites with SHTXFs can be converted just like like SHTXFS. Sprites with SHTXFf header are without palette and use BGRA instead of RGBA.
Another .btx format are compressed .dds textures that can be decompressed, resulting in DDS1DDS header. If leading DDS1 is removed so file starts with DDS, it can be opened as a .dds texture.
Hello @xdanieldzd , is there any way to convert png images to txf (from disgaea 4)?
Thx for your support
Scarlet/Scarlet.IO.ImageFormats/GNF.cs
Line 186 in 8c56632
imageBinary.PhysicalHeight = (height + 7) / 8) * 8;
Some examples (and results) to test against: noesis_and_scarlet_issues_with_GNF_images.zip
GXT files in PCSG00567 (YU-NO: Konoyo no Hate de Koi o Utau Shoujo) are nonstandard, not having a GXT0 magic (from bg.mpk, system.mpk, etc.) .
https://s14.postimg.cc/y6r1lfvo1/nonstd-xtg.png
There seems to be some encryption going on because the files are not compressible with 7zip and rar (low entropy). There's no obvious value matching the filesize either. On the other hand, other file types (from script.mpk, se.mpk) in either basegame and patch v1.02 are extracted without issue (usable .scx files, .at9 files with RIFF header).
Using the same tools (sg-unpack or arc_unpacker), I can unpack mpk's from steins;gate 0 vita, and they yield standard gxt files.
Would you mind having a look?
Hi!
I'm trying to edit and mod Resident Evil 0 game on Nintendo Switch, but no tool available is capable of opening and converting the Switch .tex files. Only the PC ones. Is there any plan to support Switch version of the file?
Here's what I get when trying to convert a Switch .tex file.
And here's an example file:
https://www.mediafire.com/file/odw373zp0wqexdo/yad_ID.tex/file
produces a 1024*1024 blank white png
https://mega.nz/#!OIVVHKBB!YXRxry3fhw9Jg8PwNPagrwW1zvWQiNwdtfDUBMAx7K8
Seems like Metal Gear Solid HD Collection uses different format than regular GXT files and GXT from PlayStation All-Star Battle Royale, which is made by Bluepoint Games too. I've talked about it with Cri4Key, who made a ripping and packing tool for PSASBR and improved Scarlet for it, he said: "They are totally different from the PSASBR ones.
Honestly, they seem to be based on GXT too, specifically the 16 bytes starting at 0x10 seem very familiar to what in GXT is located at 0x20. It's just modified. It's just a hunch that may be right, or may be totally wrong. Tried trial and error with modifying the header under HEX editor and trying to make it read as a GXT but nothing really worked. Maybe there is a way to make it work, something I am missing, or my deduction is just wrong. Sorry if I can't help out much with these, they have the same extension .ctxr but internally the format is different. That's why the tool says the CTXR is invalid, because it's not designed to open these ones. I don't plan to work on them as of now, I don't have the time for it anyway. The only clue I can give you that may be either right or wrong, is that these may be GXT textures packed just differently, as if it has a sort of stripped header. 0x18 is width, 0x1A is height. That's all I could guess on this format at first glance."
So, is there any chance to add support for this format? Also font texture may be in different format than, for example, splash screens, that I sent to Cri4Key.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.