Kuribo64
Views: 14,248,894 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
05-08-21 07:22 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? New reply


Hiccup
Posted on 05-07-16 09:17 AM (rev. 4 of 05-07-16 09:31 AM) Link | #70538
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
Posted on 05-07-16 10:06 AM (rev. 2 of 05-07-16 10:07 AM) Link | #70539
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
Posted on 05-07-16 03:26 PM Link | #70550
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
Posted on 05-07-16 03:32 PM Link | #70552
beh, there aren't even switch IDs? that thing sucks

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Hiccup
Posted on 05-08-16 06:02 AM (rev. 2 of 05-08-16 06:03 AM) Link | #70574
@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
Posted on 05-10-16 12:43 PM Link | #70631
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
Posted on 05-10-16 01:09 PM Link | #70633
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
Posted on 05-10-16 01:31 PM Link | #70634
Nah, I'm more interested in more parameters you *know*, so I can add them to the db. Are there any?

Hiccup
Posted on 05-19-16 03:49 PM (rev. 3 of 05-19-16 03:52 PM) Link | #70844
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
Posted on 05-23-16 10:31 PM Link | #70930
Posted by Hiccup
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?


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? New reply

Page rendered in 0.033 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 216/216, time: 0.028 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.