Golden Sun Hacking Community
July 22, 2018, 08:50:56 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Lash Ropes  (Read 750 times)
0 Members and 1 Guest are viewing this topic.

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« on: September 18, 2017, 05:18:01 AM »

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
« Last Edit: September 18, 2017, 06:04:04 AM by Plexa » Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2412

« Reply #1 on: September 18, 2017, 03:06:06 PM »

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.)

Code:
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?
« Last Edit: September 18, 2017, 05:11:19 PM by Fox » Logged

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...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

Regular Member
**

Coins: 2
Offline Offline

Posts: 135

« Reply #2 on: September 18, 2017, 09:37:44 PM »

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.
Logged
View Profile
Pages: [1]   Go Up
  Print  
 
Jump to:  

Cbox
Yesterday at 09:19:06 PM
Salanewt: Time to upload that "EXP gain when KO'd" patch I made a month ago.
Yesterday at 09:18:48 PM
Salanewt: Oh hey, the site's back up!
July 18, 2018, 10:49:52 PM
roger: I can post but it goes to an error page when I submit.
July 18, 2018, 05:24:12 PM
zman9000: Site is back WOO!
May 09, 2018, 12:35:37 AM
KyleRunner: The "Start In" field is not editable... I'll try making new shortcuts
May 08, 2018, 09:51:08 PM
Fox: If all else fails, you canmake new Shortcuts to do the same thing.
May 08, 2018, 09:49:53 PM
Fox: Export Properties > Shortcut (Tab) > Target / Start In ; Target (for Export) should be: (filename) 0 , and for Import: (filename) 1
May 08, 2018, 08:52:00 PM
KyleRunner: I can't change the path in properties menu...
May 08, 2018, 01:27:19 AM
Fox: You may need to edit something in properties, though... so it uses the exe file in the same directory.
May 08, 2018, 01:24:59 AM
Fox: It is suppose to be a shortcut, yes.
May 03, 2018, 11:48:05 PM
KyleRunner: Fox, the "export" function in your text editor is just a shortcut... Could you please fix it?
May 02, 2018, 09:53:45 PM
KyleRunner: I come here everyday. I'm working on a Portuguese translation, and the people here help me a lot.
May 02, 2018, 08:56:07 AM
Drake baku: My feel as well, I posted a little as well since my return, but silence was all that followed... At least the forum is a great source for data when hacking GS/ GS2, currently looking for something I have read a long time ago cause my PP recovery psy is not working
May 01, 2018, 09:58:04 AM
Fox: I am thinking a lot of this might be because of Discord?
May 01, 2018, 09:56:08 AM
Fox: Yeah, this forum is more dead than ever before.  February and April have 0 new topics. (All other months prior have more.) And March has lowest number of new posts. (It'd be dumb to count the very first month this site was created.)
April 25, 2018, 09:02:13 PM
Fox: Yes. The best tool is a hex editor. Well.... VBA, VBA-SDL-H, no$gba Debugger, GBATEK, and my documentation.... to use these to learn how the code/data works. Best method because it maximizes your editing ability... and then there is my program gsmagic that I was working on. Still in its early stages, though. (Even after year(s).)
April 25, 2018, 04:21:58 PM
Xendrox D: *exept tla editor.
April 25, 2018, 04:21:29 PM
Xendrox D: is there any other tool for hacking gs?
April 23, 2018, 09:26:27 PM
Atrius: Rarely, but not never.
April 23, 2018, 08:01:48 AM
Drake baku: Can it be, the god who created the editor, atrius. I heard you never came back online here anymore

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.062 seconds with 22 queries.