About Map Voter and Auto wipe script
This plugin makes the admin’s life easier by automatically generating maps, initiating a vote that lets users choose which map they would like to play in during the next wipe and auto wiping the server.
Depends on:
Wipe Info API (If your server in country that have forced wipe at Friday please use WipeInfoApi file in MapVoter/WipeInfoApi/WipeInfoApi .cs)
Update 1.5.00:
Unified Plugin Types
- Merged all different types of the plugin into a single, unified version.
Server Wipe Fix
- Fixed an issue where the plugin did not wipe the server after a restart.
General Improvements
- Resolved various other issues to enhance performance and stability.
- Added server identity to the configuration file.
If you load the plugin while the server is running, it will automatically set to the current identity.
Alternatively, you can find the server identity by:
- Checking the startup command for +server.identity.
- Inspecting the server.cfg path: You can locate the server identity in /server/{server.identity}/cfg/.
Logging Enhancements
-
Added logging files to track auto-wipe progress.
To enable this feature, set Enable Debug Mode to true in the configuration file.
Update 1.4.67:
Added:
- Single Discord message now supports up to 4 maps.
- Wipe countdown in Embed.
Fixed:
- Magnify icon not showing.
New config options:
You must set the Embed URL if you want to use the Single Discord embed message.
"Embed Url": "https://codefling.com"
"Single Embed?": false
Note: The single message will only display 4 maps, but you can add more.
Update 1.4.64:
Server administrators can list data files to be deleted after the wipe
"Plugins Data wipe": { "Enable plugins data wipe on forced wipe day": true, "Enable plugins data wipe on map wipe day": true, "File names to be deleted on forced wipe day": [ "wipeinfo", "WipeInfoApi" ], "File names to be deleted on map wipe day": [ "wipeinfo", "WipeInfoApi" ] }
If you utilize a game hosting service, please ensure that your host permits the modification of the startup command.
Update 1.3.26 :
Auto wipe now works for non Dedicated (game server or host) servers but you'll have to disable sandbox and you won't be able to auto update the server.
Requirements
Rust Server(s) setup in a standard way on a Windows ,Pterodactyl Panel , Open Game Panel, Ubuntu dedicated server or game/host server (Doesn't work on LinuxGSM).
Administrator privileges on said dedicated server.
All of your server settings in \server\my_server_identity\cfg \server.cfg except rcon.port ,rcon.web rcon.password which will be added to batch script later.
Auto Wipe will launch the server without start.bat.
Features:
Automatically restart and update the server every first Thursday of the month.
Automatically generate or select random maps from rustmaps.com filter maps on wipe day or x days before wipe using https://rustmaps.com/ & wipe-info-api and start the vote.
Allows players to vote on maps through an in-game UI or Discord (if you use any plugin that links a player and a Discord user, enable “only authenticated users can vote” in the config file to avoid duplicate votes).
Automatically checks if it’s wipe day using wipe-info-api and the plugin’s config.
Automatically update Oxide and the server and wipes it on forced wipe.
Configure the plugin through a GUI (not all settings are available on the GUI).
Select maps from rustmaps.com through a GUI via a RustMaps share code.
Added Custom maps via GUI (to delete map you have to delete it from data file in MapVoter/Custommapdata.json).
The vote will start automatically on custom maps in data folder if custom maps usage is enabled in config.
Fun kit.
Automatically generates custom maps every wipe, utilizing RustMaps.com. Please note that to use this feature, a subscription to RustMaps.com is required.
Update 1.4.61
In this update you can generate a custom maps every time map vote starts with same config you provided.
Update 1.3.40
New UI
Update 1.3.35
1- Added Fun kit.
Fun kit is kit that will be enabeled before every wipe, players can redeem it using /kit <kit name> or when respawning.
Players wont be able to learn BPs and unloack workbench tree nodes.
How to add fun kit?
1 - create kit using kits plugin with permission example :
2 - In map voter config file edit :
"Fun Kit": {
"Fun kit enabled": false,
"Enable Fun kit x minutes before wipe": 0,
"Kit name": null,
"Permission": null
},
3 - save and reload MapVoter.
2 - Map Voter will print future wipes in console when loaded
How to add Custom maps :
Video
Permissions:
MapVoter.use only allows an admin to generate maps and start a vote.
MapVoter.Manager allows an admin to use all the features.
MapVoter.Vote allows player to vote(you can enable or disable this in configuration).
Commands
/mvote : Opens the plugin’s main GUI.
/startvote After selecting which maps will appear on the vote, starts the vote.
MapVoter.generate <Number of maps to generate> <seed> <voting duration in minutes>.
voteresult : Shows which map had won the vote.
Mapvoter.reload reload the plugin.
MapVoter.mapwipe <delay in seconds> <Map size > will generate a map and change startup parameters in server.cfg.
MapVoter.mapwipe <delay in seconds> <Custom map url > will wipe the server with a given custom map url and change startup parameters in server.cfg
MapVoter.bpwipe <delay in seconds> <Map size > will generate map and delete *.db, *.db-journal and *.sav files and changes startup parameters in server.cfg
MapVoter.bpwipe <delay in seconds> <Custom map url > will delete *.db, *.db-journal and *.sav files and change startup parameters
MapVoter.cancelwipe : cancels ongoing wipe.
MapVoter.stopvoting : stops ongoing voting.
MapVoter.update <Delay in seconds> initiates restart and updates the server & oxide.
Mapvoter.CancelUpdate : Cancels restart and update.
Discord commands
!vote
!generate <Number of maps to generate> <seed> <voting duration in minutes>.
!mapwipe <delay in seconds> <Map size >
!bpwipe <delay in seconds> <Map size >
bpwipe <delay in seconds> <Custom map url >
!cancelwipe
!stopvoting
!update <Delay in seconds>
!cancelupdate
Configuration
{ "Commands": { "Open MapVoter UI": "mvote", "Generate Mpas": "MapVoter.generate", "vote result": "voteresult" }, "Options": { "Map size": 3500, "Select random maps from rustmaps filter id instead of generating random maps on wipe day (true/false)": false, "How many pages the plugin looks up per search request(every page has 30 maps": 10, "Enable Discord bot (true/false)": true, "Only players with permission MapVoter.Vote can vote (true/false)": false, "Log to Discord (true/false)": true, "Discord Logs Channel Id": "", "Disable UI": false, "RustMaps API key": "https://rustmaps.com/user/profile", "staging": false, "barren": false, "Stop voting after (minutes)": 60, "avatar url": "", "Discord footer": "", "filter Id": "Visit https://rustmaps.com/ and adjust your map requirements. In the red box above the settings hit the Share button,the string at the end of the URL is the filterId.Example URL: https://rustmaps.com/?share=gEU5W6BUuUG5FpPlyv2nhQ the string at the end in this case {gEU5W6BUuUG5FpPlyv2nhQ} is the filterId." }, "Discord Settings": { "Vote Channel id": "", "Discord Apikey": "BotToken", "Discord Command Prefix": "!", "Discord Channels": [ { "Discord Channel ID": "", "Commands": [ "generate", "vote", "mapwipe", "bpwipe", "cancelwipe", "stopvoting", "update", "cancelupdate" ] } ], "Discord Command Role Assignment (Empty = All roles can use command.)": { "generate": [ "DiscordRoleName", "DiscordRoleName2" ], "vote": [ "DiscordRoleName", "DiscordRoleName2" ], "mapwipe": [ "DiscordRoleName", "DiscordRoleName2" ], "bpwipe": [ "DiscordRoleName", "DiscordRoleName2" ], "cancelwipe": [ "DiscordRoleName", "DiscordRoleName2" ], "stopvoting": [ "DiscordRoleName", "DiscordRoleName2" ], "update": [ "DiscordRoleName", "DiscordRoleName2" ], "cancelupdate": [ "DiscordRoleName", "DiscordRoleName2" ] } }, "Auto Vote": { "Auto start vote": true, "Only Authenticated users can vote through discord": true, "Start voting x days before wipe": 0, "Start voting at (HH:mm) 24-hour clock": "17:00", "Number of maps to generate": 4 }, "Auto Wipe": { "Custom Map": { "Custom map": false, "Map URL": "" }, "Map Wipe schedule": [ 7, 14, 21, 28 ], "BP Wipe schedule": [ 0 ], "Enable Auto wipe": true, "Wipe BPs at forced wipe day": true, "Forced Wipe time (HH:mm) 24-hour clock": "19:00", "Wipe time (HH:mm) 24-hour clock": "19:00" } }
MapVoter.cs, which will handle wipe schedule and automatically generate maps, start voting and restart the server.
How to Install
1 - Upload Mapvoter.cs.
2 - all your server configuration must be in /server/{server.identity}/cfg/server.cfg or you can change the path in config if your host use different path (/server/{server.identity})
3- Upload Discord extension to /RustDedicated_Data/Managed.
4- change the startup command if possible to ./RustDedicated -batchmode +server.identity "rust" +rcon.port {{RCON_PORT}} +rcon.web true +rcon.password \"{{RCON_PASS}}\" or leave all the map seed, size and level URL empty.
5-create server.cfg file in server/{server.identity}/cfg/
example :
server.port 28000 server.seed server.worldsize //server.levelurl server.maxplayers 100 server.gamemode vanilla server.hostname " Vanilla" server.tags vanilla,weekly server.level "Procedural Map" server.radiation true server.saveinterval 600 server.tickrate 30 server.headerImage "" server.url "" server.secure 1 server.salt 50
Perform a Dry-Run
Whilst your server is online with no players, test some commands like Mapvote.bpwipe, server.cfg, and make sure that server.seed and server.worldsize has changed and all your selected files have been deleted.
Contact
kaysharp#2008