Skip to content
736c6f77706f6b65 edited this page Dec 21, 2018 · 1 revision

Level

Each Level object has the following components:

  • version - The game uses this int to determine how old or new the map file is. Keep it at 6 for modern builds of the game
  • actors - A list of Actor objects that the map uses
  • tilemaps - A list of Tilemap objects the map uses, maps usually have 4
  • theme - The theme that the map uses as a string. The theme names can be found here
  • is_singleplayer - Boolean used for depricated "race to the bomb" levels, keep as False
  • bomb_timer - Int used for depricated "race to the bomb" levels
  • author - Map author string
  • name - Map name string
  • description - Map description string.
  • workshop_id - Int used when uploading to the steam workshop

You can load a compressed .sr file using the Level.load() function, which takes a relative file path string as an argument.

You can also save to a compressed .sr file using Level.save() which takes a filename and extension string as an argument.

Clone this wiki locally