Original Author(s)
opeyx
Description
This page should (hopefully) provide you with some knowledge about how certain stuff in Luigi's Mansions works.
We will continue add new content here as we get a better understanding for how different parts of the game works.
This page should be considered a work in progress at all times, we will do our best to always provide the most accurate information however.
JMP
Observers
One of the things that people seem to have the most trouble understanding is Observers, so here is a small rundown:
Observers are essentially "mini-programs" that constantly asks the game questions about what the current state of the game is. ("Is all the ghosts in this wave captured yet?", "Is flag 23 turned on?"). Think of them like an invisible eye that consistently monitors what condition needs to be met so that something can be done.
They are used for everything from making ghosts spawn to making the lights turn on when you've captured all the ghosts in a room.
Lets give you an example:
- The observer will ask the game a "question" (Eg: "Have all of the candles in this room been blown out?") - In programming terms these "questions" are known as Conditions.
- The game itself will reply with an "answer" of either True (Yes) or False (No). - In programming terms these "answers" are known as bool's / Booleans.
- If the reply from the game is True (Yes) then the observer will do something - More accurately, it will do whatever is specified in the observer's do_type field.
By using the cond_string_arg0 and string_arg0 fields in the observers you can link a multiple observers to activate after just one observer activates,
this will allow you to do more than just one thing after a ghost wave has been defeated for example.
You could however also create a "observer chain" to do this; "Is all the ghosts in this wave captured yet?" (True) -> Light Up The Room (True) -> Unlock The Doors (True) -> Spawn Chest (True)
"There's multiple ways to Rome" - You can get similar results with different approaches, we recommend you choose one that you find the most understandable / easy to use.
And that is essentially how all observers in the game work.
Now go experiment! - That's the best way of learning! :)
RAM/DOL
RAM
Change which door triggers the Foyer Gold Ghost Laugh and in return sets flag 3
8001bec0 386000xx
xx - Door ID
(Credits - CyrusLoS)
DOL
Force Portrait Ghosts to use params for HP
At offset 0xBDED0 paste/write 4800002c.
(Credits - CyrusLoS)
Add treasure drops to regular ghosts
Change the address listed at 0x358718 to 800d59ac.
Add a entry for the ghost in question into iyapootable along with what you want it to drop.
(Credits - LMFinish)
Reverse Kieru (spawn animation) for regular ghosts
Offset | Model Archive |
---|---|
0x33DD5E | obake01.szp |
0x33DF5E | obake02.szp |
0x33E17E | obake03.szp |
0x33E3BE | obake04.szp |
0x33E3BE | topoo.szp |
0x33E3BE | skul.szp |
0x33EBBA | heypo.szp |
0x33F8C2 | tenjyo.szp |
0x33FA02 | banaoba.szp |
Change the value at any of the offsets to 0E 52 to reverse the ghosts' spawn-in animation.
(Credits - weirdboo)
Beta Spinning Coins by Ralf (upside-down bug fix by 0wen)
At offset 0xD50, paste/write 3C608000C0033D6CC03D0024EC21002AD03D0024A87C00A64815427C41700000
At offset 0x15402C, paste/write 3800BC00B01E005E
At offset 0x154D40, paste/write 4BEABD70
(Credits - weirdboo, 0wen)
Various RAM Address'
Address | Description |
---|---|
80340D48 | Yapoo Appear Type |
80340F48 | Mapoo Appear Type |
804D2BE4 | Flashlight Cone Size Modifier |
804D2BEC | Flashlight RGB |
800D0E94 | I'm 99% Sure This Is Luigi's Reaction To The Poison Mushroom |
800466F4 | Draws The OOB Coin |
804D2BB8 | Luigi's Walking Speed |
8003D6F0 | Radar State I think (To make it so the radar is always on, NOP this address.) |
801E1EA0 | Coin Physics (If this address is nopped/zero'd out it will give you spinning coins, however, it spins periodically and not consistently.) |
800BCAF0 | treasuretable JMP Loading (Same goes for the address below) |
800BCAF4 | treasuretable JMP Loading |
804D9A0C | Nintendo Logo Color |
800B3B6C | Flashlight On And Off Function (If you nop this the flashlight will not turn off) |
804D8597 | This Address Is How Many Ghosts Luigi Has And The Current Value Of The Ghost Counter |
(Credits - ScaredLuigiCrawling)