Sign in to follow this  
ImDaMisterL

Examining GENERIC_MALE and FEMALE characters differently.

Recommended Posts

ImDaMisterL    21064

I want my character to examine generic male characters differently than generic female characters, example:

 

GENERIC_MALE_PLAYER = (Yes, I know that's now how you call their examination BUT EXAMPLE):

{
            GENERIC = "%s is a good example of the common beta swine you'll find in this place.",
            ATTACKER = "Don't get near M'ladies, %s!",
            MURDERER = "Shall we have a gentlemanly match?",
            REVIVER = "%s is almost as gentleman as I am.",
            GHOST = "%s seems to need to be revived by a gentleman, like me!",
        },
 
GENERIC_FEMALE_PLAYER = 
{
            GENERIC = "What a pleasure to have M'lady here with me!",
            ATTACKER = "Calm down, M'lady. I'm here!",
            MURDERER = "M'lady, have you killed someone? \nHopefully it was a beta.",
            REVIVER = "You revived someone, M'lady! I hope it wasn't a Neanderthalic beta...",
            GHOST = "My love and respect for you still lives on, M'lady!",
        },

 

So, is this possible or am I just thinking too high and should face reality?

Share this post


Link to post
Share on other sites
DarkXero    2889

@ImDaMisterL, put this in modmain:

local STRINGS = GLOBAL.STRINGSlocal GetGenderStrings = GLOBAL.GetGenderStringslocal speechreadygenders = {	FEMALE = true,	MALE = true,}local function GetStatus(inst, viewer)	local status = "GENERIC"    if inst:HasTag("playerghost") then        status = "GHOST"    elseif inst.hasRevivedPlayer then        status = "REVIVER"    elseif inst.hasKilledPlayer then        status = "MURDERER"    elseif inst.hasAttackedPlayer then        status = "ATTACKER"    end	local gendermod = GetGenderStrings(inst.prefab)	gendermod = (speechreadygenders[gendermod] and gendermod) or "MALE"	return status.."_"..gendermodendAddPlayerPostInit(function(inst)	local old_spdesc = inst.components.inspectable.getspecialdescription	inst.components.inspectable.getspecialdescription = function(inst, viewer)		--change "willow" to "wolfgang", for example		if viewer.prefab == "willow" then			local modifier = GetStatus(inst, viewer)			--change WILLOW to WOLFGANG, for example			local charstrings = STRINGS.CHARACTERS.WILLOW			local playerdesc = charstrings.DESCRIBE.PLAYER			return string.format(playerdesc[modifier], inst:GetDisplayName())		else			return old_spdesc(inst, viewer)		end	endend)

and change like the comments say, to the prefab of your character.

 

This will enable more statuses, so on your speech file, you put:

	DESCRIBE =	{		PLAYER =		{			GENERIC_MALE = "%s is a good example of the common beta swine you'll find in this place.",			GENERIC_FEMALE = "What a pleasure to have M'lady here with me!",			ATTACKER_MALE = "Don't get near M'ladies, %s!",			ATTACKER_FEMALE = "Calm down, M'lady. I'm here!",			MURDERER_MALE = "Shall we have a gentlemanly match?",			MURDERER_FEMALE = "M'lady, have you killed someone? \nHopefully it was a beta.",			REVIVER_MALE = "%s is almost as gentleman as I am.",			REVIVER_FEMALE = "You revived someone, M'lady! I hope it wasn't a Neanderthalic beta...",			GHOST_MALE = "%s seems to need to be revived by a gentleman, like me!",			GHOST_FEMALE =  "My love and respect for you still lives on, M'lady!",		},... etc.
Edited by DarkXero

Share this post


Link to post
Share on other sites
Dudedude    928

I want my character to examine generic male characters differently than generic female characters, example:

 

GENERIC_MALE_PLAYER = (Yes, I know that's now how you call their examination BUT EXAMPLE):

{
            GENERIC = "%s is a good example of the common beta swine you'll find in this place.",
            ATTACKER = "Don't get near M'ladies, %s!",
            MURDERER = "Shall we have a gentlemanly match?",
            REVIVER = "%s is almost as gentleman as I am.",
            GHOST = "%s seems to need to be revived by a gentleman, like me!",
        },
 
GENERIC_FEMALE_PLAYER = 
{
            GENERIC = "What a pleasure to have M'lady here with me!",
            ATTACKER = "Calm down, M'lady. I'm here!",
            MURDERER = "M'lady, have you killed someone? \nHopefully it was a beta.",
            REVIVER = "You revived someone, M'lady! I hope it wasn't a Neanderthalic beta...",
            GHOST = "My love and respect for you still lives on, M'lady!",
        },

 

So, is this possible or am I just thinking too high and should face reality?

Man, whoever's lines those are must be really euphoric, if you know what I mean.

Also, I noticed

"          REVIVER = "%s is almost as gentleman as I am.","

Might wanna look into this....

Edited by Dudedude

Share this post


Link to post
Share on other sites
ImDaMisterL    21064

 

@ImDaMisterL, put this in modmain:

local STRINGS = GLOBAL.STRINGSlocal GetGenderStrings = GLOBAL.GetGenderStringslocal speechreadygenders = {	FEMALE = true,	MALE = true,}local function GetStatus(inst, viewer)	local status = "GENERIC"    if inst:HasTag("playerghost") then        status = "GHOST"    elseif inst.hasRevivedPlayer then        status = "REVIVER"    elseif inst.hasKilledPlayer then        status = "MURDERER"    elseif inst.hasAttackedPlayer then        status = "ATTACKER"    end	local gendermod = GetGenderStrings(inst.prefab)	gendermod = (speechreadygenders[gendermod] and gendermod) or "MALE"	return status.."_"..gendermodendAddPlayerPostInit(function(inst)	local old_spdesc = inst.components.inspectable.getspecialdescription	inst.components.inspectable.getspecialdescription = function(inst, viewer)		--change "willow" to "wolfgang", for example		if viewer.prefab == "willow" then			local modifier = GetStatus(inst, viewer)			--change WILLOW to WOLFGANG, for example			local charstrings = STRINGS.CHARACTERS.WILLOW			local playerdesc = charstrings.DESCRIBE.PLAYER			return string.format(playerdesc[modifier], inst:GetDisplayName())		else			return old_spdesc(inst, viewer)		end	endend)

and change like the comments say, to the prefab of your character.

 

This will enable more statuses, so on your speech file, you put:

	DESCRIBE =	{		PLAYER =		{			GENERIC_MALE = "%s is a good example of the common beta swine you'll find in this place.",			GENERIC_FEMALE = "What a pleasure to have M'lady here with me!",			ATTACKER_MALE = "Don't get near M'ladies, %s!",			ATTACKER_FEMALE = "Calm down, M'lady. I'm here!",			MURDERER_MALE = "Shall we have a gentlemanly match?",			MURDERER_FEMALE = "M'lady, have you killed someone? \nHopefully it was a beta.",			REVIVER_MALE = "%s is almost as gentleman as I am.",			REVIVER_FEMALE = "You revived someone, M'lady! I hope it wasn't a Neanderthalic beta...",			GHOST_MALE = "%s seems to need to be revived by a gentleman, like me!",			GHOST_FEMALE =  "My love and respect for you still lives on, M'lady!",		},... etc.

Thank you so very much, dear sir! :D

Share this post


Link to post
Share on other sites
Mobbstar    14096

Off-Topic: Are you sure that's a gentleman swearing about "betas"? A true gentleman pays respect to every person, regardless of their personality or niveau.

 

#whatwouldlaytonsay

Share this post


Link to post
Share on other sites
ImDaMisterL    21064

Off-Topic: Are you sure that's a gentleman swearing about "betas"? A true gentleman pays respect to every person, regardless of their personality or niveau.

#whatwouldlaytonsay

But that's not any gentleman, gentleman.

That's Fedoraplier, one of Markiplier's alter egos.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this