Example Map

From YAD Wiki

Jump to: navigation, search

This is a copy of the example map (example.map) that comes with YAD. The version in SVN is likely more recent than this one.

# This map serves as a tutorial.
# X COORDS START AT 0 AND ARE COUNTED LEFT TO RIGHT.
# Y COORDS START AT 0 AND ARE COUNTED TOP TO BOTTOM.
# ALL DIRECTIVES ARE CASE SENSITIVE!
# Comments start with #. The game ignores them.

# The only directive /required/ is the Map (M) comand
# In the map data, W is a wall, . is terrain that the character can walk on.
# The map data MUST end with an END directive, or the parser will
# eat the rest of the file as a map too!
# If you intend to place a staircase, door, or teleporter, please use '.' and not wall.
# The aforementioned may not work if you do not.
M
WWWWWWWWWWWWWWWW
W..............W
W..............W
W..............W
WWWWWWWWWWWWWWWW
END

# Visibility can be defined for the map. Use the visibility (V) directive.
# Vx,y - X is the left and right distance, y is the up and down distance.
# The player will be able to see the map X squares to the left and right of them (each)
# and Y squares above and below.
# Vn works as well, n being the distance for both directions.
# 0 sets unlimited visibility.
V0

# The character needs a starting location. This is given by the start (S) directive
# Don't set it to be in a wall.
# Syntax:
# Sx,y -- X is X, Y is Y
S1,1

# To add doors, use the door object (Od) directive.
# The syntax is as follows
# Odx,y,state -- x is the X coordinate, y is the Y coordinate, and s is the initial door state.
# The state is 0 for closed and 1 for open.
Od2,1,0

# To place objects, use the object (Oo) directive.
# Oox,y,id,shortdesc -- id is a number and must be unique among all objects.
# shortdesc is the name by which the object will be displayed.
Oo2,2,1,a food ration

# To place a message object, use the message object (Om) directive.
# Omx,y,message -- message is the message
Om1,1,This is your starting location.

# To place a staircase, use the staircase object (Os) directive.
# Osx,y,X,Y,map -- x and y are the x and y on THIS map, X and Y are the x and y to start out on
# on the new map, and map is the map filename!
# Os1,3,1,1,woot.map

# Every map should have either a staircase or a finishing location (given by the F directive)
# This rule is not enforced.
# Fx,y
F1,3

# Teleporters can be defined with the teleport object (OT) directive. Syntax:
# OTx,y,X,Y - x and y are the coordinates of the square that the teleporter is on, and
# X and Y are the destination coordinates. Teleporters are not automatically two-way.
# Teleporting to a teleport square will not set off the second teleporter.
# OT1,1,2,2
Personal tools