1

Topic: [tool]teleport converter using tml

I wrote a little python script which converts old race maps to new race maps. In former versions of the racemod there was no tele layer but the teleports were simply placed with entities. The script i wrote searches for those tiles and creates a tele layer and places new teleports. At the same time it removes the old teleport tiles.

Requiremenents

Installation of tml

Once Python is installed u simply should install the python setup tools. After this u can use the command "pip" to install tml from github. Ofc git has to be installed.

pip install -e git+git://github.com/SushiTee/tml.git#egg=tml

Or u download the sourcecode from tml directly from github and place it where ever you want but in this case u have to be in the correct folder to use the script.


Script usage

Simply pull the maps u want to convert on the script. It is also possible with more than one map at the same time.
If you want to run the script from terminal:

python /path/to/script/teleport_convert.py path/to/map.map another/path/to/another_map.map

Further information

The script created a new map with the same name but with _new at the end. So if a map is called bunny.map it will be called bunny_new.map. The maps will be created in the same directory. The script will report any error if there is something wrong. (at least it should xD)

Download

teleport convert script: teleport_convert.py



If there are any questions or suggestions... feel free smile

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

2

Re: [tool]teleport converter using tml

very handy tho i dont really want to install python

3

Re: [tool]teleport converter using tml

Nice to see tml gets more and more used, good work!

Sushi, maybe we can include the script in the example section of the tml docs. I would like to make some minor changes (seriously, os.system('pause') and catching all exceptions? big_smile) and then the script doesnt get "lost" in the forum when we have it in our repos. By the way, heinrich had another nice idea to extend the script, but lets discuss that via irc smile

(And I should update my repo, sorry for inactivity hmm)

4

Re: [tool]teleport converter using tml

tml seems really handy. I agree with erd though. system("pause") is bad, really bad. If you want to be able to just doubleclick it write an additional batch file. And the catching all exceptions part is just there to get all error messages if one map fails but continue processing others the cheap way.

5 (edited by erd 2012-01-08 18:21:44)

Re: [tool]teleport converter using tml

m!nus wrote:

And the catching all exceptions part is just there to get all error messages if one map fails but continue processing others the cheap way.

Catching all exceptions also includes exceptions like KeyboardInterrupt. All tml exceptions are based on "MapException", so we should just catch all MapExceptions smile

Edit: Ooop, sorry, KeyboardInterrupt isn't derived from Exception.

6

Re: [tool]teleport converter using tml

i placed it there so u can see the output when simply pulling maps on the script xD
thouthg so its not really nice xD

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

7

Re: [tool]teleport converter using tml

I have a bunch of maps with broken teles, could someone that knows how run this converter on them for me?

8

Re: [tool]teleport converter using tml

Sure, just post it here or pm me. smile

9

Re: [tool]teleport converter using tml

thanks so much: http://www.mediafire.com/?s3620znhhg0kajm

10

Re: [tool]teleport converter using tml

Here you are: http://www.mediafire.com/?7cbi94fy0t2ct29 (not tested, I don't know whether the converter works on ddrace maps, probably not?)

11

Re: [tool]teleport converter using tml

Thanks a bunch, this actually did work.