Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.67k stars 326 forks source link

Add Contextual Macros for Capitalized Gender-Specific Pronouns #2634

Open Mentill opened 4 months ago

Mentill commented 4 months ago

Some quest dialog and strings include GSP (gender-specific pronoun) macros (e.g. %g1). However, the macro handler always makes these lower-case, which is improper at the beginning of a sentence, in English at least.

Instead of making GSP macros always capitalized, and unnecessarily deifying characters, it makes more sense to capitalize only the ones at the beginning of a sentence. I found an earlier proposal which suggested code changes to detect when one is used at the beginning of a sentence. However, this detection becomes problematic when accounting for whitespace, unusual punctuation, and other languages whose sentences may end with different symbols.

Therefore, I added new macros which capitalize the first letter of the GSP, which can be placed in quest/string files as needed to replace GSPs found at the beginning of sentences. I plan on modifying - if this is merged - my upcoming quest dialog improvements, in order to utilize these new macros. I tested all these new macros and they do work; macro names are case-sensitive.

Mentill commented 3 months ago

Ok, I created a function and moved the macro definitions.