GARbro icon indicating copy to clipboard operation
GARbro copied to clipboard

requesting a repack engines for .med and .pac files.

Open Haiyami opened this issue 4 years ago • 49 comments

So as of date I don't see any option to create archive files for .med files by Fudegakisoft and .pac files by LUNE. There is legacy support for unpacking but not repacking for LUNE. And Fudegaki Soft games I only see support to open encrypted files. I'm not even sure when I extract script archive files if it's properly decrypting for either .med or .pac files. By the way I tried mixing and matching programs. used GarBro to unpack srp.pac files from LUNE games. I'd then edit files in notepad++ and then recompile for with PacManager.exe. However when running the game it doesn't load properly. I even did a test by unpacking with GarBro, and then immediately repacking with PacManager.exe. And the second attempt I made no changes to the script files. Game still crashed. PackManager is nice but incomplete as an extractor due to converting mportant code line to hexadecimal. But it lines up the code nice. I prefer garbro better though I think it needs lots of work to unpack files properly as 90% script code ends up being a mess in notepad++. Code looks like one long continuous line. in notepad++. As you can see in the example picture the file extracted as a txt file was used with PacManager.exe but important lines are in hexadecimal. The picture showing the file extracted as a .srp file shows some correct file references in script but it's not organized nicely and there are these weird nul stuff. I just wish I had an easier time trying to recompile script files. By the way word wrap is on so it the .srp files look somewhat clean but not clean enough. file as srp file as txt

Haiyami avatar Jun 06 '21 08:06 Haiyami

So as of date I don't see any option to create archive files for .med files by Fudegakisoft and .pac files by LUNE. There is legacy support for unpacking but not repacking for LUNE. And Fudegaki Soft games I only see support to open encrypted files. I'm not even sure when I extract script archive files if it's properly decrypting for either .med or .pac files. By the way I tried mixing and matching programs. used GarBro to unpack srp.pac files from LUNE games. I'd then edit files in notepad++ and then recompile for with PacManager.exe. However when running the game it doesn't load properly. I even did a test by unpacking with GarBro, and then immediately repacking with PacManager.exe. And the second attempt I made no changes to the script files. Game still crashed. PackManager is nice but incomplete as an extractor due to converting mportant code line to hexadecimal. But it lines up the code nice. I prefer garbro better though I think it needs lots of work to unpack files properly as 90% script code ends up being a mess in notepad++. Code looks like one long continuous line. in notepad++. As you can see in the example picture the file extracted as a txt file was used with PacManager.exe but important lines are in hexadecimal. The picture showing the file extracted as a .srp file shows some correct file references in script but it's not organized nicely and there are these weird nul stuff. I just wish I had an easier time trying to recompile script files. By the way word wrap is on so it the .srp files look somewhat clean but not clean enough. file as srp file as txt

hi can i know how to get the script to be readable like ur 2nd picture? and btw i can help u with restructuring that text in notepad++,because it can be done using function in notepad++ instantly

ElegantCollibri avatar Aug 11 '21 13:08 ElegantCollibri

So as of date I don't see any option to create archive files for .med files by Fudegakisoft and .pac files by LUNE. There is legacy support for unpacking but not repacking for LUNE. And Fudegaki Soft games I only see support to open encrypted files. I'm not even sure when I extract script archive files if it's properly decrypting for either .med or .pac files. By the way I tried mixing and matching programs. used GarBro to unpack srp.pac files from LUNE games. I'd then edit files in notepad++ and then recompile for with PacManager.exe. However when running the game it doesn't load properly. I even did a test by unpacking with GarBro, and then immediately repacking with PacManager.exe. And the second attempt I made no changes to the script files. Game still crashed. PackManager is nice but incomplete as an extractor due to converting mportant code line to hexadecimal. But it lines up the code nice. I prefer garbro better though I think it needs lots of work to unpack files properly as 90% script code ends up being a mess in notepad++. Code looks like one long continuous line. in notepad++. As you can see in the example picture the file extracted as a txt file was used with PacManager.exe but important lines are in hexadecimal. The picture showing the file extracted as a .srp file shows some correct file references in script but it's not organized nicely and there are these weird nul stuff. I just wish I had an easier time trying to recompile script files. By the way word wrap is on so it the .srp files look somewhat clean but not clean enough. file as srp file as txt

hi can i know how to get the script to be readable like ur 2nd picture? and btw i can help u with restructuring that text in notepad++,because it can be done using function in notepad++ instantly

So the second picture is done by extracting the srp.pac file using pacmanager.exe. This script properly decrypts the file. You can also use the same exe to repackage the script files back into a .pac file that will properly be read by the game. There is only one issue. A lot of parameters and directory indexes are decrypted as hexadecimal and I have no patients for learning hexadecimal in relation to images sizes or file directory references.

The first picture shows a script file opened by extracting the srp.pac file using GarBro. The files remain encrypted though. Garbro also does not have a repacker for .pac script files by LUNE. In that case I must use pacmanager.exe to repackage the script file. So, if I make any edits or just straight repackaging with no edits of a script files that were extracted using GarBro will cause the game to crash or throw back an error.

The first image is an example of a script file extracted using GarBro. In the first reference picture I highlighted a line that starts with "fm_C04a_05_0_0_0_02/-254/0.42/0.42B". I believe this is the parameter for the character sprite sizes. However because of the garbled mess it's really hard to tell. The parameter for position of the sprite on the y axis in the game window however is in a different script file.

Both pictures are using notepad++ to open different versions of an extracted script file from LUNE games. If you can help me with cleaning up a garbled mess from the first example picture it would help. I just need to change sprite sizes. Though I don't know if it's going to solve the repacking issue. Garbro has no repacker for LUNE type srp.pac files. And the extraction doesn't remove encryption. If there is some way to clean up the file or decrypt it in notepad++ please let me know.

As an extra note. PacManager.exe extracts the srp.pac file into a folder called srp. Inside it are _characterfilemacro.var _characterview.var _filemacro.var _system.var _var.var _ vulgarword.var

There will also be a bunch of .txt files that are labeled by scenario number that determines which route you are on. If you look inside the srp.pac file using garbro, all the underscore files don't have a .var after them and the .txt files are .srp files showing that the .pac file is still encrypted.

Also garbro needs a repacker for .med files from Fudegaki-soft.

Haiyami avatar Aug 22 '21 20:08 Haiyami

So as of date I don't see any option to create archive files for .med files by Fudegakisoft and .pac files by LUNE. There is legacy support for unpacking but not repacking for LUNE. And Fudegaki Soft games I only see support to open encrypted files. I'm not even sure when I extract script archive files if it's properly decrypting for either .med or .pac files. By the way I tried mixing and matching programs. used GarBro to unpack srp.pac files from LUNE games. I'd then edit files in notepad++ and then recompile for with PacManager.exe. However when running the game it doesn't load properly. I even did a test by unpacking with GarBro, and then immediately repacking with PacManager.exe. And the second attempt I made no changes to the script files. Game still crashed. PackManager is nice but incomplete as an extractor due to converting mportant code line to hexadecimal. But it lines up the code nice. I prefer garbro better though I think it needs lots of work to unpack files properly as 90% script code ends up being a mess in notepad++. Code looks like one long continuous line. in notepad++. As you can see in the example picture the file extracted as a txt file was used with PacManager.exe but important lines are in hexadecimal. The picture showing the file extracted as a .srp file shows some correct file references in script but it's not organized nicely and there are these weird nul stuff. I just wish I had an easier time trying to recompile script files. By the way word wrap is on so it the .srp files look somewhat clean but not clean enough. file as srp file as txt

Hey, do you still need the repack for .med and .pac I got tool for it

Cosetto avatar Oct 20 '21 06:10 Cosetto

So as of date I don't see any option to create archive files for .med files by Fudegakisoft and .pac files by LUNE. There is legacy support for unpacking but not repacking for LUNE. And Fudegaki Soft games I only see support to open encrypted files. I'm not even sure when I extract script archive files if it's properly decrypting for either .med or .pac files. By the way I tried mixing and matching programs. used GarBro to unpack srp.pac files from LUNE games. I'd then edit files in notepad++ and then recompile for with PacManager.exe. However when running the game it doesn't load properly. I even did a test by unpacking with GarBro, and then immediately repacking with PacManager.exe. And the second attempt I made no changes to the script files. Game still crashed. PackManager is nice but incomplete as an extractor due to converting mportant code line to hexadecimal. But it lines up the code nice. I prefer garbro better though I think it needs lots of work to unpack files properly as 90% script code ends up being a mess in notepad++. Code looks like one long continuous line. in notepad++. As you can see in the example picture the file extracted as a txt file was used with PacManager.exe but important lines are in hexadecimal. The picture showing the file extracted as a .srp file shows some correct file references in script but it's not organized nicely and there are these weird nul stuff. I just wish I had an easier time trying to recompile script files. By the way word wrap is on so it the .srp files look somewhat clean but not clean enough. file as srp file as txt

Hey, do you still need the repack for .med and .pac I got tool for it

Yes I need a working unpacker and repack tool for editing script files and picture archives for .med. I would also like to try your .pac unpack and repack tool to see if it's any different than PacManager.exe.

Haiyami avatar Oct 24 '21 23:10 Haiyami

So as of date I don't see any option to create archive files for .med files by Fudegakisoft and .pac files by LUNE. There is legacy support for unpacking but not repacking for LUNE. And Fudegaki Soft games I only see support to open encrypted files. I'm not even sure when I extract script archive files if it's properly decrypting for either .med or .pac files. By the way I tried mixing and matching programs. used GarBro to unpack srp.pac files from LUNE games. I'd then edit files in notepad++ and then recompile for with PacManager.exe. However when running the game it doesn't load properly. I even did a test by unpacking with GarBro, and then immediately repacking with PacManager.exe. And the second attempt I made no changes to the script files. Game still crashed. PackManager is nice but incomplete as an extractor due to converting mportant code line to hexadecimal. But it lines up the code nice. I prefer garbro better though I think it needs lots of work to unpack files properly as 90% script code ends up being a mess in notepad++. Code looks like one long continuous line. in notepad++. As you can see in the example picture the file extracted as a txt file was used with PacManager.exe but important lines are in hexadecimal. The picture showing the file extracted as a .srp file shows some correct file references in script but it's not organized nicely and there are these weird nul stuff. I just wish I had an easier time trying to recompile script files. By the way word wrap is on so it the .srp files look somewhat clean but not clean enough. file as srp file as txt

Hey, do you still need the repack for .med and .pac I got tool for it

Yes I need a working unpacker and repack tool for editing script files and picture archives for .med. I would also like to try your .pac unpack and repack tool to see if it's any different than PacManager.exe.

Here https://mega.nz/fm/HiRGgAqJ find DxLib(LuneTB).rar for .med and Lune&Marine.rar for .pac. If you don't know how to use then find me on discord Yggdrasill#0473

Cosetto avatar Oct 24 '21 23:10 Cosetto

The tool doesn't support extract/repack .grd files unfortunately. But it can repack those grd files into .pac

Cosetto avatar Oct 25 '21 00:10 Cosetto

Sorry this is the correct link https://mega.nz/folder/GvJzxC4T#XeAsGdjH6EOfvUXJbFrByw

Cosetto avatar Oct 27 '21 01:10 Cosetto

Sorry this is the correct link https://mega.nz/folder/GvJzxC4T#XeAsGdjH6EOfvUXJbFrByw

Will DxLib(LuneTB) work on .med from Fudegaki-soft games like Saiminjutsu 4? Also I'm not sure how to run python script I have zero experience with python. I have it installed I just don't know how to use it. I'm going to attempt the Lune&Marine.rar first to unpack the srp.pac file, edit the script and then repack it. But first I need to know how to use the programs in python. :(

Haiyami avatar Oct 28 '21 06:10 Haiyami

Sorry this is the correct link https://mega.nz/folder/GvJzxC4T#XeAsGdjH6EOfvUXJbFrByw

Will these work on .med from Fudegaki-soft games like Saiminjutsu 4?

You can try run it on cmd like this: python test.py Make sure to add-path when install python. Open the the test.py with notepad++ or sth that can edit it. Then delete # before the function you want to use like #PAC.repack_pac(). Make sure to change file you want to edit in pac_name = 'srp.pac'. If you have any problem with running it ask me on discord Yggdrasill#0473 . And Idk if it works with Saiminjutsu 4. You can try

Cosetto avatar Oct 28 '21 06:10 Cosetto

Sorry this is the correct link https://mega.nz/folder/GvJzxC4T#XeAsGdjH6EOfvUXJbFrByw

Will DxLib(LuneTB) work on .med from Fudegaki-soft games like Saiminjutsu 4? Also I'm not sure how to run python script I have zero experience with python. I have it installed I just don't know how to use it. I'm going to attempt the Lune&Marine.rar first to unpack the srp.pac file, edit the script and then repack it. But first I need to know how to use the programs in python. :(

Hey I found a guy can help you https://github.com/crskycode, asking him in galgamcoding's issue. He will create tool for your game, just make sure to credit him

Cosetto avatar Nov 09 '21 05:11 Cosetto

Saiminjutsu 4

hm looks like it is hacked image If you're interesting then find me in this server https://discord.gg/x4RXg8ef

Cosetto avatar Nov 23 '21 01:11 Cosetto

Saiminjutsu 4

hm looks like it is hacked image If you're interesting then find me in this server https://discord.gg/x4RXg8ef

god damn!I'm trying to change a game's text which is Saiminjutsu 3! It looks like could be changed same way?

M3ngZ avatar Nov 23 '21 10:11 M3ngZ

I think so, I haven't tested yet

Cosetto avatar Nov 23 '21 10:11 Cosetto

Saiminjutsu 4

hm looks like it is hacked image If you're interesting then find me in this server https://discord.gg/x4RXg8ef

god damn!I'm trying to change a game's text which is Saiminjutsu 3! It looks like could be changed same way?

You can send me the md_scr.med so I'll will text it out

Cosetto avatar Nov 23 '21 11:11 Cosetto

Saiminjutsu 4

hm looks like it is hacked image If you're interesting then find me in this server https://discord.gg/x4RXg8ef

god damn!I'm trying to change a game's text which is Saiminjutsu 3! It looks like could be changed same way?

You can send me the md_scr.med so I'll will text it out

oh...I don't know how to send you this file

M3ngZ avatar Nov 23 '21 11:11 M3ngZ

Saiminjutsu 4

hm looks like it is hacked image If you're interesting then find me in this server https://discord.gg/x4RXg8ef

god damn!I'm trying to change a game's text which is Saiminjutsu 3! It looks like could be changed same way?

You can send me the md_scr.med so I'll will text it out

oh...I don't know how to send you this file

Do you discord if yes then join the server if not then zip the file in .zip then drag 'n drop it here

Cosetto avatar Nov 23 '21 11:11 Cosetto

Saiminjutsu 4

hm looks like it is hacked image If you're interesting then find me in this server https://discord.gg/x4RXg8ef

god damn!I'm trying to change a game's text which is Saiminjutsu 3! It looks like could be changed same way?

You can send me the md_scr.med so I'll will text it out

oh...I don't know how to send you this file

Do you discord if yes then join the server if not then zip the file in .zip then drag 'n drop it here

oh..I see. thank you very much , and could you teach me how to unpack and repack ? It took me a whole day today T_T md_scr.zip

M3ngZ avatar Nov 23 '21 11:11 M3ngZ

md_scr.zip back up your file then try this, run the game with LE

Cosetto avatar Nov 23 '21 11:11 Cosetto

oh..I see. thank you very much , and could you teach me how to unpack and repack ? It took me a whole day today T_T [md_ md_scr.zip scr.zip](https://github.com/morkt/GARbro/files/7587661/md_scr.zip) back up your file first then try this file, run the game in LE

yes ,it can work and not anything wrong

M3ngZ avatar Nov 23 '21 12:11 M3ngZ

DxLib.zip here

Cosetto avatar Nov 23 '21 12:11 Cosetto

DxLib.zip here

I put md_scr.med in this directory and type python test.py in cmd , it runs successfully and created a file _new.med ,can you tell me how to edit game's text ?

M3ngZ avatar Nov 23 '21 13:11 M3ngZ

DxLib.zip here

I put md_scr.med in this directory and type python test.py in cmd , it runs successfully and created a file _new.med ,can you tell me how to edit game's text ?

urgh you need to check the test.py, open it with notepad++ or text editor app, delete # before the first 3 functions, create_dict function will create jp_chs.json and edit it with notepad++ (Ex: "I... I made it!": "Translate here.",) then open test.py add # to the old function then delete # before output() and repack() then run test.py again

Cosetto avatar Nov 23 '21 13:11 Cosetto

DxLib.zip here

I put md_scr.med in this directory and type python test.py in cmd , it runs successfully and created a file _new.med ,can you tell me how to edit game's text ?

urgh you need to check the test.py, open it with notepad++ or text editor app, delete # before the first 3 functions, create_dict function will create jp_chs.json and edit it with notepad++ (Ex: "I... I made it!": "Translate here.",) then open test.py add # to the old function then delete # before output() and repack() then run test.py again

should I delete # after repack() ?

M3ngZ avatar Nov 23 '21 13:11 M3ngZ

DxLib.zip here

I put md_scr.med in this directory and type python test.py in cmd , it runs successfully and created a file _new.med ,can you tell me how to edit game's text ?

urgh you need to check the test.py, open it with notepad++ or text editor app, delete # before the first 3 functions, create_dict function will create jp_chs.json and edit it with notepad++ (Ex: "I... I made it!": "Translate here.",) then open test.py add # to the old function then delete # before output() and repack() then run test.py again

should I delete # after repack() ?

well delete # before output means you insert the text back and if you delete both of output and repack it will insert and then repack

Cosetto avatar Nov 24 '21 01:11 Cosetto

DxLib.zip here

I put md_scr.med in this directory and type python test.py in cmd , it runs successfully and created a file _new.med ,can you tell me how to edit game's text ?

urgh you need to check the test.py, open it with notepad++ or text editor app, delete # before the first 3 functions, create_dict function will create jp_chs.json and edit it with notepad++ (Ex: "I... I made it!": "Translate here.",) then open test.py add # to the old function then delete # before output() and repack() then run test.py again

should I delete # after repack() ?

well delete # before output means you insert the text back and if you delete both of output and repack it will insert and then repack

Yeah , I almost succeed yesterday , still had a problem, the game couldn't display text which I had already translated

M3ngZ avatar Nov 24 '21 03:11 M3ngZ

"I... I made it!": "", You see that? Translate like this "I... I made it!": "Translate here.",

Cosetto avatar Nov 24 '21 03:11 Cosetto

of course
HBD0BMWNGIPM$}1A`(XBU and it cann't display ,like this 2 but if you use mouse scroll up, it can display image

M3ngZ avatar Nov 24 '21 03:11 M3ngZ

i'm still having issues getting the tools to work. I can't even get an extraction to work i cmd by running the python scripts. spent 3 weeks filddling around and I'm a bit frustrated. I even removed the # sounds as instructed but the python tool just wouldn't run. Since you guys are able to extract the script file. Are you able to edit the script file where it calls to the sprite CG and make sure that instead of the medium halfbody sprites appear, the full body sprites appear all the time?

Haiyami avatar Nov 25 '21 23:11 Haiyami

well, I'm not good in English . I think you may having issues in Python ? you can google "How to install Python " and " how to configure Python's environment variables" , also you can learn how to change path in cmd , after that if you want to run a file .py , you should make sure cmd path is the same with your .py path .

M3ngZ avatar Nov 26 '21 03:11 M3ngZ

friends I forgot to tell you in folder scr/MED.py, line 378 _new_bytes = jp_chs[_str].encode('gb2312', errors='ignore') change the gb2312 to sjis

Cosetto avatar Dec 20 '21 14:12 Cosetto