[Bug] Tinto script walk can get stuck during Neclord arc

If you are stuck in the Dunan Unification Wars; or wish for more details on the gameplay systems, this is the place.
Post Reply
KFCrispy
Global Admin
Posts: 6174
Joined: Wed Jun 30, 2004 3:29 pm

[Bug] Tinto script walk can get stuck during Neclord arc

Post by KFCrispy »

https://clips.twitch.tv/MildRamshackleS ... DstCsdVy0H

I think I've seen this happen a few times to people. Any ideas about how to avoid it or fix it?
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: Tinto bug during Neclord arc

Post by Pyriel »

I think he went far enough down the path to the mine to trigger a loading zone, which probably dropped him back in the wrong area module. Similar to how the more well-known Tinto glitch happens.

Another possibility is that by dropping into that little pocket on the south of the trail, just as he hit the zone for the event trigger, he caused a hiccup with the pathing. It could be a bit of both.

Edit: It's the second one. Sort of.

You're not supposed to be able to move in non-dominant directions unless you're skimming off something you're colliding with, and it forces you along. You can see in the video there that he's pressing into the southern edge of the path. For some reason, if you do that, and get Riou into that "skim" state against that edge, and make it into that little pocket on the path, that glitch always happens. There's probably some tile math that goes off in the path-finding, and it doesn't think it can move you to the right location.

The northern edge, and more manual maneuvering works just fine. If you get into the pocket, move north, walk back along the path a little ways, and then move more directly toward the event trigger, it usually doesn't happen.

Edit 2: Here's the offender, but the issue is in the code that implements the command, I would imagine.

Code: Select all


RAM:80111D62                 .byte    4 #pathfind to location
RAM:80111D63 .byte 0
RAM:80111D64 .byte 0x68 # h X-pos
RAM:80111D65 .byte 0xBB # + Y-pos
I even triggered the other Tinto glitch to get back into the earlier version of the module, and it happens there as well. So I expect this problem exists in all versions of the game, including Japanese, and it's not just a US localization issue.

Seeing what it does frame-by-frame, the issue is probably that the increments allowed in the Y (north/south) direction are such that it just keeps overshooting where it thinks it needs to go. Pathfinding isn't something I'm terribly familiar with. From what I do know, I'm not sure if this is fixable without overhauling the logic in a major way, or changing something that could be detrimental elsewhere. I did try sending Riou to different locations, but that narrow gap there always causes issues if you have to move through it.
Julian
Posts: 73
Joined: Wed Jan 29, 2014 9:17 pm

Re: [Bug] Tinto script walk can get stuck during Neclord arc

Post by Julian »

It might not fit since the original part of that script is 4 bytes, but you could maybe try using 0x30, which is a "move to position based on another character's position" and use it to go just north of Koyu? I've noticed that command usually ignores obstacles so it would probably work.

This is what I have on my documentation:

0x30
object id to move
object id to move in relation to
direction 1 (seems to be left/right only? aka 02 or 03)
# units away
direction 2 (seems to be up/down only? aka 00 or 01)
# units away
?? (seems to influence path, it's either a 9 or not, seemed to flip whether they went x first or y first)

But depending on space available around that script this may not be the best fix.
User avatar
Pyriel
Webmaster
Posts: 1227
Joined: Wed Aug 18, 2004 1:20 pm

Re: [Bug] Tinto script walk can get stuck during Neclord arc

Post by Pyriel »

It's not a bad thought, but when I change it to seek the right position, Riou just walks farther into the rocks before getting stuck in exactly the same way.

I couldn't really use it in the bug-fix anyway, without a lot of overhauling. There are 4 bytes of air around this script that can conceivably be used, but I already used all of them to fix the other glitch in the sequence. As I recall, the module in question was right up against the limit, which is why it was duplicated in the Western localizations to make space for the translation, and I don't think there was even room left to just copy the script to the end of the file.

Edit: Actually, if I tell him to go to 0xBD instead in the original command, it seems to fix the issue. At least I haven't been able to trigger it with that value in. It's just really fiddly. Everything else I tried that wasn't just silly caused him to get stuck. I guess he'll just have to get really cozy with Koyu.

I take that back, it just made it harder to trigger. I can still get it to happen, but I have to be more careful about movement.

Edit 2: Ok, there's sort of a sub-tile position stored right after the X/Y tile positions. You don't really need to do the skim, at least not for long, but if you can ever get past the primary collision into that southern area, you're boned. Typically, the boundary will prevent you getting past Y=0x560, but if you skim or try hard enough, you can get to where it lets you pass up to 0x564. After that, you're misaligned by 4 until you do something to reset it, like go into an interior and return. If you trigger the loading zone with the misalignment, the pathing goes haywire in the script.

Presumably the pathfinding is converting to the more granular units, and the condition is never satisfied. Not entirely sure at this point. Riou definitely hits the right Y tile value, and should move left, but doesn't, so it seems a safe bet.
User avatar
JuveLeo
Posts: 260
Joined: Tue Dec 31, 2019 12:10 am
Location: Canada

Re: [Bug] Tinto script walk can get stuck during Neclord arc

Post by JuveLeo »

I've never had that one happen to me. I've had the glitch in Tinto where you couldn't leave houses and were basically walking in walls lol.
Post Reply