Author Topic: New Map Rotation (v1.1) [MINIGAME ONLY]  (Read 9299 times)

It's a map rotator, but it's new.
Okay, so this was influenced by this topic.

The map rotator works with RTB's server control feature so you have pretty much full control over the functionality of the script.
If you don't have the RTB server control (or another add-on that is compatible with the RTB hooks), I'd recommend getting it here.

So, the script contains 3 5 commands.
/mapHelp - Probably the most important command, if you have the rights to use the other 2 commands (dictated in the prefs) they will show up when calling this one.
/voteNext - Allows players (who are of a certain permission - again dictated in the prefs) to vote for the next map, the next map will automatically load when up to n players have called this command. The minimum number of votes are available to edit in the prefs. By calling /voteNext once you've already voted, it will cancel your vote.
/nextMap - Allows a user (of a certain permission - the prefs of course) to load the next map at any time during the game.

New Commands:
/reloadmaps - Reloads the server's collection of maps so you can add more maps to the rotator whilst the server is running.
/mapList - Shows you a list of maps that the server has collected.

Important:
For this to work, you have to be in a DEFAULT minigame, it can't just be a minigame, it has to be default.
The commands will not work unless you are in a default minigame.

This also has a 'cooldown' spam protection which again can be adjusted in the server prefs.

The server prefs include:
Map Rotation:
Enabled - Turn it on and it works, turn it off and it doesn't!
Who can vote for the next map? - Restricts the /voteNext to whatever is set (Anyone/Admin/Super/Host)
Who can call the next map? - Restricts the /nextMap to whatever is set (Admin/Super/Host)
Minimum votes to next map - When the /voteNext is called, it'll add up the votes until this set number, it'll then load the next map automatically.
How many seconds before next cmd - This is cool-down spam restriction timer, a number between 0 & 59 (seconds) before a player can call another command.
After how many rounds to load next? - A number between 1 & 10, when the minigame resets, it'll add up until this set number, it'll then automatically change the level.

Map Rotation - Maps:
Up to 10 maps can be set - Scratched in update, see below!


UPDATE v1.1
So, what's new?

Instead of specifying the 10 saves in the server prefs, it will automatically pick up save files in a folder called "NewMapRotation" within the Blockland Server's saves folder. If you run the server with the updated version of this add-on, it will automatically create that folder for you and place a cheeky readme file in it.

New commands:
/reloadmaps - Reloads the server's collection of maps so you can add more maps to the rotator whilst the server is running.
/mapList - Shows you a list of maps that the server has collected.

--

I'll be working on Slayer preferences for the next update.

When the rotator kicks in:
All players will be put into observer mode (practically un-spawned).
The script will clear all of the bricks that were previously loaded.
The script will then load the next save file in the map rotations list.
Players will be respawned in the appropriate spawn-points.

IMPORTANT: When you load the mod and are running a default minigame, please use /nextmap to start the rotation system!

All sorted? Awesome.
Place the add-on into the add-ons folder of your Blockland Server, and enable it. All the standard stuff.

Download here
« Last Edit: January 03, 2017, 03:55:26 PM by BI0-Hazzard »

I'd highly suggest using Slayer prefs instead of RTB prefs. RTB is outdated and with Slayer prefs if can be specific to your minigame.

Did you even test this? Looking at the code, it looks like it'll only work if it's not a custom gamemode, it has this add-on in the gamemode.txt file, and a non Slayer minigame in the gamemode.txt file.
« Last Edit: March 18, 2016, 02:06:05 PM by jes00 »

I'd highly suggest using Slayer prefs instead of RTB prefs. RTB is outdated and with Slayer prefs if can be specific to your minigame.

Sounds like a good idea, I'll have a look at the slayer docs.

I was going to offer you this GUI to use, but I don't think you've put enough effort into this.


I was going to offer you this GUI to use, but I don't think you've put enough effort into this.
would that need a client mod to use

I'd highly suggest using Slayer prefs instead of RTB prefs. RTB is outdated and with Slayer prefs if can be specific to your minigame.
would it need to be a slayer minigame to use if implemented

would that need a client mod to use
All GUIs need a client sided mod to use.
would it need to be a slayer minigame to use if implemented
Yes, but I see nothing wrong with that.

All GUIs need a client sided mod to use.
i don't see why a gui would be needed for voting (which typically is available to all players) since very few would ever use download it

Yes, but I see nothing wrong with that.
hm

one for regular default minigame and one for slayer default minigame is good

I was going to offer you this GUI to use, but I don't think you've put enough effort into this.



i dont think you've put enough effort into that gui either.

i dont think you've put enough effort into that gui either.
you could call him out on his bm rather than bming him back

but it seems like he raised a legitimate point since this has some arbitraty limitations (why 10 maps max? why not any number? why have map list setup in rtb prefs?) though jes didnt need to be so rude about it

This was just a basic map rotation system, I wasn't planning on making it the best thing out there. I mean if I spent a little more time on it, I could make it flick through all of the maps in a folder which is what I'm planning to do next

though jes didnt need to be so rude about it
Sorry. Wasn't trying to be rude.
It's easy to read things the wrong way. I simply mean't that this has a lot of unused potential.

Sorry. Wasn't trying to be rude.
It's easy to read things the wrong way. I simply mean't that this has a lot of unused potential.

I didn't see it as rude, I get what you meant. At the moment this is in it's early stages of development but I'll be upgrading it when I have the time


Why ten at most?
Ten to start with, can easily develop it into more, I might just make it designate a folder in the saves where it counts every save file.

Hm, that sounds like the way to go.

UPDATE v1.1
So, what's new?

Instead of specifying the 10 saves in the server prefs, it will automatically pick up save files in a folder called "NewMapRotation" within the Blockland Server's saves folder. If you run the server with the updated version of this add-on, it will automatically create that folder for you and place a cheeky readme file in it.

New commands:
/reloadmaps - Reloads the server's collection of maps so you can add more maps to the rotator whilst the server is running.
/mapList - Shows you a list of maps that the server has collected.

The download link in the OP is to the updated version.

I'll be working on Slayer preferences for the next update.