![]() The Sauerbraten editing reference can give a lot more information for the meaning of the attribute values.Īttr1 specifies the angle in degrees in the XY plane that the model is rotated by. The "o" field is of a structure containing three 4-byte floats to specify the x, y, and z co-ordinates (in that order), and the "type" field is as in the following table. Here is the structure definition from src/shared/ents.h:Įnum The number of entities present is given in the "numents" field of the header. This section consists of a number of entities concatenated together. If you want, you can fill it with texture indices (like I have in the example below). no array) and everything appears to work fine. I set texmru.length to 0 (followed by a 0-length array of texture indices, i.e. I don't know if this information is useful for anything other than getting recently-used textures to appear first when a mapper scrolls through the textures. ![]() It conssists of an unsigned short quantity "texmru.length", which specifies the number of entries in the MRU, followed by that many unsigned short values which are the values in the cache. This is the contents of the Most-Recently-Used cache of texture indices. I don't know under what circumstances these could be non-zero (perhaps they're legacy?), so I just leave them as 0. I have no idea what this section is for, but what I gather from the Sauerbraten code is that there is an unsigned short value "extraentinfosize", followed by an unsigned short "extras.length". For normal Sauerbraten, this string is just "fps". It consists of a single byte to give the length of the string, followed by a string of that length, plus a zero-terminating byte. This is a string to identify which game the map is intended for. For an int variable, this is a 4-byte value containing the int, for a float it is a 4-byte value containing the float, and for a string it is a 2-byte unsigned short followed by the non-zero-terminated string.Ħ9 6b 32 6b 2f 65 6e 76 2f 69 6b 6c 61 6b 65 There are 3 basic types that can come in this section:Īll variables contain a single byte to specify the type (either 0, 1, or 2, as above), followed by a 2-byte value (of type unsigned short) to specify the length of the variable name, followed by the variable name (not zero-terminated), finally followed by the value of the variable. This section is a series of map variables. Numvars is the number of variables in the Variables section. Numpvs, lightmaps, and blendmap are not discussed in this documentation, so I just set them all to 0 and forget about them (you can run calclight from within edit mode to get these filled in properly). ![]() Numents is just the number of entities contained in the Entities section. If worldsize is not a power of 2, you will get some very strange effects. The worldsize is the length of one side of the cube that contains the map (so that we know how big each cube of the octree is). For the format described herein, version must be 29, and headersize must be 36. The magic field must be the 4-byte string (not zero-terminated) "OCTA" in order for the map to load correctly. This structure is written straight into the first 36 bytes of the uncompressed map file. Int version // any >8bit quantity is little endian Here is the structure definition from src/engine/world.h: The header is a 36-byte structure containing some useful information about the map. The maps are organised in to several sections, as follows, which are concatenated together and then gzip'd to produce an OGZ map file. Note that all integer values are stored in little-endian. The map file is gzip'd, but as this is fairly trivial to do, I shall describe the non-compressed part. Īre you working on a project using this documentation? Get in touch - and I'll mention it here.įirstly, this documentation is for the version 29 map format, and it may change in the future. Benjamin Summers is working on a Haskell library to read, write, and generate Sauerbraten maps. Projects Salatiel has made a web tool to create Sauerbraten maps from JSON data. No permission, attribution or payment necessary. Sauerbraten map format documentation Sauerbraten map format documentation Feel free to use this documentation in any way whatsoever. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |