Advertisement
BigETI

map file structure

Feb 8th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.75 KB | None | 0 0
  1. A SA:MP streamer plugin map file allows to store and load objects, pickups, 3D text labels, map icons, areas, checkpoints, and race checkpoints within multiple groups.
  2.  
  3. /=====File Structure==========================================================================\
  4. | |
  5. | Header: 11 bytes |
  6. | Constant: "strmrgrps01" |
  7. | Sequence: |
  8. | Chunk: |
  9. | Size: 2 bytes |
  10. | ID: 4 bytes |
  11. | "Head", "Gnrt", "NGrp", "GrpH", "_Obj", "Pckp", "TxtL", "_Chk", "RChk", "Crcl", |
  12. | "Rect", "Sphr", "Cube", "Plgn", "MapI", "Wrld", "_Int", "Plyr", "_EOF" |
  13. | Data: "Size" bytes |
  14. | Checksum: 4 bytes ( Only from "Data", using CRC32 ) |
  15. | |
  16. \=============================================================================================/
  17.  
  18. /=====IDs=============================================================================================\
  19. | |
  20. | "Head" ( 0x64616548 ): ( Global Header ) |
  21. | This chunk provides any kind of data a scripter can use. |
  22. | Examples: Title, ID, credits, or map information. |
  23. | Structure: |
  24. | "Size" bytes: Data (char array) |
  25. | |
  26. | "Gnrt" ( 0x74726E47 ): ( File Generator ) |
  27. | A file generator can create this chunk to write its signature. |
  28. | Multiple "Gnrt"s are invalid. |
  29. | Structure: |
  30. | "Size" bytes: Data (char array) |
  31. | |
  32. | "NGrp" ( 0x7072474E ): ( Next Group ) |
  33. | Tells the intepreter to create the next group. |
  34. | "Size" is always 0 |
  35. | No need to use "NGrp" to create the first group, hence "Next Group". |
  36. | If a group before "NGrp" is empty, the group before has to be destroyed. But it is still valid. |
  37. | "Checksum" always returns 0x2144DF1C or 558161692. |
  38. | |
  39. | "GrpH" ( 0x48707247 ): ( Group Header ) |
  40. | This chunk provides any kind of data within a group, which can be used by a scripter. |
  41. | Using multiple "GrpH"s inside a single group is invalid. |
  42. | Examples: Title, ID, credits, or map information. |
  43. | Structure: |
  44. | "size" bytes: Data (char array) |
  45. | |
  46. | "_Obj" ( 0x6A624F5F ): ( Object ) |
  47. | Adds a new object to the current selected group. |
  48. | "Size" can only be 28, 32, or 36. |
  49. | Structure: |
  50. | 4 bytes: Model ID (long) |
  51. | 4 bytes: X (float) |
  52. | 4 bytes: Y (float) |
  53. | 4 bytes: Z (float) |
  54. | 4 bytes: Rotation X (float) |
  55. | 4 bytes: Rotation Y (float) |
  56. | 4 bytes: Rotation Z (float) |
  57. | ( optional ) 4 bytes: Stream Distance (float) |
  58. | ( optional ) 4 bytes: Draw Distance (float) |
  59. | |
  60. | "Pckp" ( 0x706B6350 ): ( Pickup ) |
  61. | Adds a new pickup to the current selected group. |
  62. | "Size" can only be 20, or 24. |
  63. | Structure: |
  64. | 4 bytes: Model ID (long) |
  65. | 4 bytes: Type (long) |
  66. | 4 bytes: X (float) |
  67. | 4 bytes: Y (float) |
  68. | 4 bytes: Z (float) |
  69. | ( optional ) 4 bytes: Stream Distance (float) |
  70. | |
  71. | "TxtL" ( 0x4C747854 ): ( 3D Text Label ) |
  72. | Adds a new 3D text label to the current selected group. |
  73. | "Size" can't be smaller than 17. |
  74. | Structure: |
  75. | 4 bytes: X (float) |
  76. | 4 bytes: Y (float) |
  77. | 4 bytes: Z (float) |
  78. | 1 byte: Test Line Of Sight (bool) |
  79. | 4 bytes: Stream Distance (float) |
  80. | ( optional ) "size"-17 bytes: Text (string) |
  81. | |
  82. | "_Chk" ( 0x6B68435F ): ( Checkpoint ) |
  83. | Adds a checkpoint to the current selected group. |
  84. | "Size" can only be 16 or 20. |
  85. | Structure: |
  86. | 4 bytes: X (float) |
  87. | 4 bytes: Y (float) |
  88. | 4 bytes: Z (float) |
  89. | 4 bytes: Size (float) |
  90. | ( optional ) 4 bytes: Stream Distance (float) |
  91. | |
  92. | "RChk" ( 0x6B684352 ): ( Race Checkpoint ) |
  93. | Adds a race checkpoint to the current selected group. |
  94. | "Size" can only be 25 or 29. |
  95. | Structure: |
  96. | 1 byte: Type (char) |
  97. | 4 bytes: X (float) |
  98. | 4 bytes: Y (float) |
  99. | 4 bytes: Z (float) |
  100. | 4 bytes: Next X (float) |
  101. | 4 bytes: Next Y (float) |
  102. | 4 bytes: Next Z (float) |
  103. | ( optional ) 4 bytes: Stream Distance (float) |
  104. | "Crcl" ( 0x6C637243 ): ( Circled Area ) |
  105. | Adds a circle area to the current selected group. |
  106. | "Size" always equals 12. |
  107. | Structure: |
  108. | 4 bytes: X (float) |
  109. | 4 bytes: Y (float) |
  110. | 4 bytes: Z (float) |
  111. | 4 bytes: Size (float) |
  112. | |
  113. | "Rect" ( 0x74636552 ): ( Rectangled Area ) |
  114. | Adds an rectangled area to the current selected group. |
  115. | "Size" always equals 12. |
  116. | Structure: |
  117. | 4 bytes: Min X (float) |
  118. | 4 bytes: Min Y (float) |
  119. | 4 bytes: Max X (float) |
  120. | 4 bytes: Max Y (float) |
  121. | |
  122. | "Sphr" ( 0x72687053 ): ( Sphered Area ) |
  123. | Adds a sphered area to the selected group. |
  124. | "Size" always equals 12. |
  125. | Structure: |
  126. | 4 bytes: X (float) |
  127. | 4 bytes: Y (float) |
  128. | 4 bytes: Z (float) |
  129. | 4 bytes: Size (float) |
  130. | |
  131. | "Cube" ( 0x43756265 ): ( Cubed Area ) |
  132. | Adds a cubed area to the current selected group. |
  133. | "Size" always equals 28. |
  134. | Structure: |
  135. | 4 bytes: Min X (float) |
  136. | 4 bytes: Min X (float) |
  137. | 4 bytes: Min Y (float) |
  138. | 4 bytes: Min Z (float) |
  139. | 4 bytes: Max X (float) |
  140. | 4 bytes: Max Y (float) |
  141. | 4 bytes: Max Z (float) |
  142. | |
  143. | "Plgn" ( 0x506C676E ): ( Polygoned Area ) |
  144. | Adds a polygoned area to the current selected group. |
  145. | "Size" can't be smaller than 34. It also has to be divisible by 2. |
  146. | Structure: |
  147. | 4 bytes: Min X (float) |
  148. | 4 bytes: Min Y (float) |
  149. | 2 bytes: Number Of Points (short) |
  150. | 8*"Number Of Points" bytes: (float array) |
  151. | 4 bytes: X (float) |
  152. | 4 bytes: Y (float) |
  153. | |
  154. | "MapI" ( 0x4D617049 ): ( Map Icon ) |
  155. | Adds a map icon to the current selected group. |
  156. | "Size" can only be 18 or 22. |
  157. | Structure: |
  158. | 4 bytes: X (float) |
  159. | 4 bytes: Y (float) |
  160. | 4 bytes: Z (float) |
  161. | 1 byte: Type (char) |
  162. | 4 bytes: Color (long) |
  163. | 1 byte: Style (char) |
  164. | ( optional ) 4 bytes: Stream Distance (float) |
  165. | |
  166. | "Wrld" ( 0x57726C64 ): ( Group Virtual World ) |
  167. | Sets the virtual worlds of the current selected group. |
  168. | "Size" can't be smaller than 8. It also has to be divisible by 4. |
  169. | Structure: |
  170. | 4 bytes: "Number Of Virtual Worlds" |
  171. | 4*"Number Of Virtual Worlds" bytes: Virtual Worlds (long array) |
  172. | 4 bytes: Virtual World (long) |
  173. | |
  174. | "_Int" ( 0x5F496E74 ): ( Group Interior ) |
  175. | Sets the interiors of the current selected group. |
  176. | "Size" can't be smaller than 8. It also has to be divisible by 4. |
  177. | Structure: |
  178. | 4 bytes: "Number Of Interiors" |
  179. | 4*"Number Of Interiors" bytes: Interiors (long array) |
  180. | 4 bytes: Interior (long) |
  181. | |
  182. | "Plyr" ( 0x506C7972 ): ( Group Player ) |
  183. | Sets the players of the current selected group. |
  184. | "Size" can't be smaller than 8. It also has to be divisible by 4. |
  185. | Structure: |
  186. | 4 bytes: "Number Of Players" |
  187. | 4*"Number Of Players" bytes: Players (long array) |
  188. | 4 bytes: Player (long) |
  189. | |
  190. | "_EOF" ( 0x5F454F46 ): ( End Of File ) |
  191. | Tells the intepreter to be finished. |
  192. | "Size" is always 0 |
  193. | "Checksum" always returns 0x2144DF1C or 558161692. |
  194. | |
  195. \=====================================================================================================/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement