2.13 CHARACTER section

This section describes the actors populating your game. This section can contain zero or more CHARACTER definitions.  INCLUDE statements could be used to include libraries of reusable CHARACTER definitions.   CHARACTERS syntax (square brackets indicate optional parts): CHARACTERS [ATTRLIST attributes list]   [CHARACTER definition here…] [CHARACTER definition here…]   END_CHARACTERS   The parameters are specified below. Don’t include double quotes (“) for specifying the values:   Parameter Meaning ATTRLIST Comma-separated list of pairs, of the form: Attribute1=val1,Attribute2=val2 which specify the attributes that ALL the characters (especially: players) will have, and also their starting value. Use this attribute to implement useful parameters for the game like skill, strength, intelligence, etc. See also: 2.11 – Attributes/properties, ATTRLIST definitions – page .   example: CHARACTERS ATTRLIST Health=10,Strength=1,Dexterity=1   CHARACTER asia NAME Asia DESCRIPTION Asia is the princess of the Reign. POSITION End IMAGE 120×130 sm/chrAsia.gif   END_CHARACTER   2.14 CHARACTER This tag defines a computer-controlled character.   CHARACTER syntax (square brackets indicate optional parts): CHARACTER id [DEFAULT] NAME Name goes here [DESCRIPTION textual description] [ATTRLIST attributes list] [ACCEPTS list of object_ids] [POSITION room_id] [ICON icon url] [VOLUME int_value] [CAPACITY int_value] [SHOW type] [IMAGE definitions here … ]   Parameter Meaning ID Identifier (mandatory) NAME Character’s full name (as seen by the players) DESCRIPTION Description text which appears when you look at him POSITION (Optional) ID of the container (typically a ROOM object) representing its initial position. If not specified, the character will not be initially visible. ATTRLIST (Optional) Additional attributes list. It’s a comma-separated list. These will be added to the default attributes, as specified in the CHARACTERS section. See also: 2.11 – Attributes/properties, ATTRLIST definitions – page . ACCEPTS (Optional) Comma-separated list of ITEM Ids and/or TYPE Ids of ITEMs that the CHARACTER would accept. To specify that any object is accapted, use the wildcard character: * Please note that, while you can give any item to any other player, computer-controlled characters accept nothing by default.To make the character to accept something, you have to tell so explicitly using this attribute. DEFAULT (Optional) If “true”, this entity becomes the “system default”, which is used to make system announcements such as “The game is over”. In this...

Read More

2.12 LINKS, LINK

2.12 LINKS, LINK

The LINKS section describes how the rooms are interconnected. This section contains any number of LINK or MLINK tags.  INCLUDE statements could be used to access libraries of reusable LINK definitions.   Each LINK tag describes a bi-directional connection, (mono-directional if the MLINK keyword is used). Usually, doors between rooms are described as bi-directional LINKs.   LINK syntax (square brackets indicate optional parts): LINK id from-to [orientation] NAME Name goes here [DESCRIPTION textual description] [ATTRLIST attributes list] [ICON icon url] [SHOW show_type] [IMAGE definitions here … ]   MLINK works exactly the same, just replace LINK with MLINK and the link will be mono-directional.   The parameters are specified below. Don’t include double quotes (“) for specifying the values:   (M)LINK parameter Meaning Id Passage identifier (mandatory) Name Passage name (this text appears next to passage icon) Special value: Specify “*” to let DimensioneX automatically use the orientation name (North /South and so on) From ID of the room from which the passage starts (mandatory) To ID of the room to which the passage leads (mandatory) orientation (Optional) Char specifying the direction, determines also the icon. Possible values are N S W E U D (for North South West East Up Down). ICON (Optional) Icon associated to this passage. If missing, the icon is determined by the orientation. If orientation parameter is also missing, then the default passage icon is used. ATTRLIST Comma-separated list of pairs, of the form: Attribute1=val1,Attribute2=val2 Use this attribute to specify features of this passage. For example: open=0, locked means closed and locked. See also: 2.11 – Attributes/properties, ATTRLIST definitions – page . NAME The name of the link, as it will be displayed DESCRIPTION Textual description. SHOW (Optional) defines the SHOW type for this link, default is OFFSCREEN. See 2.9 – SHOW types for more details. Note: Can be specified on MLINKs only   LINK example: LINK door1 P-End WNAME door ATTRLIST open=0,locked ICON...

Read More

2.11 Attributes/properties, ATTRLIST definitions

This definition is relevant to all objects.   The additional attributes help you to better qualify and specify the behaviour of an object as they are treated like local variables (or properties) of that object. By means of an additional attribute you can specify for instance whether an item can be picked or not (“pickable”), if it is visible (“hidden”), if it is “open”, and so on. A number of pre-defined attributes are ready to be used. Plus, the developer can define his own attributes which can help him to control the game plot by means of events. Here in this section you find a list of pre-defined, standard attributes which are automatically recognised and managed by the system to handle the most common situations.   Basic principle: Attributes are specified as comma-separated list of “key=value” pairs. The part “=value” can be omitted, in that case =true is considered the default value.   Attribute/property name Meaning for the game Open Tells whether an object is open or not. WAY objects not having this attribute are implicitely open. openable Tells whether an object can be opened by a player. If it has open or locked attributes, the object is implicitly openable. You should use this one in the form openable=0 to specify that cannot be opened, and this does not depend from a lock. For example, a sealed metal box cannot be opened, and it has no lock to open with whatever key. So the message the player will get when trying to open it will be different. Locked Tells whether an object can be opened with a key. Nota: To programmatically open a “locked” object, you set the “open” attribute to 1 or true. pickable If an object can be picked or not. Implicitely is not. Hidden If an object is hidden or not. Implicitely is not. hideable If an item is hideable or not. Implicitely it is. You should use this one in the form hideable=0 to specify that cannot be hidden. Characters, ways and scenes cannot be hidden by the player. Examples on the use of attributes can be found in the sample games provided with DimensioneX. Note: the VOLUME and CAPACITY...

Read More

2.10 IMAGE

2.10 IMAGE

The IMAGE definition is widely used in the DimensioneX file syntax in order to describe an image being used.   An IMAGE is defined in one line according to the following syntax:   IMAGE [orientation] [dimensions] [ SHOWAREA [x1],[x2],y ] url   Example:   IMAGE N 400×300   SHOWAREA 100,300,10     start.jpg     The parameters are specified below. Don’t include double quotes (“) for specifying the values:   IMAGE attribute Meaning url Defines the file representing the image. It can be either a fully-qualified, absolute URL or a relative URL (a simple file name is considered as such).     Absolute URLs are not recommended.   URLs beginning with a slash are considered relative to the server hosting the game. For example, the following: /pics/scroll.gif always refers to the /pics/ folder in the server hosting the game.     Relative URLs not starting with a slash are considered relative to the IMAGESFOLDER attribute which has been defined for this WORLD. This means that, by deafult, all images are assumed to be stored in the same IMAGESFOLDER.   For example, the following: scroll.gif will be automatically modified so that the image will be fetched from the WORLD’s IMAGESFOLDER. dimensions (Optional) Specifies width and height of the image in the form: 123×123. The first number is width, the second is height. This data are optional but, if specified, the effect as perceived by the user is that the page loads more quickly. orientation (Optional) Specifies the orientation which an observer should have in order to see that image.   Possible values are N S E W U D for North South East West Up Down.   Use this attribute in multiple IMAGE definitions in order to create navigable 360° views of the object. SHOWAREA x1,x2,y (Optional). Specifies the baseline along which any on-screen object or icon can be shown. The purpose of this information is to avoid erroneously displayed situations such as: objects flying in the air, characters standing on the water’s surface, etc.   The default values are: x1 = left side of the picture x2 = right side of the picture y = 10% of the picture’s height   Please note that, any invalid value...

Read More

2.9 SHOW types

2.9 SHOW types

The SHOW tag is used in definitions of ITEMS and CHARACTERS to define how they should appear on the game screen. Here is the SHOW tag syntax: SHOW showMode [showX,showY [FOR showFor] ]   2.9.1    showMode showMode can take one of the following values:   OFFSCREEN Specifies that the object is shown as an icon in the icons panel, outside the scene picture. This is the default behaviour for ITEMS. If an IMAGE is specified for the object, it can be seen when the player looks at the object. Note: (corresponds to object.showmode=0) ONSCREEN Specifies that the object is shown by its IMAGE on the scene picture. This is the default behaviour for CHARACTERS. Note: (corresponds to object.showmode=1) ICON Specifies that the object is shown as an icon on the scene picture. Note: (corresponds to object.showmode=2)   2.9.2    showX, showY A pair of co-ordinates can be also specified, indicating the position in the scene picture where the lower-left corner of the image/icon should appear.   Notes The lower-left corner of the picture is co-ordinates (0,0). If unspecified, the position is automatically determined at random and by considering the scene pictures’ SHOWAREA. If co-ordinates are not valid, they are automatically ignored and replaced by a valid random value. Currently, LINKS objects always show OFFSCREEN so if you would like to change their on-screen appearence (an open/closed door for instance), you should change programmatically the scene’s picture.   2.9.3    showFor If a FOR tag is specified, the object is shown using the specified co-ordinates only if the scene image’s URL matches the provided one. In other words, showFor is an URL that locks the object’s image to a specific scene...

Read More

2.7 ROOMS section

2.7 ROOMS section

The ROOMS sections describes the rooms of the game. It simply contains one or more ROOM definitions. INCLUDE statements could be used to include reusable libraries of ROOM definitions.   ROOMS <ROOM definition> [<ROOM definition> … ] END_ROOMS 2.8 ROOM definition   Each ROOM definition describes a room in the game.   Syntax: (square brackets indicate optional parts): ROOM id  [DEFAULT]     NAME Name goes here      [DESCRIPTION Description]      [ATTRLIST attrList]      [PANEL panelId]      [IMAGE definitions here … ]     The parameters are specified below. Don’t include double quotes (“) for specifying the values:   ROOM parameters Meaning Id Identifier of the room (mandatory) Basic principle: ID, like all identifiers used in DimensioneX, can be made of letters and numbers, no spaces nor other characters. ID is a unique identier and cannot be used for other objects. DEFAULT (Optional) If this keyword is specified after the ROOM’s ID, this room is used as a starting point when a player connects. Name Room’s name (as displayed on the player’s screen) Description (Optional) Description of the room. This is the text the user will read when entering in or looking at the room.   Dynamic descriptions A description starting with the ampersand character, e.g.   @myFunction($AGENT)   Will produce a dynamic description by executing and using the return value of myFunction($AGENT). PanelId (Optional) Id of a control panel to be used in the room. If omitted, the world’s default panel is used. attrList Comma-separated list of pairs, of the form: Attribute1=val1,Attribute2=val2   See also: 2.11 – Attributes/properties, ATTRLIST definitions – page .   Note: If you would like the player’s position to be tracked on the game’s map you have to specify the mapx and mapy attributes. Example: ATTRLIST     mapx=100,mapy=200 IMAGE The ROOM definition may contain one or more IMAGE definitions which specify the images associated to the room itself. For more on this, see below   Note: When using transparent scene images (GIF and PNG formats), in order to set night/day sky color, use the WORLD’s bgcolor property. Example:   Bgcolor = “#003355” ‘ Sets dark blue sky...

Read More