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.)

Creating NPCs

Discussion in 'Neverwinter Nights (Classic)' started by bonusman, May 13, 2003.

  1. bonusman Gems: 1/31
    Latest gem: Turquoise


    Joined:
    May 13, 2003
    Messages:
    4
    Likes Received:
    0
    [​IMG] Here's one for you all:

    Here is what I want to do: I would like to create an NPC (based off a generic blueprint), do some changes to it (sex, race, name, tag, portrait,etc) and then spawn it in as the result of a conversation. I know that I can use CreateObject() to spawn in an instance of the creature but as of yet I haven't figured out how to change those other values.

    I tried looking for a list of attributes associated with creatures (or NPCs) that maybe I could set with a SetLocalxxx() call. You know, some list of default attributes that every NPC would have. Any ideas?
    :rolleyes:
     
  2. Blackthorne TA

    Blackthorne TA Master in his Own Mind Staff Member ★ SPS Account Holder Adored Veteran Pillars of Eternity SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) New Server Contributor [2012] (for helping Sorcerer's Place lease a new, more powerful server!) Torment: Tides of Numenera SP Immortalizer (for helping immortalize Sorcerer's Place in the game!)

    Joined:
    Oct 19, 2000
    Messages:
    10,414
    Media:
    40
    Likes Received:
    232
    Gender:
    Male
    I believe every unique NPC must have its own blueprint.
     
  3. BigStick Gems: 13/31
    Latest gem: Ziose


    Joined:
    May 2, 2003
    Messages:
    590
    Likes Received:
    0
    [​IMG] I don't think that you can do that. The best alternative that I can think of is to create a bunch (scientific term there) of generic-type people templates and then pick one at random to spawn from your conversation. I believe that this is the technique that was used in the OC.

    If there is a way to do it, you might find something at the NWN Lexicon .

    I know it's bad news, but I hope it helps anyway. ;)
     
  4. Capt. Tripps Gems: 9/31
    Latest gem: Iol


    Joined:
    Mar 11, 2001
    Messages:
    341
    Likes Received:
    0
    You're asking to be able to open the toolset from the game and no you can't do that as a player. As a DM you might be able to create a charater based on player responses and place them in the game but for a PC to do that the answer is no.
     
  5. bonusman Gems: 1/31
    Latest gem: Turquoise


    Joined:
    May 13, 2003
    Messages:
    4
    Likes Received:
    0
    I don't think I'm trying to open the toolset as a player... I just want to be able to modify the characteristics of an object before spawning it in. And we're talking about in a script, which is obviously not player controlled.

    Actually, I see no reason why this couldn't be done. I don't think it is possible either after further review, but why shouldn't it be? All that would have to be done is setting whatever variables Bioware has defined for their objects (like SetLocalString(oObject, "sTag", "whatever")). How useful would that be?

    BTW Capt.... like the Stephen King reference.
     
  6. Rastor Gems: 30/31
    Latest gem: King's Tears


    Joined:
    Jul 8, 2002
    Messages:
    3,533
    Likes Received:
    0
    I don't see any reason why you couldn't edit a character in the toolset, give it a unique blueprint and REF and then use a script with the conversation. I.E. The player says one thing, the script is triggered that uses a Create ObjectAtLocation();. I may be misinterpreting what you're trying to do, however.
     
  7. ArtEChoke Gems: 17/31
    Latest gem: Star Diopside


    Joined:
    Jul 12, 2001
    Messages:
    916
    Likes Received:
    0
    It can be done, I played a mod called "Bone Kenning: The Art of Thanaturge" that had a similar effect. The PC could create a number of different undead skeleton types by putting parts in a sarcophagus and performing a ritual to create it. It was cool, it could have various feats, or special attacks depending on what parts you used.

    What you need to do is have all the possible variations of the character in the custom creature palette. The code is beyond me, but I suggest you check out that mod, you might get some ideas as to how to implement it from there.
     
  8. bonusman Gems: 1/31
    Latest gem: Turquoise


    Joined:
    May 13, 2003
    Messages:
    4
    Likes Received:
    0
    The trick here is that I don't want to have to go in the toolset and make a blueprint for every possible NPC I want to make. Maybe if you guys understood what I'm trying to do it would be more clear:

    The mod that I'm coding for has the ability to purchase a farm. Also, if your farm is big enough, you can buy a worker to farm it for you. I don't want to have a fixed number of workers, I want to make one on the fly based on what the PC says he/she wants the worker to be. (sex, race, color of skin, etc). I'm sure by this point that what I want is not possible. Oh well.
     
  9. Blackthorne TA

    Blackthorne TA Master in his Own Mind Staff Member ★ SPS Account Holder Adored Veteran Pillars of Eternity SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) New Server Contributor [2012] (for helping Sorcerer's Place lease a new, more powerful server!) Torment: Tides of Numenera SP Immortalizer (for helping immortalize Sorcerer's Place in the game!)

    Joined:
    Oct 19, 2000
    Messages:
    10,414
    Media:
    40
    Likes Received:
    232
    Gender:
    Male
    As I said, I believe you have to have a blueprint for each different kind of NPC. So, you'd have to make a blueprint for each of the worker combinations you would allow the farmer to request, but the farmer could then request multiple workers of that type, or any combination of the types for which you have a blueprint.

    Understand that I haven't used the toolset for this; mainly I've done conversations and scripting for unique devices based on placeables, but that's my understanding.
     
  10. BigStick Gems: 13/31
    Latest gem: Ziose


    Joined:
    May 2, 2003
    Messages:
    590
    Likes Received:
    0
    bonusman & BTA - You are both correct.

    The blueprint must exist before the module is executed in order to create the object. There is no way to dynamically create a blueprint in-game. So, bonusman, there is no way to do exactly what you want to do. If you want them to be able to hire any sort of farm-hand, you'll have to create them all in the toolset first. :cry:
     
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.