_MyScript Variable Injections

Many commands in DROD Script can accept dynamic values for certain options by taking values from any of the _MyScript variables. When a _MyScript variable is equal to -9999 it indicates its value should not be used - anything else and commands will take their values, overriding whatever you input in the command itself.

Below is a table of all the ways this can be used:

Command X Y W H F
Activate item Target X Target Y
Amb. Sound at Target X Target Y
Appear at Target X Target Y
Attack Tile Target X Target Y Attack type
Push Tile Target X Target Y Direction
Build Rect X Rect Y Rect Width Rect Height Tile type
Build marker Rect X Rect Y Rect Width Rect Height Tile type
Cut scene Ms per frame
Destroy trapdoor Rect X Rect Y Rect Width Rect Height
Display filter Filter
Face Direction Orientation
Face Towards Target X Target Y Single Step Entity bitmap
Flash mess. Red, 0-255 Green, 0-255 Blue, 0-255 Use color?
Game effect Target X Target Y Orientation Game effect Play sound
Generate entity Target X Target Y Orientation Entity
Get entity dir. Target X Target Y
Get natural target Target type
Goto lev. entrance Skip e. screen
Link Orb Target 1 X Target 1 Y Target 2 X Target 2 Y Connection type
Move X Move Y Move Allow Turn. Single Step
Move to Target X Target Y Allow Turn. Single Step Entity bitmap
Play Video Target X Target Y
Set player weapon Weapon
Set ceiling darkness Rect X Rect Y Rect Width Rect Height Darkness level
Set ceiling light Rect X Rect Y Rect Width Rect Height Light color
Set wall light X Y Intensity Light color
Set var atTarget X Target Y
Set array var Starting Index
Set array var atTarget X Target Y Starting Index
Teleport Player Target X Target Y
Teleport To Target X Target Y
Wait Wait turns Y
W. entity Rect X Rect Y Rect Width Rect Height Entity bitmap
W. entity type Rect X Rect Y Rect Width Rect Height Entity
W. door X Y
W. item Rect X Rect Y Rect Width Rect Height Tile type
W. item group Rect X Rect Y Rect Width Rect Height
W. build mark. Rect X Rect Y Rect Width Rect Height
W. no build mark. Rect X Rect Y Rect Width Rect Height
W. b.m. type. Rect X Rect Y Rect Width Rect Height Tile type
W. open move Orientation
W. player to face Orientation
W. player state On or off
W. player to input Command
W. player to move Orientation
W. remains Rect X Rect Y Rect Width Rect Height Remains
W. turn Turn number
W. weapon Rect X Rect Y Rect Width Rect Height Weapon
W. while entity Rect X Rect Y Rect Width Rect Height Entity bitmap
W. while ent. type Rect X Rect Y Rect Width Rect Height Entity
W.Map Tile Icon Target X Target Y Entrance Entity Map display
W.Map Image Icon Target X Target Y Entrance Image Map display

Below are the values that can be used for specific override types:


Entity bitmap
This is a bit map value, meaning it can contain multiple values created by just adding them.
1 (0x001) - Player
2 (0x002) - Halph
4 (0x004) - Monster
8 (0x008) - NPC
16 (0x010) - Double
32 (0x020) - Self
64 (0x040) - Slayer
128 (0x080) - Beethro
256 (0x100) - Stalwart
512 (0x200) - Fluff Baby (Wait for open tile only)
1024 (0x400) - Required Monster

Attack type:
0 - Stab
1 - Explode
2 - Damage
3 - Kill
4 - Remove Monster
5 - One-turn stun
6 - Two-turn stun
7 - Floor spikes
8 - Fire trap

Remains
15 - Rock golem
26 - Fegundo
40 - Construct

Orb Connection type:
0 - None
1 - Toggle
2 - Open
3 - Close

Weapon
-2 - Off
-1 - On
0 - Sword
1 - Pickaxe
2 - Spear
3 - Staff
4 - Dagger
5 - Caber

Game effect
0 - Blood splatter
1 - Mud splatter
2 - Tar splatter
3 - Gel splatter
4 - Seep splatter
5 - Golem splatter
6 - Slayer splatter
7 - Debris
8 - Sparks
9 - Explosion
10 - Splash
11 - Steam
12 - Swirl
13 - Vermin
14 - Bolt
15 - Jitter
16 - Floor spikes
17 - Puff explosion
18 - Fire trap
19 - Ice melting
20 - Puff merged into fluff

Filter

0 - Normal
1 - Black and White
2 - Sepia
3 - Negative

Map display

0 - Off
1 - On
2 - Level state
4 - Locked
8 - Disabled
16 - Image only

Target type

0 - Regular Monster
1 - Brained Monster
2 - Best Brain Tile
3 - Best Brain Direction

Tile type
ID of the tile. Please refer to the source code DRODLib\TileConstants.h for a list of all tiles and their IDs.

Entity
ID of the entity. Please refer to the source code DRODLib\MonsterType.h for a list of all entities and their IDs.
You can also use IDs of custom entities, visible above the list of custom entities on the "Character Management" dialog

Orientation values:

0 - North-West
1 - North
2 - North-East
3 - West
4 - No Orientation
5 - East
6 - South-West
7 - South
8 - South-East
9 - Clockwise
10 - Counter clockwise

Command values:
1 - North
2 - North-East
3 - West
5 - East
6 - South-West
7 - South
8 - South-East
9 - Rotate Clockwise
10 - Rotate Counter clockwise
11 - North-West
12 - Wait
23 - Special command
25 - Special command 2
26 - Special command 3

Light colors:

0 - None/Remove light
1 - White
2 - Red
3 - Green
4 - Blue
5 - Pale Red
6 - Pale Green
7 - Pale Blue
8 - Yellow
9 - Cyan
10 - Mauve
11 - Orange
12 - Pink
13 - Lime
14 - Turquoise
15 - Violet
16 - Azure

Command list
Character Scripting