• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Web] Map partitioner (by frxstrem) [open.mp release only!]
#1
Rainbow 
What is a map object partitioner?

- Split your maps from one file into several separate (or similar!)





So with initial use at freeroam projects i've had the last years, I've had several occations where I felt I needed a tool that could mark all the objects in a certain area, and be able to split it up from the rest of the objects.

It started out with me taking over a community, and where i had the urge to separate the maps in my code by area. Some maps were to be removed and replaced with new maps, but all the objects were mixed into 1 single file without any form for sorting. My friend, frxstrem (a really cool guy) helped me solve this by making the following tool.



For a preview, look at my attachment (a picture of it), or visit my instance of it hosted at https://extreme-stunting.net/map



Source code: https://github.com/dennorske/map-object-partitioner (yes it is a fork, but my friend told me I needed to maintain it, as he made it for my community back a few years).



It currently supports AddStaticVehicle, AddStaticVehicleEx, CreateDynamicObject and CreateObject codes - and if you for example want to visualize single "RemoveBuildingForPlayer" or similar, you can use either of the functions mentioned before. (make a new file and rename the occurences).



[Image: T5MoZA0.png]

Here is an example where i was debugging my script. Something kept crashing my players over long time, and in order to locate the issue, I attempted to log every crash and visualize it with my tool. Essentially, you can visualize anything in 2D on the map, just rename and use functions that are supported.



The code is written using Javascript, and is about 3 years old at the moment with no updates to it yet.





Use:



  1. You load your file with objects in a .inc or .pwn file (can be both CreateObject and CreateDynamicObject, can include vehicles too)

  2. Scroll and pan around in the image field, and create polygons as described to mark areas. You can have unlimited of polygons. Each object will be represented with a dot on the map, and will be in scale with the San Andreas map coordinates. Make sure to zoom out if you have objects outside of the shore-lines.

  3. When done, select update and download txt-file with the separated polygons to you computer. Feel free to rename them. Each polygon will include the objects you had inside them.




For support, post a reply here or create an issue on the repo.

Feature requests may lead to me learning more Javascript, so why not!
Away
  Reply
#2
Looks good.
  Reply
#3
Great
[Image: q7fGeq3.png]

  Reply
#4
This is very useful for me, thanks for sharing it
  Reply
#5
Great
OG

Since of 2011


Discord: zeetayn#2166

  Reply
#6
Could you rewrite an version to include the textures also (not show on map but to remain etc as they are)?
  Reply
#7
Nice one!
  Reply
#8
(2019-07-14, 04:18 PM)unix Wrote: Could you rewrite an version to include the textures also (not show on map but to remain etc as they are)?



Sorry, I'm not 100% sure what you mean :) PRobs possible, but requires much more than showing coords :D
Away
  Reply


Forum Jump: