Lachesis is an IRCRPG combat engine written in a combination of C and C++. The C portions will probably be redone in C++ as time permits. This effort is being undertaken primarily for Final Fantasy: Dragoon's Birth, which will be using it for automating battles. However, anyone who finds it useful is welcome to use it as is or adapt it to their needs; the software is available under the GNU General Public License.
Quick note here (man this page needs cleaning up): A new branch update patch is available. This adds a LOG COMMENT command (explicitly add an HTML comment to a log) and support for CSS stylesheets and colors. The default internal stylesheet is defined in config.h but you can specify an external stylesheet for your logs to invoke using --stylesheet. Also, a patch exists for adding features to the dice roller, including support for Maid RPG / TOON style dice rolls (using the new b6 modifier) and for returning the sum of the highest or lowest n rolls. A patch also exists to replace the current ISO rand()-based RNG with one based on the Mersenne Twister algoritm.
Project Deadness Report: If anyone has bothered to look at this page within the last few years, it should be painfully obvious that there has been no public activity for quite some time. My situation has left me busy enough that I have not done any serious development or planning work on Lachesis for quite some time, and I'm not prepared to promise a renewed effort either. But I would like to clarify the situation, and outline what someone could expect (especially if they were to contact and request something).
Firstly, the most recent version (last on the page) of the version 0.3 design goals still more or less reflects where I would like to go with the software. There is another not-quite-started project which might have a very significant impact on the direction of any further development, though, so I can't really say that if this project is renewed, how much it will resemble the current plans for 0.3.
Secondly, there has been bug-fix work. This is a program I personally use (in its RPGServ build) and over the course of this use I have run into bugs which I have addressed. It has been quite some time since I messed with the local CVS or checked my code in. What will most likely happen, given my lack of memory about the current state of the repository, is that my current working code will eventually be diffed against the 0.2.5 release to create a patch to publish. Some of these bugfixes are rather significant, such as a log module bug that causes the program to crash when a loggable comment contains a -, even if one is not actually logging. I promise no ETA on this, but if you use the program and need the fixes, sending an email may help ensure it actually happens in something approaching a timely manner.
Finally, if development beyond bugfixes ever resumes, most likely the CVS repository as it currently exists is not getting carried through. Whatever I end up using for version control in 0.3 will probably be started from scratch, because I just don't remember where I am with the current repository anymore. Not to mention this also removes any legacy concerns in picking a new version control system.
I'll just add as an additional note that I most likely won't end up doing any actual compliance verification on 0.1, but just leave it unavailable except by request. If I do ever put it up again, I'll probably include a patch against BotNet instead of BotNet itself. Also, the development journal being down is pretty much a permanent thing, I'm not sure I could even get the livejournal database going again if I did reinstall the software.
New: As the Lachesis source signing key is due to expire in a couple months, I've issued a new one and signed it with the old one. I'll replace the signatures for the tarballs when the old key is about to expire. You can get the new key here and a signature to verify it here. The new key ID is 7D3ED517.
As of the 0.2.4 release, tarballs are now cryptographically signed. I have performed a cursory visual review of the code for 0.2.4, and also have had no reason to suspect compromise. Nevertheless, keep in mind that this signature is not a solid guarantee that the code was never compromised, merely my best attempt to assure that it isn't. (Sorry if I'm being overly pessimistic/paranoid) The key ID is 4E322617, and can be found here or at keyserver.net.
Lachesis now has a development journal. (Note: journals are currently down due to site maintenance)
A minor feature adjustment is available. This adjustment is not significant enough to warrant a new version, but is being made available as a patch against 0.2.4. Only people who use the WROLL command should bother with this patch, as it directly addresses the matter of "botched" rolls from WROLL. Note that this patch is already included as of lachesis 20040116.
Some significant changes are being considered to take advantage of some
of the programming concepts I'm working with in class right now. ;)
In particular, since I'm implementing a lexical analyzer as part of an effort
to make a scripting language implementation, the primitive tokenizing functions
in the Lachesis API (Util_Separate, Util_SepTo, Util_Explode, and Util_Count)
may be dropped from the 0.3 release of the software (Util_Separate in
particular is due for an API change anyway, as the current interface is
awkward and leads to ugly code). Most likely I'll keep the 0.2.x interface
frozen at that of the 0.2.5 release unless it creates an unworkable problem
for an important bugfix.
Also likely for 0.3 is garbage collection. A good deal of code ugliness is a result of the need to keep track of dynamic buffers to free. And in some cases static buffers have made things worse (e.g. the awful use of nick, user, and host from a prefix, where the first two end up being copied from the buffer so they aren't clobbered. In actuality, you can get away with calling IRC_Hostmask{Nick,User,Host} in any order on the same prefix and the results from each will still be valid, but this is not guaranteed by the API and wasn't the case in version 0.1). So I'm planning to make a "Pointer" class that'll do some reference-counting tricks to make sure memory is freed when the last reference goes out of scope.
Finally, this means that 0.3 is no longer reserved for the "engine" branch of Lachesis. I haven't decided how the version numbering will go in the long run, but the noengine branch is going to have a 0.3 version release.
Update 2006/03/10: Well, I've had to keep this project on hold for a long time, but I've finally got some progress to report. A few minor fixes to the 0.2.x code have been implemented, including a feature to resume logs that were opened and never closed (due to disconnect), and supporting correct behavior under AUTO_RECONNECT. Once I have a chance to evaluate the changes and make sure things are working correctly, I'll put up another release.
Additionally, I've reconsidered what I'm trying to do here, and come to some decisions regarding how 0.3 ought to look. The biggest decision is that there will no longer be engine and noengine branches to Lachesis. The command module setup is clunky and difficult to deal with, and will only get more confusing with the addition of an engine which needs to be able to receive responses. Additionally, features that arguably ought to be relatively modular such as logging and dice rolls. have been placed in the core software and the engine, and add to a certain amount of code sprawl. Thus, I am going to be implementing a generic plugin API based on hooking messages. The engine will be a set of plugins provided with Lachesis, and as such will remain relatively easy to remove, while eliminating the need for separate codebases.
Several parts of the codebase will see rewriting and/or API changes. Most significantly, the IRC interface will be reimplemented as an instanceable class rather than a static part of the program. This will allow the bot to maintain more than one connection to the server, and thus the creation of RPGServs at request of a Lachesis user. This will most likely mean that the low-level interface will be reimplemented in C++ to simplify things.
Also, the codewise distinction between Lachesis and RPGServ will go away as support for RPGServ-in-Lachesis is implemented. Lachesis will instead have a command-line option for running as an RPGServ.
Garbage collection is still definitely on the table, but I'm looking at existing solutions before committing to designing my own.
The user database is definitely changing. Into what I don't know yet.
January 19th, 2004
Well, did some fixes and some cleanup, AUTO_RECONNECT is probably a
little closer to actually being usable, and the source has been placed into
a CVS repository. I'll look into adding anoncvs and/or CvsWeb access as I
have time. Meanwhile, since there has been some significant improvement, and
the project is generally stable these days anyway, I've decided to release
the snapshot at the time the project was imported to CVS. The main change
still pending for 0.2.5 is the RPGServ Single User mode, which has not been
implemented as of this snapshot.
March 17th, 2004
Finally had a chance to work on this again. A minor bug in
authentication/commands has been partly fixed; a more complete solution
should be available for the next release. And the Single User mode has
been implemented; you can now assign RPGServ instances to particular users
with the same userlist. Note that if you intend to run multiple instances
of RPGServ from the same directory, you should undefine STDERR_LOG_FILE
in config.h to avoid a conflict.
Note: Access to the version 0.1 source has been disabled pending verification of GPL section 2a compliance. These versions have only been retained for historical reference and are not intended for use. If I deem it necessary to make modifications to these versions to bring them into compliance, only the minimum necessary changes will be made.
Version 0.2 through 0.2.4 contain no outside code and are thus unaffected by this concern.