Server Help

General Questions - Request: LVL information

Helicon - Fri Jan 03, 2003 12:53 am
Post subject: Request: LVL information
please, you experts out there, give everything you know on lvl format IE:

complete byte by byte format info, probably from the FACTS guys, eh?
Complete pallette info
How the server loads it (IE when, what safety checks)
How the client loads it
Any animation speicifications/ tile types
possibilities for tileset sizes
anything else

thanks.. btw, im a gonna quote you all... (---------)
Mine GO BOOM - Fri Jan 03, 2003 1:48 am
Post subject:
Please do not be an ass.
SOS - Fri Jan 03, 2003 4:46 am
Post subject:
The LVL file format is very simple.
First, an optional tileset can be appended to it.
Designated by "BM" as first two bytes.
Next 4 bytes is the size of the tileset(from beginning of file)
The tileset can be any valid BMP. I have not tested any non-default sizes.
Then there is one 4-byte block per each non-empty tile in the game.
They do not have to be in any order.
One block is this(Little-endian byte order):

Code: Show/Hide
struct LVLFileTile
{
   unsigned x      : 10;
   unsigned afterx   : 2;   // Unused, but SG goes boom if not 0
   unsigned y      : 10;
   unsigned aftery   : 2;   // Unused, but SG goes boom if not 0
   unsigned id   : 8;   // Tile number
};


Tile numbers are(From MERVBot):

Code: Show/Hide
enum
{
   vieNoTile,
   vieNormalStart      = 1,
   vieBorder         = 20,   // Borders are not included in the .lvl files
   vieNormalEnd      = 161,   // Tiles up to this point are part of sec.chk

   vieVDoorStart      = 162,
   vieVDoorEnd         = 165,

   vieHDoorStart      = 166,
   vieHDoorEnd         = 169,

   vieTurfFlag         = 170,

   vieSafeZone         = 171,   // Also included in sec.chk

   vieGoalArea         = 172,

   vieFlyOverStart      = 173,
   vieFlyOverEnd      = 175,
   vieFlyUnderStart   = 176,
   vieFlyUnderEnd      = 190,

   vieAsteroidSmall   = 216,
   vieAsteroidMedium   = 217,
   // vieAsteroidLarge   = 218,   // Not used anymore == Medium
   vieStation         = 219,
   vieWormhole         = 220,
};


Borders are drawn around the map by the client. Border tile is #20.
Helicon - Fri Jan 03, 2003 8:59 am
Post subject:
Mine GO BOOM wrote:
Please do not be an ass.


i hope i didnt come across that way.. i didnt mean it that way... it was late and i... well, sorry...
Helicon - Fri Jan 03, 2003 9:03 am
Post subject:
thanks, i been looking for the structure, i think i staill got the packing formula saved somehwhere in a .doc... a direct queston:
if i expand the size of a tileset appended, does that effect the type of tile represented on each part of the tileset IE are all the tiles' functions still the same (IE fly over, fly under, std, flag) and the additional added tiles only standards?

thnx
SOS - Fri Jan 03, 2003 2:11 pm
Post subject:
I doubt that it is going to accept your own "added" tiles
Helicon - Sat Jan 04, 2003 12:38 am
Post subject:
is there no more info here... wasnt there a castles_..lvl or something like that(my memory's dim) that had a wierd tileset...?
SOS - Sat Jan 04, 2003 5:35 am
Post subject:
Hmm, yes it was smaller I think.
But you shouldn't try it, because even if C might support it, bots and other things probably will not, since this might mess up the tile numbering.
Mine GO BOOM - Sat Jan 04, 2003 2:32 pm
Post subject:
Back in the old days of VIE beta client, the maps never had fly over/under tiles. The whole bottom row didn't exist. The VIE client accepted this backwards method, but if a lvl had one of those tiles used, i think it blew up. As for Continuum, it either will a) blow up or b) just use a blank space that you can't see in the game. Sort of like if you delete the ships.bm2 file while playing.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group