A Mod For OpenTTD

Yes, I'm still totally engrossed in this game. If you've missed my crush on it somehow just check these:

Another Oldie but Goldie: OpenTTD

"I Just Play Here"

Plainly Put: Plane Power Play

However, the game has one glaring and terrible omission: it doesn't contain tea.

Thankfully this can be amended by writing a mod of a type called NewGRF (New Graphic Resource File). There are several tools available for doing this. The first I tried was TrueGRF, which is a web based tool with a lovely and usable interface. It really was a joy to work with.

You can find it here.

Technically the sort of NewGRF I want to add is of the sort "Industry" which has a slight issue. Each type of industry has an ID and if this ID collides with an existing industry this can cause complications. Therefore industry-type NewGRFs tend to disable other industry-type NewGRFs, and this includes the default industry set. TrueGRF does this for you, and it's a setting that can't be changed.

As much as I like tea it wasn't super fun playing on a map with only tea farms and tea factories. My only alternative was to build an entire industry set. I'm not terribly tempted by that idea, so I started looking at alternatives.

The original format that compiles to .grf files is called NFO. Something that low level sounds like a good idea until you look at NFO. The files are only hex codes. Not particularly human friendly.

The other alternative is called NML, or NewGRF Meta Language. It's an almost 1-to-1 mapping to NFO, but human readable. It's a declarative programming language, more or less.

You can find a tutorial here.

I've started fiddling with it, and I really like it. I'm incrementally getting somewhere. I figure that if I could sit down alone for a full day I could have this NewGRF finished. It'll be at least a week before I have that opportunity though.

Stay tuned. Tea is coming.

-- CC0 Björn Wärmedal