To the best of my ability.
//////////
//ACTORS//
//////////
// Note: adding actors via script is usually a better solution, as it allows them to appear even if the area was already visited
SET ag_q_number = 1 // the number of actor you've just added and are setting values for
SET ag_q = (Q_NewOffset_Actor+Q_Siz_Actor*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~ActorName~ #32 // how it shall appear when opened in editor
WRITE_SHORT (ag_q + 0x20) 0 // position, X
WRITE_SHORT (ag_q + 0x22) 0 // position, Y
WRITE_SHORT (ag_q + 0x24) 0 // destination, Y
WRITE_SHORT (ag_q + 0x26) 0 // destination, Y
WRITE_LONG (ag_q + 0x34) 0 // orientation, 0-15, starting south and incrementing clockwise
WRITE_LONG (ag_q + 0x40) 0xffffffff // schedule, ffffffff means it's always present
WRITE_ASCII (ag_q + 0x80) ~crefile~ #8 // CRE file
// Note: the following generally aren't changed
WRITE_LONG (ag_q + 0x28) 1 // unknown
WRITE_LONG (ag_q + 0x2c) 0 // spawned flag
WRITE_LONG (ag_q + 0x30) 0 // animation
WRITE_LONG (ag_q + 0x38) 0xffffffff // unknown
WRITE_LONG (ag_q + 0x3c) 0 // unknown
WRITE_LONG (ag_q + 0x44) 0 // NumTimesTalkedTo(x)
WRITE_ASCII (ag_q + 0x48) ~~ #8 // dialog
WRITE_ASCII (ag_q + 0x50) ~~ #8 // script (override)
WRITE_ASCII (ag_q + 0x58) ~~ #8 // script (class)
WRITE_ASCII (ag_q + 0x60) ~~ #8 // script (race)
WRITE_ASCII (ag_q + 0x68) ~~ #8 // script (general)
WRITE_ASCII (ag_q + 0x70) ~~ #8 // script (default)
WRITE_ASCII (ag_q + 0x78) ~~ #8 // script (specific)
////////////
//TRIGGERS//
////////////
SET ag_q_number = 1 // the number of infotrigger you've just added and are setting values for
SET ag_q = (Q_NewOffset_Trigg+Q_Siz_Trigg*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~TriggerName~ #32 // trigger's name
WRITE_SHORT (ag_q + 0x20) 0 // type
WRITE_SHORT (ag_q + 0x22) 0 // bounding box, left
WRITE_SHORT (ag_q + 0x24) 0 // bounding box, top
WRITE_SHORT (ag_q + 0x26) 0 // bounding box, right
WRITE_SHORT (ag_q + 0x28) 0 // bounding box, down
WRITE_SHORT (ag_q + 0x2a) 0 // vertex count
WRITE_LONG (ag_q + 0x2c) 0 // vertex index
WRITE_LONG (ag_q + 0x30) 0 // unknown
WRITE_LONG (ag_q + 0x34) 0 // cursor
WRITE_ASCII (ag_q + 0x38) ~~ #8 // exit ARE resref
WRITE_ASCII (ag_q + 0x40) ~EntranceName~ #32 // destination entrance
WRITE_SHORT (ag_q + 0x60) 0 // flags
WRITE_SHORT (ag_q + 0x62) 0 // more flags, none seems to be ever used
WRITE_LONG (ag_q + 0x64) 0 // dialog.tlk string for info points (type = 1)
WRITE_SHORT (ag_q + 0x68) 0 // trap detection difficulty
WRITE_SHORT (ag_q + 0x6a) 0 // trap removal difficulty
WRITE_SHORT (ag_q + 0x6c) 0 // is 'trap' trapped?
WRITE_SHORT (ag_q + 0x6e) 0 // is trap detected?
WRITE_SHORT (ag_q + 0x70) 0 // trap position, X
WRITE_SHORT (ag_q + 0x72) 0 // trap position, Y
WRITE_ASCII (ag_q + 0x74) ~~ #8 // unknown
WRITE_ASCII (ag_q + 0x7c) ~~ #8 // BCS resref for triggers (type = 0)
//////////
//SPAWNS//
//////////
// Note: contains some unknowns, it might be better to use scripts instead, as BG2 often does
/////////////
//ENTRANCES//
/////////////
SET ag_q_number = 1 // the number of entrance you've just added and are setting values for
SET ag_q = (Q_NewOffset_Entra+Q_Siz_Entra*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~EntranceName~ #32 // how it shall appear when opened in editor
WRITE_SHORT (ag_q + 0x20) 0 // position, X
WRITE_SHORT (ag_q + 0x22) 0 // position, Y
WRITE_SHORT (ag_q + 0x24) 0 // orientation, 0-15, starting south and incrementing clockwise
//////////////
//CONTAINERS//
//////////////
SET ag_q_number = 1 // the number of container you've just added and are setting values for
SET ag_q = (Q_NewOffset_Conta+Q_Siz_Conta*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~ContainerName~ #32 // container's name
WRITE_SHORT (ag_q + 0x20) 0 // position to use, X
WRITE_SHORT (ag_q + 0x22) 0 // position to use, Y
WRITE_SHORT (ag_q + 0x24) 0 // type
WRITE_SHORT (ag_q + 0x26) 0 // lock difficulty
WRITE_LONG (ag_q + 0x28) 0 // flags
WRITE_SHORT (ag_q + 0x2c) 0 // trap detection difficulty
WRITE_SHORT (ag_q + 0x2e) 0 // trap removal difficulty
WRITE_SHORT (ag_q + 0x30) 0 // is container trapped?
WRITE_SHORT (ag_q + 0x32) 0 // is trap detected?
WRITE_SHORT (ag_q + 0x34) 0 // trap position, X
WRITE_SHORT (ag_q + 0x36) 0 // trap position, Y
WRITE_SHORT (ag_q + 0x38) 0 // bounding box, left
WRITE_SHORT (ag_q + 0x3a) 0 // bounding box, top
WRITE_SHORT (ag_q + 0x3c) 0 // bounding box, right
WRITE_SHORT (ag_q + 0x3e) 0 // bounding box, down
WRITE_LONG (ag_q + 0x40) 0 // item index
WRITE_LONG (ag_q + 0x44) 0 // item count
WRITE_ASCII (ag_q + 0x48) ~~ #8 // trap BCS resref
WRITE_LONG (ag_q + 0x50) 0 // vertex index
WRITE_LONG (ag_q + 0x54) 0 // vertex count
// 0x58 #32 unknown
WRITE_ASCII (ag_q + 0x78) ~~ #8 // key ITM resref
WRITE_LONG (ag_q + 0x80) 0 // unknown
WRITE_LONG (ag_q + 0x84) 0 // dialog.tlk string when picking an unpickable container
/////////
//ITEMS//
/////////
SET ag_q_number = 1 // the number of item you've just added and are setting values for
SET ag_q = (Q_NewOffset_Items+Q_Siz_Items*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~~ #8 // ITM resref
WRITE_SHORT (ag_q + 0x08) 0 // expiration time
WRITE_SHORT (ag_q + 0x0a) 0 // charges 1
WRITE_SHORT (ag_q + 0x0c) 0 // charges 2
WRITE_SHORT (ag_q + 0x0e) 0 // charges 3
WRITE_LONG (ag_q + 0x10) 0 // flags
////////////
//AMBIENTS//
////////////
SET ag_q_number = 1 // the number of ambient you've just added and are setting values for
SET ag_q = (Q_NewOffset_Ambie+Q_Siz_Ambie*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~AmbientName~ #32 // ambient's name
WRITE_SHORT (ag_q + 0x20) 0 // position, X
WRITE_SHORT (ag_q + 0x22) 0 // position, Y
WRITE_SHORT (ag_q + 0x24) 0 // radius
WRITE_SHORT (ag_q + 0x26) 0 // height
WRITE_SHORT (ag_q + 0x28) 0 // unknown
WRITE_SHORT (ag_q + 0x2a) 0 // unknown
WRITE_SHORT (ag_q + 0x2c) 0 // unknown
WRITE_SHORT (ag_q + 0x2e) 0 // sound volume, percentage
WRITE_ASCII (ag_q + 0x30) ~~ #8 // 1st WAV resref
WRITE_ASCII (ag_q + 0x38) ~~ #8 // 2nd WAV resref
WRITE_ASCII (ag_q + 0x40) ~~ #8 // 3rd WAV resref
WRITE_ASCII (ag_q + 0x48) ~~ #8 // 4th WAV resref
WRITE_ASCII (ag_q + 0x50) ~~ #8 // 5th WAV resref
WRITE_ASCII (ag_q + 0x58) ~~ #8 // 6th WAV resref
WRITE_ASCII (ag_q + 0x60) ~~ #8 // 7th WAV resref
WRITE_ASCII (ag_q + 0x68) ~~ #8 // 8th WAV resref
WRITE_ASCII (ag_q + 0x70) ~~ #8 // 9th WAV resref
WRITE_ASCII (ag_q + 0x78) ~~ #8 // 10th WAV resref
WRITE_SHORT (ag_q + 0x80) 0 // total number of sounds
WRITE_SHORT (ag_q + 0x82) 0 // unknown
WRITE_LONG (ag_q + 0x84) 0 // base time intervals between sounds
WRITE_LONG (ag_q + 0x88) 0 // base time deviation
WRITE_LONG (ag_q + 0x8c) 0xffffffff // time of day when active
WRITE_LONG (ag_q + 0x00) 1 // flags
/////////////
//VARIABLES//
/////////////
// Note: you want to set variables from within a script, not like this
/////////
//DOORS//
/////////
SET ag_q_number = 1 // the number of door you've just added and are setting values for
SET ag_q = (Q_NewOffset_Doors+Q_Siz_Doors*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~DoorName~ #32 // A long name for this door. Could be used by scripts.
WRITE_ASCII (ag_q + 0x20) ~~ #8 // door's ID, used in conjunction with WED
WRITE_LONG (ag_q + 0x28) 0 // flags
WRITE_LONG (ag_q + 0x2c) 0 // vertex index for open state
WRITE_SHORT (ag_q + 0x30) 0 // vertex number for open state
WRITE_SHORT (ag_q + 0x32) 0 // vertex number for closed state
WRITE_LONG (ag_q + 0x34) 0 // vertex index for closed state
WRITE_SHORT (ag_q + 0x38) 0 // bounding box for open state, left
WRITE_SHORT (ag_q + 0x3a) 0 // bounding box for open state, top
WRITE_SHORT (ag_q + 0x3c) 0 // bounding box for open state, right
WRITE_SHORT (ag_q + 0x3e) 0 // bounding box for open state, down
WRITE_SHORT (ag_q + 0x40) 0 // bounding box for closed state, left
WRITE_SHORT (ag_q + 0x42) 0 // bounding box for closed state, top
WRITE_SHORT (ag_q + 0x44) 0 // bounding box for closed state, right
WRITE_SHORT (ag_q + 0x46) 0 // bounding box for closed state, down
WRITE_LONG (ag_q + 0x48) 0 // vertex index for closed state, impeded
WRITE_SHORT (ag_q + 0x4c) 0 // vertex number for closed state, impeded
WRITE_SHORT (ag_q + 0x4e) 0 // vertex number for open state, impeded
WRITE_LONG (ag_q + 0x50) 0 // vertex index for open state, impeded
WRITE_SHORT (ag_q + 0x54) 0 // unknown
WRITE_SHORT (ag_q + 0x56) 0 // unknown
WRITE_ASCII (ag_q + 0x58) ~~ #8 // sound resref for opening
WRITE_ASCII (ag_q + 0x60) ~~ #8 // sound resref for closing
WRITE_LONG (ag_q + 0x68) 30 // cursor type
WRITE_SHORT (ag_q + 0x6c) 0 // trap detection difficulty
WRITE_SHORT (ag_q + 0x6e) 0 // trap removal difficulty
WRITE_SHORT (ag_q + 0x70) 0 // is door trapped?
WRITE_SHORT (ag_q + 0x72) 0 // is trap detected?
WRITE_SHORT (ag_q + 0x74) 0 // trap position, X
WRITE_SHORT (ag_q + 0x76) 0 // trap position, Y
WRITE_ASCII (ag_q + 0x78) ~~ #8 // key strref
WRITE_ASCII (ag_q + 0x80) ~~ #8 // script strref
WRITE_LONG (ag_q + 0x88) 0 // detection difficulty (for secret doors)
WRITE_LONG (ag_q + 0x8c) 0 // lock difficulty
WRITE_SHORT (ag_q + 0x90) 0 // open position, X
WRITE_SHORT (ag_q + 0x92) 0 // open position, Y
WRITE_SHORT (ag_q + 0x94) 0 // close position, X
WRITE_SHORT (ag_q + 0x96) 0 // close position, Y
WRITE_LONG (ag_q + 0x98) 0 // message when attempting to picklock an unpickable
WRITE_ASCII (ag_q + 0x9c) ~TrigName~ #32 // transition infotrigger, the one that activates when the door is opened
// 0xac #8 - unknown
// Note: the following are from NI, IESDP gives different offsets
WRITE_LONG (ag_q + 0xb4) 0 // door's name when initiating a dialog, string from dialog.tlk
WRITE_ASCII (ag_q + 0xb8) ~~ #8 // DLG strref
/////////////////
//TILED OBJECTS//
/////////////////
// Note: no information about this type of objects
////////////
//VERTICES//
////////////
// Note: you really want to use the alternative version instead
SET ag_q_number = 1 // the number of vertex you've just added and are setting values for
SET ag_q = (Q_NewOffset_Vertx+Q_Siz_Vertx*(ag_q_number - 1)) // do NOT touch this line
WRITE_SHORT (ag_q + 0x00) 0 // position, X
WRITE_SHORT (ag_q + 0x02) 0 // position, Y
////////////////////////
//VERTICES ALTERNATIVE//
////////////////////////
// Note: nobody wants to handle each vertex separatedly, therefore follow this pattern,
// increasing the numbers inside of brackets by 4 for every additional vertex
// 1st vertex
WRITE_SHORT (Q_NewOffset_Vertx + 0) 0 // position, X
WRITE_SHORT (Q_NewOffset_Vertx + 2) 0 // position, Y
// 2nd vertex
WRITE_SHORT (Q_NewOffset_Vertx + 4) 0 // position, X
WRITE_SHORT (Q_NewOffset_Vertx + 6) 0 // position, Y
// 3rd vertex
WRITE_SHORT (Q_NewOffset_Vertx + 8) 0 // position, X
WRITE_SHORT (Q_NewOffset_Vertx + 10) 0 // position, Y
// 4th vertex
WRITE_SHORT (Q_NewOffset_Vertx + 12) 0 // position, X
WRITE_SHORT (Q_NewOffset_Vertx + 14) 0 // position, Y
// etc.
//////////////
//ANIMATIONS//
//////////////
SET ag_q_number = 1 // the number of animation you've just added and are setting values for
SET ag_q = (Q_NewOffset_Anima+Q_Siz_Anima*(ag_q_number - 1)) // do NOT touch this line
WRITE_ASCII (ag_q + 0x00) ~AnimationName~ #32 // animation's name
WRITE_SHORT (ag_q + 0x20) 0 // position, X
WRITE_SHORT (ag_q + 0x22) 0 // position, Y
WRITE_ASCII (ag_q + 0x28) ~~ #8 // BAM resref
WRITE_LONG (ag_q + 0x34) 0b00000000 00000000 00010000 00000101 // flags
// Note: the following generally aren't changed
WRITE_LONG (ag_q + 0x24) 0xffffffff // schedule, ffffffff means it's always present
WRITE_SHORT (ag_q + 0x30) 0 // sequence number
WRITE_SHORT (ag_q + 0x32) 0 // frame number
WRITE_SHORT (ag_q + 0x38) 0 // height
WRITE_SHORT (ag_q + 0x3a) 0 // transparency, 255 is invisible
WRITE_SHORT (ag_q + 0x3c) 0 // starting frame
WRITE_BYTE (ag_q + 0x3e) 0 // looping chance, 0 equals 100%
WRITE_BYTE (ag_q + 0x3f) 0 // starting delay
WRITE_ASCII (ag_q + 0x40) ~~ #8 // palette
/////////////
//MAP NOTES//
/////////////
// Note: Qwinn says it's unused in PST
SET ag_q_number = 1 // the number of map note you've just added and are setting values for
SET ag_q = (Q_NewOffset_MapNo+Q_Siz_MapNo*(ag_q_number - 1)) // do NOT touch this line
WRITE_SHORT (ag_q + 0x00) 0 // position, X
WRITE_SHORT (ag_q + 0x02) 0 // position, Y
WRITE_LONG (ag_q + 0x04) 0 // strref to dialog.tlk or TOH/TOT files
WRITE_SHORT (ag_q + 0x08) 1 // Strref location (0=extenal (tot/toh), 1=internal (tlk)
WRITE_SHORT (ag_q + 0x0a) 0 // colour of the note, 0-7
///////////////
//PROJECTILES//
///////////////
// Note: adding projectiles via script is usually a better solution, as it allows them to appear even if the area was already visited
// Note: needs to be tested first, NI is of no use here
Edited by GeN1e, 09 June 2009 - 02:50 PM.