Convert huge amount of MTA/SA-MP objects into another type
Right now i finished the first version of my small and tiny offline object converter for SA:MP/MTA:SA, because our favourite map converter convertffs.com is dead.
The purpose of this program and tutorial is to create a simple object converter for myself but now i want to share it, maybe its useful for someone
Another reason is the huge amount of objects i want to convert and the conversion by using online converters takes a huge amount of time due to the upload/download speed of the client.Its meant to be a commandline tool because i love simple stuff and i love SSH/CMD so why not?
Most online converters were not able to convert more than 5000 objects because they stop working or you get some connection timeout because of the slow upload.
So i decided to create a small C based converter by using fscanf and sscanf to parse the values out of the input and convert it into the desired output.
My tool is available for Linux and Windows at the moment, a Mac OSX version is not planned.
Note! This program is in Beta state so it may contain bugs, please report them if you encounter any malfunction.
You can report bugs via E-Mail: firstname.lastname@example.org or by replying in this topic.
I did not pay attention of efficieny because even with 100.000 objects in worst case, meaning MTA:SA to SA:MP the average time for a conversion is around 1.6 seconds.
The execution time of this program is O(3n) in best case and O(6n) in the worst case (MTA:SA (XML) to SA:MP CreateObject)
The goal is to support features like the conversion of Vehicles,Peds/Actors, Pickups and more, like the MapConverter Plugin you can find in here.
I also want to cover more types of objects.
And the most important reason: I dont want to spent all my time, uploading and converting it somewhere.
Usage of this tool is quite simple.
Let’s check the readme..
Filename is converter.exe and the parameter the input filename.
(You can also use a batch file to execute it)
Now you choose the input objecttype and the desired output.
Now the conversion is done! Simple, isnt it?
Now you are ready to use this tool.
I did not use any XML Parser because for this simple use, because it would be way to difficult in to implement it in C!
Input sample, MTA SA 1.0 map:
And our PAWN SA-MP output.
I hope its useful for someone, like written in the license I will publish updates weekly in this topic and refresh the github repository.