When to hack
What? There's a command that your MUSH really needs, a function not in standard PennMUSH, a bug you've discovered? In cases like this, the fact that you can "Use the Source, Luke" can greatly enhance your enjoyment of MUSH, your understanding of MUSH, and your MUSH. :)
I should probably insert here the standard cautions about not adding loads of feeping creatures ("feeps") and kludgy hacks to your MUSH, but I won't. Feeps are fun and usually harmless, and as long as you're happy with your code, don't let anyone tell you otherwise.
While there are no rules, then, there are a few guidelines I try to follow when deciding what *not* to hack:
- Avoid hacks which permanently alter the db or maildb structure, unless you know that you'll always be willing to support the code and cope with possible future PennMUSH upgrades, or if you don't care about ever upgrading. The sort of thing I'm talking about here is adding a couple new variables to the db structure. If you think your hack is of general interest, let me know and if I agree, you'll be assigned an official db-flag for your hack, and we'll arrange for built-in db conversion code to turn your changes on or off (the way USE_WARNINGS works, for example). Another good approach is to create your own file for storing local properties, and sing set_objdata and get_objdata to manipulate them once they're loaded (usually from local.c). This is discussed later.
- Avoid hacks which require the MUSH to filter all outgoing text. Ansi and HTML filtering is bad enough. While I've seen some beautiful commands like @wrap (which word-wraps output to players), each time you add a filter to
all the MUSH's output, you significantly increase CPU requirements. Leave client-functions to clients, if possible.
- Avoid hacks with very limited functionality. If you've got spare time to hack, ask Javelin if there's something he's been stalling on doing...he keeps a big list.
- If the hack is something that seems very useful, email the idea and/or the source code (a context diff) to firstname.lastname@example.org. It may well appear in the next release!