1 |
< tag attribute = "value" /> |
1 2 3 |
< tag1 attribute = "value" > < tag2 attribute = "value" /> </ tag1 > |
1 2 3 4 5 6 7 |
* < vrf > * < globals > * < design > * < create > * < action > * < imagemap > * < define > |
All values, meaning anything immediately following an equals sign must be surrounded by quotes. Any value that describes an x,y or x,y,z coordinate must be bounded by parentheses . R,G,B color values also must be bounded by parentheses .
To include comments in a VRF file, use the following syntax:
1 |
<!-- your comments here --> |
Any information bounded in this way will be ignored. Avoid using multiple, consecutive dashes in comments for compliance.
1 |
< vrf > ... </ vrf >´ |
The <globals> tag. These tags define information which appears before the design section. The globals contains information that applies to the entire VRF code.
1 |
< globals > ... </ globals > |
The <design> tag. These tags surround the design content of the VRF, including the map itself.
1 |
< design > ... </ design > |
1 |
< devel /> |
1 |
< title name = "name text" /> |
1 |
< lib href = "url" required = "minimum version required" /> |
1 |
< map dimensions = "(columns,rows,layers)" /> |
1 |
< sky texture = "folder/image.vri -or- URL" color = "(red,green,blue)" brightness = "brightness%" /> |
1 |
< fog color = "(red,green,blue)" start = "value" end = "value" density = "density%" /> |
The <ground> tag. If supplied, VRGrid uses the given image (or color) as the ground plane directly beneath the first layer of the map. An author can then build a map without having to supply a solid floor. To use the default ground texture, include an “empty” ground tag. If not supplied, there will be no ground. Movement through the lowest, groundless layer is hindered, unless units are placed on this level to move over.
1 |
< ground texture = "folder/image.vri -or- URL" color = "(red,green,blue)" /> |
1 |
< atmosphere brightness = "brightness%" color = "(red,green,blue)" /> |
1 2 3 |
< orb texture = "folder/image.vri -or- URL" position = "(turn,tilt)" brightness = "brightness%" color = "(red,green,blue)" href = "url" target = "target frame" text = "text" /> |
1 2 |
< ambience file = "folder/sound.wav -or- URL" volume = "volume%" playback = "looped|random|once" delay = "minimum..maximum" /> |
1 |
< loader texture = "folder/image.vri -or- URL" /> |
1 |
< assets href = "url" /> |
1 |
< font name = "name-of-font" /> |
1 |
< scope /> |
The <view> tag. The view sets the radius viewer distance. Values can be set between 5 and 90.
1 |
< view radius = "distance" /> |
The <create> tag. Every 3D object is assigned a double ASCII character as a unit. For instance, let´s say a full 3D object is assigned to the “##” character. So when you make a wall on the map you might type ## ## ## ## ## which is a wall that is five units wide. The <create> tag allows you to change the textures applied to a 3D object and change some other features of the 3D object, such as the orientation, the lighting (brightness, radius, and color) or the sound (WAV file, volume, radius and playback mode).
1 2 3 |
< create unit = "unit" vrobj = "libraryused:3dobjectname" > ... </ create > |
1 2 3 4 5 6 7 8 9 10 |
< create unit = "unit" vrobj = "libraryused:3dobjectname" > < param orient = "up|down|north|south|east|west,0|90|180|270" solid = "yes|no" walkable = "yes|no" origin = "(x,y,z)" /> < side name = "name" texture = "folder/image.vri -or- URL" angle = "0-359" color = "(red,green,blue)" clarity = "clarity%" style = "tiled|scaled|stretched" projection = "top|bottom|north|south|east|west" faces = "0|1|2" solid = "yes|no" rect = "x1,y1,x2,y2" /> </ create > |
The <define> tag. The <define> tag is used to define script variables and functions in your VRF. See Scripting for more details.
1 2 3 |
< define > ... variables and functions ... </ define > |
1 |
< include href = "folder/file.vrf" /> |
1 2 3 |
< layer number = "number" name = "name" > ...rows of units... </ layer > |
1 |
< enter location = "(column,row,layer)" name = "name" angle = "0-359,-90-90" /> |
The <exit> tag. A hyperlink to another VRF file. Location defines where in the VRF the link will be placed. The href gives the filename or URL of the destination VRF or other file, with an optional enter name (if omitted the “default” enter will be used). The trigger attribute defines how the link can be activated, either by clicking on it, stepping on it, or both. The text attribute defines the text that will be displayed when the mouse rolls over the link. Like the <enter> tag, the <exit> tag can also be assigned to a 3D object by including it in the <create> tag, or it can be placed in the design on its own, usually at the end of the design or immediately following the layer in which it occurs.
1 2 3 |
< exit location = "(column,row,layer)" href = "folder/desitination.vrf#enter-name" trigger = "click on|step on" text = "text" /> |
The <action> tag. Defines an action which takes place as a response to a particular trigger. Radius used only for trigger=“step in” or “step out”. Delay is only used for trigger=“timer”. Delay is measured in seconds. If only one delay value is specified, the delay time will remain consistent. If delay is expressed as a range from minimum to maximum times, the delay will be random within those parameters. Action tags can stand alone in the design of the VRF file, or they can be attached to 3D objects inside the <create> tag. Action can also be used in an imagemap with the additional attributes of shape=“rect|circle” and coords=“x1,y1,x2,y2|x,y,radius”.
1 2 3 4 5 6 7 |
< action location = "(column,row,layer)" trigger="roll on|roll off|click on|step in| step out|proximity|timer|location|key down| key up|key hold" key = "keyvalue" radius = "number-of-units" delay = "min..max" /> < execute action here /> </ action > |
The <popup> tag . Popups are 2D images that get displayed on the screen when the user travels within the radius of the location defined. This 2D image can be a texture (animated or still) or a color. The position and size of the popup image on the screen can be specified. Text can also appear on a popup, with a given alignment color and custom font specified with the globals font tag. When text is placed over a texture, the color attribute will define the color of a drop-shadow to make the text more legible. Finally, the brightness of the entire popup can be specified. Popups can be assigned to a location in the map in the design section, or they can be assigned to a specific 3D object in the <create> tag. If used in the <create> tag, the location attribute is not needed. If used in the design, and no location attribute is defined, then the popup will display throughout the entire VRF.
1 2 3 4 5 6 7 8 9 10 11 12 |
< popup location = "(column,row,layer)" trigger = "rollover|proximity|everywhere" radius = "number-of-units" texture = "folder/image.vri -or- URL" color = "(red,green,blue)" placement="mouse|top-left|top|top-right| left|center|right|bottom-left|bottom|bottom-right" size = "(width,height)" text = "message" textalign="top-left|top|top-right|left|center| right|bottom-left|bottom|bottom-right" textcolor = "(red,green,blue)" imagemap = "map name" brightness = "brightness%" /> |
The <imagemap> tag. Defines an imagemap. Imagemaps are images that have areas that contain links to other VRF´S or other documents. Imagemaps can be used in popups only. When creating a rectangular area of an imagemap, the coordinates x1, y1 refer to the top left corner of the rectangle, and x2, y2 refer to the bottom right corner. When creating a circular area of an imagemap, x, y refers to the center of the circle.
1 2 3 4 5 6 7 8 9 10 11 12 |
< imagemap name = "imagemap name" > < area shape = "rect|circle" coords = "x1,y1,x2,y2|x,y,radius" href = "destination" text = "your text" /> </ area /> < action shape = "rect|circle" coords = "x1,y1,x2,y2|x,y,radius" trigger="roll on|roll off|click on| step in|step out|timer"> </ action > </ imagemap > |
The <sound> tag. Specifies a sound file that will play in the VRF. Location refers to the placement of the sound in the map or layer. The sound can either be played once, once every time the player enters the specified radius (single), looped continuously, or played at random intervals with the playback attribute. If playback=“random”, you can also specify a range of delay times between playbacks. Delay times are measured in seconds, and are measured from the time that the sound begins, rather than when it ends. Flood=“yes” will cause the sound to fill the specified radius at the specified volume. Radius should only be used if flood=“yes” or playback=“single” or “once”. Rolloff determines how quickly the sound will taper off as you move away from the source. Sounds can also be assigned to specific 3D objects within the <create> tag. If used in the <create> tag, the location attribute is not necessary. Default values are as follows: volume=“100%”, playback=“looped”, delay=“5..10”, radius=“1”,flood=“no”, and rolloff=“1.0”.
1 2 3 4 5 |
< sound file = "folder/sound.wav-or-url" name = "sound name" location = "(column,row,layer)" volume = "volume%" playback = "looped|random|once|single" delay = "minimum..maximum" radius = "number_of_units" flood = "yes|no" rolloff = "rolloffvalue" /> |
The <point_light> tag. Defines a light at a specific location in the map that shines in all directions. Location refers to the placement of the light in the map or layer. Position refers to the position of the light within the 256-pixel unitspace. Flood=“yes” will cause the light to fill the radius at the specified brightness. Flood=“no” will create a light that is the specified brightness at the center, and gradually drops off to the atmosphere light level at the far end of the radius. The default value is flood=“no”. Lights can also be assigned to specific 3D objects within the <create> tag. If used in the <create> tag, the location attribute is not necessary.
1 2 3 4 |
< point_light style = "static|pulsate" location = "(column,row,layer)" position = "(x,y,z)" brightness = "n%" radius = "number_of_units" flood = "yes|no" color = "(red,green,blue)" name = "light name" speed = "cycles_per_second" /> |
The <vrf_light> tag .Defines a vrf_light at a specified location that shines in a specified direction. Direction is expressed as a pair of angles. The turn angle describes a direction in the horizontal plane, from 0 to 359 degrees, with 0 being north. The tilt angle describes a direction in the vertical plane, from -90 to 90 degrees, with 90 pointing straight up, 0 pointing at the horizon, and -90 pointing straight down. The cone describes how wide the light is in degrees.
1 2 3 4 5 |
< vrf_light style = "static|search|revolve" location = "(column,row,layer)" position = "(x,y,z)" brightness = "n%" radius = "number_of_units" flood = "yes|no" color = "(red,green,blue)" direction = "(turn,tilt)" cone = "angle" name = "light name" speed = "revolutions_per_second" /> |
The <script> tag .Call functions and perform other scripting operations. See Scripting for more information.
1 2 3 4 5 6 |
< script trigger="delay|proximity|roll on|roll off| click on|step in|step out|proximity|timer|location| key down|key hold|key up" delay = "seconds" radius = "number_of_units" key = "keyvalue" > ... script ... </ script > |
The <player> tag. Interacts with the view options. The default values for the <player> tag are: move_back=“[up]”, move_back=“[down]”, move_left=“[left]”, move_right=“[right]”, look_up=“a”, look_down=“z”, sidle_mode=“[shift]”, fast_mode=“[ctrl]”, go_faster=“[pad +]”, and go_slower=“[pad -]”.
1 2 3 4 5 6 |
< player size = "(x,y,z)" camera = "(x,y,z)" vrobj = "unit" move_forward = "key" move_back = "key" move_left = "key" move_right = "key" look_up = "key" look_down = "key" sidle_mode = "key" fast_mode = "key" go_faster = "key" go_slower = "key" /> |