LVZ Scripting: Difference between revisions
m changing Category:Tutorial to Category:Guides... |
m →Files |
||
| Line 25: | Line 25: | ||
Acceptable image formats are bitmap (.bmp), jpeg (.jpg), gif (.gif) and png (.png). Images with any of these extensions can have their extensions replaced with the extension .bm2, but the chances of any .bm2 you find actually being a .bmp are usually good (as with .wa2 there is little point in using the .bm2 extension). | Acceptable image formats are bitmap (.bmp), jpeg (.jpg), gif (.gif) and png (.png). Images with any of these extensions can have their extensions replaced with the extension .bm2, but the chances of any .bm2 you find actually being a .bmp are usually good (as with .wa2 there is little point in using the .bm2 extension). | ||
It is also recommended that you make your graphic sizes a multiple of 16, because each tile is 16 pixels by 16 pixels. This makes your graphic match with the tiles. | |||
Note only the first frame of animated .gif's can be seen in game (see [[Animation]]). It is recommended to use .png format together with [http://pmt.sourceforge.net/pngcrush/ Pngcrush] to cut down on file size. | Note only the first frame of animated .gif's can be seen in game (see [[Animation]]). It is recommended to use .png format together with [http://pmt.sourceforge.net/pngcrush/ Pngcrush] to cut down on file size. | ||
Revision as of 00:05, 15 December 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 (.wav) files; valid extensions are .wa2 and .wav, but there is little point in using .wa2. 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 (.bmp), jpeg (.jpg), gif (.gif) and png (.png). Images with any of these extensions can have their extensions replaced with the extension .bm2, but the chances of any .bm2 you find actually being a .bmp are usually good (as with .wa2 there is little point in using the .bm2 extension).
It is also recommended that you make your graphic sizes a multiple of 16, because each tile is 16 pixels by 16 pixels. This makes your graphic match with the tiles.
Note only the first frame of animated .gif's can be seen in game (see Animation). 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. 0 is also the default.
- object id is used when controlling objects. The default is 0. You are allowed multiple objects with the same object id.
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
These are images that appear on the users HUD, such that when the player moves the images also move or stay relative to the gauges.
The format is:
<x coord>,<y coord>,<image>,<layer>[,<mode>,<display time>,<object id>]
See Map Objects for information on image, layer, mode, display time and object id.
The x coord and y coord are relative to the top left of the screen. However you can change this using the following modifiers:
- C - screen center.
- B - bottom-right corner.
- S - stats box lower right corner.
- E - below energy bar/spec data.
- G - top right corner of specials.
- F - bottom right corner of specials.
- W - top left corner of weapons.
- V - bottom left corner of weapons.
- T - top left corner of chat.
- R - top left corner of radar.
- O - top left corner of radar text. This is the captial letter O, not the number zero.
Note that x and y can have different prefixes, R-10,B-10 for example.
Screen objects example:
File=arebelong.jpg File=tous.gif [objectimages] IMAGE0=arebelong.jpg IMAGE1=tous.gif [mapobjects] [screenobjects] C-146,29,IMAGE1,AfterChat,EnterZone,3000 12,12,IMAGE0,AfterTiles,ServerControlled,100000,1000