Skip to content

Instantly share code, notes, and snippets.

@jkap
Last active August 29, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkap/9433b2b1ade0fea951b4 to your computer and use it in GitHub Desktop.
Save jkap/9433b2b1ade0fea951b4 to your computer and use it in GitHub Desktop.
Pronoun Macro for Twine 1

Pronouns for Twine

I wrote this pronoun macro about a month ago and Davin (@onidavin) was kind enough to make an exmaple Twee file for it.

How to use:

Currently only 'she/her', 'he/him', and 'they/them' are included. It would be trivial to add the ability to use custom pronoun sets, but I haven't needed that yet, since I made this to pick pronouns for characters in a game I'm working on.

Here's the syntax:
<<pronoun "she" "subj">> = she
<<pronoun "they" "posa">> = their

That's all! tweet at me if you've got questions. @jkap

:: Start
Your story will display this passage first. Edit it by double clicking it.
WHAT DO YOU WANT TO BE CALLED
[[PLEASE CALL ME 'SHE'|NextPage][$pnoun_choice = "she"]]
[[MALE PRONOUNS FOR DAYS WHAT WHAT|NextPage][$pnoun_choice = "he"]]
[[CALM THE FUCK DOWN ALL CAPS BOI YOU WILL REFER TO ME WITH THE MODERN 'THEY', WHICH WILL DRIVE PEDANTS MAD WHICH HONESTLY IS WORKING AS INTENDED|NextPage][$pnoun_choice = "they"]]
:: pronoun stuff [script]
(function() {
var pronouns = {
she: {
subj: 'she',
obj: 'her',
posa: 'her',
posp: 'hers',
reflexive: 'herself'
},
he: {
subj: 'he',
obj: 'him',
posa: 'his',
posp: 'his',
reflexive: 'himself'
},
they: {
subj: 'they',
obj: 'them',
posa: 'their',
posp: 'theirs',
reflexive: 'themselves'
}
};
macros.pronoun = {
handler: function (place, name, params, parser) {
var pronounSet, pos, interim;
interim = params[0];
pronounSet = state.history[0].variables[interim];
pos = params[1];
return new Wikifier(place, pronouns[pronounSet][pos]);
}
};
}());
:: StoryTitle
Untitled Story
:: NextPage
let us describe you
<<print $pnoun_choice>>
<<pronoun pnoun_choice "subj">> will rule the world some day.
<<pronoun pnoun_choice "posa">> attractiveness level is unstoppably high.
:: StoryAuthor
Anonymous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment