Archive for March, 2010

Training

Posted in code snippets, MUD Development on March 22, 2010 by sigmud

All these practices, and nothing to spend them on, right?  You gain 8 practices a level (if you have max wis), and only spend 2 every level (maybe) to get a new skill or spell.  How about training abilities?  Increase your con/int/wis to get more mana, or increase your str to get more damage; all without having to take up gear slots!

So, how does it work?

I experimented with a couple of ideas.  First was a simple “train” command – added a do_train command, put something in interpreter.c, and called it good.

But I didn’t like that idea.  It doesn’t make sense to walk out into the middle of nowhere and still be able to train your abilities.  So I decided to require players be before a trainer in order to train.  Only certain mobs will be designated trainers, so players will have to seek them out in order to improve their abilities.  This could be either someone in newbie school, or a dedicated trainer somewhere out in the middle of nowhere.

More after the jump Continue reading

Regen and Bleed

Posted in code snippets, MUD Development on March 11, 2010 by sigmud

Given that I haven’t updated the blog with fun bits of code in a while, here’s a bit to add to the community: BLEED and REGEN affects.

I’m not going to go too in depth here, if you need help adding AFF_ flags to the stock code, leave a response and I’ll get into it in more detail.  Also, you should know how to add bitvector values to spells (see the Sanctuary spell).

Bleed and regen affects are unlike most other affects, instead of applying every tick (how useful is hp/tick when fights last less than 1 tick), they are applied every round (but only when you’re fighting).

Code after the jump.

Continue reading

Building areas

Posted in MUD Development on March 11, 2010 by sigmud

…is a pain in the arse.

I understand the temptation to go ahead and use stock areas.  But I’m a trooper, I’ll struggle through.  Heck, I’ve already got 3 areas written.  And stock TBA comes with…oh…crap.  Yeah, I’m never going to write hundreds of areas like TBA comes with standard.

It sure would have been nice if I had changed the code so that new areas would be backwards compatible (I didn’t).  Maybe I’ll work on that sometime soon.

As it stands, right now I’m working on making mobs behave more like characters – casting spells, using skills, and generally being more difficult to kill than random bags of hitpoints.

Coding is a lot more fun than building areas.  At least, it’s less repetitive.

Scanning

Posted in Uncategorized on March 4, 2010 by sigmud

I haven’t posted for a while, but then again, I haven’t been doing a lot of coding recently.

I am working from TBAMud 3.56, and as you may see from the TBA homepage, the current code is on version 3.61.  I’ve done some fairly extensive changes to the code, and I haven’t been using version control (bad coder, BAD!), so updates aren’t exactly easy.

I was perusing the changelog recently and noticed that version 3.61 (or somewhere around there) had added a “scan” command.  Scan is a fairly ubiquitous mud command, and offers the ability for players to look around in adjacent rooms and see what mobs are there.

I didn’t like the old version, so I decided that I would change it.  Feel free to swipe.

Continue reading