News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Lash Ropes

Started by Plexa, 18, September, 2017, 01:18:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Plexa

Okay so these are driving me crazy. The length of the rope on a lash post is variable in length - either short, medium or long (as far as I know). But there doesn't seem to be a good reason why the length of the rope changes? It definitely isn't based on the GRN? Is it related to a global counter or something?

EDIT: Whoops wrong game :D

Daddy Poi's Oily Gorillas

#1
Sounds interesting. Would it have to do with the distance between both posts? I guess I can take a closer look at exactly what's being checked.

----
There are two types of Ropes - One that requires Lash, the other that's already connected... So I'll post the sections of code for both... (To point out the general section is already known, but a lot of it might not be documented good enough.)

Lash Pegs Group 1 (0300009C)
080D897C = Lashy - Initialization (Called from Map Code.)
080D8A00 = Lashy - Called every ~frame?
080D8C10 = See Movement Type - This is based on Lash pegs. - Called every ~frame?

080D8FA8 = Lashy
080D8FF8 = Lashy

080D9104 = Lash/peg/rope related (If flag is off) (pegset,peg1,peg2)
080D9194 = Lashy
080D92A4 = Lashy
080D92D4 = Lashy
080D9498 = Lashy
080D9710 = Lashy
080D9790 = Lashy
080D9974 = Return
080D9978 = *Research needed: One place tries to write "1" to 080F3944.
080D99B8 = isPlayerNextToPeg(peg1,peg2) Returns 1 if the player is next to a peg, otherwise 0. ; The pegs that you use Lash on.
080D9A74 = Lash/peg/rope related(peg1,addr1,addr2) peg2 placed in addr1, pegset placed in addr2.  (When r0=peg1, returns -1 if no match.)
080D9AB0 = Lash/peg/rope related
080D9AD0 = addLashy(pegset,flagInd,peg1,peg2) (Called from Map Code.)

Lash Pegs Group 2 (030000A0) - May not contain flag indexes, so these probably don't need the Lash psynergy.
080D9D40 = See Movement Type - This is based on Lash pegs.
080D9E74 = [030000A0]+EC, return an empty slot (return address)
080D9E98 = addLashy(pegset,peg1,peg2)
080D9F1C = Lashy
080DA060 = Lashy(,peg1?,peg2?,)
080DA0B0 = Lashy
080DA1B8 = Lashy
080DA22C = Lashy
080DA334 = Lashy
080DA3BC = Lashy
080DA660 = Lashy
080DA6E0 = Lashy
080DA908 = Lashy
080DA938 = Lashy
080DA968 = *Research needed: One place tries to write "1" to 080F3950.


@ room 23 (Shrine of the Sea God entrance room.)
02036CF8 = (value is 6) Seems to affect the sprite. But not length.
First rope entry:
02036D00 = Length of rope. (Probably for number of rope segments in a list.)
02036D18 = Pointer to what looks like a list of entries for each rope segment.

So I guess I kind-of see it?
Shrine of the sea god (Map 23) = Length 15
Kandorian temple lobby (Map 22) = Two ropes that are length 10
Madra catacombs (Map 47) = Length 17
Ahafran Cave (Map 101) = Length 8

But to figure out how the length is decided, I'll need to study one quick thing.

Looking at 080D9194 function for calculation:
Yep! Distance between both is checked - So that means Pythagorean Theorem is used.
(root(x^2 + y^2 + z^2) / 6) + 1
(Where x, y, and z are the difference between both objects, ofcourse.)


---
Was that what you were looking for, or did I miss something?
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Plexa

Oh my god that makes so much sense. The room where we're having trouble with it is the third floor in Gabomba where you need to use lash on the spinning gear. For some inexplicable reasons we didn't know why the rope changed length after the encounter, and this is why - the distance from the rope to the pole on the gear keeps changing.