Hex Codes

/////////🌟 DOL🌟 //////////


```Actor Entries Starting Offset```

                   **ADDRESS**


                   0x338590


/////////🌟 DOL🌟 //////////


```Static Data Starting Offset```

                   **ADDRESS**


                   0x21B000



/////////🌟 DOL🌟 //////////


```Play LM in Widescreen```

                   **ADDRESS**


                   0x1D400


`CHANGE FROM EC001028EC010024D00700B0, TO 3C603FE360638E39906700B0`



/////////🌟 DOL🌟 //////////


```Poltergust Is Always Hidden Mansion Strength```

                   **ADDRESS**


                   0x7EA28


`CHANGE FROM 800D0160, TO 3800000F`



/////////🌟 DOL🌟 //////////


```Change Attack Type 0B (bomb) to Drop Something Else```

                   **ADDRESS**


                   0xDD16C


`CHANGE FROM 3860000D, TO 3860xxxx`

```Use the model ID list to pick your replacement```


/////////🌟 RAM & DOL 🌟 //////////

```Ghost Dynamic Transparency Max and Min```


                   **ADDRESSES**


                 DOL 

                 0xC61D0 For Max

                 0xC6208 For Min


                 RAM

                 800C9470 For Max

                 800C94A8 For Min


`EDIT 386000XX - XX GOES ANYWHERE BETWEEN 00 TO FF FOR YOUR PREFERRED TRANSPARENCY LEVEL`



/////////🌟 DOL🌟 //////////


```Luigi Always Has Equipment```

                   **ADDRESS**


                   0xB619C


`CHANGE FROM 3003FFFF, TO 3003FFFE`


/////////🌟 RAM & DOL 🌟 //////////

```New Game Warping Map```


            **ADDRESSES**


                 DOL

                 0x9CA8


                 RAM

                 8000CF48


`CHANGE 38000002 TO 380000XX`

```This will warp you to your map of choice when starting a New Game:

00 - Test Map

01 - E. Gadd's Lab

02 - The Mansion

03 - Training Room

04 - Ghost Portificationizer

05 - The Gallery 1

06 - The Gallery 2

09 - King Boo Roof Arena

0A - Chauncey Crib Arena

0B - Boolossus Balcony Arena

0C - Ending Portrificationizer

0D - Bogmire Cemetery Arena```


/////////🌟 DOL🌟 //////////


```Change Luigi's Walking Speed```

                   **ADDRESS**


                   0x396538


`Default Value is 4190`


/////////🌟 DOL🌟 //////////


```Beta Camera Angle```

                   **ADDRESS**


                   0x1F9EC


`CHANGE FROM 4BFFDD6D, TO 60000000`


/////////🌟 DOL🌟 //////////


```Map6 Door Entries Offsets```

                   **ADDRESS**


                   0x300C50

                   `Right Door`


                   0x300C6C

                   `Left Door`


/////////🌟 DOL🌟 //////////


```Change Nintendo Logo Color```

                   **ADDRESS**


                   0x39BAEC


`CHANGE FROM DC0000FF, TO xxxxxxxx`

```First byte is R, second byte is G, third byte is B, and the fourth byte is Alpha (opacity).

Japanese version uses 0046FFFF.```


/////////🌟 RAM/ASM 🌟 //////////

```Poltergust Nozzle Manager Branch & Action Controller```


                        **ADDRESS**


                        800B3B68


```This Routine loads each specific nozzle actor for each of Luigi's Actions and also controls the execution of such Actions```


```Action Executor Example: Check for Dust Spraying

800B3820   lwz r3, 0x7D4 (r30)


800B3824   lfs f1, -0x6374 (r1)


800B3828   lfs f0, 0x002C (r3) // Load Dust Spray State as Float


800B382C   fcmpo cr0,f0,f1 // Check if Dust Spray Ongoing


800B3830   ble- 800B3868  // Skip Dust Spraying if Not Ongoing```


```Checkers/Definers

800B3894   li r31, 5  // Load Flashlight Equipment State ID


800B3898   lwz r0, 0x1180 (r30)  // Load Current Equipment State ID


800B389C  cmpw r31, r0  // Check if Flashlight Is In Use

800B38A0  // Skip Nozzle Switch Animation


800B38A4  lwz r0, 0x3C (r30) // Check Player Actor


800B38A8  cmpwi r0, 179 // bmario actor check


800B38AC  // Jump to bmario action table

800B38B0  // Jump to Luigi action table


800B38B4  cmpwi r0, 1 // Ghost Luigi actor check```


```Example: Use Nozzle during Vacuuming

800B38C8  cmpwi r31, 1  // Check if Vacuuming

800B38CC  bge -> 800B38DC // Jump to Nozzle Loading Code


Nozzle Loader:

800B38DC addi r3,r30,0


800B38E0 li r4, 6 // Load Nozzle by Actor ID


800B38E4 bl 800b9064 // Call Actor Loader

```

`THIS CAN BE USED TO RESTORE THE UNUSED NOZZLES (HAS TO BE IN GAME_USA)`


/////////🌟 RAM/ASM 🌟 //////////

**Flag Checker By @Cryptus **


                        **ADDRESS**


                        80065FA4


```Used to Read a Flag and Check Its State```


```bl ->80065fa4

rlwinm r0, r3, 0, 24, 31 (000000ff) // Read the Flag State

cmplwi r0, 1 // Check if Flag Enabled

beq -> What to do if Flag Enabled

bne -> What to do if Flag Disabled```


/////////🌟 DOL🌟 //////////


```Change Luigi's Max HP```

                   **ADDRESS**


                   0xB2F80


`CHANGE FROM A81F0FFC, TO 3800xxxx`

```0064 (100 in decimal) is the default```


///////// 🌟 DOL 🌟 //////////



**Luigi Mansion DOL Door Entry Structure (NTSC)**



```The door entries start off at 0x2FFF80


byte - 1 Byte - Orientation (0: Invisible, 1: Forward, 2: Sideways)

byte - 1 Byte - Unknown ('Mode' / Group? Observed pattern; 0 for doors, 1 for hallways and 2 for small balcony)

short - 2 Bytes - Padding

ushort - 2 Bytes - Key ID

byte - 1 Byte - Model ID

byte - 1 Byte - Entry ID? (Used in Events?)

int - 4 Bytes - Door X Position

int - 4 Bytes - Door Y Position

int - 4 Bytes - Door Z Position

short - 2 Bytes - Viewport X Offset

short - 2 Bytes - Viewport Y Offset

short - 2 Bytes - Viewport Z Offset

byte - 1 Byte - Next Escape

byte - 1 Byte - Current Escape```


///////// 🌟 DOL 🌟 //////////



**Luigi Mansion DOL Door Entry Descriptions (NTSC)**



```

NOTE - Area doors has been marked with a (!) icon.


--------------------------------------------


FLOOR 0

002FFFB8 - Secret Altar (!)

002FFFD4 - Pipe Room

002FFFF0 - Secret Altar Hallway

0030000C - Breaker Room

00300044 - Cellar

00300060 - Cellar -> 0F Hallway

0030007C - Cold Storage


FLOOR 1

003004C0 - Courtyard -> Rec Room

003004DC - Bathroom (1F)

003004F8 - Conservatory

00300514 - Courtyard (!)

00300568 - 2F Stairs

00300584 - Rec Room -> 2F Stairs

003005A0 - Washroom (1F)

003005D8 - Projection Room

003005F4 - Billiards Room

00300610 - Kitchen

0030062C - Storage Room

00300648 - Backyard

00300680 - Ball Room

003006B8 - Laundry Room

003006D4 - Dining Room

003006F0 - Mirror Room

0030070C - Fortune-Teller's Room

00300728 - Butler's Room

00300744 - Foyer (!)


FLOOR 2

003001E8 - Nana's Room

00300204 - Bathroom (2F)

0030023C - 2F Hallway Entrance

00300258 - Tea Room

00300274 - Washroom (2F)

003002AC - Astral Hall

003002C8 - Wardrobe Room

003002E4 - Backyard Balcony

00300300 - Observatory

00300354 - Anteroom

003003A8 - Parlor

003003C4 - 2F Hallway (Study, Master Bedroom etc)

003003E0 - Study

003003FC - Master Bedroom

00300434 - Guest Room

00300450 - Sitting Room

0030046C - The Twin's Room

00300488 - Nursery


FLOOR 3

00300098 - The Artist's Studio

003000B4 - Balcony

003000D0 - Balcony -> Attic Hallway (!)

00300140 - Safari Room

0030015C - Safari Room -> Attic Hallway

00300178 - Clockwork Room

00300194 - Telephone Room

003001B0 - Armory

003001CC - Ceramics Studio


UNKNOWN / OTHER

002FFF80 - ???

002FFF9C - ???

00300028 - ???

003000EC - ???

00300108 - ???

00300124 - ???

00300220 - ???

00300290 - ???

0030031C - ???

00300338 - ???

00300370 - ???

0030038C - ???

00300418 - ???

003004A4 - ???

00300530 - ???

0030054C - ???

003005BC - ???

00300664 - ???

0030069C - ???```


///////// 🌟 DOL 🌟 //////////


**Actor Section Documentation By LMFinish**


```Actor entries start at 0x338590


int32 ModelArchive; // ID for which model archive is loaded by this actor

int32 unk1; // Seems to affect somehow how the ghost flees during suckage

short RenderType; // ID for the render type used for this actor

int32 padding;

int32 unk2;

short GlobalTypeID; // Specifies which number # this actor is, in a sequence of similar types? Take the Gold Ghost species, yapoo1 and mgyapoo are 00, yapoo2 is 01 and iyapoo is 02. Seems to be nulled out into FF's if not used for the actor

int32 GhostType // Which ghost type is this actor (if a ghost, of course; if not, nulled out into FF's). 02: Ordinary; 03: Portrait; 04: Boss

int32 ActorName // Specifies where in RAM the name for this actor is located```


/////////  🌟  DOL 🌟   //////////


**Addresses for iyapoo1-25 actor entries**


                          **ADDRESSES**

                        ```0x339FAE-33A269```



/////////  🌟  RAM 🌟   //////////


**How to replace the the fire elemental shield with the treasure chest sparkle effect and disable stun protection:**


```These addresses are for the PAL version.

To load in the treasure chest sparkle, replace the particle call at this address


800c1f54 - replace instruction with 480aae69 to call FUN_8016cdbc instead


NOP this address to disable the shield "flag", Note this will allow all ghosts that have a shield to be stunnable

800c1fb0

---------------------------------------------------------------------------------------------------------------

These are the equivalent addresses in the NTSC Version

To load in the treasure chest sparkle, replace the particle call at this address


800beb08 - replace instruction with a blr to to call FUN_80169924 instead


NOP this address to disable the shield "flag", Note this will allow all ghosts that have a shield to be stunnable

800beb64

----------------------------------------------------------------------------------------------------------------```


/////////  🌟  DOL 🌟   //////////


`Luigi Flashlight Holding Style`


                  **ADDRESS**


                   ``0xB2B7C``


```Holding Style list:


00 - 2 Hands, Normal

01 - 2 Hands, Normal, Alternative Flashlight Position

02 - 2 Hands, Looking Up

03 - 2 Hands, Normal (Same as 00)

04 - 2 Hands, Looking Down

05 - 1 Hand,  Looking Down

06 - 1 Hand,  Looking at GBH, Alternative Flashlight Position

07 - 1 Hand,  Looking at GBH, Normal Flashlight Position

08 - 1 Hand,  Normal (Default)```


/////////  🌟  DOL 🌟   //////////


`How to enable chests automatically opening:`


```

Locate offset 0x150BFF

Change 04 to 03

```


/////////  🌟  DOL 🌟   //////////


`E3 Flashlight Cone Fix`


```Locate offset 0x74DC2 

change 0034 to 0104```


```Locate offset 0x74DC7 

change 14 to E4```



///////// 🌟 RAM 🌟  //////////


`Sunglass Ghosts`


```Change address 800c811c to 60000000 to enable ghosts to spawn with lights on```

```Change address 800c7bc8 to 60000000 to enable ghosts to be created with lights on```


/////////🌟 DOL🌟 //////////


```Change King Boo's HP```

                   **ADDRESS**


                   0x399228


`CHANGE FROM 01F4, TO xxxx`

```01F4 (500 in decimal) is the default```


/////////🌟DOL🌟 //////////  


`NTSC PCM Starting Offset`


                  **ADDRESS**


                  ``0x271E40``


/////////🌟 DOL🌟 //////////


```Ghosts Don't Startle Luigi When They Appear```


                              **ADDRESS**


                             0x396578


`Change 44480000 to 00000000`


/////////🌟 DOL🌟 //////////


`E3 GBH Clock`


```Locate offset 0x3A2A7

change BC to D8```


```Locate offset 0x393EA9

change 5D to 75```


```Locate offset 0x39CC3

change 04 to 01```


Health Counter Position Modifier Code with Comments By @LMFinish 


///////// RAM /////////


0403C29C 38B400YY // Define custom value for Heart Icon Y Position

0403C2AC 389400XX // Define custom value for Heart Icon X Position

04041BB0 386000XX // Define custom value for Health Number Shadow X Position

04041BC8 396000YY // Define custom value for Health Number Shadow Y Position

04041BFC 386000XX // Define custom value for Health Number X Position

04041C04 388000YY // Define custom value for Health Number Y Position


**Boolossus Ram Notes**


///////// RAM /////////



`413852C 38030000 - Disables Regroup Timer

04139010 28170010 - Sets the maximum value for one of the boo numerical checks

04139018 3B00000F - Increases the number of boos in attacking group if that numerical check is met

04139020 3BE00005 - Sets Attacking group speed and frozen thawing rate (as if they were the last boo) if that numerical check is met

04139024 3BA00004 - Sets boos telegraph and tackle rate (as if they were the last boo) if that numerical check is met

04139028 3B200000 - Sets how many Boos in attacking group will NOT perform tackles if that numerical check is met`



**Bogmire Ram Notes**


///////// RAM /////////


`(Bogmire) CharacterEventObserver:

00: Null (8006CB90) (8006CBF0)

01: Invisible (8006CC34) (8006CC98)

02: Selects Bogmire's Location (8006CD1C) (8006CD90)

03: Lightning + Picks BoggyShadow's location (8006CED0) (8006CF68)

04: Idle/Spawn Boggy Shadow (8006CFBC) (8006D0DC)

05: Stuck in Shadow (8006D1B8) (8006D288)

06: Unused Stun (Similar to how Luigi stuns common ghosts) (8006D6B8) (8006D6F8)

07: Bogmire Resisting Vacuum (8006D764) (8006D794)

08: Lightning Strikes, spawn multiple shadows (8006D97C) (8006D9A8)`


//////DOL//////

Beta Cam Angle

luigim1 and LMFinish


Any Region Offset 1F9EC

Replace 4BFFDD6D with 60000


//////////MDL///////////



[25/10/2020 17:43] squid_tailbash

Make MDLs colored by their Ambient Color

Search FF FF FF FF 00 00 00 01 in hex on the mdl

set the 01 to 00

done


/////////🌟 DOL🌟 //////////


Nintendo Power First Person Camera (Gameboy Horror Alternate)


```Locate offset 0x3A2A7

change BC to D8


Locate  offset 0x39CC3

change 04 to 02


Done. Rebuild now```


/////////🌟 DOL 🌟//////////


```Gameboy Horror E3 Position


Locate offset 0x393EA9, change 5D to 75```


/////////🌟 DOL🌟 //////////


```Luigi Doesn't Do Key Pick Up Animation


Locate offset 0xCD39B Change 02 to 01```


/////////🌟 DOL🌟 //////////


`Beta Coin Counter`


**AR code by: Br123 T T and LMFinish**

**Converted by weirdboo**


```0x2170 paste-write 801e12f481fe12f4480b3bc4

0x4DA34 paste-write 60000000

0x4DA68 paste-write 60000000

0x4DB30 paste-write 388000bc

0x4DB44 paste-write 380001ac

0x4DB78 paste-write 7de57b78

0x4DB98 paste-write 386000e5

0x4DBB8 paste-write 380001ad

0x4DBC0 paste-write 38c000ff

0x4DBCC paste-write 38e000ff

0x4DBD4 paste-write 39000011

0x4DBE8 paste-write 39200043

0x4DBEC paste-write 7de57b78

0x4DC68 paste-write 39000000

0x4DCC4 paste-write 39000000

0x4DD3C paste-write 39200000

0x4DD84 paste-write 388001ff

0x4DDA0 paste-write 39200000

0xB5A98 paste-write 4bf4c438```


/////////🌟DOL🌟 //////////


E3 Luigi hurt animation recreation


```Original AR code by Br123 TT

Converted to DOL offsets by SGYT // LM MODDER

0xB6104 - paste write 38000006

0xB60D4 - paste write 38000002```


/////////🌟DOL🌟 //////////


turi06_3 animation when kicked off of the Poltergust 400


```Original AR code by: Owen Modding/0wen

Converted to DOL by SGYT // LM MODDER

0x33B7BC - paste write 0000007c```


/////////🌟DOL🌟 //////////


Make ghosts drop stuff after adding them to IyapooTable


```Locate 0x358718 and replace 80 0C 9B 28 with 80 0D 59 AC.```


(NOTE: If some ghosts are not added to the IyapooTable in map2.szp, it can cause a game crash after sucking up a ghost, BE CAREFUL!) Also, make EnGhostA use the IyapooTable for dropping treasure.