Itemappeartable / Itemfishingtable

From LMHack

Original Author(s)

weirdboo

Description

Documentation on two jump tables, itemappeartable and itemfishingtable. These jump tables tell the game how to spawn the items defined in iteminfotable.

  • itemappeartable is used to spawn items from furniture and enemies once they've been defeated. It can be linked to characterinfo / teidencharacterinfo, Enemyinfo / Teidenenemyinfo, and furnitureinfo using the item_table field. It can also be linked to the mNormalItemTblID field in ghost parameter files.
  • itemfishingtable is used to spawn items from ghosts during the process of capturing them. The developers used the term "fishing" (tsuri in Japanese) as a codeword to describe the act of catching ghosts, explaining the name of this file. It can also be linked to the mTsuriItemTblId field in ghost parameter files

itemappeartable and itemfishingtable can be edited with Jumpah.

Itemappeartable

The values for each itemappeartable entry, item0 through item19, add up to a probability out of 20. A good way to imagine this is to think of each itemXX as a "raffle ticket" that each entry can pick when it's time to spawn an item. The itemXX picked is what will spawn, meaning that the more "raffle tickets" a certain item has, the higher chance it will have to spawn.

Listed below are the entries Nintendo used.

Entry Number Percentage Odds Description
0 100% - nothing Nothing will spawn.
1 100% - nothing Nothing will spawn.
2 50% - money Used for furniture where most of the time, money will spawn, but you can get a heart or a poison mushroom occasionally. The hearts that spawn from these will bounce around the room randomly. For some reason, this type is also used with banaoba (the Garbage Can Ghost).
30% - nothing
15% - move_sheart
5% - mkinoko
3 80% - nothing Used for non-portrait ghost parameter files. These are the 20% chance small hearts that come out of ghosts.
20% - sheart
4 100% - key_4 Used for the key that Toad flushed down the toilet in the 1F Washroom.
5 100% - key_74 Used for the key that comes out of the treadmill in the Rec Room.
6 100% - key_72 Used for the key that comes out of Van Gore's chest painting.
7 100% - mletter Used for Mario's Letter that comes out of the birdhouse in the Courtyard.
8 100% - mcap Used for Mario's Hat that comes out of the washing machine in the Laundry Room.
9 60% - move_sheart Used for furniture. It has a chance of spawning a small heart that will bounce around the room randomly.
40% - nothing
10 100% - move_lheart Used for the big 50 HP hearts that come out of furniture in Boss Rooms.
11 100% - money Used mainly for furniture that has gems in it, but also in some uncommon cases where the furniture always spawns money.
12 100% - move_sheart Used for furniture. It always spawns a small heart that will bounce around the room randomly.
13 50% - sheart (UNUSED) Has coin-flip odds of spawning a small heart that bounces in place.
50% - nothing
14 100% - sheart (UNUSED) Always spawns a small heart that bounces in place.
15 100% - move_sheart (UNUSED) Same as 12.

Itemfishingtable

Determines what items can come out of a ghost while Luigi is vacuuming (fishing for) a ghost. itemfishingtable doesn't use RNG like itemappeartable and simply spawns items in the order they're listed as Luigi drains HP from the ghost. The longer Luigi is vacuuming (fishing), the more of these items will pop out.

Listed below are the entries Nintendo used.

Entry Number Items Spawned Description
0 nothing Nothing will spawn. Used for most parameter files as the default value if no items are desired.
1 nothing Nothing will spawn.
2 banana, nothing Used to spawn bananas while Luigi captures a banaoba (the Garbage Can Ghost)
3 sheart, mkinoko, nothing Used for most Portrait Ghosts. Spawns poison mushrooms and small hearts that bounce in place. The frequency of poison mushrooms increases the longer Luigi is vacuuming (fishing) to punish the player for taking too long. NOTE: Pearl spawning from Portrait Ghosts is tied to ASM and is not related to itemfishingtable.
4 sheart, mkinoko, nothing Clone of 3. Used for some Portrait Ghosts.