make a map only work on 1 server..

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

make a map only work on 1 server..

Post by fo0k »

a puzzle kinda map where every object in the level (statics.. anything) is a spawner..

you download the map, complete with all the objects - but the locations of each object (spawner..) are all in the server version of the map.

basically if you run the map locally it would either crash or just show an empty level.


any more bright ideas on this general theme of 'cheat prevention' ?

purely for the discussion really, although I always kinda wanted to try something like this. :lol:
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: make a map only work on 1 server..

Post by Shrooms »

This would be a good idea for a changing infantry map and it is possible. I have a map where statics are converted to pcos and they are controlled server side. They spawn on flags. This is how I have it set up. http://www.mediafire.com/download/25or7 ... ics_r1.rar

In objects.con of the static object, the object name of the simpleobject is renamed simply by adding _server to the end of the name, easy to differentiate. And instead of simpleobject, the template is playercontrolobject. I also had to create and include a new networkable info code. Then all of the pcos have an objectspawner coded in ObjectSpawnTemplates.con All is included in the client .rfa

as for objectspawns.con it's not neccesary to have it filled with code in the client.rfa this is where we proceed with adding this file to the map_001.rfa with the objects position.

Code: Select all

objects.con
ObjectTemplate.create PlayerControlObject bigrock1_server
ObjectTemplate.geometry bigrock1
ObjectTemplate.setNetworkableInfo bigrock1_serverBodyInfo
ObjectTemplate.setHasCollisionPhysics 1

network.con
NetworkableInfo.createNewInfo bigrock1_serverBodyInfo
NetworkableInfo.setPredictionMode PMLinear


ObjectSpawnTemplates.con

ObjectTemplate.create ObjectSpawner airport_runway_server
ObjectTemplate.setObjectTemplate 1 airport_runway
ObjectTemplate.setObjectTemplate 2 airport_runway
ObjectTemplate.MinSpawnDelay 9999
ObjectTemplate.MaxSpawnDelay 10000
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 9999
ObjectTemplate.Distance 9999
ObjectTemplate.DamageWhenLost 1
ObjectTemplate.maxNrOfObjectSpawned 1
ObjectTemplate.teamOnVehicle 0

There can be a lot more done to this. team 2 has different objects than team 1 spawning on a flag; random object spawn locations. I did not go in that depth. That would be great for a counter strike like mod. I tested this code online.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: make a map only work on 1 server..

Post by freddy »

fo0k wrote:a puzzle kinda map where every object in the level (statics.. anything) is a spawner..

you download the map, complete with all the objects - but the locations of each object (spawner..) are all in the server version of the map.
Would work fine, specially for a puzzle game but i would limit it to the critical parts, and not every tree or bush because i think the strain on the server would increase for every network "thing" it has to handle. Propably there is some limit where it would just lag to death.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: make a map only work on 1 server..

Post by fo0k »

yeah true, although I have hit the 3000 (approx) spawner limit in bf before without lag.. funny little engine. (non physiscs objects but spawners) but yeah was offline, thinking about it.

now.. again only for discussion.. dont go thinking im crazy.

but in theory perhaps you could actually charge people money for a map.. or charge to play on the server.. because map would not work anywhere else :lol:

I would take my hat off to anyone who managed to get money for a map :)
just how much info could be serverside I wonder to try and achieve this.
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: make a map only work on 1 server..

Post by Shrooms »

The server owner could have a password given to those who "donate". Or have all ip's banned except for those who pay.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: make a map only work on 1 server..

Post by fo0k »

well the point would be that the map just would not work elsewhere.. so restricting ip should not be needed..

Dice and other studios have looked at making their single player campaigns be dependent on an online connection for all the Ai in missions for example, to prevent piracy. game would be a dead duck without connection.

I have thought about puzzles.. but its tough in an engine without any python style scripting. any 'lock' / 'trigger' / if, and, or variables etc etc.. style objects are tough to make for example.. or at least very messy.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: make a map only work on 1 server..

Post by Vilespring »

I have seen some very primitive if/else in BF1942. Here is the only thing I found in 1942.

Code: Select all

Var v_is_coop
console.useRelativePaths 0
run bf1942/game/is_coop.con
console.useRelativePaths 1
if v_is_coop == True
	ObjectTemplate.hpLostWhileCriticalDamage 1
else
	ObjectTemplate.hpLostWhileCriticalDamage 0
endIf
from Forgotten Hope.
As I see it, it means if the game mode is coop, a critical vehicle takes damage, and if it isn't coop, it can sit there indefinitely. (unless it has the spawn self destruct it)
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: make a map only work on 1 server..

Post by freddy »

the problem is that its only read once when the game (or server) loads, its should be available ingame when playing
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: make a map only work on 1 server..

Post by Vilespring »

man. I wanted a puzzle map, that isn't a jumping puzzle.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
Post Reply