Runtime gender swapping

Have an idea how we can improve the engine or this forum? Share it here!
Post Reply
ckastens
Posts: 11
Joined: 06 Sep 2020 11:07

Runtime gender swapping

Post by ckastens »

Would love to have a gendered term loader where the player can choose the form of address they would like to receive from game characters.
For example, a character in the game asks what form of address they prefer and the answer is converted into a global index value. In English, for example, options could be (but not limited to):
he/himself = 1
she/herself = 2
they/themself = 3
ze/hirself = 4

Whenever there is a gender-specific word, the author writes something in the script to identify it as such, using the first option on the list as the "generic" term. For example, the writer puts in { $en_himself } and the script inserts the correct address at runtime based on the player-selected global index: himself, herself, themself, zirself.

Users could expand the dictionary for other languages, adding in lists of terms for as many genders as they want and the index will always look at the first word on the list. For example, add in a line "pt: ele, ela, elu, ile" for Portuguese "he" and use { $pt_ele } in the text to automatically choose the correct term from the list. Capitalization could be specified by changing the variable name or some other method.

An even better option is to have the software automatically replace every exact match on the list without having to write the names as variables, but I´m not sure that works for all languages, so it might be best as a toggle.

Just throwing out some ideas.

Elringus
admin
Posts: 538
Joined: 11 May 2020 18:03

Re: Runtime gender swapping

Post by Elringus »

Thanks for the suggestion! This is something we will consider implementing given enough demand from other users. If anyone is interested and/or have examples of such systems implemented in other engines or games, please reply in this topic.

ckastens
Posts: 11
Joined: 06 Sep 2020 11:07

Re: Runtime gender swapping

Post by ckastens »

In case it´s useful to anyone, I wrote up a relatively simple solution to this using Naninovel´s custom functions and custom variables.
I´ve zipped up the C# script and a Naninovel script to show how it works:
https://drive.google.com/file/d/1Vs1yjX ... sp=sharing

Notes:

  • Create a custom variable (string) called "choose_gender" in the project before running the test script.
  • The C# script contains an array with a small dictionary of English and Portuguese gendered terms. Adding more terms, changing the name of the terms or even adding another language should be pretty easy to get the hang of after seeing how they work in the test script.
  • If using more than one language, the gendered terms need to be localized manually during translation, just like any other text.
  • Use the Cap() function to capitalize, as shown in the example.
  • Be careful when writing for gender neutrality. Just to give one example, gender-neutral "they" takes on verbs in the plural, even when referring to a specific person. "He is a good person" / "She is a good person" / "They are a good person". Adding the appropriate verbs to the dictionary can help you get around this, but needs to be done on a case-by-base basis.
nio kasgami
Posts: 4
Joined: 15 May 2020 04:17

Re: Runtime gender swapping

Post by nio kasgami »

I think this should be usefull Custom Generic function is something important. so I will vote yes for it

@elringus : think for those kind of stuff we could use Poll.

Elringus
admin
Posts: 538
Joined: 11 May 2020 18:03

Re: Runtime gender swapping

Post by Elringus »

Can't this be already implemented via expression functions? The post above shows an example.

Post Reply