Page 1 of 1

Change character description

Posted: Fri Feb 04, 2022 11:09 am
by sergeil
It would be great to have the way to change character description.
In fact, now it can be done only by deleting and creating character again.

Very often people do not change the description by mistake.

Re: Change character description

Posted: Sat Feb 19, 2022 10:33 pm
by Qui Chang
This is actually something that could be done pretty easily via the OnPlayerChat event.
An example:

Code: Select all

else if (GetStringLeft(sSaid, 5) == "/bio ")
        {
            string sRemove = StringParse(sSaid, " ");
            string sBio = StringRemoveParsed(sSaid, sRemove, " ");
            SendMessageToPC(oSpeaker, "You have reset your current bio.");
            SetDescription(oSpeaker, sBio);
            //ExportSingleCharacter(oSpeaker);
        }
In this case you would just type "/bio "(with the space) followed by whatever you want your bio to be. Something like: "/bio You hail from the far off lands of Hufflepuff and have decided to set off in search of a better house."

Re: Change character description

Posted: Mon Feb 21, 2022 12:57 am
by sergeil
I don't mean so radical. IMHO, changing gender of character is too much. I propose just changing of it's description. Name of function is like SetDescription(object, string, int). I can see it in my test location to be sure, because I already tried it.
https://nwnlexicon.com/index.php?title=SetDescription

PS: Maybe, it would be good to have item to activate this functionality or dummy in some placy like dummy to change appearance of weapon or armor.

Re: Change character description

Posted: Mon Feb 21, 2022 12:34 pm
by Qui Chang
sergeil wrote: Mon Feb 21, 2022 12:57 am I don't mean so radical. IMHO, changing gender of character is too much. I propose just changing of it's description. Name of function is like SetDescription(object, string, int). I can see it in my test location to be sure, because I already tried it.
https://nwnlexicon.com/index.php?title=SetDescription

PS: Maybe, it would be good to have item to activate this functionality or dummy in some placy like dummy to change appearance of weapon or armor.
What I posted above doesn't change gender. That's "bio" as in "biography" AKA player description.

Re: Change character description

Posted: Tue Feb 22, 2022 12:45 pm
by sergeil
Qui Chang wrote: Sat Feb 19, 2022 10:33 pm

Code: Select all

if (GetStringLeft(sSaid, 5) == "/bio ")
{
...
}
I was not able to find function how to read text string from talk window. As I understand, it is part of conversation.
Can you post small example? How you receive text to sSaid variable?

Re: Change character description

Posted: Tue Feb 22, 2022 6:34 pm
by driller
I went and added a function like this. Type /bio=Enter your text here.

Re: Change character description

Posted: Tue Feb 22, 2022 6:35 pm
by driller
https://nwnlexicon.com/index.php?title=GetPCChatMessage
sergeil wrote: Tue Feb 22, 2022 12:45 pm
Qui Chang wrote: Sat Feb 19, 2022 10:33 pm

Code: Select all

if (GetStringLeft(sSaid, 5) == "/bio ")
{
...
}
I was not able to find function how to read text string from talk window. As I understand, it is part of conversation.
Can you post small example? How you receive text to sSaid variable?

Re: Change character description

Posted: Tue Feb 22, 2022 11:34 pm
by sergeil
Thank you very much

Re: Change character description

Posted: Sat Jul 16, 2022 7:02 am
by sergeil
it could be great if it can be realized /bio+, means, append string from new line

As example

/bio=-The Family Clan-
/bio+Good girl from great family

----------------------------------------
-The Family Clan-
Good girl from great family
----------------------------------------

In case of
/bio+
means new line to append


/bio=-The Family Clan-
/bio+
/bio+Good girl from great family

----------------------------------
-The Family Clan-

Good girl from great family
----------------------------------