redeclipse package

class redeclipse.Map(magic, version, headersize, meta, map_vars, texmru, ents, vslots, chg, worldroot)[source]

Bases: object

Base redeclipse map object, contains everything needed for the rendering a map to disk.

The first four bytes should be MAPZ. The code specifies BFGZ as well, but I haven’t seen these myself.

{‘numvars’: 155, ‘numvslots’: 909, ‘lightmaps’: 0, ‘worldsize’: 1024, ‘revision’: 2, ‘gamever’: 229, ‘blendmap’: 0, ‘numpvs’: 0, ‘gameident’: b’fps’, ‘numents’: 3} This essentially marks the end of the header

classmethod from_dict(data)[source]

Re-construct map from to_dict output.


Attach a skybox to the map


return represnetation of map as dictionary


Return self.to_dict as json


Write map to disk

Parameters:path (str) – Path to write to
class redeclipse.MapParser[source]

Bases: object


Parse a map into a redeclipse.Map object

Parameters:base_path (str) – path to gzipped map file.

Auto-convert string or bytes to a bytes