Jump to content

Modded characters gender


Recommended Posts

Currently every mod character should be registered via AddModCharacter function

Let me fresh up your memory about its contents:

local function AddModCharacter(name)    table.insert(MODCHARACTERLIST, name)end
As you can see, it simply populates constant table MODCHARACTERLIST with the name of character prefab.

But how will we know it's gender then?

 

There is CHARACTER_GENDERS table, that initially consist of named below:

CHARACTER_GENDERS ={    FEMALE = {        "willow",        "wendy",        "wickerbottom",        'wathgrithr'    },    MALE = {        "wilson",        "woodie",        "waxwell",        "wolfgang",        "wes",        'webber'    },    ROBOT = {        "wx78",    },}
I think, that good idea would be to enchance the AddModCharacter to populate the CHARACTER_GENDERS table aswell:

local function AddModCharacter(name, gender)    table.insert(MODCHARACTERLIST, name)    gender = gender and gender:upper() or "MALE"    if not CHARACTER_GENDERS[gender] then CHARACTER_GENDERS[gender]={} end    table.insert(CHARACTER_GENDERS[gender],name)end
What do you think about this?
Link to comment
https://forums.kleientertainment.com/forums/topic/48220-modded-characters-gender/
Share on other sites

@SethR, this also have influence on how death/revive messages for modded characters are built.

This is the part of the GetNewDeathAnnouncementString in eventannouncer.lua:

        if not theDead.ghostenabled then            message = message.."."        elseif table.contains(CHARACTER_GENDERS.MALE, theDead.prefab) then            message = message..STRINGS.UI.HUD.DEATH_ANNOUNCEMENT_2_MALE        elseif table.contains(CHARACTER_GENDERS.FEMALE, theDead.prefab) then            message = message..STRINGS.UI.HUD.DEATH_ANNOUNCEMENT_2_FEMALE        elseif table.contains(CHARACTER_GENDERS.ROBOT, theDead.prefab) then            message = message..STRINGS.UI.HUD.DEATH_ANNOUNCEMENT_2_ROBOT        end    else        if table.contains(CHARACTER_GENDERS.MALE, theDead.prefab) then            message = theDead.name.." "..STRINGS.UI.HUD.GHOST_DEATH_ANNOUNCEMENT_MALE        elseif table.contains(CHARACTER_GENDERS.FEMALE, theDead.prefab) then            message = theDead.name.." "..STRINGS.UI.HUD.GHOST_DEATH_ANNOUNCEMENT_FEMALE        elseif table.contains(CHARACTER_GENDERS.ROBOT, theDead.prefab) then            message = theDead.name.." "..STRINGS.UI.HUD.GHOST_DEATH_ANNOUNCEMENT_ROBOT        end    end

As you can see, some of the characters could have no "He/She/It became a spooky ghost!" part, but the worst is that some of them could nave no "lost all of his/her/its humanity and is gone forever.", and the returned message would be "".

  • Developer

@Some1, thanks for the suggestion! We've updated how genders are handled to have a 4th neutral option which is what we default to if a gender is not specified. In those cases we have announce strings that are gender neutral and use the "singular they" instead of he/she.

 

If the mod doesn't specify a gender, a warning will be printed to the log asking them to pick from  "FEMALE", "MALE", "ROBOT", or "NEUTRAL".

@PeterA

In Russian Language Pack I also handle CHARACTER_GENDERS.IT in case it appears, because there is some difference about how we say true "IT" gender ("ROBOT" is not the case, because in russian robot rated as "HE").
And in addition I do check for CHARACTER_GENDERS.PLURAL, in case, that somebody makes a mod with multiple characters in one pack. This could be pack of wolfs, for example, or something like that (imagine, that somebody wants to make an evil mod, to play evil characters. This idea carries great potential, and deserve to be considered separatedly))

I think, you could take it for service too.

  • Developer

@Some1, I like the idea of PLURAL, so I've added that to the list too!

 

Regarding CHARACTER_GENDERS.IT I couldn't find any reference to that in the Russian language pack. Is there a new version coming that hasn't been released yet? ROBOT is definitely a unique side case that is meant for WX and other actual robots, but what is the difference between IT and NEUTRAL?

@PeterA
Yes, there will be new release of Russian Language pack soon. I'm working on universal handling of announce messages.
 
As regards the differnence, it depends on what you mean, talking about NEUTRAL.
 
You said:

In those cases we have announce strings that are gender neutral and use the "singular they" instead of he/she.

Is this "singular they" something completely different from "It"?
 
Russian language has three gender types — male, female and neutral (+ plural, just as english is). Neutral compares to english "it" mostly, but there are lot of things being "it" in english, and spoken as "he" or "she" in russian. You can think about this from the point of children view, when kids say "he" or "she" about animals, robots and so forth.
 
For example, let's see at ". It became a spooky ghost!"
How do I translate it? As true neutral case, or as the case of robot (so, properly speaking, "he" in russian)?
In my last version of translation mod I call GLOBAL.TheNet:GetClientTable() to find out player prefab.
After I know the prefab, I can check for player gender, and i do that like this:

--THIS IS THE PART OF MY NEW UNIVERSAL SPEECH PARSER--IT TAKES THE STRING, AND TRANSLATES IT ACCORDINGLY--TO THE TRUE GENDER, TAKEN FROM CHAR.        local gender="neutral"	if not char then char="wilson" end	char=char:lower()	if char=="generic" then char="wilson" end	if GLOBAL.rawget(GLOBAL,"CHARACTER_GENDERS") then		if GLOBAL.CHARACTER_GENDERS.MALE and table.contains(GLOBAL.CHARACTER_GENDERS.MALE, char) then gender="he"		elseif GLOBAL.CHARACTER_GENDERS.FEMALE and table.contains(GLOBAL.CHARACTER_GENDERS.FEMALE, char) then gender="she"                --Robot is HE!		elseif GLOBAL.CHARACTER_GENDERS.ROBOT and table.contains(GLOBAL.CHARACTER_GENDERS.ROBOT, char) then gender="he"		elseif GLOBAL.CHARACTER_GENDERS.IT and table.contains(GLOBAL.CHARACTER_GENDERS.IT, char) then gender="it"		elseif GLOBAL.CHARACTER_GENDERS.PLURAL and table.contains(GLOBAL.CHARACTER_GENDERS.PLURAL, char) then gender="plural" end	end	--Webber talks about himself as "we" so there are some cases, when we need to do this:	if char=="webber" and (not talker or talker:lower()==char) then gender="plural" end

If the code couldn't receive player gender for some reason, it makes the russian version of the sentence below:
"The player ".."bla-bla bla-bla-bla. He became a spooky ghost!"

 

As you can see here, I'm avoiding of strict usage of character gender, by changing the focus to the gender of the "player" word. And this is something I can call NEUTRAL too, but the implementation of this is completely different.

Is that the "singular they" case?

@PeterA

Really? And what about the PLURAL case then?

Ain't it better to make "The player bla-bla bla-bla-bla. He became a spooky ghost!" for the neutral

and "They became a spooky ghost!" for the plural cases?

 

This is much better from the translation point of view (I can detect exacly what case is this: the plural or the neutral one).

  • Developer

@Some1, both the NEUTRAL and PLURAL case will say "They became a spooky ghost". For NEUTRAL it's a singular they, and for PLURAL it's a plural they. I believe that presuming "he" in the absence of a gender specified can be considered a bit rude in English, as well as it's harsh in English to say "it" when gender isn't specified. Robots like WX don't mind being called "it" though :) If this doesn't work for your mod, you're free to translate NEUTRAL and PLURAL to what makes the most sense for the target languages.

@PeterA

And now we ended up with the main problem of translations for dst.

On the client the only thing I have is the english message, that was pushed by the server. The server could be either with the translation mod or without it.

So if I override Networking_Announcement, then I can intercept all messages was sent by the server. But I can't say, what causes this message, I just don't know, was it STRINGS.UI.HUD.DEATH_ANNOUNCEMENT_2_PLURAL or STRINGS.UI.HUD.DEATH_ANNOUNCEMENT_2_NEUTRAL, since they completely identical, see?

But I have to translate them differently...

 

--------------

Oh, I see you have added DEATH_ANNOUNCEMENT_2_DEFAULT instead of separate PLURAL and NEUTRAL.

 

There only remains for me to use TheNet:GetClientTable() to detect player prefab and true gender.

@PeterA

I almost did it in my translation. Could you let me some more time? I have plans to make Super-Duper Translation Mod, that will translate to any desired language, using specific rules for text adoptation.

I'm currently working on universalization of Russian Language Pack core to make it work with different languages by setting some universalized setup.

@PeterA
You forgot to add appropriate version to wilson's SKELETON_PLAYER examination string.

		SKELETON_PLAYER =		{			MALE = "%s died doing what he loved. Being hurt by %s.",			FEMALE = "%s died doing what she loved. Being hurt by %s.",			ROBOT = "%s died doing what it loved. Being hurt by %s.",		},

P.S. And please fix GENERIC = "It's a flammable a tuft of grass.", line in speech_willow.lua

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...