It’s not only alive, it’s even usable!

It’s a wonderful feeling to look at TableMaster running for the first time since I upgraded from Win98. The output is stuffed with diagnostics, of course, but it’s TableMaster output, just like it should be.

In the TableMaster manual, on page 5, there is the following table — the first sample table in the tutorial section:

.table Gem-Table
.roll <1d10>
1-3 Topaz
4-5 Garnet
6-7 Emerald
8-9 Ruby
10 Diamond

And here’s its output, from a run just before I started typing this:

Garnet
Topaz
Topaz
Topaz
Emerald
Ruby
Ruby
Ruby
Emerald
Topaz

That’s real TableMaster output, from a real run of that table; I just edited out the diagnostics that it’s still cluttered with (and will be for a while — it’s easier sometimes to just look at some print statements than step through it with the debugger).  So if you just wanted to copy off the tables you find in rulebooks, it can already do about 90% of that.

Of course, that’s not what TableMaster is about. It’s about being able to go far beyond anything you find in a book, which might be something like my generic gem table there. It’s about being able to roll up entire medieval towns, with the names of shopkeepers and their businesses, or fantasy taverns complete with menus and the innkeeper’s personal problems, or detailed post-apocalyptic settlements that would fit right in with the latest Mad Max or Star Wars, or newspaper headlines for a science fiction starport town. That’s coming. But even before that’s done, at least for me it’s really cool to have a running TableMaster again, after all these years.

By the way, why is it always gems? Well, that was what I started testing TableMaster with, back in the day, and I’ve just kind of kept it for consistency’s sake. As for why I first tested with gems, instead of, say, Chinese restaurant names (yes, I once wrote a table for that!), it’s because of a friend of mine. Waaaaaay back in the day, mid 80s or so, my friend Bill wrote a program he called Gemgen. All it did was roll up gems, sort of like this table (but, I believe, with values too; that’s coming). It was a big deal at the time (after all, there was nothing like TableMaster) and definitely impressed his friends, including me. It was just plain cool. So I had Gemgen in mind, I think, when I wrote that first gems table. And it’s been my standard test table ever since.

Now I’m looking at actual output, I’m thinking of some design questions. For example, the original line-length default was 80 characters, since that was the width of CRT screens and most printers. Should it still be? Should it be something else? Should there be an option in the UI to set the default, instead of having to set .WIDTH in every table? Any suggestions here?

6 thoughts on “It’s not only alive, it’s even usable!”

  1. I wouldn’t know what line width to use without some experimentation.

    I would say having a way to set the default in the settings part of the UI.

    Having it also honor the .WIDTH parameter in a table would be good, I would think.

    In other words, when it runs, check the table for a .WIDTH parameter and honor that. If .WIDTH does not exist, then use the default from the UI.

    Maybe have the in box setting in the UI be 80 characters?

    I would imagine that having a maximum possible setting in the UI would be a Good Thing.

    1. It’s definitely going to honor .WIDTH (in general, anything TableMaster did, it will still do, once I’m done with it — too many tables would break otherwise — except for .GRID, which was a hairball that nobody used anyway).

      I have a default width setting feature in the UI now (though it doesn’t actually work yet; it won’t until .WIDTH is put in). I’m going with 80 characters; since it’ll be persistent (saved in ini file) if someone doesn’t like that, they only have to change it once.

      I’ve been doing the formatting codes. I have all the plural ones in (except for checking to see if something should be ‘s’ or ‘es’), the space, and the + and \ escapes. (I’m thinking that I might just define anything after \ as itself, like \+ and \\). I also thought of a new one — provisionally called \t — that will add the appropriate “st”, “nd”, “rd”, or “th” to a number. So “The <1d10>\t door has a tiger behind it” will get 1st, 2nd, 3rd, 4th, etc., correct.

      I’m going to be working on this section for a couple of days. Its former incarnation was in many ways elegant, in some ways scary, and had at least one bug I never squashed. I want to be sure I get it right this time around.

  2. Also, I imagine that there is a way to put comments in the actual .tbl file itself.

    Like the colon (:) character for Microsoft command line batch files and the “” of xml files.

    If it’s not there, that would be handy.

    I know, “It’s not even released yet and you’re doing feature requests? What an asterisk!” 🙂

      1. Hah!

        Bug in the WordPress software! Yay!

        If you put an XML comment into the comment field, it won’t be displayed!

        1. Oh, joy. WordPress is broken. Well, I’ve got enough to do with TableMaster — not gonna try to fix WordPress. :p

          As for the comments: it’s in there.

          : denotes a comment, and if the first line in the file is a comment, then the UI will display it when you select that table, so you can use it to expand on your table name. For instance, you might have a table called “innstuff.tbl”, and the descriptive comment would be “: Things you might find in the dark corners of an inn” which would be displayed if you selected that table. That was particularly handy back in the olden times, when we didn’t have long filenames and you had to try to remember what some abbreviated name was. (And now I want to write that table!)

          Go all out with the feature requests! If they’re not something I already have in (or plan to add) this is still a good time to either put a feature in, or put in a hook to attach it to later. Though, in general, I’m not going to expand much on what the original TableMaster had — after I got it to the point of doing what it was supposed to do, I resisted efforts to get me to glue on other stuff “just because.” That’s what’s given us Microsoft Word, where the stuff you need is buried in misfeatures that one person in a million uses once a year. But if something makes sense — for instance, your comments made so much sense, I put them in 20 years ago! — this is a great time to tell me what I’m going to be coding next. :p

          I just tried to improve the text output system and broke it instead. 🙁 Not sure if I want to fix it or just revert.

Comments are closed.