Difference between revisions of "LVZ Scripting"

From ASSS Wiki
Jump to: navigation, search
(Object Images: completed)
(Map Objects: finished writing this section)
Line 55: Line 55:
  
 
== Map Objects ==
 
== Map Objects ==
-write me-
+
Some uses for map objects are changing the background, zone news or creating the effect of having more tiles.
 +
 
 +
The format is:
 +
<pre>
 +
<x coord>,<y coord>,<image>,<layer>[,<mode>,<display time>,<object id>]
 +
</pre>
 +
*''x coord'' is the x position of the image on the map in [[Pixels|pixels]].
 +
*''y coord'' is the y position of the image on the map in pixels.
 +
0,0 is the top left of the map. Negative values are allowed.
 +
 
 +
*''image'' is an image from the object images section
 +
*''layer'' is how the image is to be drawn. The available layers are:
 +
**BelowAll
 +
**AfterBackground
 +
**AfterTiles
 +
**AfterWeapons
 +
**AfterShips
 +
**AfterGauges
 +
**AfterChat
 +
**TopMost
 +
 
 +
The following are optional:
 +
*''mode'' is when the image is to be displayed. The available modes are:
 +
**ShowAlways - This is default and means that this object is visible.
 +
**EnterZone - The object is displayed to players who enter zone for ''display time''
 +
**EnterArena - The object is displayed to players who enter arena for ''display time''
 +
**Kill - The object is displayed to players who kill somebody else for ''display time''
 +
**Death - The object is displayed to players who die and for ''display time''
 +
**ServerControlled - Use this if the object will be controlled by some other means.
 +
*''display time'' is how long the image will be seen for. The time is in 1/100th of a second however the resolution is only 1/10th of a second. Putting 0 here means display forever.
 +
*''object id'' is used when controlling objects. <!-- keep the audience in suspense :D -->
 +
 
 +
Here is a complete example:
 +
<pre>
 +
File=all.jpg
 +
File=your.gif
 +
File=base.png
 +
 
 +
[objectimages]
 +
IMAGE0=all.jpg
 +
IMAGE1=your.gif
 +
IMAGE2=base.png
 +
 
 +
[mapobjects]
 +
8192,8192,IMAGE0,AfterTiles,ServerControlled,500,1
 +
0,0,IMAGE2,AfterTiles
 +
</pre>
  
 
== Screen Objects ==
 
== Screen Objects ==

Revision as of 13:03, 12 January 2005

LVZ scripts are used to generate .lvz files.

Layout

The general layout of a LVZ script is as follows:

;"arena name" date

OutFile=some.lvz

; files

[objectimages]

[mapobjects]

[screenobjects]

Lines beginning with a semicolon are comments and are ignored by the LVZ compiler.

Files

You can add files such as graphics or sounds using mutliple File keys.

Sound files must be wave files, acceptable extensions are .wa2 and .wav. It is a good idea to reduce the quality of the sound to reduce file size. However 4bit wave files do not work with Continuum.

Acceptable image formats are bitmap (.bm2 and .bmp), jpeg, gif and png. Note only the first frame of animated .gif's can be seen in game. It is recommended to use .png format together with Pngcrush to cut down on file size.

File=Commands.hlp
File=ships.png
File=victoryl.wav

Object Images

This section defines all the images that can be used in the map and screen object sections. The image file should exist in a File= entry too.

The format is:

IMAGE<number>=<filename>[,<x tiles>,<y tiles>,<anim period>]
  • number starts at 0 and goes up to 255
  • filename is a file already defined with a File=
  • x tiles is how many frames wide the animation is
  • y tiles is how many frames high the animation is
  • anim period is the total length of the animation

x tiles, y tiles and anim period are all optional. They will be set to 1, 1, 100 by default as can be seen in the example below. See Animation for more information on animations.

File=gameover.png
File=10anim.png

[objectimages]
IMAGE0=gameover.png,1,1,100
IMAGE1=10anim.png,2,5,1000

Map Objects

Some uses for map objects are changing the background, zone news or creating the effect of having more tiles.

The format is:

<x coord>,<y coord>,<image>,<layer>[,<mode>,<display time>,<object id>]
  • x coord is the x position of the image on the map in pixels.
  • y coord is the y position of the image on the map in pixels.

0,0 is the top left of the map. Negative values are allowed.

  • image is an image from the object images section
  • layer is how the image is to be drawn. The available layers are:
    • BelowAll
    • AfterBackground
    • AfterTiles
    • AfterWeapons
    • AfterShips
    • AfterGauges
    • AfterChat
    • TopMost

The following are optional:

  • mode is when the image is to be displayed. The available modes are:
    • ShowAlways - This is default and means that this object is visible.
    • EnterZone - The object is displayed to players who enter zone for display time
    • EnterArena - The object is displayed to players who enter arena for display time
    • Kill - The object is displayed to players who kill somebody else for display time
    • Death - The object is displayed to players who die and for display time
    • ServerControlled - Use this if the object will be controlled by some other means.
  • display time is how long the image will be seen for. The time is in 1/100th of a second however the resolution is only 1/10th of a second. Putting 0 here means display forever.
  • object id is used when controlling objects.

Here is a complete example:

File=all.jpg
File=your.gif
File=base.png

[objectimages]
IMAGE0=all.jpg
IMAGE1=your.gif
IMAGE2=base.png

[mapobjects]
8192,8192,IMAGE0,AfterTiles,ServerControlled,500,1
0,0,IMAGE2,AfterTiles

Screen Objects

-write me-