Prior to this commit, I experienced the following use case:
Given I have the following code:
```emacs-lisp
(require 'rpgdm-dice "~/git/emacs-rpgdm/rpgdm-dice.el")
(require 'rpgdm-tables "~/git/emacs-rpgdm/rpgdm-tables.el")
(require 'rpgdm-tables-dice "~/git/emacs-rpgdm/rpgdm-tables-dice.el")
(require 'rpgdm-tables-freq "~/git/emacs-rpgdm/rpgdm-tables-freq.el")
(setq rpgdm-base "~/git/emacs-rpgdm/")
```
And I call `rpgdm-tables-load`
And load all the tables.
When I then call `rpgdm-tables-choose`
Then I get the following error:
```
let*: Symbol’s function definition is void: rpgdm-message
```
With this commit I'm able to skip requiring `rpgdm` and thus only use a
segment of the `rpgdm` package ecosystem.
When requiring `rpgdm.el` and it's "child" packages, I encounter the
following warnings:
> Warning: ‘destructuring-bind’ is an obsolete alias (as of 27.1); use
> ‘cl-destructuring-bind’ instead.
>
> Warning: ‘incf’ is an obsolete alias (as of 27.1); use ‘cl-incf’
> instead.
>
> Warning: ‘decf’ is an obsolete alias (as of 27.1); use ‘cl-decf’
> instead.
>
> Warning: ‘defstruct’ is an obsolete alias (as of 27.1); use
> ‘cl-defstruct’ instead.
Since we've already required the `cl` package, this should be a noop change.
If an entry in a table references <<another/table>>, that reference is
replaced with a call to that other table. This allows building complex responses.
At least, from this historical record as preserved by git, it is.
In reality, this project represents a year of off-and-on development
in another git repository, and has been converted and reformatted
for (potentially) public consumption.
Particularly lacking is the Tables and other charts that make this
useful, but I need to make sure I don't violate any copyright laws, as
many of my tables were copy/pasted from digital books I own.
Which really make demoing this "product" difficult.
While I was at it, I split my "taverns" document into a number of real
tables that I could pull up.
And changing the hotkey to F12 so that it is easier to access on the
laptop.
Oh, and let's have the displayed message contain a little more details
so that when we jump backwards through the history, we understand more
what we are seeing.
Because loading the tables is now getting time and space prohibited, we
are now just storing the the name of the table and the filename ... at
first. Then once we ask for a chart, we fetch the chart and choose some
results.
Loading the tables is now not a cost issue ... and Emacs more stable.
I realized that a DM Screen isn't really what I want. If I want
information about a particular rule or the magic school, then I want it
to pop up, and then go away.
A dice table is a direct translation of a gaming table from a book,
where the table has a stated dice expression, and each entry has a
numeric range. Most tables can now be taken as is from published
sources.
Also, if a message from a randomly rolled table contains a dice
expression, like Found 2d8 scrolls, the expression is automatically
substituted.
Finally if a message contains something like:
You found a [wolf/fox/badger].
The displayed message will only include on of those entries.
Some of these tables are getting complicated, so I have created three
different tables, and this should be sufficient.
Describing it, however, seems to be a lot for source code, and I thought
I would describe it using a literate programming style. We'll see.
I have a semblance of code giving me functions to help me run my D&D
games. The README needs a lot more love, but the code is generally tidy.
Time to add some tables...