Jump to content

orangesunshine

Members
  • Posts

    6
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    orangesunshine reacted to MrPalloncini in A complete guide to unpack and repack Yu-Ris engine files   
    Introduction
    I wanted to make this guide since i couldn't find some complete guide to mod any VN on yuris engine. The main reason is that i played euphoria and i wanted to mod it.
    All the examples you are going to find are my years of reverse engineering and online documentation on euphoria (Mangagamer) version of yuris (v474).
    How Yu-Ris engine works
    Yuris is an interpreter that uses code C-like, is often used with ERIS, which is the VN interactive engine part of the interpreter.
    The engine use its own file format called "YPF" for archives and "YBN" for scripts. The contents of the YPF file are usually assets since the archive can contain all kind of media, except videos.
    The engine can be configured to use debug mode, as well as a log mode if activated.
    Usually is used with some assets protection, using the ypf format, the algorithm should change with major version of the SDK. It also offer a XOR encryption protection for the scripts files.
    The engine uses SHIFT-JIS text encoding, to be compatible with Windows versions since 98 to today. This of course causes some issues with the text since the OS will use ASCII standard to read it.
    Unpacking YPF files
    Unpacking YPF files is quite simple since is a standard Zlib compression, however tools may be incompatible depending on the engine version.
    You can easily unpack those files by using yu-ris text replacer, arc_conv or GARbro.
    GARbro has a really simple UI to use and can extract each archive by guessing the key or using a list of known keys for each game you want to unpack.
    arc_conv is quite simple to use too, just double click the exe and pick the file, it should extract the ypf file into a folder in the same directory.
    Yuris text replacer will extract the files automatically without any input from the user, this however might be incompatible with some later games, since the app is not developed anymore and the project is not opensource.
    Unpacking Video files in YPF format
    Video files aren't really compressed or encoded, so renaming the YPF file with an MPG extension will works. (Example: OP.ypf -> OP.mpg)
    The encoding of the video itself is very specific and while it can be opened with a standard player, creating a new one for the game can be a pain, so i suggest to use sdk tools for repacking.
    Unpacking YBN files
    This is the part where all gets tricky, the game tries to protect all of the scripts assets with an XOR encryption. To find the text you must before unpack it from the YPF, usually is bn.ypf.
    Then, you have to find the encryption key, which is only an XOR key, meaning that all the 0 in the file is a letter of the key. For This reason, you should pick up a file with most NULL chars in it, so you can find the key more easily.

    As you can see, the file patter use so often x.0s chars, when the dot is an escape character so you must save the key in HEX format, in this case the key for euphoria is: 0x30731b78.
    You can also use this site: https://wiremask.eu/tools/xor-cracker/ to crack the file with some analysis by uploading it.
    Now that we have the key, we must find a good file to start our unpacking. I suggest to use an hex editor with a bitwise xor functionality with in, the only tool i found is Hex Editor Neo, but is a pay program, however there is a trial version, so if you can find a free one, let me know!
    We can now import some files to start our cracking, i suggest to import some files in the middle that should contain text, in my case i used the file yst00140.ybn.

    As you can see, we have some text that is used in the game itself, be aware that some file just use the text to instruct the engine and those files will be not exportable (yet).
    Now that we just know the key and the file to unpack, we can use ExtYbn to extract the plain text on the file.
    extybn is a ybn extractor, that can guess op-codes and extract the text with the given key, the app however must be compiled from Golang in a standard executable: https://github.com/regomne/chinesize/tree/master/yuris/extYbn
    I will give you the precompiled application.
    Now we should start the executable with the command line and use this argument: extYbn -e -ybn yst00140.ybn -output-opcode -key 0x30731b78

    This will give us the op-codes, which are useful to extract the text without issues that we may have.
    We now can unpack those files correctly using the following command: extYbn.exe -e -ybn yst00140.ybn -json unpacked.json -txt unpacked.txt -key 0x30731b78 -op-msg 95 op-call 29
    the following commands are explained in the help file, but i will give you a summary.
    -e: puts the program in extract mode -ybn: choose the input ybn file -json: will create a json file with all the offsets (required for repacking) -txt: will create a txt file with all the text inside -key: will specify the key in hex format -op-msg/call: will specify the op codes to extract the text We now should have the txt file, remember to use a compatible encoding (default one should be good) and use the syntax the engine will expect.
    To repack the file, the command is almost identical with some key difference: extYbn.exe -p -ybn yst00140.ybn  -txt unpacked.txt -new-ybn modded.ybn -key 0x30731b78 -op-msg 95 op-call 29
    in this case we removed the json file, which will be imported automatically, the -p mode to pack the file and the -new-bin command with the new filename.
    You can also verify the file by manually decrypting in the hex editor like before. However yu-ris is quite sensitive with the text, so your new text may crash the game. Be sure to have repacked well with the right encoding and byte space.
    Repack YPF files
    To repack the archives, i suggest you to use the official sdk, you might need to get used to it, but i'ts quite simple and you can find the manuals in the official site, they are in japanese but you can use translate with that url.
    The sdk should match the game version, however the only important thing is that the sdk must use the same repacking algorithm of the game. I'll leave the sdk for euphoria, but is possible to get it from the official site with an http request.
    Inside the engine folder, you should find a subfolder called system, then the YsPac folder. Inside that folder, there is the YPF packer that we are going to use.
    First we must drop the extracted folder inside the application and select it. Then we must click the top left menu bar, then click the second parameter. This will export the file.

    That's it, the file should now be exported as a YPF file.
     
    Feel free to contribute and improve this guide, if you have any issues let me know.
     
    Yu-Ris SDK link: https://mega.nz/file/FQBgxJib#Yirgo01FPfDQu8Mte2b3dGMSxZx2UPyjIDDMhZZ2mU0
    extYbn link: https://mega.nz/file/FQBgxJib#Yirgo01FPfDQu8Mte2b3dGMSxZx2UPyjIDDMhZZ2mU0
  2. Thanks
    orangesunshine reacted to HoplessHiro in MAITETSU 18+ DEMOSAIC STEAM-FAKKU PATCH [COMPLETE]   
    MAITETSU 18+ 
    DEMOSAIC STEAM AND FAKKU PATCH

     


    Did you mistake the quote "100% DRM free and completely uncut with no scenes removed" as "TOTALLY UNCENSORED!"? Do you hate to see squares in beautiful art? Are you from the golden era (JAST USA, Peach Princess, G-Collections) and expected from an localized eroge to get an fully uncut, uncensored and without mosaics game? ... Then this patch is for you.
    You read it right, the patch does what it says.
    It removes the mosaic in hscenes from the beautiful artwork.
     

    Original MAITETSU 18+ Fakku edition -> you can buy it at the official page: https://www.fakku.net/games/maitetsu-english -> PLEASE SUPPORT english localization by buying the game ! OR BUY FROM STEAM
    Maitetsu 18+ Release Restoration Patch - FOR STEAM   OR    BANDAID removal PATCH + restoration patch - FOR FAKKU  

    1. [Q]: Is it legit?
    [A]: I can't believe it myself either. But YES! It is real and it does what it says. Try it before reporting or commenting. Thank you.
     
    2. [Q]: Where are the hscenes? I can't find them in the game?
    [A]: There are no hscenes in the common route, except  provoking pictures which the Maitetsu 18+ Release Restoration Patch restores and the actual hscenes won't trigger by default, but during a heroine route, a message will popup at bottom right side of the screen saying that you gain access to a hscene, then you have to manually open the hscene in the menu. It is a game design, not a bug or glitch, it is how LOSE company makes the games. Rarely you will gain access for hscenes during a route, most hscenes are unlocked AFTER finishing the game with that particular heroine.
     
    3. [Q]: When does the DLC hscenes show up?
    [A]: After you complete the previous hscenes, the DLC hscenes will eventually show up.
     
    4. [Q]: STEAM support?
    [A]: At the moment I don't own the STEAM version so I can't test it and I don't know if it works. If someone can help me I will make an steam support patch, but you would still need the FAKKU 18+ DLC patch.
     
    5. [Q]: Can we see some screenshot/examples of patch?
    [A]: Because of the nature of the game as being an loli game I can't post pictures because of the policy of the forum. But if someone wants to see the results before buying the actual game I can send you 2 example pictures. Just send a PM and I will reply with those 2 example pictures. Examples of non-loli characters are in the gallery section.
     
    6. [Q] : What was changed in the new Fakku edition? What's the difference between the OLD and NEW download?
    [A]: Jacob from fakku has a good description -> https://www.fakku.net/forums/games/maitetsu-fixes-and-updates .Everything written in the section "what has not changed" WAS already fixed already by heliosaurus by his patch and the same fix is present in the new "BANDAID removal PATCH + restoration patch"
     
    7. [Q] Why is there a difference in size between Heliosaurus Restoration patch and "BANDAID removal PATCH + restoration patch"
    Both patches work perfectly fine and shouldn't have any problems. You can use Heliosaurus on the OLD and NEW version but the BANDAID patch is only for new FAKKU download ONLY. But... the original restoration patch includes fixes which are already fixed in the new version of  FAKKU's edition and the BANDAID removal patch just removes this fixes from the PATCH to be less in size. The reason why you could still use the original restoration patch on the old and new version of fakku is that technically the patch is in original form a "patch.xp3" which contains mostly PICTURES! Yes, pictures. And it just replaces those pictures from the original data files which are located in "data.xp3" / "emotedx.xp3", and so on. The KiriKiri engine works like that. When FIRST run, it loads first files from, data.xp3, and all the main xp3, and then LOADS patch.xp3, patch2.xp3, patch3.xp3... and so on. That's why we don't need external programs to patch the original data files, and we can put everything in PATCH.XP3, or PATCH2.XP3, and so on. You can  literally replace the whole game with a single PATCH.xp3 file. The restoration patch was made by using resource files from the JAPANESE version and replaces the resource files from the ENGLISH version. So the original restoration patch just OVERWRITES fixes-pictures present in the MAIN game from the NEWEST fakku edition download....
     
    8.[Q]: That isn't the game we were promised / it is disappointing / don't want to buy the game ....
    [A]: Well, it isn't a question, I just want to express my opinion... I understand that the release a disappointment, and like everyone, even I would wanted a TOTALLY uncut and uncensored version. I hate the CUTS in western releases, but that was going on for decades not just in VN's look in the old days of SNES games with JRPGS. And in east they get the same results with some western games... Thanks to that, we have two types of ppl - one who are complaining and the the other one who are making uncut/undub/uncensored version of games, from snes to psp/psvita and so on. What I mean is that you shouldn't lose energy in complaining on fakku and denpasoft/sekai, yes even sekai. I understand that sekai don't take releases seriously but at least we got the translated version, whish is a huge WORK. And be thankful, we got "OMG!" Maitetsu! I can't expect newcomers and the ones on fakku to stop complaining ( and I am not saying that you have to start editing, and join the community of moders, but you are always welcome to join ), but at least you at fuwanovel you have no more reasons to complain. At the end you got the complete 1:1 japanese uncut release with english text, and even a little more, with the demosaic patch ( which in the japanese edition they don't have ).
     
     
     
    .... please ask questions and I will put most common questions and answers here ...
     

    STATUS : COMPLETE !
    ALL SCENES MOSAIC-FREE !
    Hachiroku's Route

     
    Hibiki's Route
     
     
    Paulette's Route

     
    Reina's Route

     
    Fukami's Route

     
    Nagi's Route

     
    Kisaki's Route

     
    Makura's Route

     

    FOR STEAM USE: HELIOSAURUS PATCH for STEAM
    FOR FAKKU USE: HELIOSAURUS PATCH for FAKKU or down below the BANDAID removal patch
     
    1. Just extract the file patch2.xp3 from the ZIP file in the main maitetsu folder!
    !! the patch2.xp3, should be in the same folder as the Restoration patch (patch.xp3)  and the Maitetsu.exe file. !!!
     
     

    07/23  - Released the patch with the 5th scene included, and fixes the bug in Hscene 2
    07/24 - Released the patch with the included 6th scene
    07/25 - Released the patch with the included 7th scene
    07/26  - Released the patch with the 8th scene included
    07/27  - Hachiroku's Route COMPLETED!!!!
    07/28  - Released the patch with Hibiki's HSCENE 01 without mosaic!
    07/29  - Released the patch with Hibiki's HSCENE 02 without mosaic!
    07/30  - Released the patch with Hibiki's HSCENE 03 without mosaic!
    07/31  - Released the patch with Hibiki's HSCENE 04 without mosaic!
    08/02  - Released the addon patch with Hibiki's HSCENE 05 without mosaic, you still need the OLD "Maitetsu 18+ Demosaic Patch 7-31-2018" patch. In your folder you should have patch.xp3 (bandaid fix), patch2.xp3 (old 7-31 patch) and patch3.xp3 (this new addon patch)
    08/03  - HIBIKI's ROUTE COMPLETED !!!
    08/04 - Paulette's new hscene released!
    08/05 - Paulette's new hscene released! (Hint: This is the new release which includes HSCENE 03. Skipped Hscene 02 because here isn't any mosaic! Hence the name v0.3 - which represent the hscene completed )
    08/06 - Paulette's new hscene released!
    08/07 - Paulette's new hscene released!
    08/08 - Paulette's new hscene released!
    08/09 - Paulette's new hscene released!
    08/10  - PAULETTE's ROUTE COMPLETED !!!
    08/11 - Reina's new hscene released!
    08/12 - Reina's new hscene released!
    08/13 - Reina's new hscene released!
    08/14  - REINA's ROUTE COMPLETED !!!
    08/15 - Fukami's new hscene released!
    08/16 - Fukami's new hscene released!
    08/17 - Fukami's new hscene released!
    08/18 - Fukami's new hscene released!
    08/19  - FUKAMI's ROUTE COMPLETED !!!
    08/20 - Nagi's new hscene released!
    08/21 - Nagi's ROUTE COMPLETED !!!
    08/22 - Kisaki's new hscene released!
    08/23 - Kisaki's new hscene released!
    08/24 - Kisaki's ROUTE COMPLETED !!!
    08/25 - Makura's new hscene released!
    08/26 - Makura's new hscene released!
    08/27 - COMPLETE PATCH released! Mosaic removed from all scenes!
    08/30 - COMPLETE STEAM PATCH released! Mosaic removed from all scenes in STEAM FINALLY!!!!
     

     
    Complete FAKKU Patch
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    COMPLETE PATCH
    Maitetsu 18+ Demosaic Patch - v0.9a.7z
    Installation guide:
    - if you have downloaded the partial update - patch3.xp3 just manually delete it ( you don't need it anymore because its already inside the complete patch! )
     
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
     
    Complete STEAM Patch
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    Maitetsu 18+ Demosaic Steam Patch - v0.9a.7z
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||

    ThugShiro - mega big thanks to ThugShiro. He donated the Steam Version!
    BIG THANKS TO marcus-beta - with his tremendous help he found out the problem and fixed it, without him there wouldn't be a steam patch!
    Ulysses - big thanks to Ulysses, without his tools ( https://github.com/UlyssesWu/FreeMote/releases ) this wouldn't be possible.
    Tools used:
    PsbDecompile - for decompiling PSBs,
    PsBuild - for rebuilding back to PSBs
    FreeMoteViewer - to view rebuilded PSBs (after PsBuild)
    number201724 - of course, also big thanks to number201724 for the psbtools https://github.com/number201724/psbfile/releases
    Tools used:
    emote_conv - decode and encode psb file
     
    Heliosaurus - special thanks to the master of the Restoration patch and his helpful guiding
     
     
     
     
     


     
     
     
    SPECIAL extra patch:
    BANDAID removal PATCH + restoration patch integrated into a single patch ( patch.xp3 )
    For the newest FAKKU edition and STEAM!


    08/1  - Released the BANDAID removal PATCH + restoration patch integrated Restorationa Patch ( as PATCH.xp3 )
    09/20  - Released the BANDAID removal PATCH + restoration patch  for STEAM ( as PATCH.xp3 )
    Optional download
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    FAKKU edition
    Maitetsu 18+ Restoration & Bandaid Removal Patch.7z
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    STEAM edition
    Maitetsu 18+ Restoration & Bandaid Removal Steam Patch.7z
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    ANY COMMENTS, MEANINGFUL CRITICS, GRATITUDE, ADVICE, SUGGESTION RELATED TO THE PATCH ARE HELPFUL. THANK YOU VERY MUCH!
     
     
     

    Want to support the project?

  3. Thanks
    orangesunshine reacted to MrPalloncini in A complete guide to unpack and repack Yu-Ris engine files   
    You might get this error message because you are trying to repack the file in a folder that use SHIFT-JIS standard name, i suggest you to repack the folder in the desktop and without using a locale emulator (if you are using one). I've been able to repack the file, but the game refuse to work because the key of the compression is different. The game you are trying to repack uses a custom version of the engine (i think), which should be 500 (even if the exe says it's 555, idk). Because i'm not a programmer, i can't say that well how the repacking works for those versions and the official SDK for this version is not available. I recommend you to check YPF Manager Tool to try it for yourself, but i couldn't repack it even with that tool. The reason why i use the official SDK is because it's the only decent repacker out there, since ypf repackers aren't common. If you are able to find the exact version and the key, GARbro might be able to repack it too, but i already tried it. I'll try to work on this, but i can't guarantee you that i'll be able to repack it. However by using YPF Manager tool the game doesn't give any error, it just doesn't display the images. If you have more details, let me know.
     
    YPF Manager Tool precompiled: https://mega.nz/file/AN51FIbB#RBpPUPT4haxhTYAplxNPtt7SN7SKrDFGkdCZHcQaLBU
  4. Thanks
    orangesunshine got a reaction from Drowsyyy in -   
    -
×
×
  • Create New...