Hardcode

Hardcode javelin Mon, 2012-02-13 19:43

Herein find answers to frequently asked questions about hacking the PennMUSH hardcode.

1.7.7 + Redhat 9 - krb5.h not found

1.7.7 + Redhat 9 - krb5.h not found javelin Mon, 2012-02-13 19:50

When compiling PennMUSH 1.7.7 with RH9, you may get errors that begin with:

In file included from /usr/include/openssl/ssl.h:179,
                 from ../hdrs/mushtype.h:10,
                 from ../hdrs/conf.h:13,
                 from access.c:74:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory

In RH9, RedHat built OpenSSL to use Kerberos, and put the Kerberos include
files in /usr/kerberos/include.

To fix this problem, you need to add -I/usr/kerberos/include to the CCFLAGS in the top-level Makefile. You can do it every time the Makefile is generated by Configure, you can tell Configure about it every time you run Configure, or you can try creating the file 'config.over' in the pennmush/ directory, containing the following line:

ccflags='-I/usr/kerberos/include'

2003-Aug-18 9:53am dunemush

Adding a new lock type

Adding a new lock type javelin Mon, 2012-02-13 19:51

Adding a new lock type

In lock.c, you will see something like this:

const lock_type Basic_Lock = "Basic";     /**< Name of basic lock */
const lock_type Enter_Lock = "Enter";     /**< Name of enter lock */
const lock_type Use_Lock = "Use";         /**< Name of use lock */

You will also see:

const lock_list lock_types[] = {
  {"Basic", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL},
  {"Enter", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL},
  {"Use", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL},

And in lock.h you will see:

extern const lock_type Basic_Lock;
extern const lock_type Enter_Lock;
extern const lock_type Use_Lock;

Just add your lock to these three places in the same fashion.
Of course, your lock will have no effect unless you add code to handle it.

How Do I Report a Bug or Suggest a New Feature to Penn?

How Do I Report a Bug or Suggest a New Feature to Penn? MrWigggles Fri, 2012-05-11 15:14

If you think you've found a bug or want to suggest a new feature to Penn, then you'll want to go the Google Code for Pennmush.

http://code.google.com/p/pennmush/

From there, you'll want to clink on the Issues tab, where you'll be brought to a list of the current open ticket for PennMush. You'll notice a mix of bug reports and new features.

Then you'll want to click on the New Issue button, and select on the pull down menu, Feature Request or Bug Report and fill out the form.

How can I hide a attribute?

How can I hide a attribute? javelin Mon, 2012-02-13 19:49

How can I hide a attribute?

I am a wizard on a mush. I have set up in the hard code to add a few attributes to the player on player creation. That is working fine but I do not know what flags to use to hide the attribute so mortal players can not see the attributes that I have set. Thank you for any help that you can give me.

2002-Dec-31 6:05pm ctempleton3

The mortal_dark attribute flag. It's AF_MDARK in the hardcode. If you're using atr_add() to set the attributes without adding the attribute to the main table in hdrs/atr_tab.h, it should be the last argument to atr_add(), instead of NOTHING.
It's usually easier, btw, to do this sort of thing in softcode. I usually have an @aconnect in player_start (Set wizard, of course, so it can modify players) to set up initial attributes.

2003-Jan-12 1:58am shawnw

How do I apply a patch?

How do I apply a patch? javelin Mon, 2012-02-13 19:46

How do I apply a patch?

The instructions for PennMUSH patches are at the top of each file, but here's a summary.

From a unix shell prompt in the pennmush directory (Represented by the %):
% patch -p1 < 1.7.4-patch06
% make

The name of the patch file will vary, of course. If anything else needs to be done, like re-running Configure, make will tell you. After make recompiles the mush, do a @shutdown/reboot from in the mush. Some patches require a full @shutdown -- if so, the instructions in the patch file will mention this.

2001-Jun-11 7:58pm shawnw

How do I change @sex into a wizard only command?

How do I change @sex into a wizard only command? javelin Mon, 2012-02-13 19:54

How do I change @sex into a wizard only command?

I don't want players to be able to change their sex once they get out of character generation. I figure the best way to do this is make it a wizard only command, create a wizard object in character generation and create commands on it that set gender (i.e. &command_male gender=@male:@sex *%#=Male). But how do I turn @sex into a wizard only command?

@sex isn't actually a command, it's an attribute. See help @attribute for how to make it a 'wizard' attribute, which will prevent mortals from setting or changing it.

2012-02-13 javelin

I'm getting compile errors in command.c about case values or a parse error before '.'

I'm getting compile errors in command.c about case values or a parse error before '.' javelin Mon, 2012-02-13 19:47

I'm getting compile errors in command.c about case values or a parse error before '.'

You probably have the chat system turned on in options.h. You probably have the CHAT_ALIAS_TOKEN option defined. You probably didn't read the explanation about this option that's right above it in the file or when running a make update.
To reiterate what it says: CHAT_ALIAS_TOKEN, if defined, should be set to a single character within single quotes. That character should not be +. '.' is good. '=' is good. . is bad. = is bad. '+' is bad.

2001-Jul-19 12:50am shawnw

What do I have to do after changing something in options.h?

What do I have to do after changing something in options.h? javelin Mon, 2012-02-13 19:44

What do I have to do after changing something in options.h?

Recompile the mush (By running 'make' in the pennmush directory), and then do a @shutdown/reboot from inside the mush.

2001-Mar-28 10:51am shawnw

What files should I put custom hardcoded functions and commands in?

What files should I put custom hardcoded functions and commands in? javelin Mon, 2012-02-13 19:46

What files should I put custom hardcoded functions and commands in?

Normally, any custom hardcoded functions you add should go in src/funlocal.c, and new commands in src/cmdlocal.c. These two files are not altered by new patch levels, which greatly reduces the chance of a conflict when upgrading patchlevels.
There are a few exceptions, of course, for cases when you need to have access to information that's not normally available outside of specific files. See the Guide for Gods for more information on this.

2001-Jun-11 8:02pm shawnw

Where can I get the latest PennMUSH version?

Where can I get the latest PennMUSH version? javelin Mon, 2012-02-13 19:45

Where can I get the latest PennMUSH version?

See the 'Download PennMUSH' link at the top right of this site (http://community.pennmush.org)

ansi color in connect.txt

ansi color in connect.txt javelin Mon, 2012-02-13 19:52

Note: Since after 1.8.3 or so, ANSI and ACCENTS were enabled by default. The suggested method is now to use a message object instead of straight textfiles. That allows you to simply use [ansi()] softcode etc.

// Considerations //
1) This worked on 181p9 - I don't know if it will work on older versions
2) If someone connects to your mush with a client which can't grok ansi codes, your connect.txt will look like regurgitated potato salad.
// HOW TO //
1) in pennmush/src note notify.c around line 690:

  if (!d->connected) {
    /* These are the settings used at, e.g., the connect screen,
     * when there's no connected player yet. If you want to use
     * ansified connect screens, you'd probably change NA_NPASCII
     * to NA_NCOLOR (for no accents) or NA_COLOR (for accents).
     * We don't recommend it. If you want to use accented characters,
     * change NA_NPUEBLO and NA_NPASCII to NA_PUEBLO and NA_PASCII,
     * respectively. That's not so bad.
     */
    return (d->conn_flags & CONN_HTML) ? NA_NPUEBLO : NA_NPASCII;

2) Not so bad, huh?

2006-Jul-28 2:40pm bill