Recommend
35 
 Thumb up
 Hide
61 Posts
1 , 2 , 3  Next »   | 

18xx» Forums » General

Subject: XXPaper: A tool for generating charters, privates, shares and train files for 18XX games rss

Your Tags: Add tags
Popular Tags: DIY [+] [View All]
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
XXPaper generates Postscript files representing charters, privates, shares, and trains as defined by a configuration passed on the command line. All art is made using a format which is friendly to die-cutting. Cutlines are provided in the "outline" files for hand cutting. Alignment lines are provided for all files that allow accurate die placement when using a die cutter.

The resulting Postscript files can be converted to PDFs using the ps2pdf utility that comes with Ghostscript.

A sample configuration file can be found in the "samples" directory of the source tree. The sample file produces privates, shares and train art sized suitably for the test die that comes with an Ellison Pro die cutter.

Sources can be found on GitHub: https://github.com/clearclaw/xxpaper

Example files produced with XXPaper: http://kanga.nu/~claw/xxpaper/example/
28 
 Thumb up
0.05
 tip
 Hide
  • [+] Dice rolls
United States
San Somebody
California
flag msg tools
Here the truceless armies yet / Trample, rolled in blood and sweat; / They kill and kill and never die; / And I think that each is I. // None will part us, none undo / The knot that makes one flesh of two, /
badge
Sick with hatred, sick with pain, / Strangling -- When shall we be slain? // When shall I be dead and rid / Of the wrong my father did? / How long, how long, till spade and hearse / Puts to sleep my mother's curse?
Avatar
mbmbmbmbmb
Thank you!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
XXPaper has been updated to additionally support generating linear stock markets, and to have a more flexible configuration system which allows for local preferences as well as overrides that solely apply to a given execution of XXPaper. The sample game file included in the distribution demonstrates most all features (including the linear stock market).
6 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
I've added an 1830 sample file to the distribution.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
Because people have asked:

- The COLOURS file in the source distribution lists websites that can be used to get the RGB values for colours.

- Additionally there's a 'palette.ps' Postscript file in the source distribution which can be printed (convert to PDF if needed) to see how those codes will come out on paper with your printer.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jack Neal
United States
Liverpool
New York
flag msg tools
designer
badge
Avatar
mbmbmb
Clever.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
XXPaper now supports 1.5 dimensional stock markets. The 1839 sample in the sources provides an example.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
New version with a few minor tweaks, and posted to the Cheese Shop. Note that not all dependencies (ie PSFile) are pip installable.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
A few new features in version 0.1.post45:

- "split" stripes, which are vertical stripes (default black) in the colour stripe of shares. The number of such stripes can be set, but 0-6 is probably the reasonable range for the default stripe width.

- In order to keep the share size readable, there's now an inset box overlaying the split stripes, making a blank area for the type string.

- Tokens can now have a top or bottom stripe. Normally the top or bottom half of a token is a set colour. Now an additional colour stripe can be placed at the far top or bottom edges.

These changes were made in order to:

- Allow more visually distinct/clear art for games with multiple share densities (2-share companies, 5-share, 10-share, 20-share, 50-share, etc).

- Support more clearly distinct tokens for games with large numbers of companies (inspired by the excellent art Bruce did for 1825)
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
The game I'm currently toying with has north of 64 companies (currently north of 80, but that may be excessive) with each company having a range of issuance sizes (and on a map not much larger that 1830's, thus some of the excess). Now I really don't want to write out or to maintain all the stanzas for all 80+ companies and all their share variations by hand. That would be silly for an already silly game (which will grow, err, shrink to have fewer companies). I also don't want to write a tool to write XXPaper files that I then run XXPaper on. That too would be silly. Clearly software should be the answer and all I should write is the map of company names to tokens, colours and issuances and then some sort of template-based automation inside of XXPaper should do the rest. But which template scripting/automation language/tool/whatever standard of the infinitely religious many? Oy vey.

I am currently tempted by Jinja2 for no great reason other than familiarity from other software stacks and the implementation is unpleasant but also not completely terrible. Any strong preferences?
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
The latest checkin adds jinja support in xxp files. As that is a large functional change, and I'll be making breaking changes to the command line syntax, I've also revved to 0.2.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
To give a quick sense of where this is all going, see this file. That file, when processed by the XXPaper I just released (0.2-post5 -- might be later by the time you read this), effectively turns into this file (generated by passing "-t" to the new XXPaper)...and then all the other files below pour out (plus more -- those are only the outline files for US letter paper), generated from the companies definition block at the top. Edit one place and everything changes to match.

(Note: Those files are for a design-in-progress that features 40 companies with companies able to contract all the way to being a private, or to grow up to have as many as 20 or 50 shares -- thus all the variant art for the same companies)

Lots of new little details there to dig out, like the side stripes, descriptions on shares, etc. And, all the old stuff, the old simpler files still work too!

Alas unicode support is broken in PSFile and thus broken in XXPaper. Its an easy fix for PSFile, but PSFile is a mostly dead end. XXPaper is effectively writing raw postscript...and that's likely not the best choice even if it was fun to learn the language. I'm thinking I'd rather move from PSFile to either ReportLab or Cairo + Pango. The court is still out but so far ReportLab is looking the better choice.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Occu Pant
United States
Clive
Iowa
flag msg tools
mbmbmbmbmb
clearclaw wrote:
To give a quick sense of where this is all going, see this file. That file, when processed by the XXPaper I just released (0.2-post5 -- might be later by the time you read this), effectively turns into this file (generated by passing "-t" to the new XXPaper)...and then all the other files below pour out (plus more -- those are only the outline files for US letter paper), generated from the companies definition block at the top. Edit one place and everything changes to match.

(Note: Those files are for a design-in-progress that features 40 companies with companies able to contract all the way to being a private, or to grow up to have as many as 20 or 50 shares -- thus all the variant art for the same companies)

Lots of new little details there to dig out, like the side stripes, descriptions on shares, etc. And, all the old stuff, the old simpler files still work too!

Alas unicode support is broken in PSFile and thus broken in XXPaper. Its an easy fix for PSFile, but PSFile is a mostly dead end. XXPaper is effectively writing raw postscript...and that's likely not the best choice even if it was fun to learn the language. I'm thinking I'd rather move from PSFile to either ReportLab or Cairo + Pango. The court is still out but so far ReportLab is looking the better choice.


If I can figure this out, I may try to do some (simple) companies for 1867.


On a totally separate note, is it possible to configure Privates to use a portrait (rather than landscape orientation) as it looks like you have done for charter_sheet1-outline-letter.pdf
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
Sorry, while a great many things are configurable, orientation is not one of them. Each of the entity types (charter, market, market15, private, share, token & train) have a fixed orientation and basic layout. You can move things about within that layout, but the basic structure is fixed. (Which makes some sense given that the tool's primary purpose is for rapid iteration during the design process -- it just also happens to end up with bits I like to play with)

I suggest starting with one of the simple files, such as either of the files for 1830 and then editing them to suit.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
Oh, don't forget you can also do landscape charters like this:

http://kanga.nu/~claw/1839/charter_sheet3-outline-letter.pdf

You can see the backing configs here:

http://kanga.nu/~claw/1839/1839-Papers.xxp
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
0.2.post9 -- I think wraps most of the current changes into something which should be fairly stable. Very little if anything should have broken, but we now have formalised Jinja support in XXP files (see the 1839 sample for an example) plus a host of smaller features like labled tokens on charters, notes on shares, side stripes on shares including dashed line support, print instructions on pages (eg for how many copies), and an all new and far more flexible command line.

$ xxpaper -h
xxpaper: 18xx rapid prototyping tool

Usage: xxpaper

Arguments:
game_file [text] XXPaper game file

Options:
-h, --help Show this help message and exit
-H, --HELP Help for all sub-commands
-C, --nocolour Suppress colours in reports
-D, --debug Enable debug logging
-d, --dir [text] Directory to process
-f, --formats [text] Art formats
-P, --papers [text] Paper sizes
-p, --pages [text] Pages to process
-q, --quiet Suppress information messages
-s, --sections [text] Sections to process
-t, --template Save template file
-v, --verbose Extra information messages
-V, --Version Report installed version


Oh, and see the '39 sample for a way to do revenue and tracks as a specialised example of the market type. Or if you want to see me going a little nuts with all this new stuff, keep an eye on this:

https://github.com/clearclaw/18xx_1820/blob/master/1820-Pape...
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
In 0.2.post12 I added a default colour palette to XXPaper's DEFAULTS. I looks like this:



The above was generated from the colours.xxp in samples.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Phil Davies
United Kingdom
Winchmore Hill
London
flag msg tools
Lv 30 Lawful/Evil Human Dungeon Master
badge
In Toruk's name!
Avatar
mb
This may or may not be a concern for you but that palette is terrible for colourblind safety. The Red, Green and Brown are largely indistinguishable under a Deuteranopia filter.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
I know, and I spent a couple days trying to work out a good colour palette that was colour-blindness friendly and fit my other criteria. I didn't make much progress there. If you can propose a better palette I'd be extremely interested.

And do remember: this palette is only a default. It can be trivially overridden and different colours used instead.

My backing criteria:

- 6 basic colours + gray (so 7 "colours")
- 4 shades per colour
- every possible pair of colours/shades (excluding the palest) is visually distinct and identifiable on a 1/2" token across the table in poor lighting from every other possible pair.

The last requirement is the killer -- because it is not the ability to tell them apart when they are adjacent, but to uniquely identify and distinguish them when they are scattered on a game map on the other side of the table.

The backing logic for the 4 shades criteria is a pale shade for use on share and charter colour stripes, and then 3 stronger shades for tokens. I can potentially work with two token colour shades per colour, but had trouble making that work. I went to three so as to guarantee a minimum of two visually distinct shade pairs between any to colours, as I had problems with that and only two token shades per colour.

Example charters using the new colour palette and new token stripes etc:



This is the palette I used to have/use:



But that wasn't enough for more companies.

Examples of company tokens drawn using the new palette:

8 companies, so fairly easy (same game as above):



40 companies, so a bit rougher to make everything work (and in fact the driver behind this new palette):

2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Theiss
United States
College Station
Texas
flag msg tools
badge
Avatar
mbmbmbmbmb
No logos for each company? You could just change the bottoms of the tokens to new colors.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
The purpose for XXPaper is to support and encourage rapid and easy iteration on game file changes by 18xx game designers during the game design process. Hey, I want another company, make that company a different name, tweak the value of this private, change the shape of the stock market just a bit, tweak tweak tweak fiddle fiddle fiddle... The goal is for all of that and more to be really easy and really fast so that the unnecessary overhead of representing design concepts into a physical game as they change over time is as low as possible.

Which is why producing all the artfiles for 1867 has taken me rather less than an hour so far.

The fact that the final products are also rather good to play with...hey, that's a nice bonus! Many people have called out the shares, charters, privates etc that XXPaper produces: they're clear, obvious, playable, non-distracting, etc etc etc. They're good to play with. Which is pretty cool. Not the direct goal, but pretty cool.

But it means, among other details, no images. Why? Because an image means that there's another file for the image, something additional to track and manage and update and keep in synch and such forth. Not good. XXPaper uses only one simple text file to do everything. Everything is in that one file and it can be read and edited and managed by any text editor.

For 1867 that's this.

For 1830 that's this (an even simpler format, but slightly more work to keep in synch with itself).

For 1851 its this.

Etc.

All very simple, one file does everything and its all right there and obvious and readable. But there are no images and a very limited range of visual tweaks and extra fiddly bits that can be done...because the designer should be designing the game's mechanisms and not fiddling with the fiddly bits of what a charter looks like.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Eric Brosius
United States
Needham Heights
Massachusetts
flag msg tools
badge
Avatar
mbmbmbmbmb
If the designer and/or publisher want more customized art, I would think the time to introduce and test that is after the game is working, just prior to publication (but not so close to publication that there's no time to test the new graphics.) The ability to change things rapidly and easily in response to playtesting results is extremely valuable. So I'd think you'd do all your early and middle testing using a tool like this and then (if you want) switch to a more graphics-intensive tool once you pretty much know you will only have to lay things out once.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Occu Pant
United States
Clive
Iowa
flag msg tools
mbmbmbmbmb
clearclaw wrote:
0.2.post9 -- I think wraps most of the current changes into something which should be fairly stable. Very little if anything should have broken, but we now have formalised Jinja support in XXP files (see the 1839 sample for an example) plus a host of smaller features like labled tokens on charters, notes on shares, side stripes on shares including dashed line support, print instructions on pages (eg for how many copies), and an all new and far more flexible command line.

$ xxpaper -h
xxpaper: 18xx rapid prototyping tool

Usage: xxpaper

Arguments:
game_file [text] XXPaper game file

Options:
-h, --help Show this help message and exit
-H, --HELP Help for all sub-commands
-C, --nocolour Suppress colours in reports
-D, --debug Enable debug logging
-d, --dir [text] Directory to process
-f, --formats [text] Art formats
-P, --papers [text] Paper sizes
-p, --pages [text] Pages to process
-q, --quiet Suppress information messages
-s, --sections [text] Sections to process
-t, --template Save template file
-v, --verbose Extra information messages
-V, --Version Report installed version


Oh, and see the '39 sample for a way to do revenue and tracks as a specialised example of the market type. Or if you want to see me going a little nuts with all this new stuff, keep an eye on this:

https://github.com/clearclaw/18xx_1820/blob/master/1820-Pape...


If one is now enamored with the possibilities that this tool enables, is there an instruction manual (or readme file or something that explains each of the configuration keywords allowed in the game file and associated parameters)??

I know that you have generously provided some samples. And I seem to remember you mentioning some of the interesting things that the tool will do in various threads. But I am looking for some kind of primer to get me started so that I do not have to reverse engineer my way into reasonable competence. I did look on Amazon for the "xxPaper for Dummies" book but my search came up empty.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
TonyKR
United States
Portland
Oregon
flag msg tools
Avatar
I'd start with the -H flag and see what that spits out.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
J C Lawrence
United States
Campbell
California
flag msg tools
designer
badge
Avatar
Pugnax555 wrote:
I'd start with the -H flag and see what that spits out.


-H is not particularly useful alas as I've implemented no sub-commands:

$ xxpaper -H
xxpaper


-h however is more forthcoming:

$ xxpaper -h
xxpaper: 18xx rapid prototyping tool

Usage: xxpaper

Arguments:
game_file [text] XXPaper game file

Options:
-h, --help Show this help message and exit
-H, --HELP Help for all sub-commands
-C, --nocolour Suppress colours in reports
-D, --debug Enable debug logging
-f, --formats [text] Art formats to produce
-P, --papers [text] Paper sizes to produce
-p, --pages [text] Pages to produce
-q, --quiet Suppress information messages
-s, --sections [text] Sections to produce
-t, --template Export Jinja-expanded template file
-v, --version Report installed version


I admit to not having documented what an art format, page, or section is anywhere outside the sources. So quickly here doing: They map to the types of things that XXPaper produces. A format is "nooutline" or "outline", ie whether there are lines around all the components or not (the latter is for die cutting). Papers are currently "letter" or "A4" for the we-have-no-idea-what-we're-doing and the oh-we-thought-about-this people respectively. Pages are just that: pages, a single sheet of output, a bit of paper. XXPaper puts every page in a separate file (named appropriately), with each page containing only one type of thing (shares, charters, privates or whatever). More functionally, pages map to things with [ [double square brackets] ] in the xxp file -- each one of those will come out as a page of the same name. But sections! They're dead simple. They're the basic types. Abstractly, they're really just the names of different arrangements of stuff on components (that's while you'll see me abuse the market section to draw phase tracks in addition to stock markets, or the train section to draw player number cards -- because heck, they have the right arrangement of content on the paper), but more directly they're top level concepts like charter, private, share, token, train etc and they map to the top level entities in your xxp file with [single square brackets].

Oh, and templates. If you use Jinja (not recommended until you're well familiar with the system), then debugging errors can be a right PITA. Your Jinja is fine but it created an error in the resulting template file on line 1403 and, umm, you have no idea where that is in your original xxp file that has only 98 lines...and what the heck are you going to do with that? I just go shoot myself in the back yard usually, but that got tiring. So the -t option will run any/all Jinja and then dump the results in a new just-a-template-with-no-silly-buggers-file in your output so you can then go see where your problem is.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2 , 3  Next »   | 
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.