1
2
ID:166650
Jul 8 2006, 7:58 pm
|
|
Hey, i was wonderin if anybody knows how to change from one map file to another. When i saw the game betaquest and looked at the sourcecode. It had different map files such as city and sewers. So i was wonderin if anybody knew how it works?
|
Jul 8 2006, 8:13 pm
|
|
.... if you go to open file and look for the map file. but first go to why u search what kind of file and put in map file and then look for it then after you did that. you just do it to switch or you can go on the left hand side ur map file shood be where all ur icons are so look for ur map files there and well there you go
|
In response to Kiose0
|
|
ok, i dont understand it but i'll be a little more percise. If i have two dmp (map) files such as dungeon.dmp and town.dmp. How would the format be if I were to have a mob enter a tile to transport them from the town map, to the dungeon map?
|
In response to Jusbie1
|
|
When the world is run, all the map files are stacked together. So to switch to another one, all you need to do is change your mob's z variable.
There was a pretty large post about this awhile ago which went into their order, I'll see if I can find it for you. |
In response to DarkCampainger
|
|
ok thanks, i think it gives me some clue about it.
|
In response to Jusbie1
|
|
To change from 1 map to another all you do is set up a turf that changes the coordinates of your mob to another map so when you step on that turf,it acts like you have been taken to a new spot
|
In response to Inuyashasha
|
|
no examples?... like the last post saying to change the mobs z location?.
|
In response to Jusbie1
|
|
Every atom, except area, has an x, y, and z variable. These are their location in the world. In order to go to a different map, all you have to do is change the z variable.
turf/Door/Entered(mob/M) m.loc = locate(1,1,1) //This sets the mob back to the starting point. To learn more about this, look up Enter(), Entered(), and locate() in the ref (F1 in Dream Maker). |
In response to Popisfizzy
|
|
woah, i realized something. does the map files can only have 1 Z varaible or it wont work?
|
In response to Jusbie1
|
|
The map has z levels. The z variable in the atoms correspond to these. When making a map, it asks you the x value (how wide you want it to be), the y value (how long you want it to be), and the z value (how many layers it should have). I'm sure there is a limit to the z levels, but I don't know what it is.
|
In response to Popisfizzy
|
|
Popisfizzy wrote:
I'm sure there is a limit to the z levels, but I don't know what it is. 1000, I believe. I think each coordinate has a max of a 1000. |
In response to Caramonmajere
|
|
ok, i think i tried my best to understand it. thanks.
|
In response to Jusbie1
|
|
Jusbie1 wrote:
ok, i think i tried my best to understand it. thanks. I don't think you quite understand it yet. On a map file, you may edit the size of it by clicking "Options" and then "Set Map Size". You can then adjust the X, Y and Z variables. X and Y you probably know. Z, however, may be changed to create additional "dimensions" where you could teleport players to. For instance, if you have a single map, and set the Z to 5, you can use the z variable for /atom/movable's (/obj's and /mob's) to teleport players to another Z level. That's what you've been told here, in a nutshell. What you ment to ask was on how to create multiple mapfiles. You can create as many .dmp files as you want. Like previously said, they will all stack toghether. However, you don't know the priority they will stack in. The name of the world (the name of the .dme file omitting it's extension) goes first. After that, it goes in alphabetical order (A-Z and a-z, I think). So if you have a project called "maptest", "maptest.dmp" would go first, then "apple.dmp" and then "pie.dmp". <small>(Ironically, maptest.dmp, apple.dmp and pie.dmp equal "map" even though this wasn't my intention at all.)</small> If "maptest.dmp" has 2 Z levels, "apple.dmp" has 1, and "pie.dmp" has 3, you'd have 6 Z levels in total. Z level 1 would be the 1st Z level in "maptest.dmp". Z level 2 would be the 2nd Z level in "maptest.dmp". Z level 3 would be the 1st (and only) Z level in "apple.dmp" and so forth. I hope you understand now. 01000100011000010111010001100001 |
In response to Jusbie1
|
|
Because z levels can become confusing very quickly, and change if you modify any of the map files, it's better to 'tag' specific places. For instance, in the map file 'pie.dmp' you could edit a turf so that it's tag variable equals "town 1 entrance". Now whenever you want to send a player into town 1, you can do this:
var/turf/entrance = locate("town 1 entrance") You can tag all the different special places on your map, and you'll never have to worry about them changing places or running around on different z levels. |
In response to IainPeregrine
|
|
ok thanks, that makes a lot of understanding now. Thanks for your help and everyone else.
|
In response to IainPeregrine
|
|
...I never knew that! Thanks! I should read through the forum more often...
O-matic |
In response to Android Data
|
|
Android Data wrote:
Jusbie1 wrote: Being new and having read many of these posts (too many and some going WAYYYY off topic) I have come to understand Z levels... and they stink. Doesn't seem to be the most effective way to use multiple dmp files (or even organizing multiple levels but what do I know)... I like the idea behind "MapName" library by AbyssDragon... now if i could only get it to work. |
In response to Mmudd
|
|
I might be missing the point here... but do you really need a library to handle this?
I've always handled it like so: Say you have 3 dmp files. You name them in numerical order to keep track of their Z levels easier. 1-Newbie Town.dmp 2-Adventure Area.dmp 3-Dungeon1.dmp But what if you want a more complex system? Say newbie town has 2 Z levels, one for the basic town, and one for the shop interiors. Adventure area is flat. Dungeon1 is a massive traditional RPG dungeon with multiple floors (we'll say 6) #DEFINE Newbie 1 #DEFINE Newbieint Newbie+1 #DEFINE AdventureArea 3 #DEFINE Dungeon1 4 #DEFINE Dungeon1B1 Dungeon1+1 #DEFINE Dungeon1B2 Dungeon1+2 #DEFINE Dungeon1B3 Dungeon1+3 #DEFINE Dungeon1B4 Dungeon1+4 #DEFINE Dungeon1B5 Dungeon1+5 Player goes from the newbie town to a shop usr.loc=locate(X,Y,NewbieInt) Player leaves shop usr.loc=locate(X,Y,Newbie) Player then goes off to battle usr.loc=ocate(X,Y,AdventureArea) And they find the Dungeon usr.loc=locate(X,Y,Dungeon1) Then they find the stairs down usr.loc=locate(X,Y,Dungeon1B1) etc. |
In response to O-matic
|
|
O-matic wrote:
...I never knew that! Thanks! I should read through the <s>forum</s> DM Reference more often... ;P |
In response to Zagreus
|
|
Zagreus wrote:
I might be missing the point here... but do you really need a library to handle this? The reason is quite simply, that the way you handle it is ineffecient, unflexible and all-around prone to error. While it may technically work, it doesn't work very well at all; As such, its a bad idea to promote such a system to someone. All 'levels' (referring to each Z as a new level) have an equal amount of turfs (world.maxx*world.maxy), never less and never more. If you have a 300x300 town, and all other areas in your game are only, say, 150x150 then you're wasting 150x150 turfs per z-level. Thats how I understand it - Someone more in touch with things would be more than welcome to correct me if I'm wrong. However, I do believe that I'm correct. This is the reason that SwapMaps places 'maps' in a way that don't connect. To put it bluntly, it utilizes the way BYOND maps work as much as possible - If you have two 50x50 maps, but your biggest is 300x300, then theres no reason the two 50x50 maps can't be on the same z-level. That saves you space. I'll strongly advise against EVER using defines like you are, as well. Its going to be a mess down the road, to be blunt. |
1
2