Go to file
bmgjet b3e7ce7405
Change int to ulong for network ids
2023-12-07 17:36:21 +13:00
FlattenMap.cs Change int to ulong for network ids 2023-12-07 17:36:21 +13:00
README.md Update README.md 2021-09-27 19:48:02 +13:00

README.md

About FlattenMap

This is a tool/plugin that lets you flatten the entitys from your server into the .map file.
So basically takes the place of having to use copypaste plugin for each base then import them into rust edit.

Do Note: You shouldnt be using this on your live server unless you plan to restart it afterwards.
The best option is to make a copy of the .sav files are fire up a server locally, This will also prevent any folder permission errors that hosts could have.

Usage:

Copy your map and .sav files to a seperate server, Recommended one on your local machine.
Install Oxide and this plugin as usual.
Start the server up.
Send chat or console command with or without optinal settings.
It will create a new map file within the servers root folder with the entitys flattened into it.
And No this wont bypass map passwords or break custom prefabs down.

Permission:

Must be admin to call from chat or command must be called from console.

Commands:

Console: flattenmap "newmapname"
Chat: /flatten "newmapname"

Options you can provide after the new map name in order they can be provided. If they arnt provided then best defaults will be used.
true/false wipe maps prefabs before flatten (useful if you only want player bases)
true/false apply building grade to players bases. (will all be twig if false)
true/false apply entity filter (will remove a lot of the junk stuff like spawned trees/ore/ect)
true/false filter out base players / npcs from maps. (if false piles of loot that was on players/npcs will be where players/npcs would of been)
true/false filter out entitys at 0,0,0 (will be server scripts and junk collection)
true/false filter out code/key locks
true/false replace players/npcs with place holders/spawners
true/false try process IO data.


Example:
(default mode)
/flatten "mapdump"
(dump map using options as default would of)
/flatten "mapdump" false true true true true true false true

Videos of usage:

https://www.youtube.com/embed/cCuQxI6xvGU
https://www.youtube.com/embed/Tr1zUA8kGyM


Known issues:

  • Roofs remain twig. (upgrading them automatically like the walls/foundation breaks there auto forming around edges/corners. A fix is in the works but it will take time, You can select them and manually upgrade them fine.)
  • Complex IO breaks the IO data. (A fix is also in the works but this will take a while since information in minimal about rustedits IO data so takes a lot of trial and error to find what breaks what. Such as iv found if there is a windmill connected then that IO circuit will be broken and it will stop processing the rest of them since rust edit doesnt allow windmill connection.)
  • Playing map after flatten strage stuff happens, (Restart the server strange things happen when all the entitys are known as prefabs to the server).