Game Knowledge: Difference between revisions
More actions
No edit summary |
|||
| (9 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
== Original Author(s) == | |||
''opeyx'' | ''opeyx'' | ||
== Description == | |||
''This page should (hopefully) provide you with some knowledge about how certain stuff in Luigi's Mansions works.'' | ''This page should (hopefully) provide you with some knowledge about how certain stuff in Luigi's Mansions works.'' | ||
| Line 11: | Line 11: | ||
''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.'' | ''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.'' | ||
==== | == Glossary == | ||
This list provides context for various terms used in Luigi's Mansion modding efforts. | |||
==== [[ | === Event === | ||
An '''event''' is a function that can be defined using an event script, which uses its own language (see [[Script Tags]]) to perform actions such as showing text boxes, disabling player control over Luigi, and more. | |||
==== See also ==== | |||
* [[Event List]] | |||
* [[Eventor]] | |||
==== | === Flag === | ||
A '''flag''' is a boolean value (true or false) that are primarily used as "checkpoints" for the player, however can be used for any purpose. Flags can either be permanent (saved to the memory card), room-exclusive (value lost when exiting the current room), or map-exclusive (value lost when exiting the current map). | |||
==== See also ==== | |||
* [[Flags]] | |||
===== | === Observer === | ||
Observers are essentially "mini-programs" that constantly asks the game questions about what the current state of the game is ("Are all of 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''. | |||
==== See also ==== | |||
* [[Observerinfo / Teidenobserverinfo]] | |||
* [[Cond Types]] | |||
* [[Do Types]] | |||
=== Viewport === | |||
A '''viewport''' is a rectangular window in which other rooms are rendered. These are most notably used in the 1F and 2F hallways, which are broken into multiple rooms; viewports allow these rooms to be stitched together seamlessly. | |||
== JMP == | |||
=== Observers === | |||
One of the things that people seem to have the most trouble understanding is Observers, so here is a small rundown: | 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. (" | Observers are essentially "mini-programs" that constantly asks the game questions about what the current state of the game is. ("Are all of 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. | 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. | ||
| Line 45: | Line 69: | ||
Now go experiment! - That's the best way of learning! :) | Now go experiment! - That's the best way of learning! :) | ||
== | == RAM == | ||
=== | === Change which door triggers the Foyer Gold Ghost Laugh and in return sets flag 3 === | ||
8001bec0 386000xx <br /> xx - Door ID | 8001bec0 386000xx <br /> xx - Door ID | ||
| Line 55: | Line 78: | ||
(Credits - CyrusLoS) | (Credits - CyrusLoS) | ||
== | == DOL == | ||
=== | === Force Portrait Ghosts to use params for HP === | ||
At offset 0xBDED0 paste/write 4800002c. | At offset 0xBDED0, paste/write 4800002c. | ||
(Credits - CyrusLoS) | |||
=== | === Add treasure drops to regular ghosts === | ||
Change the address listed at 0x358718 to 800d59ac. <br /> Add a entry for the ghost in question into iyapootable along with what you want it to drop. <br /> (Credits - LMFinish) | Change the address listed at 0x358718 to 800d59ac. <br /> Add a entry for the ghost in question into iyapootable along with what you want it to drop. <br /> (Credits - LMFinish) | ||
=== | === Reverse Kieru (spawn animation) for regular ghosts === | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 101: | Line 126: | ||
Change the value at any of the offsets to '''0E 52''' to reverse the ghosts' spawn-in animation. <br /> (Credits - weirdboo) | Change the value at any of the offsets to '''0E 52''' to reverse the ghosts' spawn-in animation. <br /> (Credits - weirdboo) | ||
=== | === Beta Spinning Coins by Ralf (upside-down bug fix by 0wen) === | ||
At offset 0xD50, paste/write 3C608000C0033D6CC03D0024EC21002AD03D0024A87C00A64815427C41700000 <br /> At offset 0x15402C, paste/write 3800BC00B01E005E <br /> At offset 0x154D40, paste/write 4BEABD70 <br /> (Credits - weirdboo, 0wen) | At offset 0xD50, paste/write 3C608000C0033D6CC03D0024EC21002AD03D0024A87C00A64815427C41700000 <br /> At offset 0x15402C, paste/write 3800BC00B01E005E <br /> At offset 0x154D40, paste/write 4BEABD70 <br /> (Credits - weirdboo, 0wen) | ||
=== | === Various RAM Addresses === | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 155: | Line 180: | ||
(Credits - ScaredLuigiCrawling) | (Credits - ScaredLuigiCrawling) | ||
=== Static Data Offsets === | |||
USA version documentation originally by '''weirdboo''', and JPN version documentation by ThePlayerRolo. | |||
<pre> | |||
Starting offset (USA): | |||
0x21B000 | |||
Starting offset (JPN): | |||
0x210240 | |||
Length (USA): | |||
DD380 | |||
Length (JPN): | |||
E0E60 | |||
======== | |||
gameboy.szp | |||
======== | |||
Starting offset (USA): | |||
0x21B1A0 | |||
Starting offset (JPN): | |||
0x2103E0 | |||
Length: | |||
162E0 | |||
Description: | |||
The GameBoy Horror zoom-in cutscene that plays when you press Y or Z. | |||
======== | |||
guidemap.szp | |||
======== | |||
Starting offset (USA): | |||
0x231480 | |||
Starting offset (JPN): | |||
0x2266C0 | |||
Length: | |||
409C0 | |||
Description: | |||
The Mansion map that appears when you press Y. | |||
======== | |||
ninlogo.pcm | |||
======== | |||
Starting offset (USA): | |||
0x271E40 | |||
Starting offset (JPN): | |||
0x267080 | |||
Length: | |||
1F2C0 | |||
Description: | |||
The deep-voiced "Nintendo" sound effect that plays when you boot up the game. | |||
======== | |||
nintendo.szp | |||
======== | |||
Starting offset (USA): | |||
0x291100 | |||
Starting offset (JPN): | |||
0x286340 | |||
Length: | |||
33C0 | |||
Description: | |||
The Nintendo logo that appears when you boot up the game. | |||
Note: this file can only be extracted/compressed with Yay0Enc; use the -d switch for decompression. Do **not** use ArcExtract. | |||
======== | |||
res_list.szp | |||
======== | |||
Starting offset (USA): | |||
0x2944C0 | |||
Starting offset (JPN): | |||
0x289700 | |||
Length (USA): | |||
1C060 | |||
Length (JPN): | |||
1C180 | |||
Description: | |||
The status screen that shows treasure, portrait ghosts, mario items, and medals that appears when you press Z. | |||
======== | |||
res_paus.szp | |||
======== | |||
Starting offset (USA): | |||
0x2B0520 | |||
Starting offset (JPN): | |||
0x2A5880 | |||
Length (USA): | |||
1DEA0 | |||
Length (JPN): | |||
1DCA0 | |||
Description: | |||
The pause menu. | |||
======== | |||
res_titl.szp | |||
======== | |||
Starting offset (USA): | |||
0x2CE3C0 | |||
Starting offset (JPN): | |||
0x2C3520 | |||
Length (USA): | |||
29FC0 | |||
Length (JPN): | |||
2DB80 | |||
Description: | |||
The title screen with the Luigi's Mansion logo, background, copyright text, and "Press Start". | |||
</pre> | |||
Latest revision as of 17:22, 20 May 2026
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.
Glossary
This list provides context for various terms used in Luigi's Mansion modding efforts.
Event
An event is a function that can be defined using an event script, which uses its own language (see Script Tags) to perform actions such as showing text boxes, disabling player control over Luigi, and more.
See also
Flag
A flag is a boolean value (true or false) that are primarily used as "checkpoints" for the player, however can be used for any purpose. Flags can either be permanent (saved to the memory card), room-exclusive (value lost when exiting the current room), or map-exclusive (value lost when exiting the current map).
See also
Observer
Observers are essentially "mini-programs" that constantly asks the game questions about what the current state of the game is ("Are all of 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.
See also
Viewport
A viewport is a rectangular window in which other rooms are rendered. These are most notably used in the 1F and 2F hallways, which are broken into multiple rooms; viewports allow these rooms to be stitched together seamlessly.
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. ("Are all of 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
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 Addresses
| 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)
Static Data Offsets
USA version documentation originally by weirdboo, and JPN version documentation by ThePlayerRolo.
Starting offset (USA): 0x21B000 Starting offset (JPN): 0x210240 Length (USA): DD380 Length (JPN): E0E60 ======== gameboy.szp ======== Starting offset (USA): 0x21B1A0 Starting offset (JPN): 0x2103E0 Length: 162E0 Description: The GameBoy Horror zoom-in cutscene that plays when you press Y or Z. ======== guidemap.szp ======== Starting offset (USA): 0x231480 Starting offset (JPN): 0x2266C0 Length: 409C0 Description: The Mansion map that appears when you press Y. ======== ninlogo.pcm ======== Starting offset (USA): 0x271E40 Starting offset (JPN): 0x267080 Length: 1F2C0 Description: The deep-voiced "Nintendo" sound effect that plays when you boot up the game. ======== nintendo.szp ======== Starting offset (USA): 0x291100 Starting offset (JPN): 0x286340 Length: 33C0 Description: The Nintendo logo that appears when you boot up the game. Note: this file can only be extracted/compressed with Yay0Enc; use the -d switch for decompression. Do **not** use ArcExtract. ======== res_list.szp ======== Starting offset (USA): 0x2944C0 Starting offset (JPN): 0x289700 Length (USA): 1C060 Length (JPN): 1C180 Description: The status screen that shows treasure, portrait ghosts, mario items, and medals that appears when you press Z. ======== res_paus.szp ======== Starting offset (USA): 0x2B0520 Starting offset (JPN): 0x2A5880 Length (USA): 1DEA0 Length (JPN): 1DCA0 Description: The pause menu. ======== res_titl.szp ======== Starting offset (USA): 0x2CE3C0 Starting offset (JPN): 0x2C3520 Length (USA): 29FC0 Length (JPN): 2DB80 Description: The title screen with the Luigi's Mansion logo, background, copyright text, and "Press Start".