Many games rely on text output to relay information, especially if they are narrative-driven, like role-playing games and adventures. Creating text output that works correctly under all circumstances and takes things such as genders into consideration has always been a tricky undertaking. “Grammar” is removing the coding requirements to adapt to these kinds of situations and generates variable text output by using a natural-language tagging system in the source text. The logic is in the source sentence itself!
Because it does only the string manipulation, you can use this module in any project and simply pass the generated string into your game’s own output routines.
Imagine the possibilities if you could create fluent prose, tossing any object, character or monster names into the mix and letting your program handle the necessary adjustments to build grammatically correct sentences in any situation? Forget about special cases for male or female characters, don’t worry about singular or plural items. “Grammar” has your back.
Using a single grammar-tagged string, without additional programming, you could create text output like
This sword has hardly been used.
These daggers have hardly been used.
or this one…
The nazgûl draws his sword and plunges it deep into Frodo’s shoulder.
Frodo draws his dagger and plunges it deep into the goblin’s shoulder.
Frodo draws Sting and plunges it deep into the orc’s shoulder.
Note how the names and pronouns are correctly reflecting the genders of the objects they are referring to, making this an incredibly powerful and versatile tool that belongs in every developer’s arsenal.
This kind of level of detail is what sets apart AAA titles from the rest of the pack because these small details create depth and a denser narrative. Say Goodbye to banal, one-fits-all text output and say Hello to the next generation of storytelling. And because the tags used to relate the grammar are natural-language-based in each language, “Grammar” makes sure that all your beautifully complex sentences will also make their way successfully into your foreign language versions—without additional coding.