Using Inform 7 to work on my first full sized game. My background is in standard programming languages, and lots of them, so sometimes I just can’t get my head around a particular Inform 7 thing.
Basically, I am including your standard, but always fun, coded language into the game. You know the kind, like the D’Ni language in Myst - basically just a simple letter by letter replacement. No grammar or other ConLang madness. No thanks.
So what we’re talking about here is a replacement cipher, but with Unicode symbols. So, maybe A is ᚫ, and B is ᚰ, or whatever.
But, since copy-pasting Unicode symbols sucks, and encoding the text as these symbols in text means I wouldn’t know what I wrote in that text without decoding it myself…
Basically, what I need is almost a subroutine that takes regular text and replaces letters to this cipher. With another language, hey this is just an array, a loop, and a return from a subroutine.
But how might one implement this in Inform?
A table of roman letters and their replacement?
How do I loop through text one letter at a time?
I could imagine a simple Instead of examining… repeat… type loop, passing the description of the object, would work, but how would that actual loop look and how does one parse a text variable one letter at a time?
So, to sum it up: I would love to know how to take a text description of an object (like a piece of paper left in a desk) and dynamically turn roman characters into their replacement characters, so I can write the game in plain old English and leave the encrypting into this other “language” to the machine.
Any assistance, even pointing me to the right place in the docs, would be much appreciated.