Author Topic: Editing The Character History AFTER The Character Is Created  (Read 437 times)

Legacy_mozeNWrathe

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Editing The Character History AFTER The Character Is Created
« on: September 12, 2010, 01:43:18 pm »


               Greetings and salutations...

I was wondering if anyone here knows about the script that allows you to edit your character description in a Persistent World AFTER you have created your character? I know of two servers that use such a script: Savage Eden (social) and World of Harry Potter (persistent world). The problem is, as I am not a scripter, I have no idea how that is implemented. I have sent a message to the host of one of those servers, but I do not know if I will receive an answer. I have tried looking on the NWN.Bioware.com forums, as well as NWVault.IGN.com, but I found nothing. I do not believe I was looking for it in the right fashion. If anyone here can assist me, it would be greatly appreciated.

mozeNWrathe
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
Editing The Character History AFTER The Character Is Created
« Reply #1 on: September 12, 2010, 02:01:31 pm »


               The commands you will want to use were added in 1.69, and are called GetDescription and SetDescription.

There is a nice little example of how they are used in the SetDescription entry in the Lexicon.

Hope that helps!
               
               

               
            

Legacy_kenween

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +0/-0
Editing The Character History AFTER The Character Is Created
« Reply #2 on: September 12, 2010, 02:08:07 pm »


               I managed to find a section in the NWN Lexicon which deals with the function "SetDescription(Object,String,Int)". If you search the offline NWN Lexicon for this it will produce the page below explaining how this function is used. I've posted a screenshot of the page. I suspect all you may need to do is to use the portions relating to "Description" of the character. Probably some sort of speakstring script to capture what the player wants as a description, then use the SetDescription function to paste it into the player's description.

this page seems to only be available in the downloadable NWN Lexicon and not on the online version :-

'Image
               
               

               


                     Modifié par kenween, 12 septembre 2010 - 01:15 .
                     
                  


            

Legacy_mozeNWrathe

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Editing The Character History AFTER The Character Is Created
« Reply #3 on: September 13, 2010, 01:06:28 am »


               Okay, now that gets me the commands for it. The problem is, I am by far not a scripter. All I know how to do is to roleplay a character. I was trying to see if anyone had a completed script involving these commands? The problem is that the server I am on - well, they know of the commands themselves. (I completely forgot the original thread mentioned them.) However, I do not believe they have a proper script person in the team to create a fully functioning setup that would use these commands.
               
               

               
            

Legacy_Invisig0th

  • Sr. Member
  • ****
  • Posts: 279
  • Karma: +0/-0
Editing The Character History AFTER The Character Is Created
« Reply #4 on: September 13, 2010, 01:55:03 am »


               What you're asking for is pretty much a  simple one-line script. If they have a scripter, he will  certainly be capable of doing something like this.

If (as you say) you expect you will not get a response from the server admins, then having someone here write the script for you won't do you any good anyway. This script would almost certainly need to be run on the server and not on your local machine in order for it to affect your character on that server.
               
               

               


                     Modifié par Invisig0th, 13 septembre 2010 - 01:03 .
                     
                  


            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Editing The Character History AFTER The Character Is Created
« Reply #5 on: September 13, 2010, 02:54:20 am »


               This is just one example of something you could do. It makes use of the OnPlayerChat event. If a player types " !SetMyDescription: "(without the quotes) in the chat bar and then keeps typing whatever they want their description to be, when they hit enter their new description will be set and they will recieve a feedback message that their new descrip has been set.

#include "x3_inc_string"
/////////////////////////////////////////////////////////////////////////
void main()
{

    string sMessage = GetPCChatMessage();
    object oSpeaker = GetPCChatSpeaker();
    string sCheck = GetStringLeft(sMessage, 18);

    if (sCheck == "!SetMyDescription:")
    {
        string sParse = StringParse(sMessage, ":");
        string sDescription = StringRemoveParsed(sMessage, sParse, ":");
        SetDescription(oSpeaker, sDescription);
        DelayCommand(0.1, SendMessageToPC(oSpeaker, "Your BIO has been updated."));
    }
}


Again this is just an example. You could change up the chat check to something more simple if needed. Keep in mind that the chat channel is limited to a certain amount of characters before it wont let you type anymore. So if someone wanted a really long bio then you would need to add more commands/chat checks to keep adding more onto the current description.

Good Luck.
               
               

               


                     Modifié par GhostOfGod, 13 septembre 2010 - 01:55 .