Teemap

class tml.tml.Teemap(map_path=None)

Representation of a teeworlds map.

All information about the map can be accessed through this class.

Parameters:map_path – Path to the teeworlds mapfile.
images

List of all images included in the map, external and embedded.

groups

List of the groups, ordered like they are placed in teeworlds.

mapinfo

MapInfo object, contains information like author and maplicense. Can be None.

envelopes

List of all envelopes of the map.

gamelayer

Returns the gamelayer.

If you have multiple gamelayers (don’t do that!), it will return the first one

layers

Returns a list of all layers, collected from the groups.

save(map_path)

Saves the current map to map_path.

speeduplayer

Returns the speeduplayer. Only for race modification.

telelayer

Returns the telelayer. Only for race modification.

validate()

Check if the map is a valid teeworlds map.

Returns True or raises an exception.

Previous topic

Exceptions

Next topic

Example scripts

This Page