Views: 19,856,921 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
03-29-24 02:23 PM |
Guest: |
0 users reading Does anybody know how the ! Switch + associated objects work? | 1 bot |
Main - General SM64DS hacking - Does anybody know how the ! Switch + associated objects work? | Hide post layouts | New reply |
Hiccup |
| ||
Normal user Level: 58 Posts: 483/815 EXP: 1511821 Next: 65725 Since: 09-06-12 Last post: 1664 days ago Last view: 19 days ago |
I'm not sure where to start with working it out, and some combinations crash the game.
Also, is there a way (by looking at the code) to determine if a parameter is made up of multiple parameters (see the Painting object), or just one? |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 5453/9016 EXP: 56056745 Next: 430899 Since: 07-03-12 From: in a box Last post: 57 days ago Last view: 16 days ago |
the ! switches have IDs, and the objects that can be switch-triggered have a corresponding ID set
I don't know more though (and it seems that the ObjectDB documentation is utter garbage for this object) ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
Fiachra |
| ||
Local moderator Level: 65 Posts: 943/1065 EXP: 2231336 Next: 104292 Since: 12-15-12 From: Ireland Last post: 2133 days ago Last view: 82 days ago |
Only know how they work when activating brick blocks:
- The "left" byte of parameter 1 is the amount of time in (number of seconds * 3) for which it stays activated when using a timer. - The "right" byte should be set to "02" to use a timer. - Any "Switch Activated Brick Block" objects (ID: 25) must have parameter 1 set to "FF00" in order to be activated by the switch. You'll just have to debug the game and see where the parameter is read and what is done with it. If you know the object's address you can add a breakpoint to be hit whenever that address is read from or written to in no$gba using "[XXXXXXXX]?!" where "XXXXXXXX" is the address. An object's parameters are stored at the following offsets: parameter 1: 0x08 parameter 2: 0x8C parameter 3: 0x90 Any processing will probably be done in the constructor for that object, details on finding an object's constructor are explained here. You're probably best letting the game reach the start of the constructor and then adding your breakpoint. If you want to execute custom code when a switch is stepped on you can add a hook as follows: void hook_020BA38C_ov_02() |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 5457/9016 EXP: 56056745 Next: 430899 Since: 07-03-12 From: in a box Last post: 57 days ago Last view: 16 days ago |
Hiccup |
| ||
Normal user Level: 58 Posts: 485/815 EXP: 1511821 Next: 65725 Since: 09-06-12 Last post: 1664 days ago Last view: 19 days ago |
@Fiachra
I don't really know how to do the debugging stuff, but that info gives me a place to start with manually testing the parameters, so thanks for that info. I've added it to the db with credit to you. BTW: do you have any other object documentation that you haven't released yet? I'd be interested in messing with those and adding them to the database. |
Hiccup |
| ||
Normal user Level: 58 Posts: 488/815 EXP: 1511821 Next: 65725 Since: 09-06-12 Last post: 1664 days ago Last view: 19 days ago |
If you want me to specifiy some that I'd like to know about, could you explain the parameters for the objects that use messages (sign, wall sign, toad, rabbit(?), bob-omb buddy) |
Fiachra |
| ||
Local moderator Level: 65 Posts: 946/1065 EXP: 2231336 Next: 104292 Since: 12-15-12 From: Ireland Last post: 2133 days ago Last view: 82 days ago |
I don't actually know much about how those work. I didn't want to try and work out how the message ID's were calculated for Bob-Omb Buddies so I just bypassed the original logic and made the message ID be the value set in parameter 1 and I'll be doing the same for the signs.
I could tell you where in the code the mapping takes place if you want to try to work it out. |
Hiccup |
| ||
Normal user Level: 58 Posts: 489/815 EXP: 1511821 Next: 65725 Since: 09-06-12 Last post: 1664 days ago Last view: 19 days ago |
Nah, I'm more interested in more parameters you *know*, so I can add them to the db. Are there any? |
Hiccup |
| ||
Normal user Level: 58 Posts: 502/815 EXP: 1511821 Next: 65725 Since: 09-06-12 Last post: 1664 days ago Last view: 19 days ago |
Another question:
Does anybody know how warps should be placed (coordinates, rotation and parameters) in relation to Warp Pipes, so that you don't miss the warp and land on the ground beneath the pipe and you can't warp from outside the pipe? |
Showin |
| ||
Newcomer Normal user Level: 4 Posts: 2/2 EXP: 151 Next: 128 Since: 05-06-16 Last post: 2866 days ago Last view: 2851 days ago |
Posted by Hiccup I believe you need some sort of entrance parameter for the warp pipe entrance which should be placed within the warp pipe. I can't remember it off the top of my head but you can just load up tiny huge island in the editor and check what entrance parameters are used for such. |
Main - General SM64DS hacking - Does anybody know how the ! Switch + associated objects work? | Hide post layouts | New reply |
Page rendered in 0.023 seconds. (2048KB of memory used) MySQL - queries: 29, rows: 215/215, time: 0.009 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |