prev| toc| next
 

Setting Up the Database (cont't):

Porting Global Programs:

The files provided in the fbmuf.tar are a genuine help. These are upload scripts that not only provide necessary programs, but also set up necessary exits, macros, and properties. To install them, uncompress and extract the files (`gunzip fbmuf.tar.gz', `tar -xvf fbmuf.tar'), and quote, paste, or upload the resulting files onto the MUCK, using whatever method works best for you.

The file for cmd-@register should be uploaded first: the other upload scripts will use the @register command in installing the programs. Next, install the libraries, in the following order:

  • lib-strings
  • lib-stackrng
  • lib-props
  • lib-lmgr
  • lib-edit
  • lib-editor
  • lib-match
  • lib-mesg
  • lib-mesgbox
  • lib-reflist
  • lib-index
  • lib-case
  • lib-look

(Note: The README file in fbmuf lists `lib-case' as `lib-cases'. You will need to quote it by the name given here, `lib-case'.)

The remaining programs can be installed in any order.

If you're not uploading scripts from fbmuf.tar, you'll need to install all the programs `by hand'. Even if you are using fbmuf.tar or the standard database, you will need to install some programs without the benefit of a script. The following gives an example of porting a library; the same techniques can be used for any program. First, get the code, perhaps by @listing and logging the program on an established MUCK. The example uses the logging and quoting syntax for TinyFugue; other clients will have different syntax.

====================================
On the established MUCK...
> /log lib-props
  % Logging to file lib-props
> @list $lib/props

  <output output output>

> /log off

On your MUCK...
> @prog lib-props
  Program created with number 26.
  Entering editor.
> i
  Entering insert mode.
> /quote -0 `lib-props
> .
> c
  Error in line 78: Unrecognized word lines.
> 78 l
  77 lines displayed.
> 78 d
  1 lines deleted.
> c
  Compiler done.
> q
  Editor exited.
====================================

As the example indicates, listing and quoting a program picks up an extra, unwanted line: the @list command follows its output with a line indicating how many lines of program code were listed... 77 in this case. You need to remove that line, either with a text editor on your system, or — as in this example — by uploading, compiling, noting and deleting the offending line, and then re-compiling.

Once you have the program compiled, you need to set its flags appropriately. All libraries should be set M3 and L; lib-lmgr, lib-props, and lib-reflist should also be set S, B, and H. Lib-look should be set S. Other programs should be set with whatever flags they have on the MUCK you're porting from.

Libraries — and other programs frequently used by players, such as do-nothing and obv-exits — will need to be registered. You can do this either with the @register command, or by setting the property directly.

====================================
> @reg lib-props = lib/props
  Now registered as _reg/lib/props: lib-look(#26FLM3) on Room Zero(#0R)

or...

> @propset #0 = dbref:_reg/lib/props:#26
  Property set.
====================================

Some programs will also need properties set. For libraries, this information is readily available with the @view command; for other programs, you will probably need to get a wizard or the program owner to help you view the props.

====================================
> @view $lib/look
  Command to view: @list $lib/props=1-20
  Run this command? (y/n)
> n
  Read definitions? (y/n)
> y
  .envprop = "$lib/props" match "envprop" call
  .envsearch = "$lib/props" match "envsearch" call
  .locate-prop = "$lib/props" match "locate-prop" call
  .setpropstr = "$lib/props" match "setpropstr" call
  envprop = "$lib/props" match "envprop" call
  envsearch = "$lib/props" match "envsearch" call
  locate-prop = "$lib/props" match "locate-prop" call
  setpropstr = "$lib/props" match "setpropstr" call
====================================

The first bit of output in this series...

  Command to view: @list $lib/props=1-20

...tells you that the program documentation appears in lines 1 - 20 of the program. To set things up so that players on your MUCK can view the program, set the _docs property on the program:

====================================
> @set lib-props = _docs:@list $lib/props=1-20
  Property set.
====================================

The definitions are stored in propdir _defs/ on the program object. They provide information needed for calling programs to communicate with the library. The definition...

  .envprop = "$lib/props" match "envprop" call

... means `Where a program that uses this library contains the word `.envprop', use the function `envprop' in this library'.

Set the _def properties for each definition.

====================================
> @set lib-props = _defs/.envprop:"$lib/props" match "envprop" call
  Property set.
  <Etc. Copy, find/replace, and paste are your friends.>
====================================

Setting up libraries is also discussed in Section 3.2.2, MUF Libraries.

prev| toc| top| next