Yearly Archives: 2010

Version 0.47 Editor Update

I’ve released an editor update today.  Changes are:

Object Editing

* Material type list is now sorted alphabetically.
* When editing object values, value labels change based on object type for about half of the object types.  This makes it easier to tell what values you’re editing.

Mob Editing

* Race name is now sorted alphabetically and duplicate entries have been removed.
* Class name is now sorted alphabetically and duplicate entries have been removed.

Room Editing

* Terrain types are now sorted alphabetically.

Repop Editing

* Value titles now change as the repop type changes so you know what you’re editing.

Map View

* Rooms not in the current zone are now shown on the map view in green.

You can get it here.

I’ve also added a download for Mac and Linux. The editor mostly works on those OSes, provided you have mono installed. The one known issue is that the color visualization on the editor windows does not work. The executable file is exactly the same, but instead of an installer it has a shell script to run the app. If that doesn’t work, you can always run it via a terminal window (go into the bin directory and run mono BasternaeEditor.exe).

More Zones Connected

I’ve converted and connected “The Cavern of the Worms” by Zaeru, “Fairlocke” by Lortar, and “The Elemental Plane of Air” by Lortar.  There are a few more zones that will be ready connect as soon as I can improve the zone converter to handle them.  Dang cobbled-together thing chokes for the silliest of reasons.

More Spells Are Working Now

25 more spells are working today, mostly defensive beneficial sorcerer and cleric spells like ‘fly’, ‘invisibility’, and ‘protection from fire’.  There are quite a lot more to work on, but it’s good progress.

What MUDs Have The Best AI?

Most MUDs have mobiles of very limited intelligence that stand around waiting to be killed and often don’t even bother to remember that you attacked them ten seconds ago.  Some games have more intelligent creatures that actively try to defend themselves and take down the enemy by the most effective means (always fireballing trolls, dispelling undead opponents, etc.)  What MUDs have you played with more advanced/detailed mob AI?  What was it like?

Sure, there are the obvious ones from the Basternae ancestry, but I’m looking for the ‘best of breed’ so I have a standard to measure against.

Offensive Spells

I finished up more of the new spell engine and damage spells can be used now.  I’ve only tested magic missile so far, but it worked beautifully. 😛

Changes to Affect Modifiers

Handling a skill or spell with multiple modifiers in code has always been a bit of a nuisance.  I changed that around a bit so that they work they way I want them to.

So, here’s what adding three effects looked like in code beforehand:

Affect af = new Affect( Affect.AffectType.spell, spell.Name, 12 + level / 4, Affect.Apply.intelligence, 3, Affect.AFFECT_NONE );
victim.AddAffect(af);
af.ApplyType = Affect.Apply.constitution;
af.Amount = 8;
victim.AddAffect(af);
af.ApplyType = Affect.Apply.dexterity;
af.Amount = -5;
victim.AddAffect(af);

You’ll notice that the target has 3 separate affects added just for one spell.  That’s because each affect could only handle a single modifier.

After making the modifiers into a list that can have a variable length, here’s what the same code looks like:

Affect af = new Affect( Affect.AffectType.spell, spell.Name, 12 + level / 4, Affect.Apply.intelligence, 3, Affect.AFFECT_NONE );
af.AddModifier( Affect.Apply.constitution, 8 );
af.AddModifier( Affect.Apply.dexterity, -5 );
victim.AddAffect(af);

Now it takes half as many lines of code to do the same thing and looks a lot cleaner.  The codebase also shrunk by about 300 lines of code in the process.

This also means that some spells or skills that used to show up multiple times on the score screen will only show up once.

The Spell Engine

I finally got the spell ‘plugin’ system to work as intended for the first externally-coded spell.

Each spell is stored in an XML file outside the MUD engine, i.e “Fireball.xml”.  The file has a bunch of settings for the spell like casting time, target type, modifers, etc.  It also has an optional code section for more complex spells.

Yesterday I got the simple case working, that of a single-effect spell with no custom code like detect magic.  It just sets the ‘can detect magic’ ability on the target for a number of game hours.

Today I got the more complex case working — that of a spell that uses compiled custom code.  The example spell is ‘minor creation’.  It has a lot of custom code to process keywords and select predefined objects based on those.

The code I put together a year ago almost half-worked.  It could load the spell code from the file and compile it, but when it came time to execute it failed.  Turns out that most of the issue was how namespaces were being referenced and how types were being created — lots of detailed C# reflection stuff.

Now that I’ve worked that out there are no more roadblocks to ‘modernizing’ spells.  Sure, only 2 are converted so far and there are 419 to go, but now that the groundwork is in place it shouldn’t be too difficult.

So far this is only on my local machine – not up on the server yet, but will be within a day or two.

Affect Removal Is Fixed

Looks like I sorted out that nasty little affect removal bug, so onto the next…

With this and the previous fix, now would be a great time to sign on and start testing the heck out of things.  After all, you don’t want me to run out of work to do, do you?  😛

Picking Up Items Bug Fixed

It looks like there was a nasty bug in the zone converter for two of the three format types that we convert that caused the “wear flags” to be mapped into the “extra 2” flags.  The wearable flags include the “carryable” flag, so with those being broken, that’s why things could not be picked up in most (but not all) zones.

A New Version of the Zone Editor (0.46)

I spent some time on the zone editor today. Here’s a list of changes and fixes:

  • Justice type is now selectable on the zone settings screen.
  • In walkthrough mode, the ‘help’ and ‘commands’ commands now show a list of the available commands.
  • Various minor text and appearance improvements, including adding a program icon.
  • Added the ability to edit object values so you can actually set things like weapon damage amount or armor factor.
  • Fixed a nasty bug in editing repops that would cause data corruption.
  • Added the old Basternae 2 zone guides to the help file.
  • Fixed a very nasty circular reference bug that would prevent a zone from saving in certain cases.

Repop editing is still pretty cryptic, but at least changes show up in the repop’s description in real time now.

The really confusing thing at the moment is editing object values. In DikuEdit, the values would change description when the object type changed so you could see what you were editing. The new editor does not do that yet, so you either have to already know what you’re doing or you have to guess, neither one of which could be much fun, so that’s going to be something fairly high up on the to-do list for future changes.

You can get the new version HERE.

Checking Process Status With PHP

I am not a PHP programmer. I do not know PHP. That doesn’t mean I can’t use it. Here’s a snippet I threw together to check whether the MUD process is running:


$cmd = "ps u -C 'mono Basternae.exe'";
exec($cmd, $output, $result);
if( count($output) >= 2 )
{
  Print $output[0];
  Print $output[1];
}
else
{
  print "Basternae 3 is not currently running.";
}

You can try it here: http://basternae.org/status.php

A Bunch of Little Fixes

I had a chance to tinker with the code today. I made a bunch of relatively minor fixes (code-wise). Here’s the list:

– Fixed game menu consistency so same one appears every time.
– Some minor text changes and/or typo fixes.
– Made the help editor a little easier to use and added a ‘delete entry’ button.
– Made the MUD screen editor a little easier to use.
– Fixed the immortal ‘slay’ command.
– Fixed the immortal ‘load object’ command.
– Fixed the ‘history’ and ‘!’ commands, the latter of which would instantly crash the MUD when used.
– Improved the issue system and added the ability for immortals to create issues.
– Some help entry additions and improvements.

There are two major bugs right now that will take some digging to fix properly: Items can’t be picked up, and spell/skill effects never seem to wear off.

Even though there’s still quite a lot of work to do before the codebase conversion could be considered ‘complete’, it’s becoming a bit more fun to work on.

A Linux Build of the Client

I have no clue how to build a .deb or .rpm package yet, so it’s just a .zip for now.

Though I have it working on my own Ubuntu 9 machine, I haven’t the faintest idea whether the client will run on other Linux boxen. At the very least, you’ll probably need to have the wxWidgets 2.8 libraries installed to run the client on Linux. I suppose at some point I’ll figure out how to build installer packages.

Version 0.14 of the client for Linux is now available for download. Hopefully there’s someone who can try it and let me know the result. In this case, it’ll probably be “I had to add libraries X and Y and Z before it would run”. Then again, since wxWidgets is so widely used on Linux (VLC, Audacity, etc), chances are good that most people will already have the necessary pieces installed.

Initial Mac Version of the Client

I fixed the “can’t send text” problem in the client for the Mac and Linux versions.  There are still some text problems that only show up in non-Windows versions, but I was able to log in and play for a bit without much trouble.

Though I have it working on my own machine, I haven’t the faintest idea whether the client will run on other Macs.  I’ve created an application bundle and compiled it in a way that it should supposedly run on OSX 10.5 and 10.6, but I only have 10.6, so no idea whether it will work.  And, since my machine is set up as a developer machine I have no idea whether a “normal” user’s machine will have all the libraries it needs.  That’s the trouble with being a Mac “noob”.

Version 0.14 of the client for Mac is now available for download.  Hopefully there’s someone who can try it and let me know the result.

Another Client Update

I tracked down a nasty threading problem in the status window that would explode things horribly at random intervals. Version 0.14 of the client is now available.  That’s not to say there isn’t the possibility of other horrible explosions lying around just waiting to leap out… so let me know if you find any.

A Minor Client Update

Version 0.13 of the client is now available.  Cleaned up one or two things with text processing and added command scrollback (where you can push the up arrow to retrieve previous commands).  As always, let me know of any glitches you find.

Zone Permissions Received From Gharl

Gharl was nice enough to grant permission to use his zones on Basternae 3.  This includes “The Church of Eternal Dusk”, “The Motte and Bailey of Duke Delwyn”, and “Zalkapfaan, City of the Headless”.   Thank you, sir.  Forward progress!

It Runs On MacOS

I recently acquired a MacBook to expand the multi-platform development repertoire.  One thing that surprised me is that the Basternae server executable runs unmodified on OSX (Snow Leopard) with Mono installed.  This shouldn’t have been too surprising since the server currently runs on Ubuntu Linux, but it was still pretty cool to just type ‘mono Basternae.exe’ and have it run without errors.  There’s quite close to zero chance that it’ll ever be set up on a Mac server, so this was just an interesting experiment more than anything.

You’ll probably notice that there hasn’t been much development on Basternae in the past month or so.  I’m spending the vast majority of time working on software for Zeta Centauri, so until that is a definite success or failure (I think June 2010 will be when I know), B3 will be fairly low-priority.  I doubt work will stop, but time available will be at a minimum.