--------------
SERVER SIDE: -
--------------
Server side is really simple, just copy the map you're cloning to another directory within ../gamed/config/ with the new name you will be giving the new clone map.
EX, say you're cloning b05 => house, you would make a copy of the directory (and all the files in it):
../gamed/config/b05/ => ../gamed/config/house/
This time you don't have to change any file names.
Then, all you have to do is configure your new map/clone in GS.CONF and GSALIAS.CONF.
Duplicate the section from the map you're cloning and change a few settings to make your new map/clone work.
EX:
[Original b05 GS.CONF section:]
;----------------------------------------------------------------------------
[World_b05]
index = 25
tag = 205
base_path = b05/
limit = allow-root;
grid = {80,80,25,-1000.0,-1000.0}
base_region = {-512.0,-512.0} , {512,512.0}
local_region = {-512.0,-512.0} , {512,512.0}
;instance_capacity = 400
;save_point = 1,1285.881,219.612,1274.732
;player_per_instance = 15
player_capacity = 6000
npc_count = 131072
matter_count = 262144
pool_threshold_low = 10
pool_threshold_high = 20
cid = 0,2,13
[Terrain_b05]
szMapPath = map
nAreaWidth = 512
nAreaHeight = 512
nNumAreas = 1
nNumCols = 1
nNumRows = 1
vGridSize = 2.0f
vHeightMin = 0.0f
vHeightMax = 800.0f
[MsgReceiverTCP_b05]
type = tcp
listen_addr = INSTANCEB05:10945
so_sndbuf = 16384
so_rcvbuf = 16384
tcp_nodelay = 1
listen_backlog = 10
[MsgReceiverUNIX_b05]
type = unix
listen_addr = /tmp/gssock_b05
so_sndbuf = 16384
so_rcvbuf = 16384
listen_backlog = 10
[duplicated and modified for new map/clone:]
;----------------------------------------------------------------------------
[World_house]
index = 76
tag = 400
base_path = house/
limit = allow-root;
grid = {80,80,25,-1000.0,-1000.0}
base_region = {-512.0,-512.0} , {512,512.0}
local_region = {-512.0,-512.0} , {512,512.0}
;instance_capacity = 400
;save_point = 1,1285.881,219.612,1274.732
;player_per_instance = 15
player_capacity = 6000
npc_count = 131072
matter_count = 262144
;pool_threshold_low = 10
;pool_threshold_high = 20
cid = 0,2,13
[Terrain_house]
szMapPath = map
nAreaWidth = 512
nAreaHeight = 512
nNumAreas = 1
nNumCols = 1
nNumRows = 1
vGridSize = 2.0f
vHeightMin = 0.0f
vHeightMax = 800.0f
[MsgReceiverTCP_house]
type = tcp
listen_addr = HOUSE:11946
so_sndbuf = 16384
so_rcvbuf = 16384
tcp_nodelay = 1
listen_backlog = 10
[MsgReceiverUNIX_house]
type = unix
listen_addr = /tmp/gssock_house
so_sndbuf = 16384
so_rcvbuf = 16384
listen_backlog = 10
First change the [World]/[Instance] (main) 'header' name (this is how you will 'call' [start] the new map [./gs house]):
old-[World_b05]
new-[World_house]
Next make sure your new map/clone has a unique index AND tag (world ID tag) when compared to every other map in gs.conf!
Then alter the base_path, so it knows where to find it:
old-base_path = b05/
new-base_path = house/
Then alter the [Terrain_], [MsgReceiverTCP_], and [MsgReceiverUNIX_] 'header' names to match the main 'header' name:
old-[Terrain_b05]
new-[Terrain_house]
old-[MsgReceiverTCP_b05]
new-[MsgReceiverTCP_house]
old-[MsgReceiverUNIX_b05]
new-[MsgReceiverUNIX_house]
Then alter the listen_addr (under [MsgReceiverTCP_]) to match the main 'header' name AND to be a unique listen address:
old-listen_addr = INSTANCEB05:10945
new-listen_addr = HOUSE:11946
Then alter the listen_addr (under [MsgReceiverUNIX_]) to match the main 'header' name:
old-listen_addr = /tmp/gssock_b05
new-listen_addr = /tmp/gssock_house
Lastly (for gs.conf), you will have to add your new maps main 'header' name to the world_servers= or instance_servers= at the beginning of gs.conf (depending on whether it's a world map or an instance map):
new-world_servers = house; (in addition to whatever is already there)
*Now edit gsalias.conf and repeat the previous step (add your new map by its 'header' name to the world_servers= or instance_servers= line):
new-world_servers = house; (in addition to whatever is already there)
Lastly (for gsalias.conf), create a new line that points to the server alias under [AddrAlias] for your new map/clone.
For this you HAVE to use the name you used (without the address part) from listen_addr under [MsgReceiverTCP_] in gs.conf:
old(keep)-INSTANCEB05 = game1
new(add)-HOUSE = game1
There you have it, you are now ready to start your new map:
./gs house