Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Cloning, how to clone a map:

Status
Not open for further replies.
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
CLONING, HOW TO CLONE A MAP:

Well, I know I have cloned a few maps (like b05-house, and now city of abominations-jail): The main aspects of a client side map is

-The map folder itself (in /element/maps)
-instance.txt =>inside=> CONFIGS.PCK (whick contain WID and above map directory location)
-LITMODELS.PCK
-SURFACES.PCK (for map and mini map)
-LODDATA.PCK (for some maps)

From cloning existing maps, I have noticed something when it comes to naming (without changing any of the actual map files "inside"). I cloned b05 -to- house, well here was the file naming scheme within /element/maps/house:

Directory of E:\PW_Client\element\maps\house

06/01/2011 08:37 PM <DIR> .
06/01/2011 08:37 PM <DIR> ..
06/01/2011 08:37 PM <DIR> bsdata
09/17/2010 05:17 AM 703,718 b05_1.t2bk
09/17/2010 05:17 AM 526,424 b05_1.t2lm
09/17/2010 05:17 AM 526,424 b05_1.t2lm1
09/17/2010 05:17 AM 249,272 b05_1.t2mk
09/17/2010 05:17 AM 38,236 b05_light.dat
09/17/2010 05:17 AM 32 house.cld
09/17/2010 05:17 AM 7,519 house.ecbsd
09/17/2010 05:17 AM 92,459 house.ecwld
09/17/2010 05:17 AM 4,372 house.t2hc
09/17/2010 05:17 AM 404 house.trn2
09/17/2010 06:27 AM 834 precinct.clt
01/19/2011 04:27 PM 1,914 region.clt
09/17/2010 05:17 AM 3,704 scenelights.dat

and ofc the map itself I called "house" -- so it's in /element/maps/house ==> instance.txt points to "house" ==> and LITMODELS/house ==> SURFACES.PCK house.dds etc...

So... I guess what if anything I've learned about using (or "cloning") an existing map is you can name it whatever you want. However the above files (just like in my b05~house example) should NOT have their filenames changed (unless you feel like editing "INSIDE" the files that actually point to those)...

So, the files that CANNOT have a name change from their original names (in /element/maps/mapname) are:

.t2bk
.t2lm
.t2lm1
.t2mk
xxx_light.dat






the ones that HAVE to be changed (to match your new map name)

.cld
.ecbsd
.ecwld
.t2hc
.trn2
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
--------------
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
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
I ended up making and adding the server side instructional part even though I thought one would have been able to figure it out on their own (it's really not that hard). Now there's no excuses as to not creating your own custom content, including custom ('clone') maps. Thing I personally like best about cloned maps is, even though the maps themselves are not 'original' the map in the game can be (and all without having to delete/over-write the original version of the map), since you can now create its own NPCGEN, etc...

So there you go, do it to it - lets see some nice custom (cloned) maps :):
 
Joined
Jun 7, 2009
Messages
543
Reaction score
221
This can also be used to add custom maps from other games as far as I can tell, or at the very least the ones available on ragezone. :thumbup: Thanks for this guide, I will be sure to put it to good use when I get the opportunity.
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
Kinda/for the most part, IK there's a tut HERE on how to 'fix' maps from LOMA to work with PW... Of course 'borrowing' maps from other games gets a little more complicated/tricky, but it can still be done...
 
Status
Not open for further replies.
Back
Top