The Black Tutorials- 2)How to lock a map to your server

Get some cool tips about how to tweak your UT graphic, gameplay, and much more!
Post Reply
JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

The Black Tutorials- 2)How to lock a map to your server

Post by JackGriffin » Sun May 22, 2016 4:04 pm

How to lock your map to your server

First, grab this
MapLock.zip
(3.38 KiB) Downloaded 92 times
Follow these instructions... It is broken into two parts.

PART ONE: How to secure a map.
PART TWO: What to add to the server.

PART ONE:
IMPORTANT: First, make a copy of your map. Once you protect it you will not be able to play it in editor. Protect it last when you are ready to use it on the server.

1) Open the included map in your editor. It is called "MarsDemoMap". I made this originally for Mars' MH server.
2) You can see one actor in that map in the center. It is called "ZoneFog". This is NOT anything to do with zones or fog, it is only so that it appears to be something that doesn't matter if someone opens your map up in editor.
3) Now open the map you want to protect with the same editor. It will close the "MarsDemoMap" and open the new one but that is what we want to happen. Doing it this way will make the editor 'remember' the ZoneFog actor.
4) Find someplace in your map that is out of the way (hidden is best). Open the Actor Class Browser (the little pawn chesspiece) and under "Actor" you should see "ZoneFog" at the bottom. Left-click ZoneFog to highlight it.
5) Place a single "ZoneFog" in your map you want to protect.
6) In this new ZoneFog actor select it's properties.
7) Under "Advanced" change "bHidden" to "True".
8 ) Under "Display" change "DrawScale" to "0.000001". This will hide your protection from people trying to find it.
9) Rebuild your map and it's done. You can still work on the map in editor but you cannot play it now.

What this actor does is destroy any player trying to play the map. Go ahead and try to play the map now in editor. You'll see that your game freezes. Heh heh :):)

So how do we fix this so it works? Do this to your server:

PART TWO:
1) Add this line to your UnrealTournament.ini of your server:
ServerActors=MapUnlocker.SA
2) Place the MapUnlocker.u into the system folder of the server.
3) Do NOT add the file to redirect!! This file NEVER needs to leave your server. As long as you protect it, it should protect you.
4) Start your server normally and enjoy. You will notice nothing wrong, the map will now play normally as long as it remains on your server.

Anyone who tries to use your map by getting it from their cache will see it locks their game up. This protection CAN be bypassed but only a few people are smart enough to figure it all out before this was posted. The smarter you are about it the better it will work. You can add the ZoneFog actor to as many maps as you want.

Code theory: The map mutator is simply destroying any playerpawns it finds. The server actor disables it, allowing the map to be entered. If someone tries to run it on their server without the right server actor then the map will run fine but no one will be able to join. There aren't errors or anything, it just doesn't work. As long as the actor destroys the mod then the map plays without issues.

You can grab the source code and tweak it however you like. You don't have to use 'Zone Fog' if you don't want. You can make up your own actor name, just make it sound official. You can have multiple protections on the same map with this method so long as your server actor destroys them. There are many, many other ways to invoke serveractor protection on a map or mod and this is the simplest way but it also gives a straightforward example for you to follow. Any other way of doing this will start like this and get more complex but it's the basis you need to understand.
So long, and thanks for all the fish

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by Barbie » Sun May 22, 2016 7:05 pm

So how do we fix this so it works?
I noticed this kind of protection on Mars007 server and also posted a solution there, but post was deleted by Mars. ^^

I run some of that protected maps on my server, and in the map specific hacks section I just remove these Actors (I've picked up their names in the Editor):

Code: Select all

function int RemoveCopyProtection(out int PredictedResult) {
local int result;
local Actor A;
	PredictedResult += 2;
	if (FindActor('UT_SmokeGen0', A))
	{
		A.Destroy();
		result++;
	}
	if (FindActor('SmokeLightning0', A))
	{
		A.Destroy();
		result++;
	}
	return result;
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by Chamberly » Sun May 22, 2016 8:52 pm

Keep it going, I'm saving all the copy I can, then look at them later in months when I get time.
Image
Image
Image

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by JackGriffin » Sun May 22, 2016 9:02 pm

Barbie wrote:I've picked up their names in the Editor
It's possible to suppress that and/or make it so it cannot be removed or even seen. That's not really why I posted this though as it's not my intention to create new methods from scratch. It's more of a way to answer a lot of odd forum posts from over the years that I knew why something didn't work but I couldn't really answer. There's a methodology here that should be learned but not necessarily used.
So long, and thanks for all the fish

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by sektor2111 » Mon May 23, 2016 5:40 am

Bah...
I would like to see a server with stuff playable at a good frame-rate rather than lagging and blowing up server. One of reasons for NOT being interested about such work protected or unprotected it's because breaks default mapping rules:
- less zoned;
- more polys;
- large open areas for running 2 days ? Why ?
- bot support - UFS (Unknown Flying Subject);
- monster tricky - What !? That's impossible! :loool:
Worth to be protected then ? For me: Not even a try.

Looks like I have to quit mooing with codes and get a hand in Editor. At least I will play my cubes completely Un-Protected... and I have my reasons to NOT protect them - community if will survive can use them even if I'm gone... without respawn.

In meantime when some server will get turned off, all stuff and work will be gone - because it was "protected"...
Yes, I got some idea about protecting, it won't even compile using default Engine...
Right now I'm undecided: digging more in codes or start doing feign mapper ? And... I'm not gonna sign them...

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by JackGriffin » Mon May 23, 2016 2:10 pm

I'm not really interested in protect/don't protect discussion. Everyone knows how I feel about sharing. The point is this stuff exists, it's out there in the wild because I've seen it, and it's a good idea for people to see how it works so they can deal with it. The methods I outlined are not hard to do but they also aren't hard to defeat. As far as I have ever seen no map has ever went above this level of locking that I've run across so this tutorial, while seeming to be negative, actually gives almost anyone the tools to now play any map that seemed to be unavailable to them before.

I love you Nels but trust me, we all get you won't play or use trash stuff.
So long, and thanks for all the fish

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by Higor » Mon May 23, 2016 5:47 pm

NoMapProtection.u in the Siege download also contains a protection cracker, this one used on some Siege maps.
Basically, an actor disguised as a Brush

EDIT:
Oh right, it's a hacked compilation. You're not supposed to be able to edit bStatic and bNoDelete on actors. :lol2:

Code: Select all

event PreBeginPlay()
{
	local brush B;
	local string s;

	ForEach AllActors (class'Brush', B)
	{
		if ( (Mover(B) == none) && (B.class != class'Engine.Brush') )
		{
			s = string(B.Class);
			s = Mid( s, instr(s,".")+1, 5);
			if ( s ~= "Brush" )
			{
				B.bStatic = false;
				B.bNoDelete = false;
				B.Destroy();
			}
		}
	}
	Destroy();
//Do not stay in the mutator chain
}
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

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

Re: The Black Tutorials- 2)How to lock a map to your server

Post by sektor2111 » Mon May 23, 2016 6:39 pm

Higor wrote:You're not supposed to be able to edit bStatic and bNoDelete on actors
Indeed, But I could ruin paths in maps rammed crushers, using a sort of "Wild" compilation, I exchange I couldn't Create them in UScript. Aside In some "protection" I can destroy PlayerStart/s :satan:, then join if you can and perhaps a Pawn "patrolling" will do a nice server- crash. That "brush" thing I guess it's doable using even Console...

Post Reply