“gameobject_template” table

The gameobject_template table holds information on every object that exists in the game.

Table structure

Field Type Null Key Default Extra
entry mediumint(8) unsigned NO PRI 0  
type tinyint(3) unsigned NO   0  
displayId mediumint(8) unsigned NO   0  
name varchar(100) NO      
faction smallint(5) unsigned NO   0  
flags int(10) unsigned NO   0  
size float NO   1  
data0 int(10) unsigned NO   0  
data1 int(10) unsigned NO   0  
data2 int(10) unsigned NO   0  
data3 int(10) unsigned NO   0  
data4 int(10) unsigned NO   0  
data5 int(10) unsigned NO   0  
data6 int(10) unsigned NO   0  
data7 int(10) unsigned NO   0  
data8 int(10) unsigned NO   0  
data9 int(10) unsigned NO   0  
data10 int(10) unsigned NO   0  
data11 int(10) unsigned NO   0  
data12 int(10) unsigned NO   0  
data13 int(10) unsigned NO   0  
data14 int(10) unsigned NO   0  
data15 int(10) unsigned NO   0  
data16 int(10) unsigned NO   0  
data17 int(10) unsigned NO   0  
data18 int(10) unsigned NO   0  
data19 int(10) unsigned NO   0  
data20 int(10) unsigned NO   0  
data21 int(10) unsigned NO   0  
data22 int(10) unsigned NO   0  
data23 int(10) unsigned NO   0  
mingold mediumint(8) unsigned NO   0  
maxgold mediumint(8) unsigned NO   0  
ScriptName varchar(64) NO      

Fields

entry

The unique identifier of the game object template entry.

type

The type of game object. The value determines which functionality a game object offers, and which data columns need to be used. The following list provides a list of valid types.

Value Description Value Description
0 Door 16 Duel arbiter
1 Button 17 Fishing node
2 Quest giver 18 Summoning ritual
3 Chest 19 Mailbox
4 Binder 20 Auction house
5 Generic 21 Guard post
6 Trap 22 Spell caster
7 Chair 23 Meeting stone
8 Spell focus 24 Flag stand
9 Text 25 Fishing hole
10 Goober 26 Flag drop
11 Transport 27 Mini game
12 Area damage 28 Lottery kiosk
13 Camera 29 Capture point
14 Map object 30 Aura generator
15 Mo transport    

displayId

A display model identifier for the gameobject_template. This references an entry in the GameObjectDisplayInfo.dbc table.

name

The game object’s name that will be displayed.

faction

A faction for the game object. The value has to match with a faction template identifier defined in FactionTemplate.dbc.

flags

The value set here determines how characters can interact with a game object. Multiple values can be combined. The following table lists allowed flags.

Value Name Description
1 GO_FLAG_IN_USE Disables interaction while animated
2 GO_FLAG_LOCKED Locks a game object, and requires key, spell, event, etc. to be opened
4 GO_FLAG_INTERACT_COND Not targetable, can not interact (condition required to interact)
8 GO_FLAG_TRANSPORT Object can transport (elevator, boat, car)
16 GO_FLAG_NO_INTERACT Players can not interact with game object (e.g. removed during events)
32 GO_FLAG_NODESPAWN Prevents despawning, typically for game objects only changing states
64 GO_FLAG_TRIGGERED Used for summoned game objects. Triggered by spell or other events

size

This field defines how the size of the game object’s model appears in game.

data0-23

Since the values of these fields depends on the setting of the type column, the following tables will show the use of data columns for each type.

Type Description Parameters
0 Door TODO
1 Button TODO
2 Quest giver TODO
3 Chest TODO
4 Binder TODO
5 Generic TODO
6 Trap TODO
7 Chair TODO
8 Spell focus TODO
9 Text TODO
10 Goober TODO
11 Transport TODO
12 Area damage TODO
13 Camera TODO
14 Map object TODO
15 Mo transport TODO
16 Duel arbiter TODO
17 Fishing node TODO
18 Summoning ritual TODO
19 Mailbox TODO
20 Auction house TODO
21 Guard post TODO
22 Spell caster TODO
23 Meeting stone TODO
24 Flag stand TODO
25 Fishing hole TODO
26 Flag drop TODO
27 Mini game TODO
28 Lottery kiosk TODO
29 Capture point TODO
30 Aura generator TODO

mingold

DEPRECATED: Defines money looted from the game object.

maxgold

DEPRECATED: Defines money looted from the game object.

ScriptName

To assign a script from the script library to the gameobject_template, set this string to the script’s exported name.