MapRotatorUT [Release]

Search, find and discuss about Mutators!
JackGriffin
Godlike
Posts: 3767
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

MapRotatorUT [Release]

Post by JackGriffin » Sun Jan 24, 2016 10:38 am

First the goodies
MapRotatorUT.zip
What it does:
While the server is running this mod will check once a minute to see if there are players on the server. If there are players it then goes back to sleep and checks again in one minute. If it checks and there are NO players it begins a count. One it checks the number of times you have set in "CheckTimeMinutes" it will then force the server to change to the map declared in "hubmap". If the server is already in the hubmap the mod will shut itself down entirely and load back again when the next mapchange occurs.

I wrote this specifically for my coop server but it will work on UT too. Bear in mind this uses a generic command that tells the server to load a specified map. If you are using mapvote to run extra mods, etc this will not load them. It shouldn't be a big deal since the hub map is usually just a reset type map anyway and not one that gets real play.

Enjoy and/or fuck off :lol2: :rock:
You do not have the required permissions to view the files attached to this post.
So long, and thanks for all the fish

User avatar
papercoffee
Godlike
Posts: 10141
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: MapRotatorUT [Release]

Post by papercoffee » Mon Jan 25, 2016 12:37 am

What? No one is commenting?

I'm not a server guy, but I like this idea.

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: MapRotatorUT [Release]

Post by MrLoathsome » Mon Jan 25, 2016 1:02 am

I would comment, but I think I already have that running for years via the ECoop mutator.

If no players are on for quite a while, it will switch back to the PortalMap.
Would have to go searching for details on how long it waits or how it determines when to switch.

This does sound like a useful mutator for servers that aren't running ECoop.
blarg

Higor
Godlike
Posts: 1835
Joined: Sun Mar 04, 2012 6:47 pm

Re: MapRotatorUT [Release]

Post by Higor » Mon Jan 25, 2016 2:06 am

Mmmhhh, I was playing Coop like a year ago on the dev server... left and the following day the map was still on.
Rejoined with all my items and kept playing :loool:
I'd use it for ANY game mode, except coop (if supported by XC_Engine) lol.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

JackGriffin
Godlike
Posts: 3767
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: MapRotatorUT [Release]

Post by JackGriffin » Mon Jan 25, 2016 2:42 am

I'm actually going to start working on a gear system that will carry from map series to map series. You can leave and come back next week to another map and still have your stuff. The server will begin to migrate towards a harder, career-type system with saved stats and such. I've been talking with Bob about it and I'm almost ready to do the primary coding.
So long, and thanks for all the fish

User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA

Re: MapRotatorUT [Release]

Post by Chamberly » Mon Jan 25, 2016 8:31 am

Interesting. I had to set a settings in the server to like 1 mins or so for automatic map rotate test, so I can check the server log and see if I'm missing any files for the map and this is what I done, and got it all with a simple search in the log "find" and upload the remaining files, took about 3 days maximum when I did a mass upload without properly searching for files required for it. So now, I just have a folder in my external hard drive as a server file backup, so I don't have to go through all this again. *Cough cough Fragnet lost files cough*

lol Higor 8)
Image
Image
Image Edit: Why does my sig not work anymore?

User avatar
Dr.Flay
Godlike
Posts: 3332
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK

Re: MapRotatorUT [Release]

Post by Dr.Flay » Tue Jan 26, 2016 4:52 am

A much handier way to promote that a server has more than Deck-16 and Facing Worlds.

The gear system sounds like it will make your explore-em-up server very attractive for long-term play. very cool.

User avatar
sektor2111
Godlike
Posts: 5873
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MapRotatorUT [Release]

Post by sektor2111 » Tue Jan 26, 2016 6:01 pm

Btw, I would like to see a code snippet able to show map-file-Name in whatever mutator ex: DM-Some_Map.unr. I've figured statlog having something native fully functional named

Code: Select all

native final function string GetMapFileName();
Declaring that native in other class was doing funky things at compiling so I have modified a couple of lines to gain Exactly name of UNR file used. I don't know if I have failed declaration or engine deny that external usage so I was sloping a bit:

Code: Select all

class DeathMatchPlus expands...;
...
var string MapMessage;
...
...
function PlayStartUpMessage(PlayerPawn NewPlayer)
{
	local int i;
...
	local color ColorGold, ColorPink;
	local string tmp;
	local StatLog SL;

	NewPlayer.ClearProgressMessages();
	ColorGold.R = 254;
	ColorGold.G = 254;
	ColorPink.R = 254;
	ColorPink.G = 128;
	ColorPink.B = 254;

	if (MapMessage == "")
	{
		SL = Spawn(class'StatLog');
		if ( SL != None )
		{
			tmp = SL.GetMapFileName(); //acquire string
			SL.Disable('Timer'); //No need this copy after all
			SL.Destroy(); //Get rid of it
		}
//	MapMessage = "Running Map:"@Level.GetURLMap(); //works well ON-Line - Local shows old map loaded
		if ( tmp != "" )
			MapMessage = "Running Map:"@tmp;
		else
			MapMessage = "Bork > Unknown Map Name!!!";
	}
....
	// Game Name
	NewPlayer.SetProgressMessage( GameName, i++ );
	// Optional FragLimit
	if ( fraglimit > 0 )
		NewPlayer.SetProgressMessage( FragLimit@GameGoal, i++ );
	if ( Level.NetMode == NM_Standalone ) //Local using GetURLMap() return crap
	{
		NewPlayer.SetProgressMessage( SingleWaitingMessage, i++ );
		NewPlayer.SetProgressColor(ColorPink, i);
		NewPlayer.SetProgressMessage( MapMessage, i++ );
	}
	else if ( bRequireReady )
	{
		NewPlayer.SetProgressMessage( TourneyMessage, i++ );
		NewPlayer.SetProgressColor(ColorPink, i);
		NewPlayer.SetProgressMessage( MapMessage, i++ );
	}
	if ( bUseXC )
	{
		NewPlayer.SetProgressColor(ColorGold, i);
		NewPlayer.SetProgressMessage("Enhanced with XC_Engine", i++ );
	}
Alternate option ? Anyone ?
Last edited by sektor2111 on Wed Jan 27, 2016 7:23 am, edited 1 time in total.

User avatar
Barbie
Godlike
Posts: 2394
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MapRotatorUT [Release]

Post by Barbie » Wed Jan 27, 2016 12:02 am

I use this one, but I have no idea if it works offline:

Code: Select all

static function bool ExtractMapFilename(string URL, bool WithExt, out string MapFilename) {
/******************************************************************************
Extracts the Map filename from given *URL* and returns TRUE.
If no filename could be found in *URL*, FALSE is returned.
In detail: *MapFilename* returns the part between "/" and "?"
Example for URL:
"Level.GetLocalURL=0.0.0.0/MH-Cliffs2.unr?Name=Player?Class=Bo..."

Alternate methodes to get current map name:
* Get *string(self)* and cut off *self.Name*
  Example: string(self)='MH-TowerOfDeath2.KHMBase0'
* string(Level.Outer.Name) <- but result is without extension
******************************************************************************/
local int i;

	i = InStr(URL, "/");
	if (i < 0)
		return false;
	URL = Right(URL, Len(URL) - i - 1);
	i = InStr(URL, "?");
	if (i < 0)
		return false;
	MapFilename = Left(URL, i);
	if (! WithExt)
	{
		i = InStr(Caps(MapFilename), ".UNR");
		if (i >= 0)
			MapFilename = left(MapFilename, i);
	}
	return true;
	
}
Also the extension extracting code's reliability depends on definition of extension.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett