The Black Tutorials- 2)How to lock a map to your server
Posted: Sun May 22, 2016 4:04 pm
How to lock your map to your server
First, grab this 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.
First, grab this 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.