Blue Lacuna — 33 of 467

Aaron A. Reed

Release 4

Section - Scrawls

[ These are the secret messages in Progue's language that provide hints and backstory.]

Reading level is a kind of value. The reading levels are uneducated, vowel-knowing, and language-knowing. The player has a reading level. The reading level of the player is uneducated.

A scrawl is a kind of prop. Check taking a scrawl: say "It's just writing." instead. A scrawl has some text called the standard message. A scrawl has some text called the secret message. show-secret-scrawl is a truth state that varies. A scrawl is either hint-based or story-based. A scrawl is usually hint-based. Understand "copy [a scrawl]" or "write [a scrawl]" as a mistake ("You don't have anything to copy it down with."). Understand "message/letters" as a scrawl.

Check examining a scrawl:

let full-message be indexed text;

if show-secret-scrawl is true:

if secret message of noun is "", say "You touch your fingers to the message, but no additional words appear.[paragraph break]";

else say "As you touch the message, faint glowing letters appear below it, appearing in slow waves of heat diffusion spreading from your hand.[paragraph break]";

change full-message to "[standard message of noun][secret message of noun]";

otherwise:

change full-message to "[standard message of noun]";

if reading level of player is uneducated:

say "The message is written in strange letters that you don't understand.";

otherwise if reading level of player is vowel-knowing:

say "You recognize some of the letters from the clockwork head in the treehouse, but the message is still mostly incomprehensible.";

if reading level of player is not language-knowing:

if screen reader mode is true:

say "Though you can't make it out, you see that the message runs from right to left." instead;

otherwise:

say line break;

designify full-message;

say line break instead;

otherwise:

if noun is hint-based:

say "From what you learned from the clockwork head in the treehouse, you think you'd be able to [t]translate[x] the message, though it will take some time[one of].[paragraph break][as the parser]Many of the writings you can translate can be seen as hints to nearby puzzles. If you don't want to see any hints related to this part of the island, don't translate the messages just yet.[as normal][or].[stopping]" instead;

else:

try translating noun instead.

Check touching a scrawl:

if night:

now show-secret-scrawl is true;

try examining noun instead;

else:

say "You rub your fingers along the message, but feel nothing unexpected." instead.

After going (this is the reset secret scrawl rule):

now show-secret-scrawl is false;

continue the action.

Understand "translate [a scrawl]" as translating. Translating is an action applying to one thing. Rule for supplying a missing noun when translating: let Phil be a random scrawl enclosed by the location; if Phil is not a scrawl, say "There's nothing here to translate." instead; change the noun to Phil.

Carry out translating:

if the reading level of player is language-knowing:

pass 30 minutes of time;

say "[one of]Read right to left and phonetically, you are unsurprised to discover you can read the script. In all worlds you've wayfared to, while the writing always changes, the spoken language, strangely, remains the same.[paragraph break][or][stopping]The message reads:[line break]";

say line break;

if screen reader mode is false:

designify standard message of noun;

say "[paragraph break]Or, the way you're more used to reading it:[paragraph break]";

say "'[standard message of noun][if show-secret-scrawl is true][i][secret message of noun][r][end if]'.";

otherwise:

say "You don't know enough about this language yet to be able to translate it.".

To designify (msg - an indexed text):

let original be indexed text;

let coded be indexed text;

now original is msg;

let line-length be 35;

let line-ctr be 0;

repeat with wd running from 1 to the number of punctuated words in original:

if line-ctr + 1 + the number of characters in punctuated word number wd in original > line-length:

let padspaces be indexed text;

now padspaces is "";

while line-length - line-ctr > 0:

now padspaces is " [padspaces]";

increase line-ctr by 1;

now coded is "[line break][padspaces][coded]";

now line-ctr is 0;

increase line-ctr by the number of characters in punctuated word number wd in original + 1;

let tmpword be indexed text;

let tmpword be punctuated word number wd in original;

[ Alright, this is admittedly ridiculous and a real man would have just coded this in Inform 6. But this is faster than a more automated I7 version might be.]

if the number of characters in tmpword is 12:

now coded is " [character number 12 in tmpword][character number 11 in tmpword][character number 10 in tmpword][character number 9 in tmpword][character number 8 in tmpword][character number 7 in tmpword][character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 11:

now coded is " [character number 11 in tmpword][character number 10 in tmpword][character number 9 in tmpword][character number 8 in tmpword][character number 7 in tmpword][character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 10:

now coded is " [character number 10 in tmpword][character number 9 in tmpword][character number 8 in tmpword][character number 7 in tmpword][character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 9:

now coded is " [character number 9 in tmpword][character number 8 in tmpword][character number 7 in tmpword][character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 8:

now coded is " [character number 8 in tmpword][character number 7 in tmpword][character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 7:

now coded is " [character number 7 in tmpword][character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 6:

now coded is " [character number 6 in tmpword][character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 5:

now coded is " [character number 5 in tmpword][character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 4:

now coded is " [character number 4 in tmpword][character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 3:

now coded is " [character number 3 in tmpword][character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 2:

now coded is " [character number 2 in tmpword][character number 1 in tmpword][coded]";

else if the number of characters in tmpword is 1:

now coded is " [character number 1 in tmpword][coded]";

let padspaces2 be indexed text;

while line-length - line-ctr > 0:

now padspaces2 is " [padspaces2]";

increase line-ctr by 1;

now coded is "[padspaces2][coded]";

if the reading level of player is vowel-knowing: [obscure everything except the vowels]

replace the regular expression "<BCDFGHJKMNPQRSTVWXYZbcdfghjkmnpqrstvwxyz>" in coded with "-";

otherwise if reading level of player is uneducated:

replace the regular expression "<ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijiklmnopqrstuvwxyz>" in coded with "-";

replace the regular expression " (<,?!.>) " in coded with " \1";

replace the regular expression " (<[quotation mark][apostrophe]>) " in coded with " \1";

say "[fixed letter spacing][coded][variable letter spacing]".

To decide which indexed text is the reverse of (wd - an indexed text):

let candidate be indexed text;

repeat with lt running from 1 to the number of characters in wd:

now candidate is "[character number lt in wd][candidate]";

decide on candidate.