Author Topic: Starting location.  (Read 4070 times)

Offline Draconian

  • Acquaintance
  • *
  • Posts: 15
    • View Profile
Starting location.
« on: March 12, 2009, 02:11:54 AM »
I've worked (dabbled) mostly with Discworld and have recently setup Skylib. I've been pleasantly surprised so far and I find myself not really sure why I didn't consider it sooner. And yet, I seem quite unable to find where the new player start location is defined. In the DW lib it's config.h, yet that file doesn't exist in Skylib's include folder. I've poked around a bit, found the login screens, login handler, player location stuff, but I can't seem to find where it's defined. For now I've just edited /room/tavern.c (default new player location) to link to the rest of my areas, but obviously I would prefer a proper approach to the issue.

I apologize if this should be easily found. Oh and thanks to Cratylus for his driver/lib bundles for DW and Skylib, it has made the entire get-up-and-started process a completely trivial task. Your efforts to make these easily available are very much appreciated, and I have no doubt you've saved my novice ass a lot of headaches, and just let me get to the LPC and real progress. A sincere thanks for making this hobby accessible to a wider range of users.
« Last Edit: March 12, 2009, 02:16:17 AM by Draconian »

Offline Raudhrskal

  • BFF
  • ***
  • Posts: 214
  • The MUD community needs YOUR help!
    • View Profile
Re: Starting location.
« Reply #1 on: March 12, 2009, 07:33:07 AM »
Ummm.... /secure/include/config.h ? Seems thoroughly commented...

(PS. 'man grep' in your unix shell)
I think, therefore i may be wrong.
Please note that if you met a Raudhrskal in a place that's not related to muds, it wasn't me. *sigh*... back when I started there was zero hits on google for that name...

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Starting location.
« Reply #2 on: March 12, 2009, 08:05:35 AM »
Ummm.... /secure/include/config.h ? Seems thoroughly commented...

(PS. 'man grep' in your unix shell)

Skal is quite right...let me add a little to his helpful post.

In my experience as a lib archaeologist I have often found it is necessary to
think like a detective. It's actually a lot like playing an adventure game...

"You are in a start room, but you don't know how the mud puts
you there. There is a red herring on the ground and a McGuffin in the corner."

So...what did I do to ferret out the information I wanted? I figured that
the mud must have the filename of the room specified somewhere,
so finding out the filename was the first thing to do. I logged in as my
admin char, which put me in "/room/tavern", but I did not really trust
this, since I didn't remember what the last thing I was doing in the
mud was, and maybe I'd left the start room.

So I logged in a test character, and sure enough, he wound up in
"/room/tavern", as well. Now I was pretty confident that the tavern was
the start room, so I decided to search the lib for references to the
word "tavern".

This is where grep comes in handy. It's a unix command that searches
files and folders for strings. If you use Windows, you can use some
functions of Windows Explorers to search in files, but I do not remember
how this is done :(

Anyway, I went into the unix shell and did this:

cd mudlib/

grep tavern */*

And got no results.

But then I did this:

grep tavern */*/*

and got:
Code: [Select]
save/creators/cratylus.o:last_pos "/room/tavern"
secure/include/config.h:#define CONFIG_START_LOCATION "/room/tavern"
secure/include/config.h:#define CONFIG_NEWBIE_START_LOCATION "/room/tavern"

Wheee! And gets specified more than once in that file. That's
also good to know.

The grep command really is your friend when you're dissecting a new lib.
Also helpful is approaching the new lib in the manner of a detective or
an adventure game player...because that's pretty much what you'll be
doing until you master that lib...and that can take a looooong time.

Good luck!


Offline Draconian

  • Acquaintance
  • *
  • Posts: 15
    • View Profile
Re: Starting location.
« Reply #3 on: March 12, 2009, 06:58:26 PM »
Wow I gotta stop working on mudlib after not sleeping for 30 hours. I dunno how I missed that, heh.

And thanks for the info on grep, I can see that solving actual problems and not blindness. ;)

Thanks again.