Recent site activity

SM64 Exposed Behaviour Values

Behaviour Values
 
By James S. 

(Update: 28/01/12)

There are two main types of behaviours which I call basic and complex. Basic behaviours allow Mario to read a sign or to pick a box as well as other actions; please see the basic behaviours section for more information. Complex behaviours are much more involved, such as the way Goombas, for example, move and interact with other objects. Complex objects are created ('spawned') using certain behaviour values which use a behaviour script (a list of instructions) to initialize and update the object. These behaviour scripts can also set an object's basic behaviour so this means an object can have both a complex behaviour and a basic behaviour. Using the example of a Goomba again, its complex behaviour allows it to walk about and spawn a coin when defeated but its basic behaviour allows it to do damage to Mario upon contact and also lets Mario jump on and bounce off the Goomba.

 
Complex Behaviour/Graphic ID Values
 
The behaviour and graphic ID (a.k.a. GFX ID and GID) values are used for spawning objects and are universal values because they are the same for all versions of the game. The behaviour value determines how the object moves and reacts to other objects and the graphic ID selects how the object looks. However, some graphics are only available in certain levels and some graphic ID values are reused so they will use different graphics dependent on the level. Another complication is that although the behaviours are available in all levels, some behaviours rely on data that is loaded only in some levels or area within a level.
 
These values are those that are to be used with any of my spawn codes. For the Spawn any object wherever you want [ver2.1] code you do not need the 1300 at the start of the behaviour value. For e.g., to spawn a 1-up that homes in on Mario set the behaviour (BHV/BHR) to 4148 and the graphic ID (GID) to D4. Using the same example but for the Spawn object version 3.0 code:
 
Behaviour segment value=1300
Behaviour offset value=4148
GFX ID=00D4
Extra value=0000
 
It is possible to use different behaviours with some graphic IDs that aren't normally but may not look right if they use 3D animation.
An object with a ? for the behaviour means it is unknown and might not exist. The extra value is used by some behaviours to alter how the object behaves.
There are three main ways that the game uses these behaviour and graphic ID values:
(1) Level commands.
(2) Game instructions.
(3) Preset look-up table.
 
Note: 0x indicates a hexadecimal value (e.g. 0x1C).
 

Behaviour Name

Behaviour/GFX ID (Hex)

Extra Value (Hex)

1-up mushroom that homes in on Mario

0x13004148/0xD4

 

Ampere

0x13003388/0xC2

 

Baby penguin (Cool, cool mountain-can also spawn in Snowman's land)

0x130020E8/0x57

Determines if it is the lost penguin:

0x00=Lost penguin

0x01=Not lost penguin

Big (race) penguin (Cool, cool mountain) Note: should only spawn in the hut.

0x13005380/0x57

 

Big ice bully (Snowman's land)

0x13003700/0x65

 

Black fire spitting enemy:

0x1300518C/0xB4

 

Black smoke (when Mario gets burnt)

0x13001214/0x94

 

Blarrg

?/0x54

 

Blue coin

0x130030A4/0x76

 

Blue coin (from big Goomba)

0x13000830/0x76

 

Blue flame (final Bowser) Blue flame flies and lands.

0x130019C8/0x91

0x00=After landing turns into red flame that may then spawn a yellow coin.

0x01=when lands, turns into three blue 'slug' flames.

Blue flame (final Bowser) Blue flame bounces when lands

0x13001A30/0x91

 

Bob-omb (re-spawns with no yellow coin)

0x13003174/0xBC

0x00=patrolling Bob-omb

0x01=stationary Bob-omb

Bob-omb buddy

0x130031DC/0xC3

The message to say.

Boo with yellow coin

0x13002804/0x65

 

Boo key

?/0x55

 

Bowser

0x13001850/0x64

 

Bowser red flame

0x13001AA4/0x90

 

Bowser shockwave

0x130011D0/0x68

 

Breakable box (can't pick up)

0x130014E0/0x81

 

Breakable box with three coins (can be picked up)

0x13004218/0x82

 

Brown door (warp)

0x13000AFC/0x1C

 

Brown door with Star on one side (just walk through)

0x13000B0C/0x22

 

Bullet Bill

0x1300179C/0x54

 

Bullet Bill blaster

0x13000600/0x09

 

Butterfly, group of 3. Three butterflies that when Mario touches them they can turn into a 1-up mushroom or bomb.

0x13005598/0xBB

 

Cannon base

0x130004A8/0x80

 

Cannon balls that roll

0x13003A58/0xB4

 

Cap switch

0x130001CC/0x55

Type:

0x00=Wing cap (red)

0x01=Metal cap (green)

0x02=Vanish cap (blue)

0x03=Yellow (not normally used)

Chain-chomp

0x1300478C/0x66

 

Cheep-cheep (Dire, Dire Docks, can also spawn in Jolly Roger Bay, The Secret Aquarium and Wet-Dry World as long as you spawn in water)

0x1300220C/0x64

 

Chuk-ya

0x13000528/0xDF

 

Dark brown door (warp)

0x13000AFC/0x1D

 

Dorrie

0x13004F90/0x68

 

Eel

0x13004F40/0x55

 

Explosion (e.g., from Bob-omb)

0x13003510/0xCD

 

Flame thrower (once spawned, continually produces fire)

0x13001108/0x00

 

Goomba

0x1300472C/0xC0

 

Green tree

0x13002AA4/0x17

 

Heart

0x13004EF8/0x78

 

Heave ho

0x13001548/0x59

 

Item box

0x13002250/0x89

What you get from the item box:

0x00=Wing cap

0x01=Metal cap

0x02=Vanish cap

0x03=Koopa shell

0x04=x1 yellow coin

0x05=x3 yellow coins

0x06=x10 yellow coins

0x07=1-up mushroom (moves slowly)

0x08=Star 1

0x09=1-up mushroom (moves fast)

0x0A=Star 2

0x0B=Star 3

0x0C=Star 4

0x0D=Star 5

0x0E=Star 6

Killer fish

0x130055DC/0x59

 

King Bob-omb

0x130001F4/0x56

 

King Whomp

0x13002BB8/0x67

 

Koopa

0x13004580/0x68

0x00=Run around as if lost shell.

0x01=Small Koopa.

0x02=Koopa the Quick (Bob-omb Battlefield)

0x03=Koopa the Quick (Tiny-huge Island)

0x04=Tiny Koopa

Koopa flag

0x130045D0/0xA3

 

Koopa shell

0x13001F3C/0xBE

 

Long water float (Wet-dry world)

0x130042B4/0x3B

 

Manta ray

0x13004370/0x54

 

Mario

0x13002EC0/0x01

 

Mario cap

0x13003DF8/0x88

 

Metal cap

0x13003DD8/0x86

 

Mine (used in Bowser fights) (Can also use 0x65 for GFX ID instead for any of the 3 Bowser fight levels.)

0x130037EC/0xB3

 

Monkey (Tall, Tall Mountain)

0x13000F08/0x56

 

Mother penguin (Cool, cool mountain-can also spawn in Snowman's land)

0x13002088/0x57

 

Movable box (e.g., in Wet-dry world)

0x13001518/0xD9

 

Mr. I

0x13000054/0x00

 

Oyster

0x13005440/0x58

 

Penguin (Snowman's land, can also spawn in Cool, cool mountain)

0x13002E58/0x57

 

Pirahna plant

0x13001FBC/0x64

 

Red coin

0x13003EAC/0xD7

 

Red coin number

0x13004348/0xDB

 

Red fire

0x13001184/0x90

 

Red fire 'slug' spawner

0x13001168/0x00

 

Red flame (in castle)

0x13000C84/0x90

 

Red flame from Bowser 'flame thrower'

0x13001A74/0x90

 

Rusty door

0x13000AFC/0x29

 

Shark

0x13002338/0x56

 

Shy guy

0x130046DC/0xDC

 

Signpost

0x130032E0/0x7C

 

Skeeter

0x13005468/0x69

 

Small ice bully (not normally used)

0x130036C8/0x64

 

Small water float (Wet-dry world)

0x13004284/0x36

 

Spindrift

0x130012B4/0x54

 

Star 0x130007F8/0x7A

 

 

Star (100 coin star type although can also be used as course star)

0x1300080C/0X7A

 

Star sparkle (e.g., from coin)

0x13000A14/0x95

 

Star sparkle (random, e.g. from 1-up mushroom)

0x13002AF0/0x00

 

Star sparkle (single sparkle placed in front at set distance)

0x13002AD0/0x8F

 

Starman door (sliding door)

0x13000000/0xD5

 

Ten yellow coins

0x13000984/0x00

 

Throw Mario (spawned by King Bob-omb)

0x13000254/0X00

 

Thwomp

0x13000B8C/0x58

 

Toad

0x13002EF8/0xDD

 

Vanish cap

0x13003E1C/0x88

 

Water bomb (Bob-omb battlefield)

0x13004BA8/0x54

 

Water bomb shadow (Bob-omb battlefield)

0x13004BD4/0x55

 

Water Koopa shell (spawn in water)

0x13000708/0xBE

 

Water switch (Wet-dry world)

0x130025F8/0x38

 

Water up splash

0x13002C14/0xA7

 

Whirlpool (Dire, dire docks)

0x130032A8/0x57

 

Wing cap

0x13003DB8/0x87

 

Whomp

0x13002BCC/0x67

 

Wind-up baddy

0x13001548/0x59

 

Wooden post you can pound:

0x1300481C/0x6B

 

Yellow coin (in Boo)

0x13000888/0x74

 

Yellow coin type 1

0x1300091C/0x74

 

Yellow coin (from Bob-omb)

0x13003068/0x74

 

Yellow star (when Mario hits something)

0x13000A78/0x8B

 

Yellow star from final Bowser fight

0x13001714/0x7A

 

Yellow triangle from hitting/kicking wall

0x13000ABC/0x8A

 

Yoshi

0x13004538/0x55

 

Yoshi egg

?/0x57

 


Basic Behaviours Function Address Look-up Table

Please note: addresses are RAM addresses. All values are in hex.

The basic behaviour function address look-up table is used by the game to know which function to call to execute the behaviour. For each basic behaviour the behaviour value is listed (32-bit), the address of the function address (32-bit) followed by the function address (32-bit). The behaviour value is checked against the value at offset 130 (hex) in the object structure and if the value matches, the corresponding function address from the look-up table is loaded and called.

In the following table, for each behaviour type the behaviour value is listed along with the location in the RAM of the function address, and the function address value at the memory location. The behaviour value in memory is before the function address so it’s easy to calculate where in memory a particular behaviour value is stored in the look-up table. The values are listed in the order they appear in memory.

Behaviour Type

Behaviour Value

PAL

NTSC USA

Function Address Location

Function Address

Function Address Location

Function Address

Used for red coin?

00000010

802F9B24

802483A8

8032D954

8024DB2C

?

00010000

802F9B2C

80248434

8032D95C

8024DBF0

Act like a star

00001000

802F9B34

8024845C

8032D964

8024DC28

Used for Big Boo bird cage?

08000000

802F9B3C

8024860C

8032D96C

8024DE4C

Warp with star overlay

00002000

802F9B44

8024869C

8032D974

8024DF10

Door warp with circle overlay

00000800

802F9B4C

802487EC

8032D97C

8024E0C4

Door (no warp)

00000004

802F9B54

80248A44

8032D984

8024E420

Cannon

00004000

802F9B5C

80248C60

8032D98C

8024E6EC

?

40000000

802F9B64

80248CC8

8032D994

8024E778

Makes Mario spin around

01000000

802F9B6C

80248CFC

8032D99C

8024E7D4

?

02000000

802F9B74

80248DDC

8032D9A4

8024E8F0

Throws Mario back far and causes his cap to fall off

00000400

802F9B7C

80248E88

8032D9AC

8024E9D0

Sets Mario on fire, causing him to lose 3 segments of health

00040000

802F9B84

80248F48

8032D9B4

8024EAD8

Pushes Mario back

10000000

802F9B8C

8024908C

8032D9BC

8024EC54

Pushes Mario back

04000000

802F9B94

80249170

8032D9C4

8024ED84

Pushes Mario from behind? Like a bully does

00020000

802F9B9C

802491F8

8032D9CC

8024EE44

Do electric shock to Mario

20000000

802F9BA4

80249354

8032D9D4

8024EFF8

Pushes Mario back

00100000

802F9BAC

802495F4

8032D9DC

8024F354

Pushes Mario back

00200000

802F9BB4

80249454

8032D9E4

8024F170

Pushes Mario back

00400000

802F9BBC

802494A8

8032D9EC

8024F1E0

Pushes Mario back; can bounce on top

00008000

802F9BC4

802495F4

8032D9F4

8024F354

Pushes Mario back

00000008

802F9BCC

802497AC

8032D9FC

8024F55C

Can be climbed like a tree

00000040

802F9BD4

80249A5C

8032DA04

8024F8BC

If jump at, kills Mario

00000001

802F9BDC

80249B9C

8032DA0C

8024FA60

Can be broken like a box?

00000200

802F9BE4

80249800

8032DA14

8024F5CC

Pushes Mario back

00000080

802F9BEC

802495F4

8032DA1C

8024F354

Ride like a Koopa shell

00080000

802F9BF4

802498AC

8032DA24

8024F6A4

Pushes Mario back

00000100

802F9BFC

8024971C

8032DA2C

8024F4AC

Used by wing cap?

00000020

802F9C04

80249C38

8032DA34

8024FB30

Can pick up and carry

00000002

802F9C0C

80249DB4

8032DA3C

8024FD2C

Can be read like a sign

00800000

802F9C14

8024A120

8032DA44

80250198

You can swap behaviour types by setting a function call address to another behaviour’s function call address. This will affect all objects that use that basic behaviour. For example, you can make readable objects give Mario an electric shock.


All content of this and related pages is copyright (c) James S. 2007-2012