Is there a currency built into Inform 7 or available via an extension? It seems like there must be, but I can’t find one.
I’m looking for something that allows attributing a cost to items and manages the player’s bankroll (deducting when taking an item, preventing taking an item that can be afforded, etc.).
I’ll put together an extension and share it if this isn’t already available, but want to save myself the effort if it already exists.
It’s certainly not built-in, and I can’t recall hearing of any Inform 7 extension to the purpose (nor find one on the extensions site).
(There is a “Money” library extension for Inform 6, though.)
If you do go ahead and write an extension, I suppose it would be nice if it could easily be customized so that the end author could choose the name of his currency (dollars, euros, yuan, pounds, dubloons, gold pieces, credits, galleons, cash, or whatever) and, if the extension handles systems with several units (dollars and cents; pounds, shillings, and pence; galleons, sickles, and knuts), determine the exchange rate between the units.
There’s no extension for this, but there are several examples in the Recipe Book.