Making Maps
Step 1, Knowing the Definitions:
Do not confuse ‘Levels’ with ‘Maps’.
‘Levels’ are the files holding all of the data for tiles and NPCs, this is what you walk around on.
‘Maps’ are the *.txt and image file used to make all Levels seem as one large level.
Reasons for this:
In most RPGs, ‘Levels’ are an experience system; This is not the case here unless otherwise deemed so. ‘Maps’ in other games are usually referred to the field you are walking around on, which we call ‘Levels’.
Step 2, Creating a *.txt file:
There are two methods on creating the Map Text file:
Method One: Using a Level Generator to create a mock up overworld or blank slate for you to work on.
This will also generate the necessary text file used for ‘joining the levels together’.
Method Two: Opening Notepad.exe and creating it manually.
And write out your world’s layout
“level1.nw”,“level2.nw”,“level3.nw”,
“level4.nw”,“level5.nw”,“level6.nw”,
“level7.nw”,“level8.nw”,“level9.nw”
The important rules to remember on this are keep things aligned as you wish, to always quote the levelname, and to add a comma after every level name with exception to the last one (As quite literally this is an array).
Hint, If you do not have a level to fill in a spot, using empty quotes such as “”, is more than acceptable.
(You will need to save this within your Client’s Folder/SubFolder to use. Copy it to the Gserver/world/ folder if you wish to host it. You may need to restart the client to refresh the cache of available files.)
Step 3, Setting the Map:
Open up a level in your client and place down an NPC and put the following command in it:
setmap imagename,textfile,x,y;
For now, leave imagename blank, and rename textfile to what ever you just named your Map Text file.
Load/Play your level, and you have just set the first part of your map.
Step 4, Generating the Image:
This is a lot easier than it sounds, continuing from Step 3, Press F4 to go back into the level editor (You may notice the levels are linked in the editor itself for easy level making). Press M, this will prompt you if you wish to generate a Map Image. After it has finished scanning all of the levels you have made, it will ask you where to save and what the filename should be.
(You will need to save this within your Client’s Folder/SubFolder to use. Copy it to the Gserver/world/ folder if you wish to host it. You may need to restart the client to refresh the cache of available files.)
Now open up the NPC you previously created and you may fill in all the fields of the setmap command appropriately.
setmap imagename,textfile,x,y;
Hint: x,y is just a default position to draw a player’s head on the map if they are no where to be found.
Step 5, Making it Public:
Place this command where anyone will be able to load it. Such as common areas relating to the overworld.
And alternative is to create a -System NPC weapon containing the setmap command.
if ( playerenters && !isweapon ) toweapons -System-Map;
if ( playerenters && isweapon ) {
setmap mymap.png, mylevellist.txt, 0, 0;
}
This way should anyone log into your server, the map should be present for them to link up the levels.
This concludes the Map Making Tutorial.