Tinymudserver, room descriptions, and room names

Posted by Metsuro on Fri 15 Sep 2006 06:55 PM — 4 posts, 20,107 views.

USA #0
Uh alright, with how tinymudserver comes it has the room name as part of the description and I wish to make it, its own thing. That way I can display the names and not the whole description. Anyway I could get help with setting that up?
USA #1
First you need to add the data to the class. Find class tRoom and add:

string name;


Find the DoLook command and print out the name like so:

  // show the room name
  *p << r->name;


You will then need to modify the loading routine (and, eventually if you have OLC, the saving routine) to load an extra string:

string room_name;
getline( fRooms, room_name );

//sometime later after the room is created with new
//or you could modify the constructor
//this assumes the data is public
room->name = name;


With those fragments you should be able to modify it to do as you say. You will also need to modify the room data file by hand for each room to add the name to it (on its own line).
USA #2
I got most of that figured already, the only problem I have is the loading... cant quiet seem to ever get it to work.

[EDIT] But thanks to your example I got it thank you very much!
Amended on Fri 15 Sep 2006 09:34 PM by Metsuro
USA #3
Heh while we are at this, while your in the mud, and everyonce and awhile a > will pop up where is this located??