Making good armours and weapons is probably the best way to ensure that players will visit your area, but beware, too good stuff will invariably cause some sort of inflation in weapons and armours. You'll become inpopular among the older and higher wizards. Your chances of advancing beyond wizardhood may reduce. If you still want to make a bunch of really good weapons then make sure that they are very hard to get and that your area is inpeckable, variated and full of surprises. That way noone can complain and you can motivate your good weapons.So, even though it is easy to make large, empty areas with my mapsystem, DON'T!!! In this aspect of the mud, as in all other, use your common sence, and only make areas which you yourself would find interresting to explore.
You are following a forest track which leads through a forest. The forest is dark and gloomy, and you do not really want to enter it, you feel much safer on the track. To the east and west the path continues, to the north there is a forest and to the south there is a small beach, bordering to a lake.The text in italics is automatically generated by the mapsystem, from your definitions in the mapsystem databasefile.
It is also a database, managing a lot of rooms and items, and keeping them connected to eachother, even if some of the objects are destroyed, or cleaned out by the mapsystem to save some more memory.
It is not a tool to make advanced monsters, which reply to everything the player says, and find their way around the mud on their own, but on the other hand, nothing will prevent you from putting a monster like that of your own creation in a map you have made.
#begin 0,0,0 __ __ __ /\ __ __ __ __ __ /\ ++ /\ __ __ __ /\ ++ ++ ++ /\ __ __ /\ ++ ++ ++ /\ __ __ __ /\ ++ /\ __ __ __ __ __ /\ __ __ __ #endThe first line is the begin command, which tells my 'mapmake' program that the map starts there, on the coordinates 0,0,0 (x,y,z) Then the actual map follows. This is supposed to be a small valley surrounded by mountains. Each two characters, separated by spaces, are called tokens. A map is built from tokens, put in a file and which is run through the 'mapmake' tool in the mud. The end command tells the program to stop parsing, and search for a new begin. All text in between begin/end pairs is therefore ignored, as well as the text before the first begin, and after the last end. This is a good place to put comments to help your own memory, like, what the tokens means. This will make it easier to change the map later on. I learnt this the hard way, when I forgot what the 50+ tokens in my area really was supposed to be.
This will result in
map.dat An example map
__ -- Empty room (Default, cannot be changed) /\ -- An unclimbable mountain ++ -- A faery forest #begin 0,0,0 __ __ __ /\ __ __ __ __ __ /\ ++ /\ __ __ __ /\ ++ ++ ++ /\ __ /\ ++ ++ ++ ++ ++ /\ __ /\ ++ ++ ++ /\ __ __ __ /\ ++ /\ __ __ __ __ __ /\ __ __ __ #end Now we will overwrite some of the data... Te -- A temple Pa -- A small path, leading from the temple #begin 3,3,0 Te Pa #end
__ __ __ /\ __ __ __ __ __ /\ ++ /\ __ __ __ /\ ++ ++ ++ /\ __ /\ ++ ++ ++ ++ ++ /\ __ /\ ++ Te Pa /\ __ __ __ /\ ++ /\ __ __ __ __ __ /\ __ __ __So, now we have a simple map, but what does all thoose fancy tokens mean? How does the mapsystem know that /\ is supposed to be mountains, and ++ fields? Or perhaps a forest?
Well, to answer that, we must move on to the next file, the mapdatabase file.
If you have programed LPC before, you will get atleast the basic concepts from this. Now, the exhaustive explanation of how it works.
data.c An example mapdatabase file
#include "/players/milamber/local.h" /* Some defines */ inherit DATABASE; /* defined in local.h */ reset(arg) { if (!arg) { map_title="The title"; /* Seen on top af all maps */ short_info="A testarea"; /* Seen by wizards doing "minfo" */ #include "map.h" /* The map (made with mmake) */ /* Now, lets define a roomtype, called "++", which is infact a /* field covered with grass. */ set_romtype("++"); set_long("You are standing on a large field."); set_short("on a field"); add_item("grass","it is green"); /* * This large item can be examined from outside this roomtype, * so, when the player sees a text like 'to the west there is a field' * [s]he can examine it, quite automatically. So, there is no need * to add the items to all rooms. */ add_large_item("field","it is covered with green grass"); set_seen_from_other("there is a field"); set_seen_from_same("the field continues"); set_enterable(1); /* Then the /\ mountain roomtype. Note the quoting of \. */ set_roomtype("/\\"); add_large_item("mountains","They are blocking your progress"); add_large_item("mountain","It is blocking your progress"); set_seen_from_other("there is a mountain"); /* This one should be set to something more interresting than */ /* this, but the example would get to long... */ set_roomtype("Te"); copy_roomtype("++"); /* This one should be set to something more interresting than */ /* this, but the example would get to long... */ set_roomtype("Pa"); copy_roomtype("++"); } ::reset(arg); /* VERY important, will initialize the * mapsystem and get it all started. */ }
First, a file with some standard declaration is included, to make it
easier for me to maintain the mapsystem. (If I move the mapdatabase, I
only have to change the definition of DATABASE).
Then, the mapdatabase standard object is inherited. In this object all
functions like add_item, set_long etc is placed.
Now it's time to set some variables. We'll start with 'map_title'.
This string, if any, will be placed on top of all maps of the area
generated with either the mmap command in my shellmodule, or maps
placed in it by you. Then there is the 'short_info' string,
used only in the 'minfo' command in the maptool.
Now some more exiting stuff.
#include "your_map.h"
This will include your map, generated with 'mmake' command from
your map, as discussed above (will be discussed more later on).
And now.. What this part of the documentation is really all about: How DO you define roomtypes, and how do they work and interact with each other?
Each roomtype can be considered to be a information post in a database, containing a lot of different fields, like long, short, items etc. There is also a special roomtype, inherited by all other roomtypes: 'DEFAULT'. If you add items to this romtype, they will in effect be added to all other roomtypes as well. The same is true for properties and realm, etc.
So, what can you set in a roomtype?
The easy answer to that question is: Much more than you will
EVER need!
But, here comes the most basic things:
set_long(string);
set_short(string);
add_item("item_name","description");
to add a
item. If you want to add more than one items which looks the same, you
can do add_item(({"item1", "item2", .. }),
"description");
add_large_item("item","description")
in a similar way to
add_item. Note: the array feature to add multiple items is not
included in add_large_item.
set_enterable(1);
to make the roomtype enterable
set_seen_from_other("seens");
set_seen_from_same("seens");
It is supposed to be a mapping in this format:
([ "roomtype1":"seen from roomtype1", "roomtype2":"seen from roomtype2", ... "roomtypen":"seen from roomtypen", ]);If no roomtype match, Seen from other or Seen from same is used. Use
set("seen",mapping);
to set this.
add_property("property"[, "data"]);
set_realm("string");
add_string("the string.\n");
set_replace("token");
to something more convenient.
add_actions(file_name(this_object()),({"smell"}));
to the
DEFAULT roomtype.
The first argument is the file in which to call the function called
'var_func' (Example further down), and the array is the verbs
to search for. Now, here is how var_func works:
var_func(verb,what,roomtype,where) { switch(verb) { case "smell": if(roomtype=="Sm") write("It smells awfull in here.\n"); else write("You can't smell anything special.\n"); return 1: default: return 0; /* No action here */ } }This piece of code should be placed in the database file. (Or,whatever file you want it to recide in, simply use the filename as the first argument to add_actions();.)
set("inout",inorout);
inorout is 1 or 2.
add_object(filename);
to add it. Example:
add_object("obj/torch");
will add a torch.
set("dark",value);
to set the darkness
level of the roomtype.
set("class",the_class);