Dialog Cookbook and Recommended Extensions for Beginners?

Hi again,

Not sure if this has already been brought up but is there an equivalent to the Twine Cookbook for Dialog and are there any reccomended extensions for beginners?

Thanks in advance,
rh

i’m not aware of any beginner tutorials per se. but an excellent resource is here:

it shows the coding for ‘craverly heights’ in dialog next to inform 7 with a running commentary. you don’t have to know anything about the game itself or inform 7, necessarily. but it kind of gives you the feel of watching over linus’ shoulder while he does his thing.

3 Likes

As far as extensions go, there’s not really a centralized repository of them at this point; people mostly invent them for their own projects, put them on the forum, and then they get discovered when needed.

And they also tend to be pretty specialized, because general-purpose tools end up in the standard library! So they’re things like an automap, or a hint system, or a map data type, that you don’t necessarily throw into every project until you’ve decided there’s a need for them.

I’m hoping the language gets big enough that we’ll start making a repository like that, though!

2 Likes

Also, Dialog doesn’t have a way to replace existing rule in the standard library like Inform, so any extension that is not self-contained (say it modifies a bit the behaviour of a standard action) is not really possible to write and redistribute.

You better copy-paste code in a copy of the standard library in that case.

actually, code takes priority in the order it appears. so it’s quite easy actually to replace library code with your own, as long as it’s included first. this actually would make using extensions easier.

given that extensions tend to be specialised, are there any good tutorials for writing them?

Unfortunately I don’t know of any. An extension is basically just normal Dialog code that includes a rule for (extension version).

I have some examples in my repositories, if that helps.

1 Like

at the risk of getting slightly off-topic, how do you display the credits? and is there an extension for creating an inventory of sorts?

By default, the standard library calls (exhaust) *(extension credit) while printing the banner. And I’m not quite sure what your second question means; the standard library supports having an inventory already.

I see.
This is mainly on me for not making it clearer but I was kinda thinking of something along the lines of a visual representation of the inventory. Sort of like:

Inventory: book, apple, pen

where each item has a link so that clicking the link is equivalent to typing examine [item name] in the parser.