07th-mod / umineko-question

93 stars 9 forks source link

Patch thread #1

Open ItaloKnox opened 8 years ago

ItaloKnox commented 8 years ago

Requesting you here, @enumag

Let me make a full breakdown about my findings:

The full original voiced script can be found here. Original file format was a compressed .dat file, but this is irrelevant since the new script follows a different format.

New script is here. Can be read without any workarounds. File needs to be .utf. Engine's manual is here.

For now the only thing we need to do is to put the voice files on the script.

Original script excerpt:

;「…屋敷内の戸締りは厳重に確認してきました。@ですが、万が一ということもあります。@皆、なるべくここに一緒にいた方がいいでしょう。」@
nat:dwave 0, nat_1e323`"...I carefully checked all of the doors and windows throughout the mansion.`@dwave 0, nat_1e324`  However, we must be prepared for anything.`@dwave 0, nat_1e325`  Everyone, I think it would be best if we all remained here."`\ 
E_N
ld l,$EVA_AkireA1,23

New script:

langjp「…屋敷内の戸締りは厳重に確認してきました。@ですが、万が一ということもあります。@皆、なるべくここに一緒にいた方がいいでしょう。」@
langen^"...I carefully checked all of the doors and windows throughout the mansion.^@^  However, we must be prepared for anything.^@^  Everyone, I think it would be best if we all remained here."^@
ld l,$EVA_AkireA1,23

Now two scripts that doesn't match.

Original:

; 私にとって魔法が存在しないのは、私の世界の話。@
; だからといって、お姉ちゃんの世界までを否定するのは、まったくのお門違いなのだ。\
`Magic not existing in my eyes...matters in my world.`@
`Denying it even in Onee-chan's world just because of that was totally barking up the wrong tree.`\

New:

langjp 私にとって魔法が存在しないのは、私の世界の話。@
langjp だからといって、お姉ちゃんの世界までを否定するのは、まったくのお門違いなのだ。\
langen^The fact that magic doesn't exist in my eyes...matters in my world.^@
langen^But denying it even in Onee-chan's world for that reason was totally misguided.^\

Looks like a really shitty job to do. Any ideas?

enumag commented 8 years ago

Entire game in just one script? I wanna kill somebody...

I basically need to know two things:

With an answer to the first question I should be able to create an index as I did for Higurashi. The second should allow me to insert the voices to the new script.

Non-matching translations should be possible to fix as long as the jap text is the same... Theoretically...

Btw, what does @ and \ at the end of a line mean?

Also in the new script there is often sth like this:

langjp「……………真里亞ちゃん、この一年でずいぶん立派になりましたね。」@
;<霧江
langen^"......Maria-chan really has grown a lot this past year."^@

What is the second line about? It doesn't seem to have an english eqivalent which confuses me.

Anyway this will be way harder than Higurashi. I have no idea when or even if I will have time for it.

ItaloKnox commented 8 years ago

What in the old script connects a line to its voice file? Probably you're looking for this: @dwave 0, The name is picked from a list of alias declared at the start of the script

What is the correct syntax to add voices to the new script? Looks like ^@dwave 0, ^. For some reason the engine uses ^ instead of the classic quotes.

  • Japanese text is as far as I know the same. All unmatched texts in english could be found just by searching for the japanese dialog.
  • I'm almost sure @ is a line finisher, like Line_WaitForInput in Higurashi. / seems to finish the whole dialog block.

If you remember how Higurashi works,

    OutputLine(NULL, "「さぁて!",
NULL, "\"Okay!", Line_WaitForInput);

langjp should be the first line and langen should be the second.

I also think this is a lot harder than Higurashi. Doesn't seem really worth it, so maybe we should put it on hold for a while?

enumag commented 8 years ago

Yeah... let's finish Tatari first and return to this in august or later...

Of course if anyone else reading this wants to write the script instead of me, go right ahead. ;-)

DoctorDiablo commented 8 years ago

I've got an idea how to make this work. I'll take a stab at it and let you guys know in a day or two.

drojf commented 8 years ago

I had a crack at it yesterday for a little bit but I don't think I'll come back to it until much later. By then someone will have completed it already, so I'll just write out what I did (not sure if it's helpful or not :S). The idea was the same as enumag, basically to correlate all the voiced Japanese lines in the two scripts. Then compare the two corresponding English lines and use the separators (@ or / or ) to figure out where the voice files should go in the English line

edit: I mean, count the number of separators to get to the "dwave 0" play command, then in the unvoiced version you count the same number of separators and 'paste' the "dwave 0" play in there.

Some notes that I made are:

;「 JAPANESE TEXT 」\
kin:dwave 0, kin_1e25: `ENGLISH TEXT`\
kin:dwave 0, kin_kin_1e41: `ENGLISH TEXT'\

So you'll need to take that into account when parsing the original script.

;!w800あったならッ!! ...[TRUNCATED] \
wait 3400:dwave 0, kin_1e56:`......if I did have such a chance!!"`\
langjp!w800あったならッ!![TRUNCATED]\
langen^^!w800^......if I did have such a chance!!"^\

^;.*[@/\\]\s*

My regex skills are pretty poor, there is probably a better way to do it. So, match ';' at start of line, then anything, followed by an @, / or \, with optional whitespace at the end. It's basically meant to match all lines starting with ';' and having a [@,/,] at the end.

ItaloKnox commented 8 years ago

Nice findings. wait values can be left as is, AFAIK they only affect people playing in auto mode. This stuff can be fixed by demand later.

I'll keep an eye on this thread. Hopefully we can get something to work.

DoctorDiablo commented 8 years ago

I managed to write some C# code that parses the original script and matches the Japanese sentences with the dwave aliases, based on suggestions in this thread. It's not perfect, since the original file is not consistently formatted. There are about 400 lines I know are not working and maybe others (out of like 50k total, that's pretty good though).

Now I'm working on parsing the new script to insert the dwave commands there. I'll give a more detailed explanation once I have that working.

Fun fact, in "dwave 0" the 0 is the audio channel to play on. There are a handful of places where multiple characters talk at the same time, so audio plays on dwave 0, 1, 2, etc. It's probably less trouble to just manually fix those than make the code handle them.

ItaloKnox commented 8 years ago

In Higurashi we have a similar setup for audio. PlaySE ( n, [...], where n is the channel. It supports about 16 channels, and sometimes we get up to channels 8~10. If I recall correctly Umineko also uses the same setup, so you are correct. It's not a big deal, since we can fix it manually.

DoctorDiablo commented 7 years ago

Ok, I think I've accomplished as much as I can with the code. There are 1827 issues that will need to be manually fixed, which is more than I'd like, but still about 95%. There are just too many inconsistently formatted lines. Plus, it looks like the original script didn't have 100% of the voice files encoded correctly either.

The way it works is that it reads the old script line by line and when it encounters a line of Japanese text it splits it into individual sentences on @ characters and puts them in a list of sentences. If two or more Japanese lines fall in a row, it keeps adding them at the bottom of the list. Then when it encounters an English sentence with a dwave command, it splits it on @ characters, parses each voice tag (eva_1e21) and inserts a mapping between the corresponding voice tag, the Japanese sentence, and the line number.

Once all that is built, we can loop through the new script and do basically the same line matching. But a single sentence can map to multiple voice tags -- there are at least 20 different lines that are just characters saying はい (yes). So we use the line number to find the tag that was closest to the last line written and write that one with the dwave syntax.

There are a couple ancillary output files that identify failures while reading and writing particular lines. The important one is writing_errors.utf. That's where I got the 1827 number from. Since all the voice tags are numbered and play in sequential order, I'm able to identify any discrepancies if a tag is used more than once, or if there is a gap in the tag order (jumping from eva_1e21 to eva_1e23). I did some wacky math to support tags like eva_1e21_1 and eva_1e21_a so those are being accounted for too.

I'm not too familiar with Github though. How do I upload my files?

ItaloKnox commented 7 years ago

That's some detailed stuff, also I think <2000 issues is actually a lot less than what we deal with Higurashi. It's pretty hard to talk about it without actually seeing the script, so I'm giving you write access to the repository.

I think you should make a new branch when pushing your changes. "Testing", "developer", anything goes as the name. Just don't overwrite the current scripts. 👍

enumag commented 7 years ago

@DoctorDiablo That sounds very nice! Pretty much what I intended to write if I got the time. Thank you! :+1:

The problem with Higurashi is the short lines. Unlike Umineko I can't use the context to match tem correctly because I don't have the PS3 script. That's why the result is better in this case.

There is one more problem I can think of. Since Umineko uses only one file for the entire game it is a bit too large and GitHub might not be able to show diffs unless we split it.

ItaloKnox commented 7 years ago

I think diffs should work fine after the first commit. Dunno if splitting is a good ideia, at least for the patch we're going to use delta after the first version.

DoctorDiablo commented 7 years ago

I created a branch for my code and submitted a pull request. Let me know if you can see it.

ItaloKnox commented 7 years ago

So, I went through recompiling the data and after a couple of tries (it seems you need to enable compression), I could get the game running with voices.

Though, looks like most voices are not actually working. Declared voice files aren't actually playing, and some characters have no voices while others have most voices working fine.

The following excerpt plays all Eva's files but none for Rudolf:

langjp「言ってねぇだろ、そんなことよ。」@
langen:dwave 0, rud_1e34:^"I never said anything like that."^@

ld r,$EVA_IkariA1,80

langjp「言ったわよぅ。@私、そういうのは絶対忘れないもん!」@
langen:dwave 0, eva_1e42:^"Oh yes, you did.^@:dwave 0, eva_1e43:^  I certainly wouldn't forget something like that!"^@

ld l,$RUD_komaruA1,80

langjp「いいや言ってねぇよ、言ってんのはいつも姉貴だよ!」@
langen:dwave 0, rud_1e35:^"No, I didn't...  You're the one saying that all the time!"^@

ld r,$EVA_FutekiA1,80

langjp「知ってるぅ?@ 寸止めって高等技術なのよぅ?」@
langen:dwave 0, eva_1e44:^"Didn't you know?^@:dwave 0, eva_1e45:^  Stopping a kick just a hair's breadth away from impact is a very high-level technique."^@

ld l,$RUD_waraiA2,80

langjp「ちぇ、いい歳した女がはしたなく股ばっか開いてんじゃねぇぜ!」\
langen:dwave 0, rud_1e36:^"Sheesh, women your age shouldn't spread their legs like that!"^\

I can also notice this behaviour on Genji, Nanjo, Battler, George, Kyrie, Maria, Rosa, Hideyoshi, Rudolf and Kumasawa. And that's just before at the start of the novel. So far, I've only heard Jessica's and Eva's voices. Kinzo was also voiced a couple of times, by the way.

I double checked all files and confirmed through the japanese text they are the same thing declared on the script. It seems the game is having some trouble playing the voices, but I still haven't found a pattern.

Any ideas?

By the way, if you still didn't get the voice files, you need to download this: https://mega.nz/#F!sIlFmQYb!nHEFdyvH4pEhc8vETK2ztQ The tools to extract the files are here: http://unclemion.com/onscripter/releases/ You'll only need to extract the arc3.nsa and arc4.nsa files. After getting the full voice folder, just extract the new port's arc.nsa, put the voice folder in there and recompile it. In short: ~$ nsadec arc3.nsa ~$ nsadec arc4.nsa ~$ nsadec -o arc arc.nsa ~$ nsamake arc.nsa -e -d arc

DoctorDiablo commented 7 years ago

That's different from what I'm seeing on my end. I didn't compile the voice files into arc. I just put the voices folder directly under the root of the Umineko folder and it's able to read them from there.

Or maybe we are using different versions of the voice files. I downloaded the 2 sounds archives from here: https://umineko-project.org/en/downloads/

ItaloKnox commented 7 years ago

Huh, that's odd. I didn't know you could just leave it outside the arc.nsa, but I guess it works. Dunno why it doesn't work just as nice when compiled.

I guess it's now time to work on the graphics part. By the way, doesn't the links from umineko-project only cover EP1 to 3?

DoctorDiablo commented 7 years ago

Not sure, so far I only did testing in EP 1. My voice folder has 45,568 files.

ItaloKnox commented 7 years ago

Mine has 51,077. I guess you're missing the last chapter.

I played a bit here and found a few issues, but I didn't manually check them to see what was wrong. I'm in no shape to do this kind of thing today, feeling a little tired to think.

I'll try to play a little more tomorrow, see how far I can go and take some notes.

DoctorDiablo commented 7 years ago

Cool, I was able to rip the voices from the arc files so we're working from the same setup now.

We're making good progress, thanks dude.

drojf commented 7 years ago

So, I tried it out, seems to work fine. The first error I found (which you may already know about) was nan_1e16, which is not played.

 ;!d800遺言を書くよう勧める頃です。」\
delay 2500:dwave 0, nan_1e16:`I would recommend that you write a will at this point."`\

langjp^^!d800遺言を書くよう勧める頃です。」\
langen^^!d800^I would recommend that you write a will at this point."^\

It's surprisingly on the list of voice tags (nan_1e16 - 49617), but not in the reading or writing errors list.

Next one is at

;!d800遣り残し。@受け継いで欲しいことや、/
delay 1600:dwave 0, nan_1e21:`and matters you have left unfinished.`@:dwave 0, nan_1e22:`  Things you want to be passed down...`/
;!d800……伝えたいこと。@……何でもいいんです。」\
delay 1900:dwave 0, nan_1e23:`...and things you want to tell.`@:dwave 0, nan_1e24:`  ......Anything you want."`\
langjp^^!d800遣り残し。@受け継いで欲しいことや、/
langen^^!d800^or matters you have left unfinished.^@^  Things you want to pass down to others...^/

langjp^^!d800……伝えたいこと。@……何でもいいんです。」\
langen^^!d800^...or merely matters you wish to communicate.^@^  ......Anything you want."^\

it LOOKS like it's lines which start with 'delay [delay amount]' which have the problem, not sure.

The next error is because the scripts are legitimately different (search kin_1e41), as they split a long japanese line into two japanese lines.


I have another problem, but I think it's to do with ponscripter itself (I suspect that the audio files are being played back after being played back at a different sample rate - if you A/B compare the original voice files to when it's played in game they don't sound the same). I'll do some further investigation and see what the problem is (in the end I'll be reporting back to Sekaiproject since they own the Ponscripter-fork repository....).

ItaloKnox commented 7 years ago

Yeah, delay lines aren't working. I tried moving them around but the delay is the issue here. Kinzo's issue can be fixed just by merging both lines, I guess.

(P)(O)NScripter is a really shitty engine, so it's no wonder it can't work fine.

DoctorDiablo commented 7 years ago

About the error with nan_1e16, it doesn't show up directly in the writing error list but it mentions the tags before and after

MISSING TAG BETWEEN: nan_1e15 AND nan_1e17

And I found what's causing the delay lines to blow up. It's actually the ^^ before the !d800 that is causing the problem. The original script didn't have the ^^ there so it fails to find the matching text. I can try parsing out those characters and see if that fixes it.

DoctorDiablo commented 7 years ago

I removed the leading ^^ from any Japanese sentences. It reduced the number of write errors from 1827 to 1082, and it looks like it fixed the line @drojf mentioned.

Submitted another pull request with the code change and the updated output files.

ItaloKnox commented 7 years ago

Can you double check your changes? I don't know if it's just me, but the delay lines are still not playing voices. They'll only play what is after the @ break.

DoctorDiablo commented 7 years ago

You're right, they're still not playing. This is going to require some more work. We need to figure out the correct syntax to get the dwave command playing after the delay. I tried putting it before the !d800 and after. I also tried removing the ^^, but nothing seems to work.

Media-Nox commented 7 years ago

Using "delay" instead of "!d" seems to work with the few lines I've tested it on, but for some reason you have to use a higher delay value than you would with "!d".

Example: langen:delay 2200:dwave 0, nan_1e16:^I would recommend that you write a will at this point."^\

Saq78642 commented 7 years ago

Hey, I'm Saq from the "UmiTweak" project, we manually inserted voice files into the nscript.dat, one of our scripters Levani, essentially did all the voicing. We used ONS though not PONS so you might have issues if you try to import our script and merge them. But know you can use all resources that were available to us, you have our permission. As for RU, they are GREAT. Knox is incredible and can automate scripts. Vit and Giza too. Those three are the people you want to speak to.

ItaloKnox commented 7 years ago

@Media-Nox Using delay 2000 works pretty well. I don't think it's so much different from using 800, so maybe we can stick with that for future references?

@Saq78642 Hey, thanks for dropping by. Actually we sorted out the issue by just following the japanese patterns and using that to insert the text, since the english translation is quite different from back then. For now we have a very good setup in place, and most likely the number of issues is pretty low to require further assistance. Though, I really appreciate the names you dropped here, and I will definitely look for them when a bigger issue pops out.

Anyway, thanks for all your work with the UmiTweak team. Without that, we wouldn't be so far into development. Really appreciate it. 👍

DoctorDiablo commented 7 years ago

Updated the code again. It reads the delay length from the !d800 directive, doubles it, and formats it as :delay 1600 Doubling made the most sense, since some delays are 600, 800, 1000, etc. There are also !w commands that do the same thing, so I made the regex match them too.

ItaloKnox commented 7 years ago

I've been thinking about "officially" releasing what's done until now so we can collect some more feedback. What do you guys think?

I tried a few things today related to the graphics and there are a few issues to fix. First one is that there is no scaling, so all images needs to be manually fixed to a smaller size. Second issue is that I don't have a clue on how to enable the widescreen hack. Third issue is that I cannot find anything related to the resolution at all. AFAIK the game is running in 1280x960. So, any ideas?

DoctorDiablo commented 7 years ago

I think it's stable enough to release what we've got. I'm planning to start manually fixing the voice lines that the code couldn't handle.

I haven't gotten around to looking at the graphics yet. If I find anything out, I'll let you know.

drojf commented 7 years ago

EDIT: upon further inspection of the code, I'm not sure if this information is correct. I'll look into it.

I played around with the arguments like "--window-width" which should work with onscripter (according to the internet), but didn't. Also strangely most commands would show blank instead of some error message.

So then I had a look at the source code (by downloading it and using Notepad++'s search) and there was this "-d" or "--debug" argument which I tried out (along with numerous other possible arguments). On startup it opened the folder "C:\Users[YOUR USERNAME]\AppData\Roaming\Ponscripter" with two text files with stdout, and also a file which lists all the errors the parser found when it was reading the script!

Long story short, when you run this version of Ponscripter, it redirects output to those files instead of to console. If you use the argument "-h" or "--help", it will write this to the text file:

System info: Intel CPU, with functions: MMX SSE SSE2 
Ponscripter version 20160615 '' (NScr 2.81)
Usage: ponscripter [option ...] [root path]
      --registry file   set a registry file
      --dll file    set a dll file
  -r, --root path   set the root path to the archives
  -s, --save path   set the path to use for saved games(default: platform-dependent)
      --current-user-appdata    use the current user's AppData folder instead of AllUsers' AppData
      --script path set the script filename
      --fullscreen  start in fullscreen mode
      --window      start in windowed mode
      --gameid id       set game identifier (like with game.id)
      --force-png-alpha     always use PNG alpha channels
      --force-png-nscmask   always use NScripter-style masks
      --force-button-shortcut   ignore useescspc and getenter command
      --disable-cpu-gfx do not use MMX/SSE2 graphics acceleration routines
      --enable-wheeldown-advance    advance the text on mouse wheeldown event
  -d, --debug       run in debug mode (repeat for verbosity)
  -h, --help        show this help and exit
  -v, --version     show the version information and exit

Now, the code does have some handling for the --window-width option even though it is not listed above, but afaik it doesn't actually do anything.

I also had a look further at the screen resolution stuff in the code and it looks like it's hardcoded to a few default values (Narcissu was 800x600 resolution). It might be patchable just by patching the .exe file, but I haven't done that sort of work before. This is all based on the Narcissu source code - things may have changed since then.

drojf commented 7 years ago

results: http://imgur.com/a/GswJa

OK, so editing the .exe can force the engine to go widescreen, but all the text is shoved to one side. Anyone know how widescreen patch done in previous Umineko versions? Can this be fixed via the script? I guess if the Umitweak guys could re-arrange the text-box, then the text should be able to be moved to the side using their method @Saq78642

ItaloKnox commented 7 years ago

Man, I was finishing my comment when you posted another. That's some mind reading stuff here.

Anyway, I was going to suggest the hex edit. I did some stuff with (P)ONS a few years ago, and it's just no surprised how buggy it is. I don't have much time today, but I will try to recompile the .exe later. As far as I know, the exe can be changed pretty easily since it doesn't hold anything that can get in our way. Though, I don't know if they are running Sekai Project's fork. Back then Sekai Project didn't even exist, so the only PONScripter I knew about was the one created by Uncle Mion.

drojf commented 7 years ago

OK if you're going to edit it then here's the raw edits required (if for some reason your .exe is different, you can probably still search for part of the sequence and it will turn up).

Address: 0000E6C0
00 B9 00 05 00 00 66 89 8B E8 00 00 00 66 89 93 - OLD line
00 B9 80 07 00 00 66 89 8B E8 00 00 00 66 89 93 - NEW line

MY .exe file size (not on disk) is 8,903,849 , and I'm using the steam version.

DoctorDiablo commented 7 years ago

I made manual updates to the 0.utf to resolve all the write errors in episode 1. I tested it up until reaching the boat, and I'd say it's at least 99% working. I'll keep moving forward with the later episodes.

Forteissimo commented 7 years ago

Hello everyone, a few hours ago I was suggested to contact the group currently responsible for the conversion of the game concerning a few questions I had. I'd like to thank you for all the fantastic work you have done so far, and apologize for my lack of experience concerning NScripter.

Earlier this week, when I was yet to know about this project, I began modifying the PS3 assets for use in the Steam release, hoping to patch the game myself. Both character portraits, in png, and backgrounds, most in bmp, have been resized and adjusted to fit the game's 1280x960 resolution, with all backgrounds the exact same height and width, as well as every pose repositioned and set to a specific width for every character.

However, I am having trouble repacking these assets into a proper arc.nsa file using nsaarc. While character portraits seem to be displaying just fine, backgrounds on the other hand would end up very noticeably zoomed in for some reason.

Then there's also the fact that using nsaout to extract the assets from the game's original arc.nsa, many of the bmp files would seem 'unreadable', including backgrounds, effects, and menu elements. I most likely must be doing something wrong.

If it would not inconvenience you in any way, I would appreciate any advice regarding these problems.

drojf commented 7 years ago

I suspect the background images are the originals, and haven't been pre-scaled to 1280x960. In other words, they stretch the images in-game to make them bigger (I tried the same thing as you by inserting a random .jpg in the script and it was scaled so much you could see the pixels). Unfortunately I don't know if they hardcoded that in their engine, or if you can change it via the script. Any Nscripter experts know how backgrounds/images of different size work? There looks to be a "bgalia" function which will set the background image size for you, but I haven't tried it yet.

ItaloKnox commented 7 years ago

@Forteissimo You should use nsadec to extract the *.nsa files. To repack, use nsamake.

As I posted above,

~$ nsadec -o arc arc.nsa
~$ nsamake arc.nsa -e -d arc
Forteissimo commented 7 years ago

Thank you, the tools worked just perfectly. Also, looking back on a few threads, it would appear somebody was able to disable the stretching in the backgrounds. Wish I could've contacted them at the moment.

drojf commented 7 years ago

OK, I feel super dumb right now. One of the things I hadn't done yet was actually play the damn game (this new version of it), or even extract the resources. There are high resolution background images in the game files, and looking up the file names in the script, you will find that they are prefixed with ":b;" or ":ba;"

;show 'test.jpg' in high resolution (not zoomed in), with effect 0
bg ":b;test.jpg",0   

I'm not sure what the difference is between :b, and :ba. There is also ":a" by itself, and ":c". I feel like this should be documented somewhere but somehow I never saw it in the onscripter documentation.

Anyway, now you can have your large images :)


Also, it works nicely in my widescreen mode (although the transitions are screwed up). I managed to fixed the text position by changing the "setwindow" command to add an offset to where the text is drawn. You could also do the Umitweak mod where the text is drawn at the bottom of the screen (maybe).

ItaloKnox commented 7 years ago

@drojf Which transition are you talking about? Maybe we can just replace it or if it's not all that important, remove it. I'm kinda against it, but maybe the tradeoff is fair enough.

drojf commented 7 years ago

The problem with transitions was that ALL effects would cut off or repeat after 1280 pixels.

I think I have fixed the problem. When I was looking into the problem the other day, I learned that all effects in the game just use a 'mask' image. So fade left, right, up, down effects are just images on disk, listed like so:

...
effect 3,18,1300,":c;Bmp\Efe\left.bmp"
effect 23,18,300,":c;Bmp\Efe\left.bmp"
...
effect 4,18,1300,":c;Bmp\Efe\right.bmp"
...

The size of these 'effect masks' is 640 x 480 (except for ones added in by the developers). So my theory was that if I made them 16:9 then it would just work. Well, that does seem to be the case after a bit of playing around (I just made them extremely wide instead of exactly 16:9 to check it worked at all)

Here's a video of what it looks like now (there is a black bar at the bottom because resolution is 1920 x 960 because I forgot to edit the height to 1080. The text window is not correctly aligned either.)

I'm sure something else will be broken if I play the whole game like this, but I'm much more confident about this widescreen mod than I was before.

Just a quick note for anyone testing - it looks like when you save the game, it also saves the setwindow variables (I'm guessing it snapshots the game state). So if you save after executing a setwindow statement (or any other statement which changes state), and then you change the script files, then load that save, it will still have the "old" script's file settings!

Another thing if you're testing, you can extract all the arc.nsa files into the root folder, and rename arc.nsa into arc.bak.nsa, and it will just read the resources from the root folder. Then it's easier to edit instead of having to pack/unpack the files.

So in summary, to get to this point, you must

  1. Use a hex editor to edit the resolution to 1920 x 1080 (from 1280x960)
  2. Modify all the setwindow functions to move the text to the appropriate location (I only have tested one instance of it)
  3. Modify the "effect" files in the "Bmp\Efe\" folder to be 16:9 aspect ratio (I THINK)
  4. Insert new backgrounds, but prepend ":b;" so they are shown in Big mode
setwindow 31,16,25,20,23,23,0,2,20,1,1,#999999,0,0,639,479  //original
setwindow 201,16,25,20,23,23,0,2,20,1,1,#999999,170,0,809,479 //translate by 170 in x axis. not quite correct. 
Forteissimo commented 7 years ago

I can't thank you enough for helping me out, the backgrounds look perfect now! I've uploaded the modified script and the assets in case you'd like to have a look or would want to modify them. Aside from a few effects and scenes from the Beatrice vs Virgilia fight, I think I've got just about everything else down.

Upon reading through it for a bit though, I came to know the game actually used only one background image for any kind of weather, ignoring the other versions of each background available.

drojf commented 7 years ago

No worries Forteissimo. I'm sure we can copy the weather from the umitweak script and use all the available backgrounds (assuming that was fixed in the umitweak version)


Please ignore my previous comment...it appears I was using the wrong version of the voice files (I was using the ones from the "umineko-project" version). Suffice to say that all sound files must use 44.1khz sampling rate to work properly, 48khz files will not play properly using the current game engine.

DoctorDiablo commented 7 years ago

Just submitted the last of the changes to the voice patch. Covers all 4 episodes and the tea party scenes. At this point I'd call it complete and release-ready. I managed to fix all the errors identified by my code and then some. I even managed to fix a handful of errors that were in the original voice patch.

ItaloKnox commented 7 years ago

@Forteissimo Is the arc.rar the file with the all the graphics to work with the edited script? Sorry, can't download it right now. Maybe we should merge it with the latest version of the voice patch?

@DoctorDiablo Can't thank you enough for doing all this work. I will release the final version after I get Forteissimo's answer. Maybe I can merge it already and release the whole thing.

Forteissimo commented 7 years ago

It is, yeah. Besides some effects, and unless I've missed one or two files, every one is ready to use with the game. I'd try to fix the issue with the unused cloudy backgrounds and edit the script once more, but I wouldn't exactly know when are they used.

drojf commented 7 years ago

Hi everyone, just an update on the whole widescreen thing - it seems working enough that I would want to play the game in this mode. Basically all I need is the backgrounds and playing through the game to find which additional images need to be resized.

@Forteissimo do you have the original versions of the backgrounds (renamed and sorted)? I have the original ps3 backgrounds on hand but they're not all named correctly. If your internet connection is super fast then you can upload them for me, but otherwise there's no need, I can still test without them.

If anyone wants to try the script out I've forked and added a widescreen folder. It may be a while before I actually test and issue a pull request though. You can download the resized effect files here. View the readme for more information.

For now, I've set the default resolution to 1706 x 960 (16:9 ratio). This will mean everything remains the same height, and also means any non-16:9 images will be displayed properly, centered in the middle of the screen. The downside is that, on a 1080p monitor, the backgrounds will all be stretched slightly if you make the backgrounds of height 960. In theory, if you make the backgrounds a certain height, it will counteract the stretching and you'll have pixel perfect images, but I haven't tested this. That's really a minor thing though.

The other option is to go 1080p (or higher). This will result in a much sharper image since the backgrounds will not be stretched (assuming your monitor is 1080p). But more things will likely break.

For forteissimo: btw, If you want to use PNG files for the backgrounds, but not modify the script, the game will happily load PNG files renamed as .bmp. Of course modifying the script itself isn't much more difficult either if you want to do that.

drojf commented 7 years ago

I wanted to adjust the volume of the music/voices, as the music is way too loud, and I think the voices may be clipping when played with the music. To do this you adjust the "default_vol" alias, numalias default_vol, 70 on line 183. I believe this may adjust both the music and sound effects simultaneously, not sure.

To adjust the voice volume, just use the 'voicevol' command, eg voicevol 70 sets to 70/100. Default is 100 I think. There is no existing 'voicevol' command so I just stuck it underneath the above numalias default_vol, 70

I have it set to bgm = 40, voice = 60, but you could set it lower so there's more headroom if SFX/music/voice all plays at once.