1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Making a henchman NPC

Discussion in 'Neverwinter Nights (Classic)' started by DrowLicious, Apr 18, 2004.

  1. DrowLicious Gems: 6/31
    Latest gem: Jasper


    Joined:
    Jan 13, 2004
    Messages:
    176
    Likes Received:
    0
    [​IMG] I've been messing around with the 'Dark Ranger's Treasure' mod just to figure out some simple things about the Toolset. How do I make a NPC through conversation become a henchman and aid me on my journey? I know how to make the creature and all the base stuff. I just can't seem to figure out how to do the other stuff like after making the Npc greet me and then in conversation or scripting say 'yes come along' or 'no, not right now' kind of thing and have the NPC act accordingly. Please help me!!!!! I would appreciate any tips someone would think a newb of the Toolset should know. Thanks!!! :bang:
     
  2. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    Try this, if you have HotU. If not, try this , but it does require SoU. I use the last one, I think.
     
  3. ArtEChoke Gems: 17/31
    Latest gem: Star Diopside


    Joined:
    Jul 12, 2001
    Messages:
    916
    Likes Received:
    0
    For a quick start:

    1: in the dialog editor, on the line that you want the NPC to join the PC as a hanchman. Click the "actions taken" tab in the lower right corner, and enter the following:

    {

    object oPC = GetPCSpeaker();

    object oTarget;
    oTarget = OBJECT_SELF;

    AddHenchman(oPC, oTarget);

    }

    ^^ generated by Lilac Soul's script generator btw. which makes most scripting very very easy. Some things still need tweaking by hand, but his program really minimizes the pain of scripting.

    2: in the npc's properties: scripts tab, click on the "load script set" button in the bottom right, and select, "set_xp1_henchmen.ini" which will get the NPC behaving like a henchman; ie, following, attacking your enemies, etc. The death script on that set is still wonky and will need work, but the rest of it works great.
     
  4. DrowLicious Gems: 6/31
    Latest gem: Jasper


    Joined:
    Jan 13, 2004
    Messages:
    176
    Likes Received:
    0
    [​IMG] I can get the npc to join me now (using the lilac program) but how can i then (while he/she is with me) initiate another conversation to get them out? Then what about going back up to them and asking them again? I don't understand how to organize the conversations to appear when i want them to. How would i do that with Lilac? I feel stupid about asking all this but i need some help!!!

    [ April 19, 2004, 02:30: Message edited by: Naug ]
     
  5. konny666 Gems: 4/31
    Latest gem: Sunstone


    Joined:
    Apr 9, 2004
    Messages:
    90
    Likes Received:
    0
  6. BigStick Gems: 13/31
    Latest gem: Ziose


    Joined:
    May 2, 2003
    Messages:
    590
    Likes Received:
    0
    You'll want to review some basic conversation creation rules, I think. What you are looking to do will require you to code scripts that will have to be placed in the henchman's conversation branch's "Text appears when..." box.

    You'll want to display a conversation branch that allows the PC to drop the henchman only if he already is following the PC and not display it otherwise. When the henchman is not currently following the PC, you'll want to display the branch that allows him to be invited along. You can get a little fancier and have one branch that displays if the henchman has never followed the PC and another that displays if he used to follow the PC, but isn't currently.
     
  7. DrowLicious Gems: 6/31
    Latest gem: Jasper


    Joined:
    Jan 13, 2004
    Messages:
    176
    Likes Received:
    0
    [​IMG] Okay Big Stick I know what your saying. I just dont know how to use the 'Text appears when' tab correctly OR i cant find that option for 'when the henchman is already with with PC' type command in the above tab in the 'script wizard'. Would somebody familiar with the Lilac Script program or even somebody who will just tell me how to do it manually? This is really bothering me 'cause most of the toolset I have down pat(the basics at least). I think this is a definite basic and i need to know how to keep living like a roleplayin rockstar..... thanks. :sick:
     
  8. BigStick Gems: 13/31
    Latest gem: Ziose


    Joined:
    May 2, 2003
    Messages:
    590
    Likes Received:
    0
    What goes into the "Text appears when..." box is a script that determines whether or not the associated branch of the conversation is displayed to the player. In that script that you will create you can do a check to see if the PC is the henchman's current master using GetMaster() or something similar. I think I'd code something like:
    Code:
    // Determines if henchman is already with the PC
    if (GetMaster(OBJECT_SELF) == GetPCSpeaker())
    
    ....and/or....
    
    // Determines if henchman is not with the PC
    if (GetMaster(OBJECT_SELF) != GetPCSpeaker())
    You can use the GetBeenHired() and SetBeenHired() commands to determine if the henchman was ever in the employ of the PC previously.

    I use the NWN Lexicon for all my scripting needs, as it has very good information on most, if not all, of the commands. Do a search on "henchman" or look in the function category list on the left side for Henchmen/Familiars/Summoned.

    I am not very familiar with Lilac's script generator, but I think that there is a mini-wizard in the conversation editor that will help you create the needed script.
     
  9. DrowLicious Gems: 6/31
    Latest gem: Jasper


    Joined:
    Jan 13, 2004
    Messages:
    176
    Likes Received:
    0
    [​IMG] That code you wrote to appear in the 'text appears when', do i have put both those there to do a check? I also noticed you put what the code means above each one. I can put those in all the script boxes right? In the (aouora's) script wizard they give a window. when you do a 'text appears when' and it says 'what do you want to check for?' it shows a shows a list where i can select one (race, alignment,etc.) but there isn't one to do something like if 'npc is in group and you initiate conversation' than this ( the conversation) will happen. thanks for guiding me stick. i appreciate. :p
     
  10. ArtEChoke Gems: 17/31
    Latest gem: Star Diopside


    Joined:
    Jul 12, 2001
    Messages:
    916
    Likes Received:
    0
    Ok, what you want to do is the following:

    In your npc henchman's conversation tree have 2 conversations available

    1. the conversation you'd say if he was already your henchman, and you wanted to get rid of him.

    2. the conversation you'd say to the npc if you wanted him to join.

    In the "text appears when" tab for conversation number 1, hit Edit, and paste in
    Yes you can include the "//comments" Save the script. Then in the actions taken tab *on this same conversation line* have the action that removes the henchman.

    In the "text appears when" tab in the other conversation:

    Then on the actions taken tab use the code that makes the henchy join.


    So if he is in the party (master == oPC, meaning yes the PC *is* the master), the conversation to boot will appear. But if you are not currently the boss (oPC != the master, no the PC is the opposite of the master), you'll instead get the option to ask him to join.

    Did that help, or did it just confuse things more?
     
  11. DrowLicious Gems: 6/31
    Latest gem: Jasper


    Joined:
    Jan 13, 2004
    Messages:
    176
    Likes Received:
    0
    [​IMG] I did what you said Art, and when i went to save the script, I would get an error saying 'if cannot be followed by a null statement'. What did I do wrong? I will try it again tommorrow when i have a little more time. I refuse to give up!!!! :borg:
     
  12. BigStick Gems: 13/31
    Latest gem: Ziose


    Joined:
    May 2, 2003
    Messages:
    590
    Likes Received:
    0
    Post the code you put in your script so we can see what you did. You probably have a small typo somewhere after the "if" keyword.

    ArtE - Does he need to use the "void main"? I was thinking that he needed the "starting conditional" there instead. I haven't done a lot of that so can't remember without actually looking it up.
     
  13. ArtEChoke Gems: 17/31
    Latest gem: Star Diopside


    Joined:
    Jul 12, 2001
    Messages:
    916
    Likes Received:
    0
    I'm an imbecile, you're right.

    I did a test run with rearranging the scripts a bit, and got the following to work:

    *For the join conversation:

    for the yo' ass is fired conversation:

    I swear this is working in the demo I made to test it out.
     
  14. DrowLicious Gems: 6/31
    Latest gem: Jasper


    Joined:
    Jan 13, 2004
    Messages:
    176
    Likes Received:
    0
    [​IMG] It worked 100%!!! Thanks for all the help ArtE and Biggie Sticks. I have been pining on this for like a week. I hope if i have questions in the future I get support like i did on this topic. Again thanks for going to the trouble to type the script out and just let me paste it. I appreciate lots...... :grin:
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.