Golden Sun Hacking Community
April 20, 2018, 10:06:48 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 669 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: 4566

« 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: 2411

« 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: 4566

« 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: 2411

« 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: 4566

« 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
Today at 02:46:36 PM
KyleRunner: Atrius!!
Yesterday at 11:29:46 PM
Atrius: @Fox, I tried, but for some reason Mario Golf won't boot, and Mario Tennis crashes when you patch out the text compression, and I'm not sure why...  The normal text loading functions in them are basically the same as the ones in the Golden Sun games.
April 16, 2018, 07:44:36 AM
Drake baku: So it took about halve a hour of letting my lap stay off for it to suddenly work again
April 16, 2018, 07:31:28 AM
Drake baku: All of a sudden fox his editor gets errors. When trying to start it, thing worked fine yesterday...
April 14, 2018, 01:04:37 PM
Fox: @Mario Golf/text editing = Nope... And it may be awhile yet. I think I looked into it before... (at least for GS1)... but usually is the case when I come across a particular problem, that it can delay a solution for an extremely long time.
April 12, 2018, 04:27:14 PM
KyleRunner: Gee... never used discord...
April 12, 2018, 06:03:23 AM
Drake baku: I take it back, found it
April 12, 2018, 06:02:01 AM
Drake baku: But there is no discord link to be found
April 12, 2018, 06:01:44 AM
Drake baku: Everyone is on discord
April 11, 2018, 09:44:06 PM
KyleRunner: Fox, what about that tool for editing text in Mario Golf? Didi you finish it? If not, can you make a version of gstoolkit compatible with it?
April 11, 2018, 07:41:25 AM
Drake baku: Mauw
March 30, 2018, 07:26:11 PM
Salanewt: Hi!
March 29, 2018, 07:37:45 PM
ThanatosTheDark: YYEEEOOOOOO
March 12, 2018, 02:21:06 AM
Fox: say*
March 12, 2018, 02:20:53 AM
Fox: I saw we need an event this April Fools/Easter... because two holidays are in one, why would we not want to miss having something special? (Unfortunately, there's no one here to make an event be successful.)
March 12, 2018, 02:18:17 AM
Fox: And since that's the case...  I have thought of another fun experiment idea. - What if we had an auction on who should run this site, and waited for 10 people to bid and also for a bare minimum of 24 hours. Who would bid the highest, and how much would that bid be? - The idea is more for lulz (Maybe for April Fools?), and a theory to get an idea of how much the site might be worth as well.
March 11, 2018, 03:02:31 AM
Fox: Creepy, isn't it?
March 10, 2018, 02:19:04 AM
Fox: It's frog legs now.. It's something that's dead, but somehow still manages to wiggle.
March 09, 2018, 04:12:17 AM
JamietheFlameUser: I think this place is still dead.
March 02, 2018, 09:43:18 AM
Pkmn-Master: Lol I haven't been here in like 6 years. How is everyone?

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