ROM Hack Is anyone working on a Rune Factory 4 undub?

Tomato Juice

New Member
Newbie
Joined
May 16, 2015
Messages
1
Trophies
0
XP
54
Country
United States
Here is complete .bat for renaming audio files: http://a.pomf.se/iclgjl.bat
And here is a video (horrible quality) that shows how undubbed game works:
I can't fix this. I give up. At least for now.


I would rather play it with broken Japanese voices than the English ones, but I can't get the .bat file to work. I have both roms, how do I use it?
 
  • Like
Reactions: wbsddgg

Gadorach

Electronics Engineering Technologist
Member
Joined
Jan 22, 2014
Messages
970
Trophies
0
Location
Canada
XP
956
Country
Canada
My guess would be that the game code itself is setting the playback time slots for the audio. In order to get the proper timing set for the Japanese audio, it would need to use the timings in the Japanese version. It was probably incorporated as a compiled script, hence why we can't change it easily. Alternatively, someone could manually go through the games English audio and modify the Japanese audio to match their lengths. It would be a rather hackish solution though, and would probably sound pretty bad too. The only real solution would be to set up a debugger and patch the kernel to output all files it accesses in the ROMFS, so we could see if it actually accesses an external script file. If it does, it would have to be decrypted and patched either with the Japanese timings, or modified from the Japanese version with the English dialog. In the second case, the issues would probably come from the script layout of the English dialog. Either way, it's not easy if they did it this way, though it's still better than the shit I was going to have to do to get HM-PM2 working. At least there's, ideally, no modifications to the game code here. With HM-PM2, all the main text was stored in the code, and the rest was all pre-rendered 2D objects, that would have to be modified manually. Also, the kerning for the Japanese characters made it impossible to directly translate the lyric files, as the rendering was off, and would usually cause a buffer-overflow, leading to a system crash. That would have taken extensive modifications to the code to fix. That's why there hasn't been any updates on my HM-PM2 thread, because ain't nobody got time for that.

Anyway, good luck to the poor soul that tries to undub this game. All I know is it won't be me.
 
  • Like
Reactions: Subtle Demise

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Well, I've begun messing with this... on the second day now.

I've tried quite a few things, the sound bcsar holds variable names plus file system addresses for the files. Ive also tried unpacking it but misses part of it. The japanese one has about equal file names to variables (i believe the missing sound files are inside the bcsar itself in form of sequential cseq audio within other audio grouping formats, instead of stream files). One can line up the address sets from eng and jpn and by adding a few spaces on the list can line them up. Minus the player ones, those have to be listened to get 100% right.

If I can get the batch file from homuhomu I might try to make some sort of batch tool to lower the audio quality to lower the filesize and see if they are getting cut due to a size thing since i believe the audio files dont have an actual length variable inside. if its length then thats close to a dead end.

I tried moving the text to the jp version, only the eng files renamed, and the mc plus the eng files renamed to jpn plus the original engs side by side both give the same result. I crash exactly when frey reaffirms her name towards the end of the conversation before going to the room.

Note, the jp files in the jp cartridge and the jp files in the eng cartridge are slightly different. The actual text portion is identical byte by byte but the earlier portion is off by a bit.

I found a measure of success by extracting all the english text off the eng rf3mc and placing it in the jpn one byte by byte without moving the null separators. This however had the sideeffect of cutting off some overly long english text.managed to get to the job board tutorial and manually quit at that point with no crashes.

Im currently reworking the text replacement tool to work on all files automatically without having to set the offset for the text start. If someone wants to take the lines that are too long and rephrase them so they fit I'd be grateful. (I dont want to spoil myself :x)
 
Last edited by scrangos,
  • Like
Reactions: frogboy and Solar12

Frieren

Well-Known Member
Newcomer
Joined
Oct 31, 2014
Messages
95
Trophies
0
XP
228
Country
Poland
Can someone repost that bat file? link is dead.
https://drive.google.com/file/d/0B04pOOD4KGGWVXh3WFlnQ0g3cjA
One can line up the address sets from eng and jpn and by adding a few spaces on the list can line them up. Minus the player ones, those have to be listened to get 100% right.
When i started working with renaming i thought the same. But in end up i listened a whole bunch of audio files.
i believe the missing sound files are inside the bcsar itself in form of sequential cseq audio within other audio grouping formats, instead of stream files
No. English translation just have different structure. Japanese game has more voiced lines and one line can have many variants. English game have lesser voiced lines, and one line has only one variant.
I tried moving the text to the jp version, only the eng files renamed, and the mc plus the eng files renamed to jpn plus the original engs side by side both give the same result. I crash exactly when frey reaffirms her name towards the end of the conversation before going to the room.
Quests, names and some other stuff stored in code.bin So, replacing text is pointless. It make sense only if you know how make rom working with edited code.bin
 
Last edited by Frieren,
  • Like
Reactions: Solar12

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Thanks. By the missing sounds I meant the ones that have variable names but don't seem to have equivalent files even in the JP version. If they are sequential they are probably tunes or music.

I forgot to mention that throughout the intro, with just moving the eng files and renaming some of the dialogue lines get cut at the end (Less than when i inject the text into the jp file). Crash might have to do with that. Tough theres no long lines at the spot it crashes for me. (Actually the text window is about to close to do an animation then resume text).

Names are in one of the eng files but I havnt looked for the quest names yet. Nicknames too, could in theory change all the gender nicknames around for swapping sprites.
 

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Update:

Don't know if I'm doing things right but I feel I've made progress. The injecting text into same length text as japanese is a dud as it makes no difference. Figured out the format of the jpn/eng files and it has an entry for size there. Also replaced only the one i had injected with the full eng file and had no problems.

After enough intro sequences to want to bash my head against the wall i narrowed down the crash I was getting to the heronickname file. I suspect it has to do the the empty reference calls that in the jpn file are used for honorifics. @しゅじんこうくん@くん vs @@. Due to the files having entry location address and lengths in its index I'll have to make a packer and unpacker tool for the eng/jpn files in order to edit them. I will attempt to change those entries and repack it. Hoping the npc names in that file are what gets called for the bed interactions since those are still showing up in japanese.

Even when using the eng files the script gets cut if the lines are too long. I could use a hand with someone rephrasing the lines that are too long. Not sure if its a window size issue, or a byte size issue including carriage returns.. but id asume byte size since barely any of the 3rd text line in the window gets used.

The dialogue max length is 72 bytes(70 letters plus to returns, can save a space with a return). The green option max length is 24 bytes/chars. I have to test for the max on blue options.

I've been unable to find the english stuff in the code.bin. Theres file references for textures and other bins related to combat. Theres also what appear to be internal labels for item categories.
 
  • Like
Reactions: Solar12

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Finished the tool, changed the text in the nicknames file's honorifics and that stopped the crashing. I need to fix the tool so it works on the script text file (doesnt work with \n's atm). Move whatever textures need moving and sort out the text getting cut at the end. Plus some testing.. but probably will resume tommorow.
4tDiAMi.jpg
 

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
By the way.. does anyone know how to get the game to stop deleting my saves every time I load a new version? Its getting annoying.

I had made an attempt at the sound files, using homuhomu's batch file I lined up file sizes and theres at least 1000 that are 50% larger in the U version. The only files i know for a fact that get cut are the ones in homu's video and those are larger. However the bcstm is not well documented and the tools that can convert the formats dont work for batch applications... So I'm focusing on the text on the jp version.

Looks like both the jp and eng rf3.mc work just fine but still experience the text cut. I'll stick with the jp one since it seems safer. Bin might try to ask the mc to lookup the adhoc files that the eng mc might not have references to at all since tehy dont exist in the eng version.
 
Last edited by scrangos,

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Swapped textures, no problems yet. Not sure how far in the others were getting crashes still though. I've gotten past the intro fully it seems though and can do board requests.

Modified the tool, got the english script text unpacked and packaged again properly. It still cuts at 72 characters, with either rf3.mc. Seems to be a code.bin issue im guessing since the engine is probably not expecting that many characters in japanese. It does keep making sounds like its still writing text to the window, so it does understand they are there I think, just cant display them. At least the sound engine does. Analyzing the lines theres ~9000 lines over the limit. If i remove all spaces from those 9000 lines 3700 are still over the limit. Replacing the name variable call @しゅじんこうくん@ for a 4 letter name still leaves 3500 over the limit. (out of 99572 lines of text)

Gonna try to mess around and do a gender swap while I think of what to do.
 
Last edited by scrangos,

Askedforthis

Well-Known Member
Member
Joined
Oct 15, 2013
Messages
117
Trophies
0
Age
32
XP
170
Country
Norway
Not sure how far in the others were getting crashes still though. I've gotten past the intro fully it seems though and can do board requests.
Far past the crashing part. I crashed usually long before or during talking to the dragon in the intro when replacing the files. The airship part of the intro was very prone to crashes, so if you got that far, it's probably fine.

You're doing good work, keep it up. I hope you'll open source your custom tool afterwards, would be interesting to see how you got everything working. Good luck!
 

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Well the genderswap is certainly weird. The portraits use a back image then a small front image for the different faces. However the different genders have different coordinate centers for the overlay images which causes them not to line up properly. Female has a couple more voices than male, and im guessing the file size diff might cause a bit of cutting. Model worked just fine though. Cant find a tool anywhere to deal with bctex. Seems there's people that figured it out but keep it for their personal use... Doesn't look that complicated for someone that has knowledge of these sorta things though. (which i don't).

Still not sure what to do with the text. If you remove all the e's and spaces from the ones that extend still 731 are over. In continuous dialogue one could manually put some text into the previous box since you cant be sure automatically if its part of a conversation. Either way it'll take someone going over a lot of text.

Tools not complicated. The text is a table, first 4 bytes are just "TEXT", the next 4 are the number of entries, then 8 per entry, first 4 being length and last 4 being the address where its at. Then every entry separated by a null. Though with the address its not even needed.
http://pastebin.com/SqFA2mmW c# code.
drag drop the files, if its a eng/jpn file itll unpack it, if its not itll try to pack whatever you dragged ontop of it.

Edit: Currently on hold waiting for volunteers to shorten the text.
 
Last edited by scrangos,

Nazosan

Well-Known Member
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
This is amazing... Just last night I was playing RF4 again and thinking that it's really missing something important compared to the previous games, but at first I couldn't put my finger on it. Then I realized: because it's such a bad dub you're just not really getting the true feel and nature of all the people in the town. It just isn't the same...

By the way.. does anyone know how to get the game to stop deleting my saves every time I load a new version? Its getting annoying.
It may be changing the signatures or something along the way, so this idea my not work, but have you tried using SaveDataFiler to backup the current save before swapping versions, then using it to load the save after the swap? Or if you're using it as a .3DS (I guess that makes more sense during testing phases than an installed .CIA doesn't it?) it may just be a matter of renaming the save file temporarily.
 

scrangos

Well-Known Member
Newcomer
Joined
Nov 21, 2011
Messages
60
Trophies
0
XP
150
Country
United States
Yeah its a .3ds. I got things going a few days before I started on this so I still havnt really understood the differences between 3ds 3dz and cia. Some things are sorta testable after the prologue, going through it every time is annoying @.@

Theres very little progress on the rephrase front, really could use a hand.

Genderswap is a pain, to the point probly gonna finish it just to practice and learn. The images are compressed with as someone from another forum would eloquently put "literally Satan". Funny thing is i just need to shift the images 3 pixes horizontally and 7 pixes vertically but to do that i pretty much gotta be able to do anything to them.
 

Nazosan

Well-Known Member
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
Yeah its a .3ds. I got things going a few days before I started on this so I still havnt really understood the differences between 3ds 3dz and cia. Some things are sorta testable after the prologue, going through it every time is annoying @.@
.3DZ is when a header is included -- it tells Gateway (or whatever you're using) to actually use the header. This is mostly useful when playing online since a header is needed.

I think someone said the save does get embedded in a .3DZ? I forget though. Generally speaking for your purposes there is no point in using a .3DZ.

Theres very little progress on the rephrase front, really could use a hand.
What exactly IS this "rephrasing"?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool