ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Mar 24, 2017 2:04 am

All times are UTC




Post new topic  Reply to topic  [ 33 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Wed Sep 21, 2016 9:18 pm 

Joined: Thu Sep 15, 2016 10:17 pm
Posts: 4
thank you aluigi it's work :) :) :) :) :)


Top
   
PostPosted: Sun Nov 27, 2016 10:54 am 

Joined: Sun Nov 27, 2016 10:50 am
Posts: 1
Hi,
I am working on an italian translation of Undertale, still work in progress, but I want to test out the graphical translation. To decrypt the data file from data.win, I used yoyogames.bms script, which worked as expected, but now I can't encrypt them again in a data.win file.
Any suggestions on which script to run? I've tried reimport.bat but I can't comprehend the use of it. Such a noob I am :roll:
Thanks for the great job you're doing.


Top
   
PostPosted: Sun Nov 27, 2016 11:44 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 5700
reimport.bat is very simple and it's explained in section 3 of http://aluigi.org/papers/quickbms.txt

In short you should click on reimport.bat and select the same script, archive (remember to make a backup!), and folder (that now acts as "input") you selected during the extraction.

The following are some rules to increase the chances of a good reimporting:
  • in the folder where you extracted the files, keep there only those you edited and delete the others (this is useful mainly for compressed files)
  • the edited files (for example graphics in your case) must have a size which is smaller or equal than the originals
  • for your translation you are probably going to edit STRG.txt, remember to keep your new strings (each line) shorter/equal than the originals
  • in some rare archive formats it's even necessary to keep the new string with the same length of the original, so filling it with spaces, but this is not the case of Undertale probably

If you have other doubts do a search on google with the following keywords because other people had success in modding Undertale and made videos and tutorials:
Code:
undertale quickbms reimport


Top
   
PostPosted: Thu Jan 12, 2017 11:21 pm 

Joined: Thu Jan 12, 2017 11:18 pm
Posts: 3
Hello

I try to edit some staff in alpine ski racing 2007 game. Sometimes re-importing works, sometimes not. Edit I tried is really simple. For example, I only exchanged one number for another or something like that.
When re-importing is not working, mostly, I got this message:

Last script line before the error or that produced error:
26 clog NAME OFFSET ZSIZE SIZE



Please, any ideas how to solve this?
Thank you so much


Top
   
PostPosted: Fri Jan 13, 2017 4:57 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 5700
That script (49games.bms) is not valid for reimporting because the re-compression algorithm is not available.


Top
   
PostPosted: Fri Jan 13, 2017 5:20 pm 

Joined: Thu Jan 12, 2017 11:18 pm
Posts: 3
aluigi wrote:
That script (49games.bms) is not valid for reimporting because the re-compression algorithm is not available.


Thank you for answer.
Is there available any scrip that has this algorithm? If not, is there any chance for this algorithm to be added there?
Btw, despite this fact, I even succeeded in re-importing some files.
Please help, I play this game every ski season for more 10 years now (because there is never new ski game... :cry: :cry: :cry: ) so if I could make at least slight editing to feel it more enjoyable. Thank you so much for your help. :)


Last edited by skiracing on Fri Jan 13, 2017 5:40 pm, edited 1 time in total.

Top
   
PostPosted: Fri Jan 13, 2017 5:33 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 5700
No, the only solution would be to check if the game works with the extracted files and without the original archive (probably doesn't work or requires specific folders).
Writing a rebuilder (with compression disabled) may be an option but you have to do it by yourself or finding someone who wants to do it.
You can also try some hacks on the archive with a hex editor like disabling the compression for that file, appending the content of the new file to the archive and editing the offset, size and crc field (and the method as already said).
Unfortunately with edited files the options are ever quite limited and I offer no support on this stuff, sorry.


Top
   
PostPosted: Fri Jan 13, 2017 5:49 pm 

Joined: Thu Jan 12, 2017 11:18 pm
Posts: 3
Ohh..thank you for explanation.

I'm totally dumb on hacking and stuff like that and even do not understand anything about those methods that you are telling. Oh well, it is only hope maybe sometimes in future it will be possible to re-import edited files in the game. For now, at least I know there is no sense to trying more. Thanks anyway.


Top
   
PostPosted: Sun Feb 05, 2017 8:04 pm 

Joined: Sun Feb 05, 2017 7:35 pm
Posts: 3
aluigi wrote:
It's a problem of physical space, so there is no ready solution except writing a rebuilder from scratch (the format is not complex) or just appending the new content to the file and then modifying the OFFSET and SIZE field in the archive (something that requires manual work but may be easy with the help of quickbms -l -V).

Hello, could you please provide (or link) an example on how to modify the offset and size field in an archive ? I'm currently making a voice mod, and i literally need to slaughter the soundtracks quality in order for them to "fit" in the original archive, which is not good at all :/
( If needed, i attached here the quickbms scipt i'm using, an archive and an ogg file i would like to inject in this archive)


Attachments:
test.rar [69.84 KiB]
Downloaded 18 times
Top
   
PostPosted: Sun Feb 05, 2017 8:58 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 5700
Ok, I will explain what's the normal method because you cannot use it in your situation since you have an encrypted TOC (the information about the archived files).
Sorry.

You need to run quickbms with the -l (list because you have already extracted the files) and -V option, example:
Code:
quickbms -l -V script.bms archive.dat > info.txt

When you open info.txt you can notice the following fields:
  • a dot
  • hexadecimal offset where is located the data read from the file
  • bms instruction used
  • name of the variable
  • value that has been read
  • size or type of value, usually just the size of the field (1 for byte, 4 for long and so on, N for strings)

The following is an example of these information:
Code:
. 00000012 get     comp_size  0x000032b4 4
. 00000016 get     uncomp_size 0x0000981a 4
. 0000001a get     name_len   0x0000000d 2
. 0000001c get     extra_len  0x00000000 2
. 0000001e getdstr name       "changelog.txt" 13
    63 68 61 6e 67 65 6c 6f 67 2e 74 78 74            changelog.txt
. 0000002b getdstr extra      "" 0
  0000002b 38938      changelog.txt

Now if you want to edit the offset and size of an archived file:
  • open the archive with a hex editor
  • go to the offset of the variable you want to change (the hexadecimal value after the dot)
  • put your new value overwriting the old one

So let's say you want to change the compressed and decompressed size of the previous example I provided, you have to go to offset 0x12 replacing 0x32b4 with the new one, and then do the same at offset 0x16 for 0x981a.

Yeah it's very simple if they are just few files.


Top
   
PostPosted: Thu Feb 09, 2017 2:03 am 

Joined: Sun Feb 05, 2017 7:35 pm
Posts: 3
Ah, that's sad :/ But as i can see (i think ...), the quickbms script i'm using contains decryption keys for my archive. So my question is, can impliment this method directly into a quickbms script, so that he list the files and change the offset variables i want ? Or Quickbms can't directly modify an archive ?


Top
   
PostPosted: Thu Feb 09, 2017 9:10 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 5700
Quickbms can modify archives, there are instructions like Put that do this job and the log/clog commands can be used to write data into the input archive too (with "append 1").
If you have time, perfect skills with quickbms and you have the re-encryption function probably you can (but don't expect any time and help from me, sorry)


Top
   
PostPosted: Thu Feb 09, 2017 10:53 am 

Joined: Sun Feb 05, 2017 7:35 pm
Posts: 3
It's ok, thank you very much for the information, it will help me in the future :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 33 posts ]  Go to page Previous 1 2

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