# Lacking Natural Simplicity

Random musings on books, code, and tabletop games.

## Star Wars D6 1st Edition Odds of Hitting a Target Number

After posting about the odds in Mini Six (MS1, MS2) of hitting a Target Number, I thought I should do the same for Star Wars: the Roleplaying Game, 1st Edition, the original Star Wars roleplaying game, from West End Games. It does NOT use the Wild Die; that was introduced in the 2nd Edition and is also used in OpenD6.

The Anydice.com code is very simple:

loop N over {1..12} {
output Nd6 named "[N]D"
}


Remember to click “At Least” to get the right results!

Star Wars D6 1st Edition does NOT use the Wild Die!

The multiple 100s from 6D onward are, after the first, not actually 100s, but 99.x where x is small enough it rounds up to 100.00 when shown with two digits of precision.

The 0.00s that appear from 6D onwards are not 0.00, but numbers so small that they appear as 0.00 when expressed with two digits of precision.

Star Wars D6 1st Edition Odds of Hitting a Target Number

1D

2D

3D

4D

5D

6D

7D

8D

9D

10D

11D

12D

1

100.00

2

83.33

100.00

3

66.67

97.22

100.00

4

50.00

91.67

99.54

100.00

5

33.33

83.33

98.15

99.92

100.00

6

16.67

72.22

95.37

99.61

99.99

100.00

7

58.33

90.74

98.84

99.92

100.00

100.00

8

41.67

83.80

97.30

99.73

99.98

100.00

100.00

9

27.78

74.07

94.60

99.28

99.94

100.00

100.00

100.00

10

16.67

62.50

90.28

98.38

99.82

99.99

100.00

100.00

100.00

11

8.33

50.00

84.10

96.76

99.55

99.96

100.00

100.00

100.00

100.00

12

2.78

37.50

76.08

94.12

99.01

99.88

99.99

100.00

100.00

100.00

100.00

13

25.93

66.44

90.20

98.03

99.72

99.97

100.00

100.00

100.00

100.00

14

16.20

55.63

84.80

96.41

99.39

99.92

99.99

100.00

100.00

100.00

15

9.26

44.37

77.85

93.92

98.79

99.82

99.98

100.00

100.00

100.00

16

4.63

33.56

69.48

90.35

97.79

99.62

99.95

100.00

100.00

100.00

17

1.85

23.92

60.03

85.54

96.21

99.26

99.89

99.99

100.00

100.00

18

0.46

15.90

50.00

79.42

93.88

98.63

99.76

99.97

100.00

100.00

19

9.72

39.97

72.06

90.61

97.63

99.54

99.93

99.99

100.00

20

5.40

30.52

63.69

86.28

96.11

99.15

99.85

99.98

100.00

21

2.70

22.15

54.64

80.83

93.93

98.51

99.71

99.95

99.99

22

1.16

15.20

45.36

74.28

90.93

97.53

99.47

99.91

99.99

23

0.39

9.80

36.31

66.78

87.02

96.08

99.06

99.82

99.97

24

0.08

5.88

27.94

58.58

82.11

94.04

98.43

99.66

99.94

25

3.24

20.58

50.00

76.23

91.29

97.48

99.41

99.89

26

1.62

14.46

41.42

69.46

87.72

96.10

99.00

99.79

27

0.72

9.65

33.22

61.98

83.28

94.20

98.37

99.63

28

0.27

6.08

25.72

54.05

77.96

91.66

97.46

99.36

29

0.08

3.59

19.17

45.95

71.81

88.40

96.15

98.95

30

0.01

1.97

13.72

38.02

64.96

84.35

94.38

98.34

31

0.99

9.39

30.54

57.61

79.50

92.03

97.46

32

0.45

6.12

23.77

50.00

73.89

89.03

96.23

33

0.18

3.79

17.89

42.39

67.60

85.33

94.57

34

0.06

2.21

12.98

35.04

60.79

80.90

92.40

35

0.02

1.21

9.07

28.19

53.63

75.76

89.64

36

0.00

0.61

6.07

22.04

46.37

69.96

86.24

37

0.28

3.89

16.72

39.21

63.63

82.17

38

0.12

2.37

12.28

32.40

56.92

77.44

39

0.04

1.37

8.71

26.11

50.00

72.08

40

0.01

0.74

5.96

20.50

43.08

66.19

41

0.00

0.38

3.92

15.65

36.37

59.89

42

0.00

0.18

2.47

11.60

30.04

53.33

43

0.08

1.49

8.34

24.24

46.67

44

0.03

0.85

5.80

19.10

40.11

45

0.01

0.46

3.90

14.67

33.81

46

0.00

0.24

2.52

10.97

27.92

47

0.00

0.11

1.57

7.97

22.56

48

0.00

0.05

0.94

5.62

17.83

49

0.02

0.53

3.85

13.76

50

0.01

0.29

2.54

10.36

51

0.00

0.15

1.63

7.60

52

0.00

0.07

1.00

5.43

53

0.00

0.03

0.59

3.77

54

0.00

0.01

0.34

2.54

55

0.00

0.18

1.66

56

0.00

0.09

1.05

57

0.00

0.05

0.64

58

0.00

0.02

0.37

59

0.00

0.01

0.21

60

0.00

0.00

0.11

61

0.00

0.06

62

0.00

0.03

63

0.00

0.01

64

0.00

0.01

65

0.00

0.00

66

0.00

0.00

67

0.00

68

0.00

69

0.00

70

0.00

71

0.00

72

0.00

Here's the Open Office spreadsheet, here's the PDF, and here's the raw data from Anydice in CSV format. (I saw the “Export” option, finally.) You can always look at the ReStructuredText source of this page if you want the table in ReStructuredText format — there should be link named "Source" at the beginning of this post if you are visiting the article page (not the index page for the whole blog) what will let you download it.

Perhaps more immediately understandable is this screenshot of the the results in graph mode:

(Right-clicking the image might give you the option to open the image in a new tab, where you'll see it at full size.)

Last edited: 2021-05-10 14:46:56 EDT

## OpenD6: The Mathematical Mean

Another concept that I've found useful for preparing for Star Wars: The Roleplaying Game, OpenD6 or Mini Six (MS1, MS2) games is “The Mathematical Mean”, which I first saw at The OpenD6 Project. I'll quote it here for reference.

## The Mathematical Mean

In the standard rules, traits are rated by whole and partial increments of six-sided dice. A whole die increment is written as “1D”, where the integer denotes a number of dice to be rolled and totaled. Partial die increments are written as “1D+1”, where the primary identity denotes a number of dice to be rolled and totaled, and the secondary identity denotes an absolute value to be added to the sum total.

Conflict resolution in OpenD6 is based on a standardized difficulty scale that is adjusted for the mathematical mean of a given trait score.

On this difficulty scale, a “Moderate” difficulty is defined as a number approximating the mean roll of a trait score totaling between 3D and 4D, so that the sum total of a trait roll will equal or exceed the difficulty on approximately 50% of a given set of iterations. Difficulties are then derived mathematically in multiples of 3.5, where the corresponding descriptive value is derived in multiples of 5. Each die code corresponds to a difficulty computed using a fixed value equal to 3.5x the whole die increment, and adding the partial die increments (pips) to the sum total.

The purpose of defining a “Moderate” difficulty with this range of values is to approximate a 50% success ratio for the most common trait totals assigned to protagonists and antagonists within the system, as well as to provide an increasing success ratio to higher trait totals. The 50% success ratio can be adjusted along a sliding scale to correspond to higher trait totals.

The purpose of providing descriptive values for each numerical value allows difficulties to be evaluated quickly relative to a baseline trait score of 3D.

Standardized Difficulty Table

Description

Difficulty

Die Code

Mean Result

Very Easy

1

1

1

2

2

2

3

4

1D

3.5

5

1D+1

4.5

Easy

6

1D+2

5.5

7

2D

7

8

2D+1

8

9

2D+2

9

10

Moderate

11

3D

10.5

12

3D+1

11.5

13

3D+2

12.5

14

4D

14

15

4D+1

15

Difficult

16

4D+2

16

17

18

5D

17.5

19

5D+1

18.5

20

5D+2

19.5

Very Difficult

21

6D

21

22

6D+1

22

23

6D+2

23

24

25

7D

24

Heroic

26

7D+1

25.5

27

7D+2

26.5

28

8D

28

29

8D+1

29

30

8D+2

30

Here is a PDF with a nicely formatted version of these tables (5½×8½ inches, suitable for adding to a booklet, or printing two up on on 8½x11 inch Letter paper) , and the ConTeXt source. You can always look at the ReStructuredText source of this page if you want the table in ReStructuredText format - there should be link named "Source" at the beginning of this post if you are visiting the article page (not the index page for the whole blog) what will let you download it.

By the way, does anybody know where this originates?

Last edited: 2021-05-10 18:56:44 EDT

## D6 System: The Universal Standard and Standard Difficulties

When I'm preparing for a session using any of the D6 System RPGs (Star Wars: The Roleplaying Game, OpenD6, Mini Six (MS1, MS2) or any of the many others) I like to use the following two charts to set the difficulties for tasks.

The Universal Standard

Die Code

Average Roll

Description

1D

3.5

Below Human average for an attribute.

2D

7.0

Human average for an attribute and many skills.

3D

10.5

Average level of training for a Human.

4D

14.0

Professional level of training for a Human.

5D

17.5

Above average expertise.

6D

21.0

Considered about the best in a city or geographic area. 1 in 100,000 people will have training to this skill level.

7D

24.5

Among the best on the continent. About 1 in 10,000,000 people will have training to this skill level.

8D

28.0

Among the best on a planet. About 1 in 100,000,000 people will have training to this skill level.

9D

31.5

One of the best of several systems in the immediate area. About 1 in a billion people have a skill at this level.

10D

35.0

One of the best in a sector.

11D

38.5

12D

42.0

One of the best in a region.

13D

45.5

14D+

49.0

Among the best in the galaxy.

Note: The wild die adds 0.7 to the average result.

Standard Difficulties

Difficulty

Target #

Description

Very Easy

2−5

Nearly everyone can do it. These checks should only be made if a success is critical to the scenario at hand.

Easy

6−10

Player characters will seldom have trouble with these tasks, but an untrained individual may find them challenging.

Moderate

11−15

Average Characters have a reasonable chance of failing at this level. Consistent success often requires training in the skill or a high level of natural ability.

Difficult

16−20

Tasks at this level are truly challenging. To succeed, a character needs to be well skilled or very lucky.

Very Difficult

21−30

Challenges of this level fall into the domain of masters in the skill being used; few others will succeed at them.

Heroic

31+

These challenges are almost impossible. Only the very lucky or true masters can consistently succeed at them.

Here is a PDF with a nicely formatted version of these tables (5½×8½ inches, suitable for adding to a booklet, or printing two up on on 8½x11 inch Letter paper) , and the ConTeXt source. You can always look at the ReStructuredText source of this page if you want the table in ReStructuredText format - there should be link named "Source" at the beginning of this post if you are visiting the article page (not the index page for the whole blog) what will let you download it.

## Mini Six Odds of Hitting a Target Number

I couldn't find anywhere on the net showing the percentage chance of hitting a target number using the Mini Six Wild Die, which just explodes on a 6, unlike the OpenD6 Wild Die, which explodes on a 6, but if a 1 is rolled on the initial roll it instead either removes the highest die rolled or causes a complication, depending on what the GM wants.

I much prefer the Mini Six Wild Die.

So I went off to Anydice.com and came up with the following code:

output [explode d6] named "1M"
loop N over {1..11} {
X: N+1
output [explode d6] + Nd6 named "[X]M"
}


Remember to click “At Least” to get the right results!

(Anydice defaults to only exploding twice, BTW.)

(I later found the “Export”, so I've updated the spreadsheet using that data.)

The Mini Six Wild Die explodes on a 6; unlike the OpenD6 Wild Die a 1 is NOT special.

The blank cells at Target Numbers 6 and 12 are because you can’t roll a 6 or a 12, since those explode again. Not sure why 18 isn’t blank.

The multiple 100s from 6D onward are, after the first, not actually 100s, but 99.x where x is small enough it rounds up to 100.00 when shown with two digits of precision.

The 0.00s that appear from 6D onwards are not 0.00, but numbers so small that they appear as 0.00 when expressed with two digits of precision.

11D and 12D actually extend down several more rows, but to fit everything on one page and since they only show up as 0.00 I’ve omitted that data. (It is in the raw data from Anydice, below.)

Mini Six Odds of Hitting a Target Number

1D

2D

3D

4D

5D

6D

7D

8D

9D

10D

11D

12D

1

100.00

2

83.33

100.00

3

66.67

97.22

100.00

4

50.00

91.67

99.54

100.00

5

33.33

83.33

98.15

99.92

100.00

6

72.22

95.37

99.61

99.99

100.00

7

16.67

58.33

90.74

98.84

99.92

100.00

100.00

8

13.89

44.44

83.80

97.30

99.73

99.98

100.00

100.00

9

11.11

32.87

74.54

94.60

99.28

99.94

100.00

100.00

100.00

10

8.33

23.61

63.81

90.35

98.38

99.82

99.99

100.00

100.00

100.00

11

5.56

16.67

52.47

84.40

96.77

99.55

99.96

100.00

100.00

100.00

100.00

12

12.04

41.36

76.79

94.19

99.01

99.88

99.99

100.00

100.00

100.00

100.00

13

2.78

9.72

31.33

67.79

90.38

98.04

99.72

99.97

100.00

100.00

100.00

100.00

14

2.31

7.41

23.23

57.88

85.20

96.45

99.39

99.92

99.99

100.00

100.00

100.00

15

1.85

5.48

17.05

47.79

78.64

94.03

98.80

99.82

99.98

100.00

100.00

100.00

16

1.39

3.94

12.49

38.21

70.83

90.59

97.82

99.62

99.95

100.00

100.00

100.00

17

0.93

2.78

9.21

29.65

62.14

86.00

96.28

99.26

99.89

99.99

100.00

100.00

18

0.46

2.01

6.89

22.44

53.02

80.23

94.02

98.65

99.77

99.97

100.00

100.00

19

1.62

5.22

16.70

43.96

73.37

90.89

97.67

99.54

99.93

99.99

100.00

20

1.16

3.87

12.35

35.45

65.63

86.78

96.20

99.16

99.85

99.98

100.00

21

0.77

2.83

9.12

27.86

57.34

81.64

94.10

98.54

99.71

99.96

99.99

22

0.46

2.04

6.75

21.41

48.88

75.53

91.24

97.58

99.47

99.91

99.99

23

0.23

1.47

5.01

16.17

40.64

68.57

87.52

96.19

99.08

99.82

99.97

24

0.08

1.04

3.72

12.06

32.98

61.01

82.91

94.23

98.46

99.67

99.94

25

0.72

2.75

8.94

26.15

53.14

77.41

91.61

97.54

99.42

99.89

26

0.45

2.00

6.62

20.31

45.27

71.11

88.23

96.22

99.02

99.79

27

0.26

1.43

4.89

15.51

37.72

64.19

84.05

94.40

98.41

99.63

28

0.13

1.00

3.61

11.68

30.74

56.87

79.06

91.98

97.53

99.38

29

0.05

0.68

2.65

8.71

24.55

49.41

73.34

88.89

96.28

98.98

30

0.01

0.44

1.93

6.46

19.22

42.07

66.98

85.09

94.58

98.39

31

0.27

1.38

4.77

14.81

35.11

60.18

80.55

92.35

97.54

32

0.15

0.97

3.51

11.24

28.72

53.13

75.31

89.52

96.36

33

0.08

0.66

2.57

8.44

23.05

46.06

69.46

86.04

94.78

34

0.03

0.44

1.87

6.29

18.17

39.20

63.13

81.88

92.72

35

0.01

0.27

1.34

4.65

14.09

32.75

56.48

77.07

90.11

36

0.00

0.16

0.94

3.42

10.78

26.87

49.72

71.67

86.91

37

0.09

0.65

2.50

8.14

21.65

43.03

65.77

83.09

38

0.05

0.43

1.81

6.09

17.16

36.61

59.52

78.66

39

0.02

0.28

1.30

4.52

13.39

30.62

53.07

73.66

40

0.01

0.17

0.92

3.33

10.30

25.17

46.60

68.16

41

0.00

0.10

0.63

2.43

7.82

20.35

40.27

62.28

42

0.00

0.05

0.43

1.76

5.88

16.20

34.25

56.15

43

0.03

0.28

1.26

4.38

12.70

28.66

49.91

44

0.01

0.18

0.89

3.23

9.82

23.61

43.73

45

0.01

0.11

0.62

2.37

7.50

19.14

37.74

46

0.00

0.06

0.42

1.72

5.66

15.29

32.09

47

0.00

0.03

0.28

1.23

4.23

12.04

26.87

48

0.00

0.02

0.18

0.88

3.14

9.35

22.16

49

0.01

0.11

0.61

2.30

7.18

18.02

50

0.00

0.07

0.42

1.67

5.44

14.43

51

0.00

0.04

0.28

1.20

4.08

11.41

52

0.00

0.02

0.18

0.86

3.03

8.90

53

0.00

0.01

0.12

0.60

2.23

6.85

54

0.00

0.00

0.07

0.41

1.63

5.22

55

0.00

0.04

0.28

1.18

3.93

56

0.00

0.02

0.19

0.84

2.93

57

0.00

0.01

0.12

0.59

2.17

58

0.00

0.01

0.08

0.41

1.58

59

0.00

0.00

0.05

0.28

1.15

60

0.00

0.00

0.03

0.19

0.82

61

0.00

0.02

0.12

0.58

62

0.00

0.01

0.08

0.40

63

0.00

0.00

0.05

0.28

64

0.00

0.00

0.03

0.19

65

0.00

0.00

0.02

0.12

66

0.00

0.00

0.01

0.08

67

0.00

0.01

0.05

68

0.00

0.00

0.03

69

0.00

0.00

0.02

70

0.00

0.00

0.01

71

0.00

0.00

0.01

72

0.00

0.00

0.00

Here's the Open Office spreadsheet, here's the PDF, and here's the raw data from Anydice in CSV format. You can always look at the ReStructuredText source of this page if you want the table in ReStructuredText format — there should be link named "Source" at the beginning of this post if you are visiting the article page (not the index page for the whole blog) what will let you download it.

Perhaps more immediately understandable is this screenshot of the the results in graph mode:

(Right-clicking the image might give you the option to open the image in a new tab, where you'll see it at full size.)

Last edited: 2021-05-10 14:29:31 EDT

## MIME and Gmail vs other mailers

I composed a carefully constructed MIME message using Mew, which has a nice way to build MIME messages, but Gmail doesn’t know that if you have a multipart MIME message that has a text part, then an image, then a text part, then an image, then a text part then what you want is for the image parts to be displayed inline. In messages like that composed in Gmail, it uses the content type of multipart/related, which then encloses a multipart/alternative, which has a plain text version of the message and an HTML version, which refers to the images with an img tag that has an id that refers to the id in a Content-ID MIME header in following parts of the multipart-related MIME part that is the main body of the email.

I don’t know why Gmail doesn’t display the simpler multipart/mixed messages correctly.

It is very annoying. I don’t mind them using the multipart/related (which I didn’t even know about before looking at one of their messages using wl-summary-reedit in Wanderlust, which pulls it up in the mime-edit-mode MIME composition mode 1, which revealed all the details), but I wish they’d get the simpler multipart/mixed version right. Instead, they don’t display the inline attachments (regardless of whether they are images or text) and put them all at the end of the display as attachments, and display the other text parts smushed together.

Interestingly, if a text part it has a Content-Type: Text/Plain MIME header field it is displayed inline in Gmail, unless it has a

Content-Disposition: inline; filename="JRandomFilename.txt"


MIME header field, and then it doesn’t display it inline, unlike all the other mail reading I tried: Wanderlust, Mew, Alpine, Thunderbird (had to have a pure GUI client for comparison), and mutt.

Interestingly, Wanderlust displays Gmail’s multipart/related messages correctly, which impressed me.

I originally I thought that Mew did not display the multipart/related message correctly, punting to just displaying original MIME-encoded text instead, and not displaying the image parts.

I was wrong about that; I was just confused by its presentation. First it displays the text version of the enclosed multipart/alternative, which is what made me think it didn’t display the image parts; it just hasn't yet! Then if I hit space, it displays the first of the images, and then if I hit space it displays the second of the images.

And you can make Mew display the HTML part, but it doesn’t know how the <img id=“foo”> elements work, so it doesn’t display the images.

I was pleased to see that the Wanderlust (WGH) and Mew (MGH) github repositories both have recent commits.

And Wanderlust and Mew are both in MELPA these days, although Mew’s MELPA package doesn’t include the command line program, incm, that is used to pull emails from /var/mail into MH style files under ~/Mail. Wanderlust and Mew both use MH style files under ~/Mail as their local message store. MH puts subdirectories there for folders, and in each folder the messages are named with integers that correspond to the order in which they were incorporated from whatever mail source you were using (historically /var/mail). MH used command line programs to incorporate mail, list mail messages, display mail messages, and file it into folders. I rather liked it. I used nmh (the New MH, a new implementation of the original Rand MH commands, which ran on newer Unixes) and GNU mailutils (which provided MH-compatible command line programs, if not configured out), sometimes during the same period of time, for a considerable time. At one time, when I was getting mail at a server I had online, I was using nmh, GNU mailutils, Emacs’s built-in interface to MH (MH-E), Wanderlust, and Mew. (Before that I used ViewMail, and before that I used RMAIL) They each had features the other lacked.

I tried using Unison to sync that mail between my server online and my computer at home, but that did not work well, since MH commands change the names of files when they move them from one folder to another (remember, each message in a folder gets a name that is an integer based on the order in which it was incorporated in that folder, and its folder command provided an option, -pack, that renamed all the messages in a folder sequentially, used after you’d deleted messages) so you couldn’t keep track if the message named 32 in one folder on one machine was a new one or just renamed from 976 when you ran folder -pack last. Syncing with Unison just did not work at all. Hmm. I could have changed the Path option in my .mh-profile file on each machine, so that instead of all the MH mail being under ~/Mail on both machines, on my home machine it could have been under ~/Mail-home and on tkb.mpl.com it could have been under ~/Mail-onlineserver, and then I could have used rsync to copy those from one machine to the other appropriately so I’d have a backup. Huh. Wish I’d figured that out back in the day. Of course, to read email in ~/Mail-home on my online server I’d have had to changed the Path option in my ~/.mh_profile on that machine, and then changed it back when I wanted to use ~/Mail-onlineserver. It would have worked, however.

Completion made me go look at the MIME messages I was testing in MH-E. In the multipart/mixed message MH-E does not show the PNG files inline, though emacs has the capability to do that now. It does have keybindings to open an external viewer for you. If you specify the macOS command open it will open it in whatever app is the default for macOS; in the case of PNGs that is Preview.

I do most of my email reading and sending in Gmail these days, alas. I still use Wanderlust and Mew occasionally, since they support IMAP very well. Now if only Google didn't make it harder to use them: Gmail declares IMAP-over-SSL is a “less secure” application, and turns IMAP access off if you don't use it regularly.

1

This is provided by SEMI, an Emacs Lisp package, and it has a GitHub repo (SEMIGH), last commit 27 days ago as of the time of this writing.

## Cobol and Fortran

I know Cobol, and have written it for work, but not for a long time, maybe 30 years? No, I lie, I did some a decade or two ago. It was not my favorite programming language, but knowing it helped pay the bills. At my college in the mid-80s it was taught by the Business department rather than the Computer Science department!

One of my Cobol jobs was porting code from the IBM mainframes to VMS on a Digital Equipment Corporation mini-computer, the VAX. A more recent one was fixing bugs and making enhancements to some student management software at a nearby college.

What little Fortran I've written was in the ratfor (Rational Fortran) dialect, on VMS, using the Software Tools package written at Lawrence Berkeley Labs, which ported a lot of Unix tools to VMS (and IBM mainframes) using ratfor (a dialect that was first invented on Unix to add modern control structures to Fortran 66, and implemented as a preprocessor).

One of my favorite programming books is Software Tools by Brian Kernighan and P.J. Plauger (I first read the Software Tools in Pascal version), which showed how to write Unix like tools in Ratfor (because at the time Fortran was more portable than C!). It was the inspiration for the LBL Software tools package. I wish I still had the LBL Software Tools on the VAX I maintain (running on a software emulator on Intel hardware, at much faster speeds than the original VAX), but it was deleted to save space long ago in an era of expensive hard drives, a decision I've long regretted! I can find the source online, but I can't find a binary distribution, and that VAX doesn't have a Fortran compiler anymore, alas.

## EPUB files, Markup Languages, and briefly Unix

What follows is a lightly edited version (for clarity and relevance) of the postscripts from an email that I recently wrote, transferred here for posterity and the general good.

Danger! Danger Will Robinson! Danger! The postscripts and footnotes are much longer than the main body of the reply! And the footnotes are longer than the text of the postscripts!

P.S. H., P. (and H. M., if you are interested, though I admit this combines some of my more geeky interests and thus may be of less interest to all of you, or for Howard and Paul, for that matter):

I actually figured out how to make ebooks (to a limited degree) because I wanted to try an ebook I made of an RPG adventure I wrote for a currently on hiatus0 fantasy Savage Worlds roleplaying game campaign for my daughter Lily and my niece and nephews (N1). I originally wrote the adventure1 in three typesetting systems which use markup languages, LaTeX, ConTeXt, and troff2 (which I usually use in its guise as GNU groff, but this time I used Heirloom troff, part of the Heirloom Documentation Tools, for its easy access to modern fonts) to compare the markup languages and their PDF output to decide which one I prefered to use. Later I converted it to ReStructuredText, a lightweight markup language3 that I use, to compare it to the other markup languages.

I have used ReStructuredText on and off for many years, but the main drawbacks to it was that (1) the output produced by its original docutils implementation was excessively stark and difficult to customize to have a nicer appearance, and (2) its workflow was somewhat difficult,4 Some time ago I discovered Pandoc, a “universal document converter” which can read many input sources, including ReStructuredText, and produce output in many output formats, including PDF (via LaTeX, ConTeXt, or troff; in ways easier to customize the appearance of) and HTML, and, as it turns and importantly to this story, EPUB, the most common format for ebooks! I started using Pandoc because it made it easier to generate PDF from ReStructuredText with one command (since Pandoc runs all the intermediate steps and cleans up any temporary files needed). It turned out that the abilities to read multiple input formats and to more easily customize the output was important to me as well.

So, having converted the adventure over to ReStructuredTexT for comparison5 and at first using PDF through Pandoc's troff -ms output, I soon decided to take a look at Pandoc's other output formats. I started with LaTeX and ConTeXt, and decided that the PDF output via LaTeX was not of much interest to me, but the PDF output via ConTeXt offered greater control over the appearance of the final PDF output and the opportunity of adding via writing Lua filters some features to the resulting documents that lightweight markup languages normally don't offer, such as indexes and cross references that are both hyperlinks and include page numbers and section names in the PDF output, which are features that I didn't need in the adventure document, but which I expect to need in future documents.

But back to the important point, Pandoc can produce EBUB output for ebooks! Since I already had the adventure in ReStructuredText, and Pandoc produces EPUB, and I have an ebook reader, a Kindle, it just makes sense to figure out how to get it onto my Kindle! First I used Pandoc to generate the EPUB. That required figuring out how to generate a reasonably attractive cover. Then wrote a small config file for Pandoc. Then I generated the EPUB output. Then I figured out how to convert that over to MOBI, one of the formats that the Kindle can use.6 Then I mailed it to my Kindle's email, and it looked reasonably good!7

I hope you've enjoyed this twisty maze of passages, all different!

And with a Zork reference I really must end this email!

0

Pandemics are no fun!

I originally thought I'd get through this email without footnotes, but needs must when the devil drives. I rather enjoy footnotes in email messages, but it's not as convenient in gmail as it used to be in Emacs. And since it offered the opportunity for a Shakespeare reference of sorts, I'm quite pleased, in general.

1

As it turns out, I actually wrote seven Savage Worlds adventures in troff, and then converted them all to LaTeX and ConTeXt for comparison later. I actually wrote the first three adventures using LibreOffice, a conventional office suite with a word processor, something I normally dislike but was giving another chance. I decided after three adventures that I wasn't going to do another in LibreOffice, and started looking for alternatives, hence comparing markup languages. I tend to like markup languages better than WYSIWYG editors; this may just be the programmer in me liking the idea of languages over WYSIWYG, but there did turn out to be significant advantages to switching to a markup language in the end. The primary one was that I could put character and creature descriptions in external files and reference them in the main file, rather than cut and paste them from one document to another, which meant I could just change the external file and it would automatically be included in the updated document next time I generated output from it. With a WYSIWYG tool I'd have had to go back and cut and paste the changed material in every document every time I changed it, which would be immensely tedious and horribly error prone and all too common.

2

This footnote is about LaTeX, ConTeXt, and troff, and peripherally about TeX, the progenitor of LaTeX and ConTeXt. Troff was one of the earliest computer typesetting systems, invented in 1973 as a scheme at the computer science portion of Bell Labs to get a PDP-11 so they could have an time-sharing operating system, like the earlier Multics that ran on much more expensive hardware and that the researchers had worked on previously and looked back fondly after Bell Labs pulled out of that research. Bell Labs wouldn't just pay for a computer for the researchers to play with, so they proposed developing a computer typesetting system for the secretaries to use, largely for patent submission, something Bell Labs did a lot of. Their scheme succeeded and as a result they invented Unix and troff.

So, Unix was invented explicitly to run troff!

TeX, by contrast, was not invented until 1978, LaTeX in 1985, and ConTeXt not until 1990! (I wish I'd found out about the latter earlier!) TeX was invented because of Donald Knuth's desire to produce gloriously typeset books with mathematics for his multi-volume work The Art of Computer Programming. He finished TeX long ago, but is still working on those books.

All of these typesetting systems have what are called markup languages, where the text of the document is interspersed with commands distinguished in some way from the regular text. For instance, the command \begin{document} from LaTeX is typical of TeX, LaTeX, and ConTeXt, all of which are related. Troff uses backslash commands in the middle of text and and commands on separate lines starting with periods but historically those commands have been limited to names of two characters, though this was relaxed in the later troff implementation groff, and in the Heirloom troff implementation which extended the second troff implementation, ditroff, with similar features as gnu groff, but easier access to modern fonts.

I am particularly impressed by troff's ability to correctly typeset documents that I wrote 30 years ago and that others have written even earlier. It has never failed me in this task.† This has often been a problem for me with documents from WYSIWYG systems on the contrary, even when those documents were more recently created, including one significant one from 2004. (Star Office, I'm looking at you!‡). LaTeX is reasonably backward compatible, though it did go through some big changes earlier it is now mostly stable. I did experience some compatibility problems, minor with my documents and major with complicated documents written by others. ConTeXt is generally stable, but it is developing rapidly so has more changes, though the developers are good about backward compatibility. The increasing sophistication of ConTeXt, which along its development has subsumed both TeX and MetaPost and combined and extended them with the Lua scripting language (mentioned again below), producing something that is even more flexible and impressive than TeX and LaTeX.

Another thing I like about markup languages is the fact that they are plain text‖, and can be manipulated with any program you want. Before the emergence of XML-based WYSIWYG document formats in Microsoft Word§ and Star Office this was practically impossible. Even now the complexity of the ZIP file and XML markup renders this much much more unpleasant to deal with. Kicking dead whales down the beach indeed! Being able to use any tool at all on a document is considerably more useful than being limited to the poor extensions languages of Microsoft Word and LibreOffice, and usually much simpler.

† I have had to change a few external programs I've written to help in the build process. Perl was a problem here. (I tried to resist the footnote within the footnote, but again, need must when the devil drives.)

‡ Sure, the current LibreOffice will open the file, but the formatting is significantly messed up. Earlier versions, if I remember correctly, did not open the file correctly.

§ I have never written a document in Microsoft Word for my personal use, though unfortunately I have used it often at work.

‖ I have delightedly taken to using Unicode characters in my plain text documents, as the ReStructuredText source of this document shows.

3

Lightweight markup languages, in contrast with TeX, LaTeX, ConTeXt, and troff, are usually things that start with the conventions like indicating *italics* by surrounding phrases in plain text email messages and USENET posts around them in the olden days. Most of them avoid the use of lots of keywords and backslashes, of the sort TeX, LaTeX, ConTeXt, and to a partial extent troff use. Instead, they largely try to use the non-alphanumeric characters on a standard keyboard to indicate how the text should be typeset, and without using long command names. The lack of these long command names (or short ones in troff's case) and the relatively unobtrusive nature of the non-alphanumeric characters makes documents easier to read. This is why they are called “lightweight” markup languages. Wikipedia has a good article that explains and compares them. Another advantage of most lightweight markup languages is that since they don't generally use command names, native speakers of languages other than English don't have to learn English command names, a significant matter.

I happen to prefer ReStructuredText, but Markdown is another very popular lightweight markup language that I sometimes use.

Another advantage to lightweight markup languages such as ReStructuredText and Markdown is that they often have programs allowing multiple kinds of output from them (PDF and HTML are typical) and since lightweight markup languages make no pretensions to being programming languages, which the markup languages of the original typesetting systems do (since that was how they allowed customization and extension), writing the programs to output multiple output types for lightweight markup languages is simpler than than writing programs to parse the heavy markup languages, which is the common approach that people take to get HTML from LaTeX, for instance. The fact that heavy markup languages are usually Turing complete and so can be extensively (and definitely are in practice) extended and often have programmable syntax makes processing them with other tools difficult and usually require much hand conversion. It is my impression that while LaTeX to HTML translators like TeXht and HEVEA are very good for documents that only use the standard features of LaTeX they can't deal easily with heavily programmed documents, since that would require more semantic understanding of the original LaTeX source.

One interesting attempt in this direction for troff was the unroff program, written in Elk Scheme. It took the approach of implementing a complete troff parser and proving Scheme as an extension language so you could completely customize the output. It provided a complete implementation for the troff -ms macros, and I was easily able to extend those to handle cross references and indexes that I had extended that troff document's build process to provide, in 170 lines of Scheme.

4

In particular, there was no standard name for the commands used to generate various kinds of output; on some operating systems it was rst2latex, and on others it was rst2latex.py. Also, the docutils toolchain for producing PDF output generated intermediate LaTeX files which necessitated processing with further tools, which usually necessitated writing a Makefile so I didn't have to retype multiple commands whenever I regenerated the output document. For a simple document that was considerable hassle and overhead, even when worth it for a more complicated document. (Makefiles are well worth it for complicated documents with complicated build processes, of course. I have lots of those.)

5

As a result of the comparison, I decided that I greatly prefered ReStructuredText and pandoc for the tool to process it. Pandoc's ability to customize its output using filters written in the programming language Lua was particularly appealing, as was the ability to customize its default templates for generating output using the troff -ms macros and ConTeXt. I see a use for both of those, since the -ms output is easier to customize for things that the base -ms provides, but the ConTeXt output offers greater control over the final appearance, though often at the cost of greater effort. For instance, I have a moderately long document† that is currently in DocBook 5.0 XML format, and I now find it tedious to edit and the open source tool for generating PDF from it has serious flaws. (I'm resisting another footnote in a footnote. Be impressed that I succeeded!) I can see how I can convert it to ReStructuredText (or Markdown, for that matter) and use Pandoc's ConTeXt output to produce a nicer, more attractive PDF. Now I just need the time to write the lua filter and do the conversion. (Pandoc will convert it from DocBook, but will lose the indexing information, which I would have to do all over again, a task with more work than I want to contemplate at the moment.)

I still find uses for troff and ConTeXt. In particular, if I have to use complicated tables in a document I find that the either troff or ConTeXt works better. (Simple tables for either are OK from ReStructuredText output, but complicated ones…!)

† The DocBook version of the document was derived from the troff -ms source mentioned previously, though by the time the conversion happened I vaguely recall I no longer had access to a working unroff, I think because of bitrot. NetBSD has an unroff package in its pkgsrc collection of program, and I could install it now on my NetBSD machine, but when I tried to process the document unroff exited complaining about a syntax error in one of its Scheme files. So bitrot seems to prevail.

6

Using an open source command line utility provided with Calibre ebook reader, of course!

7

There are some oddities in the current build with the conversion to mobi complaining about fonts not being found in the right places and being deleted from the result, but I don't know enough about ebooks to debug it at this time. Besides, I've hit the auspicious footnote number seven (though it's not the seventh footnote, as it is actually the eighth!) and should really finish this email now.

P.P.S. Omitted for irrelevance.

P.P.P.S. Sorry, no deeply nested parenthetical expressions this time!

Here's an addendum with two Apple Messenger messages to P., reflecting on converting this from an HTML email into a blog post:

The HTML dialect Google uses in its MIME emails is very odd. It doesn’t use <p> elements, using instead <div> elements. Unfortunately, pandoc converts those into containers, and nests them according to the nesting of the <div> elements. To fix this I hand edited the HTML to remove the outer <div> elements and convert the remaining ones into <p>s. Also, for some reason when I ran the documents through HTML tidy it converted the unicode characters into incorrect HTML character entities. I see now that it has a -utf8` switch, which I’ll have to remember for the next time I do this. (There will inevitably be a next time.)

OMG, now I have have to put that in the blog post! How many saving throws am I going to fail today anyway?

Last edited: 2020-12-28 11:11:54 EST

## Worlds of Wonder from Chaosium

I just got my Worlds of Wonder box set from Noble Knight. It was published by Chaosium in 1982, and consists of 4 pamphlets — Basic Role-Playing, Magic World, Super World, and Future World, each under 20 pages — and some supporting game aids. It was very interesting to see Chaosium's house system be stripped down so much in Basic Role-Playing, and then built up again slightly in each of the genre specific pamphlets. There are some interesting design decisions there. I'm not sure that all of those same decisions were exactly included in the Big Gold Book version of Chaosium's Basic Roleplaying book published in 2010, which collected rules from most of Chaosium's games into one generic roleplaying game. I'll have to compare them to see. I should also compare it to the BRP Quickstart. I do have Chaosium's 2002 publication of the Basic Roleplaying pamphlet. It was better typeset but was otherwise functionally identical to the pamphlet from Worlds of Wonder.

I'd love to see a PDF version of Worlds of Wonder, even if it was just a scanned version. Even better if it was release as an SRD, like their BRP SRD.

## Advanced Fighting Fantasy Renaissance and Troika! and Warlock!

With the release of Advanced Fighting Fantasy, second edition, by Arion Games (website, DriveThruRPG) in 2011 it seemed a renaissance for Advanced Fighting Fantasy had arrived. This has been born out by Arion Games releasing one or more books for AFF2E every year since then except 2015, and by their release of bunches more small products in PDF since then. And most (if not all) of their larger AFF2E products are available in POD at DriveThruRPG now, as well as in PDF. They also have a science fiction game that uses the AFF2E rules, Stellar Adventures, which is good and has several supplements.

I have enjoyed all the the AFF2E products and playing AFF and have just gotten two more, Creatures of Mishna and The Warlock Returns Issue #01, both of which look very good to my cursory glance.

And I also just got Troika! Numinous Edition science fantasy RPG from the Melsonian Arts Council and oh does it look pretty, both from a graphical design standpoint and a rules design standpoint! It has a website devoted to it. It was apparently released in 2019 (though the book says the copyright is 2015–2018), and I really wish I had gotten it earlier. It uses rules obviously inspired by AFF with Skill, Stamina, Luck, and Advanced Skills (similar to AFF's Special Skills), and has a neat and quirky random “backgrounds” system for character creation that provides you with Skills, Possessions, and other Special benefits. (One of the backgrounds has a “Small but vicious dog”, in a neat nod to Warhammer Fantasy Roleplay.) I've read it except for the backgrounds, which I've skimmed, and the bestiary. It is an excellent rules light RPG. My one criticism so far is that there doesn't seem to be a table or index of all the backgrounds, so it is hard to find a specific background if you want to read a particular one, as once rules example in the book requires to understand completely. There is a free version as well, and it contains a license allowing you to publish free or commercial material based on or compatible with with Troika!.

I also got Fronds of Benevolence, which looks good too, on a more cursory glace. I'm probably going to have to look for more Troika! products, too; I've seen that there are more out there.

Getting Troika! vaguely reminded me that there was another new RPG broadly inspired by AFF. Investigating revealed Warlock! from Fire Ruby Design (some of whose games I've greatly enjoyed - Exilim, Summerlands 2E, Esoterica, all of which have supplements I need to get), and that convinced me so I bought it. It too is obviously inspired by the AFF rules, though it does away with the all-in-one Skill of AFF in favor of starting the equivalent of AFF's Special Skills at higher values. It also drops the 2d6 rolls for d20s, and damage appears to by a simple dice roll, rather than AFF's 1d6+mod indexing a different table for each type of weapon, which could have its advantages… It also has Warhammer Fantasy Roleplay style careers. I haven't read much of it, but I'm definitely going to. It has several supplements too.

All in all, I think the AFF renaissance is growing!

Last edited: 2020-12-12 15:25:57 EST

## New book about Appendix N

There is a new book about the literary influences of Dungeons and Dragons coming out in February 2021: Appendix N. I'm hoping that it will be better than Jeffro Johnson's book of the same name, which I briefly commented on here.