Golden Sun Hacking Community
January 19, 2018, 11:12:23 PM *
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: Object Collision: Height?  (Read 500 times)
0 Members and 1 Guest are viewing this topic.
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4565

« on: January 17, 2017, 05:29:16 AM »

Hey! So, I have a long running goal where I want to make player effects more dynamic, and this includes allowing the player to push or Move objects diagonally. The problem with this is that Move pillars and other obstacles work in a way where manipulating them through the proper methods directly modifies the map collision data rather than having heights assigned to the objects. This effectively means that I can use Move to push a pillar diagonally but the sprite will only partially overlap with the collision, and looking at the actual code responsible for modifying a map's collision data didn't help.

However, I also noticed that the leaf platforms in Gaia Rock and the icebergs in E Tundaria seem to function differently. The platforms are not solid underneath, even when falling onto the lower level and trying to walk into them. I can also move freely between connected platforms, whereas movement is mostly restricted while they are moving (with exceptions where I can move very slightly should the game detect but be unable to execute a valid hop between platforms, or if I use the debug cheat for unrestricted movement while holding L). The icebergs seem to be similar minus the connecting part, as the one spot where a platform does connect with something else uses a script to make you walk all the way onto or off of the iceberg. I'm still researching these but am afraid of hitting a roadblock.

I was wondering if anyone had any insight on how these objects can have what seems to be object-based collision (unless they are actually map-based and are just hiding it really well). Additionally, I was wondering if this or some other method could be used to assign a height to something like a Move pillar while being able to stand on top of it without it being map-based and locked to a grid/whatever collision data is available. Ideally I can do it without having to rely on map initialization.

Thanks for reading!

« Last Edit: January 17, 2017, 05:41:20 AM by Lord Squirtle » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

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

« Reply #1 on: January 17, 2017, 06:59:27 AM »

Umm... I dunno...


I did just look at the leaf platforms, though... and found something interesting...
The tilemap is using the hop flag for tiles you can hop from/to.... but that also includes tiles that are touching as well.... interesting, eh?
If you turn off the hop flags, though... you can't hop between the objects... but if the objects are directly next to each other, you can still continue on.

Quote
02010000 = Tilemap (Including graphics, event indexes, heightmap, etc.)(32-bit a tile)
 000007FF = Graphic tile
 00000800 = Unused? (MSB of graphic tile in GS1)
 00003000 = If stepped on, heightmap index of PC (/NPC?) will change. (0=Does nothing? 1-3 are heightmaps 0-2.)
 0000C000 = Priority? (Whether the graphic tile appears in front or not.) - TODO: See if this is 2-bit.
 00FF0000 = Event Connector? (For doors as well.) (FF=Wall, FE=Gap for hopping?)
 FF000000 = GS1: Height data; GS2: Special tilescript flags.
 01000000 = ? (Used where bridges are.)
 02000000 = ? (Seen used in Jupiter Lighthouse near Hover pads/slopes. No idea what it could be. EDIT: I think my research a long time ago is that this was connected with above flag for changing the collision layer index of object.)
 04000000 = Determines whether to use the first or second encounters index.
 08000000 = Hit/damage inducing.
 10000000 = ? (Not sure if used or not?)
 20000000 = Slope down.
 40000000 = Climbable (Ladder/Vine) (Use same value on tile above or below to activate.)
 80000000 = Hop. (Can hop from this tile.)


How are we going to hop without relying on tilemap?
« Last Edit: January 17, 2017, 07:08:59 AM 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
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4565

« Reply #2 on: January 17, 2017, 07:13:03 AM »

You have a good point there. Although: It's also worth noting that there is a segment of code that can be modified/deleted in the hopping code, and doing so allows you to hop from the leaf platforms as they are moving (or from icebergs as they are moving, or pillars from any direction, etc.). I'll play around with that and see if it would be a viable solution but it may need something more.

Thanks for reminding me of that!


Edit: Removing the three instructions at #080D4F00 allows for what I mentioned, for reference. I still want to study the code further to see if more can be done for certain tilemap checks but for now this should work for testing.

Edit 2: Just wondering, would it be possible to mimic a tilemap tile that allows hopping through object/event scripting?
« Last Edit: January 17, 2017, 07:36:06 AM by Lord Squirtle » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

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

« Reply #3 on: January 17, 2017, 07:58:56 AM »

I was thinking about a separate Hop thing... (Assuming there was any logical reason why they even do Hop flags?) ... But yes, that works too...

---

Now that we're talking about objects... this jas led me to become very curious how all that data works (~020322EC... etc.)
For Felix... when you are on a moving platform, it sees that the last 32-bit number... is a pointing to the object you are on.

Object data
+00 = Movement Script pointer
+04 = Relative poisition in movement script
+06 = Direction facing
+08 = Current X
+0C = Current Z
+10 = Current Y
+14 = Z of floor
+18 = X dimension related?
+1C = Y dimension related?

+22 = Collision layer index

+38 = Destination X
+3C = Destination Z
+40 = Destination Y

+50 = Pointer... (I think it is sprite related stuff.)

+68 = Home X
+6A = Home Y

+7C = Pointer to object you're on top of?



---
So no height info?
« Last Edit: January 17, 2017, 08:01:25 AM 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
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4565

« Reply #4 on: January 17, 2017, 08:14:37 AM »

A separate hop would make more sense, lol.

That's also very interesting. It doesn't seem to be the same for stationary objects, but it looks like almost any moving object will have a pointer; just tested with a floating block in Jupiter Lighthouse. Makes me wonder if stuff at any of the Rocks will do it too...


Aw.
Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Pages: [1]   Go Up
  Print  
 
Jump to:  

Cbox
January 17, 2018, 04:07:51 PM
KyleRunner: :D
January 16, 2018, 08:44:56 PM
Fox: I must say... life can be complicated..... when you have question(s) (via email) ... and it seems like they sort of get ignored. :D ; Fun, (And sometimes, a person may respond, and completely not answer the question.... so like... 3-person conversation.) Hahahaha!!
January 15, 2018, 07:26:16 PM
Fox: (path) 1 text=(address) char=(address) free=(address) ; << Well, closer to this... but yeah... even if I do choose to have defaults in the code, I could still use this method for overrides.
January 15, 2018, 07:24:28 PM
Fox: So like (path) 0 text=(address) char=(address) len=(number) ; (path) 1 free=(address) ; Or something. But that's just a quick example.
January 15, 2018, 06:59:14 PM
Fox: Hopefully. I was wanting to make it so you could put in the addresses/etc. as one of the arguments in the path. Hm?
January 15, 2018, 03:37:07 PM
KyleRunner: Nice! I hope you'll add compatibility with others games (GS1, Mario Golf and Tennis) soon.
January 14, 2018, 11:40:09 PM
Fox: Okay. Posted (in Downloads section) an initial cutdown version for now, for my text compressor. Basically to separate the code from my Editor for anyone who wants to mess with it. It only supports GS2, because I still didn't add the addresses/etc. for the other games.
January 14, 2018, 05:01:00 PM
Fox: Okay! Going to need to think how I want it to work. Initial thoughts is maybe have a number of arguments in the filepath thing. And have a number of shortcuts (files) to be used as examples. Assuming there are no problems.
January 14, 2018, 10:38:24 AM
KyleRunner: Well... I'm used to editing text ina a text editor, so... yes! Thanks in advance!
January 13, 2018, 11:38:43 PM
Fox: (Text editor = Text Document like notepad.)
January 13, 2018, 11:38:21 PM
Fox: Would you prefer during the text editing in a text editor? (Like what gstoolkit lets you do?) I could probably make a separate tool or something to compress it.
January 13, 2018, 10:10:02 PM
KyleRunner: Ok. Once I finish my Lost Age translation, I'll try a Mario Golf one. Thanks. (But I'll need help).
January 13, 2018, 10:03:17 PM
Fox: If you want to make it "permanent" (part of a hack), then you'd edit code in the ROM that writes to this location of the IDs you'd want to change. (You can find these locations by using a breakpoint debugger like SDL-H or no$gba.)
January 13, 2018, 10:00:11 PM
Fox: Reload/switch = Recommended to be done through Debug mode/warp menu, ofcourse... since doors seem to appear as if they were disabled? ; 03001238:01 and B+Start to get to warp menu.
January 13, 2018, 09:55:39 PM
Fox: @Kyle Runner = It might be, but you'd have to use the correct addresses for Mario Golf, rather than for GS2 as I have it right now. ; @raijinken = Yes. 02000454 = ID of leader. (Change this and reload/switch room you are in, enjoy.)
January 13, 2018, 02:23:29 PM
raijinken: Hey guys, is it possible to somehow change the lead character on the map? Was wondering. I remember there was a cheat to use Jenna, but what if I wanted Isaac, or Piers?
January 13, 2018, 02:10:03 PM
KyleRunner: Hey, Fox *
January 13, 2018, 02:09:37 PM
KyleRunner: Hey, is your text editor compatible with Mario Golf (GBA)?
January 11, 2018, 08:33:13 PM
Fox: But if it isn't an oversight, I still can't imagine it being that useful.
January 11, 2018, 08:28:24 PM
Fox: part, ofcourse.

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.047 seconds with 22 queries.