Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411278 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 12:55:47 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignManaging gender in procedurally generated text
Pages: [1]
Print
Author Topic: Managing gender in procedurally generated text  (Read 1558 times)
Vini Aleixo
Guest
« on: May 29, 2019, 05:22:05 AM »

My games has a procedurally generated story, but we are bumping into this issue. Doesn't look good having to write in every text structure "so he/she went to the room carrying his/her backpack".

Does anyone have any guesses or experience on how to fix this issue? It is very likely that we'll have to do some programming to find a solution, but we have no clue on how to solve this.

What are your thoughts? =]
« Last Edit: May 29, 2019, 06:35:41 AM by Vini Aleixo » Logged
b∀ kkusa
Global Moderator
Level 10
******



View Profile
« Reply #1 on: May 29, 2019, 06:43:43 AM »

Most efficient way would be to do some programming since you'll need to create a gender variable , script or binary system.

Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #2 on: May 29, 2019, 07:57:40 AM »

Yeah, you'll probably have to write some sort of filter for your in-game text that looks for special formatting, like {pronoun} for example, and replaces them with the correct word. You'll probably have to do that anyway if you want your dialog to be flexible for item names and other variable things.
Logged

AngryAgendaGames
Level 0
**



View Profile
« Reply #3 on: June 07, 2019, 04:19:22 PM »

I'd say, to make the programming easier, make a variable for each type of gendered word. That way, when you have a page talking specifically about a woman, man, etc you can specifically set the gendered words referring to that character to be he, she, or they.

For example:

He/She/They: charOneStandardVariable
His/Hers/Their: CharOnePossessiveVariable



And so on and so on. Forgive my awful naming skills for variables- best I could come up with off the spot.
Logged

I hope that, whatever change I make, I make it a good one.
Craig Stern
Level 10
*****


I'm not actually all that stern.


View Profile WWW
« Reply #4 on: July 02, 2019, 12:55:39 PM »

Heh; I had to do this for my current game! The easiest way to do it is to create a sort of generic nonsense string to stand in for a type of pronoun, then do a Replace() for each instance of it appearing in your text with the correct pronoun. (In C#, it's literally string.Replace().)

For instance: I use the nonsense pronouns heshe, himer, and hiser as stand-ins in the game's writing, then automatically replace them with he / she / they, him / her / they, and his / her / their as the subject's gender demands.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic