Bug Fixes

If you are stuck in the Dunan Unification Wars; or wish for more details on the gameplay systems, this is the place.
Post Reply
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Bug Fixes

Post by Pyriel »

Sorry, I was a little too euphemistic.
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Bug Fixes

Post by Pyriel »

Here's the JP dump. I had to add a couple of little checks to try to filter out some non-text data. The way the files are structured, I can locate the text, but to a certain extent it's easier just to guess where it stops and take a little more data than I need if I have to. There are no counts or indications where pointer tables end, etc. Anyway, the system I came up with for the NA version didn't work as well on the JP version, so I made some quick adjustments. If anything obvious is truncated, I can try to fix it.

That said, if the file gets much larger, I'll have to use a host other than the forum. So that's fun.

Edit: For the person in the Suikothon Twitch chat (if you're about) when demanding the "Wind Crystal" Adlai says: 「なんじや!!!こんなガラクタを{eol}わしにどうしろというのじや?{eol}ところで、わしのたのんでいた{eol}『風の封印球』はどうなつたんじや?」

The bit in bold is the name of the item, which in the list of runes is: 風の封印球. The weird "crystal/orb icon" disconnect almost certainly doesn't exist in the original text. It's basically a lock. I'm only leaving the door open because I haven't actually played through the Japanese version, and there's always a slim chance with this game that something weird is going on. I'm also basically illiterate in Japanese without tools or a dictionary, but the strings are identical, and I can't see where context would change any meanings in goofy ways. Someone here who can actually read Japanese will probably be able to confirm at some point.
You do not have the required permissions to view the files attached to this post.
User avatar
Raww Le Klueze
Global Admin
Posts: 1915
Joined: Sat Jun 26, 2004 1:38 am

Re: Bug Fixes

Post by Raww Le Klueze »

I have no idea what the original question even is?
Doctorum Non Urina Singulus.
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Bug Fixes

Post by Pyriel »

Oh, in the US version Adlai asks for a Wind Crystal, but it's kind of unclear what he wants if you're not familiar with the series or haven't recently played the first game because everywhere you can get runes as items they just have the little orb icon. Kind of a legit gripe. Unless I'm remembering wrongly, the first game just has the word "crystal" everywhere, but in this one, Adlai might be one of only a handful of places where that term is used. I suggested that it was down to character limitations and translation because in Japanese the items don't have the icons. They're just referred to as "Sealing Balls" or whatever is a better translation for 封印球. The person who asked the question then asked what Adlai actually requests in the Japanese version, and since I was pulling the dialogue anyway...

It looks pretty clear that that's the case to me. Given how often Konami made duplicate copies of item arrays, and other assorted odd things, I still wouldn't be entirely shocked if someone who's played the JP version says they used a list in the rune shops that has 封印球 replaced with "O", or that Adlai uses an alternate line that I wouldn't find because it's too metaphorical or something.
User avatar
Raww Le Klueze
Global Admin
Posts: 1915
Joined: Sat Jun 26, 2004 1:38 am

Re: Bug Fixes

Post by Raww Le Klueze »

It is. The icons are only in the localization to save space for item descriptions and menus, same with armor/head gear/shields/etc. It's rendered as crystal in dialogue because they have more space, they just rarely talk about it. The Japanese uses the full names even in menus. The rune shops have even less space to work with so it's truncated like "Attach which one?"
Doctorum Non Urina Singulus.
Julian
Posts: 73
Joined: Wed Jan 29, 2014 9:17 pm

Re: Bug Fixes

Post by Julian »

Re: Orb/Runes

I can't speak for the PSX version, but on PSP, it works like this:

All item references to runes use the "Orb" (の封印球) suffix. When loading the text for an equipped orb (now a rune), the game literally grabs the Orb name, subtracts the end-of-string pointer by 6 (3 characters - since UTF-16), and writes "Rune" (紋章) over it. So 風の封印球 (Wind Orb) becomes 風の紋章 (Wind Rune).

Image

There's an issue with that code, because the game has to store the temp string in memory, it usually stores it right next to party data (or worse, on the stack) and there are no checks in place to see if the incoming string fits in the allotted space, so a long name causes a buffer overflow.

I assume the NA PSX version does something similar with swapping the orb icon to the rune icon. (The "MP" icon)

On another topic. Pyriel, I was doing some fiddling on script commands, and I found the meaning of the data for 0x1B. I was going to do a pull request on the github repo to update it, but I'm not sure if they edited the functionality on this during localization.

0x1B {data 1} {data 2} {data 3} {data 4} {dialog table number} {dialog number}

For the JP PSP version...
Data 1 and data 2 are x and y-coordinates for placing the dialog box (not absolute positions, think they're more like an adder).
Data 3 is the width of the box - in 0xC fixed width characters. (story dialog being 0x17)
Data 4 is the height of the box - in 0xC fixed height characters. (story dialog being 0x4)

I have no idea how they implemented VWF in the localization, so I'm not sure if that changes how Data 3 works in that version. In PSP/JP, heights and widths are very tightly coupled with other components. That width and height are used not only to build the box graphics, but they're also used to allocate space in ram to store the string and its accompanying metadata.

edit: Just realized what the original question on orbs was, uh, yeah, the item name is just hardcoded in that dialog there. So all this information is kind of irrelevant, but still interesting, I guess? I know I personally never made the connection between orb/crystals and runes being different things. I always thought that orb icon was just a rune.
You do not have the required permissions to view the files attached to this post.
Julian
Posts: 73
Joined: Wed Jan 29, 2014 9:17 pm

Re: Bug Fixes

Post by Julian »

I found a new text bug.

When you open a treasure chest with an item that has a quantity >= 2, the quantity is supposed to be printed. This seems to be broken in every version of the game, based on some youtube vod searching.

Here's the routine on the PSP version:
Image
Image

This looks *VERY* similar to the code that handles the printing for drops from battle.

Except, for treasures, the quantity was stored in 0x2(s2), not 0x3(s2). Changing those to 0x2(s2), as well as patching the addiu s0, s1, 0x7 to 0x8, effectively restores the quantity number.

The localized version might look slightly different, as they've swapped the string around. ("You got {item}" instead of "{item} obtained")

Patching those 3 instructions fixes it in the JP PSP:
Image
Image

Edit: Uh, actually, scratch that. 0x2(s2) actually seems to have the item id. It just so happened I was looking at item 0x12 and the quantity was 2.

Edit2: Ok, this ended up being a little more involved. It looks like chest quantities are hardcoded in the eboot/ELF? what XD

Looking at the stuff written near s2: (again, this is PSP... no idea what PS1 is doing.)
The stuff getting loaded into 0x0~0x3(s2) is coming from the event script: 0x1E 00 04 [4 bytes]. 2nd byte is the item id - changing it to an item that doesn't normally drop in the zone results in an error, so there must be a list of items elsewhere as well. I'm not sure what's at the top half of 0x3(s2), but the bottom half (AND 0xF) is a quantity. Seems to always be 0, but maybe not always? If you edit this one, however, you CAN override the default quantity.

0xC(s2) has a pointer to the 0x14 wide "chest structure" from the game executable. 0xA in this structure holds the quantity. Not sure what the other values are, but the chests were sequentially placed in here for the Sindar Ruins. However -- 0xA holds something else IF 0x3(s2) isn't 0. (For example, the Gauntlets chest in Sindar ruins had a 0x3(s2) of 0x10, and 0xA of this "chest structure" had 4 - clearly not a quantity since it's an equipment...)

So, I guess, you could say this isn't as much a bug as possibly scrapped functionality? They didn't want to write quantities in the event scripts, but wanted to insert them in the executable instead..? It looks a bit silly when battle drops have the quantity, but hey.
You do not have the required permissions to view the files attached to this post.
Rein
Posts: 15
Joined: Mon Sep 19, 2016 11:51 am

Re: Bug Fixes

Post by Rein »

Pyriel wrote: Sun Mar 25, 2012 2:09 pm OK, I reviewed all the code in the module, and I found nothing that's unreferenced. I'm forced to conclude that there simply isn't any AI for the Monwer. It's not broken AI, a broken definition of a monster, or anything like that. Konami just never compiled any attacks into the game, if they ever wrote any. It's probably the same for the Eye Flower, but I'll reserve judgement on that for later.

I don't think this is something that will be fixed by the patch. It might be possible to edit the sheet to include attacks, but I don't have the artistic skill for that, and the animations/AI would have to be invented out of whole cloth. I don't know what Konami's intent was here. Given history, it's probable that they screwed up somehow. Although, if they did, it was a pretty clean job. The only clue left is one frame on the sprite sheet that might be unused.
Was this ever figured out? I was playing the japanese psp version, and this enemy has a very high counter chance along with an animation for it. They never have a normal attack though.
User avatar
Raww Le Klueze
Global Admin
Posts: 1915
Joined: Sat Jun 26, 2004 1:38 am

Re: Bug Fixes

Post by Raww Le Klueze »

It's a joke, Monwer/Eye Flower are rooted to the ground so they can't get to you, they can only counter.
Doctorum Non Urina Singulus.
User avatar
Celes
Global Admin
Posts: 1422
Joined: Sun Nov 12, 2006 6:25 pm

Re: Bug Fixes

Post by Celes »

Raww Le Klueze wrote: Thu Apr 21, 2022 8:59 am It's a joke, Monwer/Eye Flower are rooted to the ground so they can't get to you, they can only counter.
This is also what the official strategy guide says. However, I have never seen them counterattack. Not even after extensive testing.
User avatar
Raww Le Klueze
Global Admin
Posts: 1915
Joined: Sat Jun 26, 2004 1:38 am

Re: Bug Fixes

Post by Raww Le Klueze »

Celes wrote: Fri Jun 17, 2022 5:19 pm This is also what the official strategy guide says. However, I have never seen them counterattack. Not even after extensive testing.

They counterattack like no one's business in the PSP version at least, it might be bugged in PSX or just the localized versions. I usually have a lot of L-rangers with me at that point so I wouldn't really have noticed most of the time.

Image
Doctorum Non Urina Singulus.
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Bug Fixes

Post by Pyriel »

I investigated this on the PSX a few years ago, and it didn't look like they were running an combat AI. Makes sense if they're only meant to counter, but it didn't look like they had attack frames on their sprite sheets, and after editing their stats and my characters' stats to a ridiculous level that should have ensured a counter under normal circumstances, nothing happened.
User avatar
Raww Le Klueze
Global Admin
Posts: 1915
Joined: Sat Jun 26, 2004 1:38 am

Re: Bug Fixes

Post by Raww Le Klueze »

Looking at the sprite sheet, there would be unused animations though? The attack animation is two frames, the half-closed flower and then the fully closed bulb, those aren't re-used as far as I can tell. The other half-closed is the being hit sprite and there's the death one.

But yeah, they don't seem to counter at all in the localized version at least, in the PSP version even level 60+ characters have trouble landing a hit on them so something's broken.
Doctorum Non Urina Singulus.
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Bug Fixes

Post by Pyriel »

Here are the sprite sheets. If I recall, I thought the frames for the head might show a "seed spitting" attack, and the rest looked like the idle, damage, and death animations. Looking at your screenshot, it very well could be the counter animation, though.

I don't think I have any Japanese saves in this area to check if it's a localization issue. I'll see if I can sort something out, though.
You do not have the required permissions to view the files attached to this post.
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Bug Fixes

Post by Pyriel »

Yep, localization issue, at least with the Eye Flowers. I converted a save, had Viktor attack for two rounds, 4 total attacks with double-beat, and he got countered twice. Never thought to check in any of the other regions. I wonder if it's a US-only bug.
Post Reply