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

Neverwinter Nights Forum Update

Discussion in 'Game/SP News & Comments' started by NewsPro, Jun 23, 2002.

  1. NewsPro Gems: 30/31
    Latest gem: King's Tears


    Joined:
    May 19, 2015
    Messages:
    3,599
    Likes Received:
    0
    (Originally posted by Z-Layrex)

    Niel Flynn, Programmer

    One Use Conversations: Fric, The previous advice was correct, except the top node should check for iTalkedTo == 1, and the second should set that to 1

    Root
    -- 1. I already gave you it, shove off already!
    -- 2. Hi How are you?
    ---- ... blah blah

    In 1. use the script wizard to create a test to see if the variable is 1.

    In the subtree of 2. Set that variable at the point the item is given.

    There are a few other threads on this subject to use as a resource too.


    Toolset Tutorial: We have a big 35 page (in Word) tutorial that has been completed and is awaiting final approval. It should be online very soon. I am not sure of the final mode of distribution (pdf, doc, html).

    NPCs Attacking Eachother: The easiest way is to set their factions to 0 relative to each other.

    Toll Bridges: Use the faction system. Make a new faction that the two Orcs belong to. Make their faction neutral towards the PC. In the converation, the node where the PC refuses to pay should have a script attached in the Actions Taken tab that sets the faction to 0 towards the PC. This can be done with the script wizard.

    More:
    Select Properties, and the Creature Properties dialog will open up.
    - In the lower right you will see an area called "conversation". Select the Edit button in that area
    - This will open the conversation editor with a new conversation. When you leave this editor, it will assign the conversation automatically to the creature.

    There are a few threads on creating conversations, but if you need more help please post again.


    Factions: Factions are explained in the tutorial (not yet released, but soon). Basically, they are a numerical representation of how two groups of one or more objects each, feel towards each other. If you make two factions (FAC_1 and FAC_2) and set them to like each other (faction value bigger than 10) they will not attack each other. Then use the script (warning I am doing this from memory)

    object oCreature = GetNearestCreature(???) 75)
    {
    SpeakOneLinerConversation ("trash_talk");
    }
    }
    }
    }

    This script means that each round there is a 25% chance of the NPC speaking a one-liner from the 'trash_talk' dialogue file. In that dialogue file, we just have a whole list of one liners... each with a script that gives a line a certain % chance of returning TRUE (with the last in the list having no script, so always being TRUE, if it gets that far). Alternatively, you could certainly replace the SpeakOneLinerConversation command with your random SpeakString method... I don't think there'd be any harm in that. If I'm not mistaken, the problem with what you're doing now is that NW_SPECIAL_COMBAT_CONVERSATION initiates off the OnPerception script... if you have the flag uncommented, the way to use it is to have a dialogue file with the very first line's script checking to see if the flag is uncommented. That, however, only fires once... and not repeatedly throughout combat. It's something that might be used to get a hostile NPC to say 'I will kill you now!' before rushing to attack the PC (as an example).


    User Defined Events:

    Quote: Try putting the ActionRandomWalk function in the OnHeartbeat script. The Onheartbeat calls every 6 seconds. This worked for me but I'm having a hard time figuring out where in the script I can place the function so that it soesn't preempt the other Onheartbeat stuff.

    You don't really want to stick scripting into the generic OnHeartbeat scripts or the other events. That's what the UserDefinedEvent is for. In your OnSpawn script, uncomment the flag for the event you want... for heartbeat, uncomment 'SetSpawnInCondition (NW_FLAG_HEARTBEAT_EVENT);' Then create a script in your OnUserDefined event for the creature. Start with this:

    void main()
    {
    int nEvent = GetUserDefinedEventNumber();
    if (nEvent == 1001) // 1001 is the OnHeartbeat UDE number
    {
    (do whatever...)
    }
    }


    Floating Text: You can't have exactly the same effect, no, because those floating texts are hard-coded. You could use the AssignCommand function on a PC to tell him to ActionSpeakString, however... and therefore display a floating string in a similar manner. This will, however, look the same as regular speech.

    Actions: Well, if you're telling him to use the ActionSit command in his OnHeartbeat script, I suppose you could simply add an If statement to see if he was talking to someone. For example:

    void main()
    {
    if (!IsInConversation(OBJECT_SELF))
    {
    (perform sitting in chair operation)
    }
    }

    More:

    Quote: Well I go it to work, thank you. But it does lead me to another question if I may be so bold. Is there an interger to set so that an NPC will remain sitting even when talked to? I have a oneliner conversation basically stating that so and so does not want to be disturbed and it seems akward for that person to stand if they don't want to be disturbed

    I THINK so. You'll have to try it out, however, to see if it works properly. If you look in the OnConversation default script, you will see a command ClearAllActions(). This is what is causing them to stand up... they are clearing their performance of the sitting animation. If you copy the script and save it as a new one and take out that command, they MAY initiate dialogue while they are sitting down. They may also not do anything at all because they're 'busy' sitting... you'll have to try it out.


    Derek French, Assistant Producer


    Top Issues:
    Greetings:

    Here the top issues that BioWare and Infogrames are working on together. We have been working on these issues ever since they were brought to our attention. Here is the list of the top issues.

    1. SecureROM.

    2. Bad STRREF issue when connecting to GameSpy.

    3. CD Key unauthorized only on certain servers.

    4. Invalid Character in singleplayer.

    More:
    Its also critically important for you to contact Infogrames about all issues that you are having. BioWare is NOT the primary tech support contact for Neverwinter Nights. Infogrames is. If you are only reporting problems here and are not contacting Infogrames, then you are doing yourself a disservice. We are in daily contact with Infogrames and unless we are getting hard numbers on the different issues, we won't know where to focus our efforts. Please remember to contact Infogrames.


    Brenon Holmes, Programmer


    Casting A Spell On An Object: What faction is the placeable in and what are your PvP options? These both have an impact on whether or not the placeable does damage. The placeable has to be in the hostile faction group (or other faction group that is hostile to the PC).

    Triggers: Triggers can't cast spells or run actions of any sort. Use an invisible placeable object instead.

    More:
    Have the trigger signal a user defined event to the placeable object when it is entered to cast the spell.


    One Liners: Okay... SpeakOneLinerConversation is actually used for conversation. Not chat bubbles... though you can get a similar effect with them. You don't pass in the text that you want the person to say... instead you pass in the resref of the conversation file... that conversation file should have only one node with your appropriate text in it. The only function you can use as you have used it in your example is SpeakString. You pass in the string that you want that creature to say for speak string and that creature will say it.
     
    Last edited by a moderator: Jan 4, 2018
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.