Wrecking Ball Revived
Notice: This plugin has been forked from ApokPT\’s Wrecking Ball plugin, and fixed for the newer updates of Unturned and rocket.
Due to the lack of updates/development for the plugin from the original author ApokPT, the plugin has been forked and fixed to work on the newer versions of Unturned and Rocket. The original repository for this plugin can be found here: https://github.com/ApokPT/Rocket-Plugin-Wrecking-Ball. My fork of the plugin can be found here: https://github.com/cartman-2000/Rocket-Plugin-Wrecking-Ball
This plugin can also make use of this plugin to get extended info in the scans. The plugin isn\’t required for this plugin to work, without it you will only get an output of player Steam ID\’s in the scans.
This addon allows you clear stuff in a defined radius using filters
|/wreck <filter> <radius> [<x> <y> <z>]
/wreck <ItemID> <radius> [<x> <y> <z>]
/wreck <SteamID> <filter> <radius> [<x> <y> <z>]
|Creates new elements destruction list. An xyz position is to be used when executing it from the console.
You can also use an ItemID or SteamID.
The filter flags in this are case sensitive.
|/wreck confirm||Confirms list destruction|
|/wreck abort||Aborts list destruction|
|/wreck scan <filter> <radius> [<x> <y> <z>]
/wreck scan <ItemID> <radius> [<x> <y> <z>]
/wreck scan <SteamID> <filter> <radius> [<x> <y> <z>]
|Scan for <filter> in <radius> and list counts for each type of element. An xyz position is to be used when executing it from the console.
You can also use an ItemID or SteamID.
The filter flags in this are case sensitive.
|/wreck teleport b|s|v||Teleports caller to a barricade/structure/vehicle at a random location.|
|/w||Alias: Has same syntax as the above commands.|
|/listvehicles [radius]||Command for listing all the vehicles plus the position and number of elements for those vehicles in a radius.
Running the command from the console will print out the full list of vehicles on the server.
The radius on the command is only used/needed when running it from a client.
|/disablecleanup <\”playername\” | SteamID>||Disables cleanup on a player until the next time they log onto the server, works as a toggle.
If you want to disable cleanup on specific players permanently, you should apply the cleanup skipping permissions to the player instead.
|/listtopplayers||Displays a list of players with the highest element counts on the server.|
|y||Trophy Containers/Weapon Racks|
|w||Walls / Windows|
|r||Roofs / Holes|
|s||Stairs / Ramps|
|g||Guards (Barricades / Fortifications)|
|o||Protections (Safe Zone Generator / Claim Flags)|
|i||Illumination (Fireplaces / Torches)|
|u||Industrial (Generators / Oil Derrick)|
|a||Agriculture (Planters / Crops)|
|D||Map Decorations (Furniture like elements, Sofas / Counters, etc)|
|!||Uncategorized (Everything else that isn\’t in the id list in the plugin.)|
|*||Everything (Except zombies.)|
|wreck.*||Allows caller to use the full /wreck command(wreck/scan/teleport).|
|wreck.wreck||Allows caller to use the wrecking portion of the /wreck command.|
|wreck.scan||Allows caller to use the scanning portion of the /wreck command.|
|wreck.teleport||Allows caller to use the teleport portion of the /wreck command.|
|wb.skipbuildables||The Auto Cleanup feature will skip over cleaning up the player\’s buildables if they have this perm.|
|wb.skipplayerdata||The Auto Cleanup feature will skip over cleaning up the player\’s data files if they have this perm.|
|wb.bypassvehiclecap||Allows a player to bypass the vehicle cap, the car will never destroyed by the cap. Works as long as the car is locked, or has a sign owned by the player with this perm.|
|listvehicles||Allows caller to use the /listvehicles command.|
|disablecleanup||Allows the use of the /disablecleanup command.|
|listtopplayers||Allows the use of the /listtopplayers command.|
|Enabled||Enables the command to be used. (does not apply to admins)|
|DestructionRate||Default: 10. Number of times a second to run an interval for destroying elements. The intervals will run slower than what is set here if the server\’s TPS is less than what this is set to, there can be at most one interval per server tic.|
|DestructionsPerInterval||Default: 10. Number of elements to destroy in one interval. This times the DestructionRate gives you the Number of elements destroyed per second(destruction speed.). Note: Having a total destruction speed over 200 elements per second may lag clients that are in the area when it is being ran.|
|LogScans||Allows scans to be printed to the Rocket Log.|
|PrintToChat||Allows scans to be printed to your chat(can be difficult to use with the limited number of lines allowed in the chat.|
|Categories||List of Categories. The Category Id\’s are specified by a single char, and have to be unique to the others. Invalid chars are control characters and *. The Color attribute are set to the color names from the ConsoleColor Enum class in C#, which you can see here. Deleting this block in the config file will cause the default Categories to be loaded on the next plugin load.|
|Elements||List of Elements. The Element id has to be unique on these records, and the CategoryId is set to the Category Id you want the element to be under. Deleting this block in the config file will cause the default Elements to be loaded on the next plugin load.|
|EnablePlayerInfo||Enables the extended player info output to scans, requires that the Player Info Lib plugin be on the server and loaded, without the lib plugin this option will disable itself on plugin load. (Read update notes for 22.214.171.124, for info on the lib plugin.)|
|EnableCleanup||Enables the auto cleanup feature in the plugin to cleanup buildables and player files by a set time since the player was on. Requires PlayerInfoLib 126.96.36.199 or above.|
|BuildableCleanup||Enables the cleaning up player buildables on the server.|
|BuildableWaitTime||The number of days the player has to be inactive for their buildables to be cleaned up. To use this instead of Unturned\’s internal decay feature, the internal one should be disabled.|
|CleanupLockedCars||Will cars that a player has locked to them be cleaned up as well(destroyed) with their buildables.|
|PlayerDataCleanup||Enables the cleanup of player data files, to keep the Players folder a bit tidy.|
|PlayerDataWaitTime||The number of days the player has to be inactive for their player files to be cleaned up.|
|CleanupIntervalTime||The amount of time between each cleanup batch.|
|CleanupPerInterval||The number of players to cleanup per batch for each cleanup type.|
|EnableVehicleCap||Enables an enforced server wide vehicle cap, to keep the lag caused by vehicles down, this has two mods(see the option below.).|
|VCapDestroyByElementCount||Enables the destroying by element count mode with lowest count first. With this false, it\’ll go by oldest first on the server instead.|
|MaxVehiclesAllowed||Maximum number of vehicles to allow on a server before the cap kicks in.
Warning: This should be set to something higher than the natural spawn count for a map, otherwise it\’ll keep on destroying vehicles on each interval.
|VCapCheckInterval||How often in seconds to run the check, it\’s best to set this to something higher than the respawn rate for vehicles on your server.|
|LowElementCountOnly||Enables destroying vehicles below a set count only.|
|MinElementCount||Cars with this or more elements are safe from being cleaned up from the cap|
|KeepVehiclesWithSigns||Allows you to keep vehicles with signs/flags from being cleaned up from the cap, will only destroy signless cars with this set.|
|VehicleSignFlag||Set\’s which flag will be counted as a sign, for use with the KeepVehiclesWithSigns variable in the vehicle cap, and the \”Sign by\” outputs on the listvehicles command and /w scan\’s.|
|LimitSafeGuards||Enables the disabling of the min element count and signs safeguards and resetting to the beginning of the loop after a certain percentage of the max allowed vehicles have been skipped by these.|
|LimitSafeGuardsRatio||Max number of vehicles to skip in percentage from max allowed vehicles.|
|PlayerElementListCutoff||Sets the minimum elements needed to be displayed on the /listtopplayers command.|
|CategoryListVersion||Stores the version of the category list in the plugin(Do not modify!)|
|ElementListVersion||Stores the version of the elements list in the plugin(Do not modify!)|
How to use:
- /wreck wpf 200 (will queue all Walls, Pillars and Floors within 200 meters for destruction)
- /wreck confirm (will confirm the destruction of the above queue)
- 188.8.131.52: Added plot to the element list, under Agriculture.
- 184.108.40.206: Added the new Sentries to the Traps category, and the Carepackage to the Containers category(although the carepackage is setup by nelson to not save across server restarts.).
- 220.127.116.11: Added the /listtopplayers command that will allow you to see a list of players, with element counts, that have the highest element counts on the server. The command will also show extended player info if you have the player info lib plugin on the server.
- 18.104.22.168: Updated the elements list to include id: 1393 under the category of traps, for the new Precise Charge, you can either delete the elements block in the config file, or add it to the block.
- 22.214.171.124: Updated the elements list to include id\’s: 1396 and 1397 for the new Ghillie Netting items, both have been added under the freeforms category. You can either delete and regenerate the elements block in the config or add these id\’s with the category letter \’m\’ to the elements list.
- 126.96.36.199: Update various vehicle messages to print the Steam ID for the one who locked it, it will also print extended info of a player(like in element scans), if the player info lib plugin is active on the server. Added a teleport to vehicle feature(flag v) to /w teleport.
- 188.8.131.52: Updated the elements list to have the new Mannequins and plaques, under the Trophy Containers category.
- 184.108.40.206: Updated the elements list to have the new ramp walls, these have been added under the walls(flag w) category, also a check has been added to have a car with players in it skipped over by the vehicle cap, so it doesn\’t kill the players in the vehicle.
- 220.127.116.11: Split the perms of the wreck command to allow specific parts of the command to be used, you will need to use the perm wreck.* to get all perms for the /wreck command, the other perms are in the permissions info section. Added permissions to allow a player with them to bypass the auto cleanup feature in the plugin(Players with these perms won\’t decay.). Fixed the vehicle cap not working.
- 18.104.22.168: Added a sign check to the vehicle cap for those that have the \”wb.bypassvehiclecap\” permission.
- 22.214.171.124: Updated for compitibility with Unturned 126.96.36.199.
- 188.8.131.52: Added some more aliases, listtp for listtopplayers, listv for listvehicles and disablec for disablecleanup.
- 184.108.40.206: Added the Stereo to the list of elements, It\’s under the Decorations Category(flag D), with id 1466, you can either delete the Elements block in the config file to regenerate the list on the next plugin load/reload, or add the line to the Elements list yourself.
- 220.127.116.11: Added some scripting/automation code to the config setup to auto add new categories and elements to the list, when they\’re added to the plugin, this has two new config options for this, you shouldn\’t modify these directly. You can still do a reset of the lists in the plugin, it\’ll run through the list update process again, if it finds one of the lists empty(the version option for that list will get reset if it finds an empty list.). I also split the Unturned libs out of the main libs directory, as the ones on the rocket plugin build server is out of date and will give you an error if you try to wreck something on the server.
- 18.104.22.168: This is a rather large update: This update has been a compatibility update for the train vehicles in the game, made it so they can\’t be destroyed by the wreck command, or by the vehicle cap(A special case to this is that you can still destroy the train using wreck, from the console only, for those that have multiple trains stuck on their server\’s.). the ability for players locked vehicles to be destroyed by wreck(steam id search.) and by cleanup(if it\’s enabled.) has been added. The output of the Listvehicles command and /w scan output has been changed too, for vehicles in either command, it\’ll now show the owner of the first sign on the vehicle, if there is one. The /w scan out put will now show item names and vehicle names(and actual vehicle id\’s for vehicles). The ability to kill animals has been added to the server, with the A flag, and the vehicle and zombie flags have been set to uppercase, and the id\’s for them set to the sub 1k range so it won\’t potentially conflict with any workshop mod that has an element with the same id\’s. And finally, Logging has been added to wreck scans and destruction queues, along with the confirmation of a wreck too.
- 22.214.171.124: Recompiled to work on Unturned 126.96.36.199, the link for it is near the top of the description, as the build server’s Unturned libs are too outdated to build the plugin.
- 188.8.131.52: Recompiled again to work on newest versions of Unturned(184.108.40.206), something in the newest versions of Unturned “silently” broke some of the vehicle handling stuff in the plugin, so it needed to be recompiled.
- 220.127.116.11: Fixed the cleanup of cars when the option for it is enabled, in buildables cleanup, updated to reference newer build of playerinfolib(for plugin build).
- 18.104.22.168: Implemented the new feature in the PlayerInfoLib plugin to show if a player has VIP on the server on things that output info from this plugin.
- 22.214.171.124: Fix vehicle element count in scans, update libs for Unturned 126.96.36.199.
- 188.8.131.52: Added the vehicle instance id to the vehicle record scan output.
- Export element id lists to the config file, would allow you to set workshop id\’s to the plugin without the need to import the id\’s into the plugins code. – Completed in 184.108.40.206
- Try to fix the potential for ghost/indestructible elements after a destruction run: Maybe something Nelson has to fix, as it appears that the barricade and structure arrays(two arrays/lists for both types of elements.) can get out of sync with each other in which only a server restart will fix. – Fixed in 220.127.116.11(As far as I can see in testing.)
- Add scanning for elements on cars. Completed in 18.104.22.168
- Add ability to scan by element ID(Will be either scan by the current style Category ID, or by Element ID.) Completed in 22.214.171.124, replace flags parameter with ItemID to use ItemID\’s.
- Add ability to scan by SteamID. completed in 126.96.36.199.
- Change the wreck command to be usable from the console too. Completed in 188.8.131.52
- Look into adding a fix command(to heal elements.).
- (Later) Add char/steam names to the owner output as well, this would require the creation of a library plugin to store the char/steam names of players on the server. The plugin will use a mysql database to store the player info, and will be optional to use with this plugin(Steam id\’s only on the owners without the plugin.). Lib plugin completed, Initial support in Wrecking Ball 184.108.40.206.
- Add an alternate to the Decay feature in Unturned(would require the player info lib plugin.) Allow the elements and/or player files on the server to be cleaned up automatically after a set amount of time of them not being seen on the server. Completed in 220.127.116.11, for both player buildables and data files.