-
Notifications
You must be signed in to change notification settings - Fork 0
He has his reason I have my reason
I have this outfit-system and the plan was to check the worn equipment and display a textual description of the character.
"You wear an ugly hat and dense fur overs your body."
The hat-outfit and also the fur-outfit will produce the substrings that then need to be glued together.
- you wear an ugly hat
- dense fur covers your body
But those outfits can also be used by NPC and I want to be able to create the description with the same operations.
But they need to be modified: - he wears a ugly hat
- dense fur covers his body
Note that we also have to be gender specific.
My current solution:
- the desription in the outfits is always written in singular pronoun; I wear...
- a function detects the gender of the character and resolves it to I,he,she,it
- a function parses the outfits description; this requires the sensitive parts to be encased in brackets:
$[I]$ $[wear]$ an ugly... - the sensitive parts together with the pronoun are fed into a lookup function that returns the matching phrase
- the original text is reassembled with the matched phrases
This requires a lookup-table with objects defining phrases replacements.
f.e. list['my'] = {def:'my',i:'my',you:'your',he:'his',she:'her', it:'its'};
See window.gm.util.descFixer and window.gm.util.wordlist.
What is twine and interactive fiction
Exampl. SuperSimpleStory
What are storyformats
Why snowman
Setup tweego and snowman
Switching between Tweego and Twine
Snowman template methods
Snowman markup
javascript usage
debugging your story
Common issues with template methods and scripting
Story Telling in general
General concepts for IF
Scenes & Sequels
Designing Puzzles
See here about my js-framework running in snowman:
==> problems & solutions <==