ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Sep 17, 2019 10:58 pm

All times are UTC




Post new topic  Reply to topic  [ 17 posts ] 
Author Message
PostPosted: Fri Nov 03, 2017 11:31 am 

Joined: Thu Sep 10, 2015 8:22 am
Posts: 16
Game: http://store.steampowered.com/app/607890/Sword_Art_Online_Hollow_Realization_Deluxe_Edition/


Attachments:
File comment: OFS3 Header Localization
localize_msg.dat [2.35 MiB]
Downloaded 129 times
Top
   
PostPosted: Fri Nov 03, 2017 11:43 am 
User avatar

Joined: Sun Aug 17, 2014 7:27 pm
Posts: 1160
Try this https://github.com/Liquid-S/OFS3-TOOL Not sure


Top
   
PostPosted: Fri Nov 03, 2017 1:57 pm 

Joined: Thu Sep 10, 2015 8:22 am
Posts: 16
Image

Somehow it works, but it's still has an encrypt.


Attachments:
File comment: Add txt to send a file
(50005).txt [24 Bytes]
Downloaded 102 times
Top
   
PostPosted: Fri Nov 03, 2017 3:17 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10569
Alternatively you can use this script for generating a txt file to use for translation (with size limits obviously):
Code:
get NAME basename
string NAME + ".txt"
idstring "OFS3"
get BASE_OFF long
get DUMMY long
get DATA_SIZE long
get STRINGS long
for i = 0 < STRINGS
    get OFFSET long
    get DUMMY long
    math OFFSET + BASE_OFF
    slog NAME OFFSET -1
next i


Top
   
PostPosted: Fri Nov 03, 2017 5:21 pm 

Joined: Thu Sep 10, 2015 8:22 am
Posts: 16
it works, tks aluigi!!!!


Top
   
PostPosted: Fri Nov 03, 2017 7:29 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10569
If you want to reimport the edited txt back in the original file you must use the reimport feature of quickbms, read section 3 of http://aluigi.org/papers/quickbms.txt for info.
Just remember that your strings must have the same length or shorter than the original ones.


Top
   
PostPosted: Tue Nov 07, 2017 12:11 pm 

Joined: Tue Nov 07, 2017 12:08 pm
Posts: 1
It is possible to extract the images from the game? to see to change them? I try to extract all the resources but they are encrypt and the images in .file that are not recognized


Top
   
PostPosted: Tue Jan 30, 2018 2:11 pm 
User avatar

Joined: Sun Aug 17, 2014 7:27 pm
Posts: 1160
How to edit this files?

Image


Attachments:
files.rar [717.55 KiB]
Downloaded 60 times
Top
   
PostPosted: Tue Jan 30, 2018 7:43 pm 

Joined: Sun Dec 21, 2014 7:43 pm
Posts: 33
makc_ar wrote:
How to edit this files?

Image


U can Edit it manually

with this info.


offset where the text start.
Image


Go to offset.
Image


Copy or edit the text.
Image


Exemple:
Image


this " NUL " value is the end of the phrase " 0x00 ".
the lenght off all text must be " mod 4 = 0 ".


Top
   
PostPosted: Tue Jan 30, 2018 11:38 pm 
User avatar

Joined: Sun Aug 17, 2014 7:27 pm
Posts: 1160
@Nameless32
Thanks a lot! You can write a tool export\import for these files?


Top
   
PostPosted: Wed Jan 31, 2018 7:29 pm 

Joined: Sun Dec 21, 2014 7:43 pm
Posts: 33
Here.

Thanks to swuforce and yours sources, i've learned how to make my own tools.


Attachments:
SAO_HR_Tools.zip [980.05 KiB]
Downloaded 214 times
Top
   
PostPosted: Wed Jan 31, 2018 9:24 pm 
User avatar

Joined: Sun Aug 17, 2014 7:27 pm
Posts: 1160
@Nameless32
Thanks a lot! How about unpacking all files in folder?
Example:
Code:
$Dir = FileSelectFolder("Select the folder...", "", "", @ScriptDir)


Attachments:
File comment: Only .txt
SAO_HR_EN.rar [1.16 MiB]
Downloaded 3071 times
Top
   
PostPosted: Mon Sep 09, 2019 2:51 pm 

Joined: Mon Sep 09, 2019 2:39 pm
Posts: 4
I know this is a bit of a necro, but thought it'd be best ot post here than start a new thread.

I was wondering if anyone found a good workflow for changing text in the end? I'm probably messing up something simple. Here's the steps I'm following:

I unpack usa.cpk
I delete all folders except msg (contains the text I want to edit)
I either edit localize_msg.dat in notepad++ directly or I unpack the file using the script above to make a neat loc file for editing.
I edit even just a single word (overwriting the word with another of the same length ie 'hello' with 'heya')
I try to repack the file but it says the file size is different now (compressed file size that is, uncompressed is the same since it's the same amount of characters)

No matter how small the edit I find it odd that the file always ends up a few bytes larger. I've managed to get it to work on a few occasions by editing text elsewhere in the file by replacing it all with spaces which reduces the file size. Most the time the game will load with no text present anywhere, but occasionally it'll load correctly with the edited text.

I'm a 3D artist so a lot of the terminoligy here goes over my head but I'd love to learn, there's quite a lot of dialoge I'd like to change to be less repetitive and more engaging. I'm guessing some letters are larger than others? Maybe notepad++ is doing something weird to increase file size slightly? I'll have to try with changing just a single letter next time to see if it still happens.

Any help would be appreciated!

Here's a screenshot if it helps in any way... I simply changed the word 'Slay' into 'Prod' in this example
Image


Top
   
PostPosted: Tue Sep 10, 2019 7:29 am 

Joined: Mon Sep 09, 2019 2:39 pm
Posts: 4
After spending several more hours trying to work it out, still running into the problem of the text simply not appearing in-game 90% of the time. If I make small edits like just changing a single word it works, but only after replacing other text somewhere with a bunch of spaces or whatever. If I change a whole sentence it works occasionally. If I change several sentences it never works. There's a post above explaining how to edit it mentioning offsets and such but the images don't work. They also linked a tool they made but unfortunately it does nothing for me except create a blank text file when using it on the localisation or any other file.

Just to be clear I'm definitely only replacing the text, I'm not erasing, deleting or adding characters, just changing them. The results are the same if I edit in notepad++, if I extract the text files using the above script and edit that way, or if I edit directly in a hex editor. It's why I'm so lost as to why changing a couple of letters would make the file a few bytes larger and thus unable to repack, or why no text at all appears in game if I edit more than a few words. Any help would be appreciated!

On a good note I've been making progress on changing out images in Hollow Fragment and Hollow Realization. The colours aren't quite right, seems like some channels are correct while others have the hue offset by a bunch, but I'll keep working on it. If I get too stuck I'll make another post in the the relevant channel for that :)


Top
   
PostPosted: Wed Sep 11, 2019 4:47 pm 
User avatar

Joined: Tue Oct 13, 2015 1:26 pm
Posts: 461
Rewinged wrote:
I try to repack the file but it says the file size is different now (compressed file size that is, uncompressed is the same since it's the same amount of characters)
Don't use the BMS script to repack cpk files, use some proper tool like YACpkTool.

_________________
Tribo Gamer Brasil


Top
   
PostPosted: Wed Sep 11, 2019 8:01 pm 

Joined: Mon Sep 09, 2019 2:39 pm
Posts: 4
Delutto wrote:
Rewinged wrote:
I try to repack the file but it says the file size is different now (compressed file size that is, uncompressed is the same since it's the same amount of characters)
Don't use the BMS script to repack cpk files, use some proper tool like YACpkTool.


Ahh thanks, I'll check that out as soon as possible for sure. I figured it was something simple like that. Hopefully that'll fix this problem for me cheers


Top
   
PostPosted: Thu Sep 12, 2019 2:29 pm 

Joined: Mon Sep 09, 2019 2:39 pm
Posts: 4
That did the trick, thanks so much Delutto! Even works for custom images too, they were showing up black before. Just as a heads up in case anyone happens to have this problem in the future, here's how I did the images.

Use rawtex to convert the file to .dds with these settings - offset to 9df , width and height to 1920 x 1080 , image type to r8g8b8a8_unom
Notice the DDS will be flipped upside-down but colors are correct.
Flip the image vertically and do your normal edits.
Before saving it out, swap the red and blue channels (no need to flip the image back vertically)
Save as .tga 32bit with alphas
Open the image as well as the original archived version in a hex editor
Replace blocks 0-11 of the TGA with blocks 0-9DE of the original file (the Phyre header stuff)
Image
Delete the last 20 blocks from the TGA (Truevision-xfile stuff)
Image
Save and it's done. Rename the TGA and replace the original archived version, then repack the .cpk with YACpkTool

It's super basic stuff and I'm just a beginner to this but hopefully it helps someone... There's probably much cleaner/easier ways of doing this but it's pretty fast and it works.
I don't get why the red and blue channels need to be flipped though to be honest. It's weird that in rawtex the images appear upside down with correct colours... If you reimport an image the right way up with normal colours it will show up right way up with red and blue channels swapped. It's only if you save right way up with red and blue swapped that suddenly the image will flip upside down and be correct in game. I'm sure others will the know the answer to this of course haha.

Transparency works fine too, here's a super quick test, replacing a tutorial message with a random monkey image
Image


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 17 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited