Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: GangstaRas on June 30th, 2019, 12:42 AM

Title: [Tool] Blender XML Exporter
Post by: GangstaRas on June 30th, 2019, 12:42 AM
Blender XML Exporter



For those of you looking to develop custom maps for VC:MP, the scale of islands and cities, I've made the process a little easier if you're using Blender. With this rudimentary plugin, you can now directly export the XML mapping data of all objects within your scene in Blender.

So for example:

(https://i.imgur.com/mbzenku.png)

This scene of an island has almost 2,300 objects, as denoted in the top-right. Quite the hell to record all these coordinates manually. With this plugin, it will generate the xml data of all these objects' coordinates and axes rotations and compile it into one XML file that you put into your maps folder for your server. For the curious, the result of this export looks like this:

(https://i.imgur.com/IUpTPQc.png)(https://i.imgur.com/sfAXZhY.png)(https://i.imgur.com/TpTPLvz.png)

Installation:


Download the attached plugin then open Blender. In Blender, go to File > User Preferences (Ctrl + Alt + U) and click on the 'Addons' tab where you will see a button at the bottom of the window that says "Install Addon from file". From there, search for the directory you downloaded this plugin to, and click the python script to install.

Ensure that you enable the plugin by typing 'output' in the search bar at the top left under the 'Addons' tab. The plugin should show up named as "VC:MP Output to XML". Simply click the checkbox to enable. You should see a tick within the box if all is successful.

To use the function, in the open scene, hit Spacebar to bring up the universal searcher and type in 'output' where you should see "Export: Output to XML". Click on this and output to the directory you see fit. The XML file will be called "map.xml" once exported.



Features:


Limitations:



Compatibility

Tested on Blender 2.79. Should work for any of the 2.7 versions, unsure if it would work with Blender 2.80 beta.



Credits:

Thanks to Thijn for creating the plugin to help me out. Grateful for his contribution. Thanks to Drake and Thomas for active support in helping me make changes and necessary fixes to the plugin to ensure maximum capability and compatibility with VC:MP.



Fun Fact:

Not sure if it's documented anywhere but VC:MP does have an object limit with XML objects as well. Through our testing, you can go as high as approximately 13,222 objects
Title: Re: [Tool] Blender XML Exporter
Post by: Sebastian on June 30th, 2019, 11:51 AM
Woah, that's awesome!
Great job!
Title: Re: [Tool] Blender XML Exporter
Post by: Klaus on June 30th, 2019, 02:26 PM
Excellent.
Title: Re: [Tool] Blender XML Exporter
Post by: GangstaRas on July 2nd, 2019, 01:36 AM
UPDATE:


Simply re-download the updated plugin, and overwrite the previous version upon installing in Blender.
Title: Re: [Tool] Blender XML Exporter
Post by: Stormeus on July 4th, 2019, 12:45 AM
Quote from GangstaRas on June 30th, 12:42 AM
Not sure if it's documented anywhere but VC:MP does have an object limit with XML objects as well. Through our testing, you can go as high as approximately 13,222 objects
This is weirdly specific and probably shouldn't be the case. I'll give it a look sometime soon.