pk-hack / CoilSnake

https://pk-hack.github.io/CoilSnake/
GNU General Public License v3.0
158 stars 37 forks source link

Is it possible that certain dialogues are excluded from the ccscript decompiler? #288

Open plaindillo opened 4 months ago

plaindillo commented 4 months ago

I wanted to modify the Runaway Five's dialogue right before Ness and company hitch a ride to Threed. To be specific, I wanted to change the name back to it's Japanese original, "Threek", as well as restore plenty of other Japanese names. In this line of dialogue, the member (iirc, his name is "Nice"), says "All right... on to Threed!"

However, while I used a Grep utility, and scraped every single mention of the name "Threed", I found myself playtesting the game, and finding that in this particular sequence, the name was not changed to "Threek" as I wrote! Upon closer inspection, I found that I hadn't wrote it at all. What I learned is that this particular line of dialogue has two variations. One where Ness willingly walks into the Runaway Five's tour bus, immediately initiating the aforementioned dialogue, and the other variation is where Ness walks a certain distance away from the tour bus, initiating the band member to run up to you and say something along the lines of "Heh heh... there's no need to run.", forcing the player to get on the bus, and only then, initiating the "on to Threed!" line. Digging through the files, it appears only the latter variation is present in the decompiled script, with the former no where to be found.

I have scrubbed similar terms such as "Dusty Dunes Desert", changing every mention of it in the decompiled script to be "Doko Doko Desert", but likewise, there are still a few places where the name "Dusty Dunes" still appears, clear as day.

I have no clue on how to begin on fixing this, all I truly wish is that the answer can be found. And if I'm doing something wrong, please tell me. I have been working on the very same pet project for years at this point, and no matter how many attempts; I still can't seem to perfect it and polish it properly. If this is seen, please at least take a look.. I just want this project to be put to rest once and for all, and this chapter of my life to be over and well finished. Screenshot 2024-02-26 232936 Screenshot 2024-02-26 233000 Screenshot 2024-02-26 233751 Screenshot 2024-02-26 233811

ShadowOne333 commented 4 months ago

What version of CoilSnake are you using? This should have been fixed years ago, since it's something I remember from way back in like 2017 or so.

Check your data_XX files for this label: l_0xc89b4f, I think in recent versions it should be in data_40.ccs That text should be within that label, in my own hack I have the whole sequence as follows with an added label l_0xc89bf6, with the following in it:

l_0xc89b4f:
    "[1F 41 05][1F 1A C0 03 01]{pause(60)}[1F 1B C0 03][1F F1 C0 03 BB 00][1F 61][1F E6 C0 03][19 22 01 02 C0 03][1F 13 01 00][19 22 02 02 C0 03][1F 13 02 00][19 22 03 02 C0 03][1F 13 03 00]{window_open(1)}@Heh heh heh..." linebreak
    "  There's no need to wait...[03]{window_closeall}[1F 15 6A 00 BD 00 01][1F EF 6A 00][1F E8 FF][1F E9 C0 03][1F 61]{pause(60)}[1F 1F 6A 00 06][1F ED][1F 15 B9 01 09 03 01][1F 15 6A 00 BF 00 01][1F EF 6A 00][1F E8 FF][1F 61][1F EB FF 06]{unset(flag 536)}{set(flag 535)}{music_resume}[1F E5 FF]{unset(flag 317)}[1F F1 C0 03 C0 00][1F 61]"

l_0xc89bf6:
    "{window_open(1)}"
    "@All right... on to Threek!" next
    "{window_closeall}[1F F1 E2 03 C1 00]{pause(60)}[1F EE E2 03][1F E8 FF][1F 67 01]" eob

I swear this was supposed to be fixed, but it's something on CCScript's side and not CoilSnake itself.

plaindillo commented 4 months ago

For starters, I'm using the very latest version 4.2 of CoilSnake. In fact, I was using version 4.1 only to discover the other day that it had been updated.

Second, I checked for the: l_0xc89bf6 label, but in all the files, including data_40, its no where to be found..

Screenshot 2024-02-27 151549

Vittorioux commented 4 months ago

Unfortunately this is the case, the CCScriptWriter version CoilSnake currently uses misses about 530 labels (I think), probably due to a bug in the splitting. These are the ones I could gather.

image

There is a newer version of CCScriptWriter that fixes this bug, but it's not part of the 4.2 CoilSnake release.

plaindillo commented 4 months ago

I see.. so if this is not yet fixed in CoilSnake, is there a release of the newer CCScriptWriter that you are referring to? If not, building it myself is unfortunately outside of my abilities.

Vittorioux commented 4 months ago

Sorry, I was wrong about the number of missing labels, these should be more like 46, not the 500+ I thought, but these are mostly related to battle and inventory management stuff, so unless your project is some sort of translation or something that affects all of the text in the game you shouldn't worry too much about it.

As for the Threed line, that's related to a different issue, and it should be solved if you include this in any of your .ccs files:

ROM[0xc89bf6] = goto(l_0xc89bf6)

l_0xc89bf6:
    "{window_open(1)}@All right... on to Threed!" next
    "{window_closeall}[1F F1 E2 03 C1 00]{pause(60)}[1F EE E2 03][1F E8 FF][1F 67 01]" eob

(change Threed to Threek)

Could you specify where did you change "Dusty Dunes" to "Doko Doko" and it didn't reflect in-game?, from a quick look through these 46 affected lines, it doesn't seem like any of them is related to Dusty Dunes.

plaindillo commented 4 months ago

I did some testing and I was probably wrong about the Dusty Dunes thing. I could have sworn I remembered the guy from Escargo Express's "Neglected Class" saying "Dusty Dunes" but it just worked when I tested it.

Second, if you have every individual line that isn't included in CoilSnake, I'd love to have them! The hack I'm going for is similar to Shadow's Maternalbound; in the sense that it alters many seemingly inconspicuous lines, I'm primarily using Tomato's Legend of Localization website and book as reference, and I plan to make every alteration accordingly. Currently though, it's just for personal use.

Vittorioux commented 4 months ago

Sure! See if this helps

https://gist.github.com/Vittorioux/02f7d48f3b3b17886225aa5bc6302f0b

It looks like this bug in the splitting has been around since 2017, when a different bug was fixed :P, and there are actually two of these lines mentioning Threed.

plaindillo commented 4 months ago

Oh man!! Thanks so much!! I'm so grateful for your help!!! :D I do have one question though. Does it matter specifically where I place these lines? Or can I simply include the .ccs file you gave me in the CCScript folder?

Vittorioux commented 4 months ago

I think it should be ok to just include the .ccs, but if it gives you a compilation error that will be because some reference is wrong, for example data_52.l_0xc9b4b8 will point to the label l_0xc9b4b8 in data_52 (but maybe it's not in that file in your case, hence the error). In that case you can fix it by having the correct data_xx for each reference.

PhoenixBound commented 4 months ago

If you want to be as efficient about it as possible/not duplicate any data, you can find the original text still there, just without a label. For example, with the "save file corrupted" text:

l_0xc7c95e:
    "[19 10 01]{swap}@[1C 02 00] got off the bike.{wait}" eob newline
    "@We're very sorry..." next
    "@but the record of adventure number {delta} has been lost..." end

You can see there's an eob/[02] there but then the script continues on without a label getting added.

The smallest fix is to insert the label/ROM[] part there, using Vittorioux's file as a reference for what address to put in the []s:

l_0xc7c95e:
    "[19 10 01]{swap}@[1C 02 00] got off the bike.{wait}" eob

ROM[0xc7c973] = goto(save_file_corrupted)
save_file_corrupted:
    newline
    "@We're very sorry..." next
    "@but the record of adventure number {delta} has been lost..." end

If you're not running low on ROM space, though, then yeah, you can just paste everything from the gist into any file/save it as its own file and put it in your project.