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 22, 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)

    All news in this post is from yesterday. (Friday 21st June)

    Niel Flynn, Producer


    DMs Joining Servers: Yes. You only need the DM password that is set on the server, and you will be able to DM any module that server happens to be running.

    Conversations: If I understand the question correctly, all you have to do is assign the conversation file in the creature properties window. The conversation will start when the player clicks on the NPC.

    Heh, I am not sure (I tend to play, not DM) but I seriously doubt it. Maybe, if you possess another NPC, but I have never tested that.


    Starting Conversations: Assign the conversation (consisting of one line) to the object. Then make this the object's OnUsed script:

    void main()
    {
    ActionStartConversation(OBJECT_SELF);
    }

    Make sure the 'Useable' flag is set in the Placeable Properties Editor.

    You have to create a link back to the start. 'Copy' the starting link, then right click on the player response and select 'Paste As Link'. It will show up in grey.

    Root
    ->NPC: Hello
    ---->PC: Howdy
    ---->PC: Hi
    -------->NPC: Hello (grey) NPC: I'm sorry, I've already given you your reward.
    ---->PC: Darn it!

    -->NPC: Hey, you're just in time for your reward.
    ---->PC: Yeah!

    1. Use the Script Wizard to attach a "Text Appears When..." script to the first NPC node ("I'm sorry..."). It should check that a local variable "nRewardGiven" is equal to 1.

    2. Use the Script Wizard to attach an "Action Taken" script to the last PC node ("Yeah!"). The script should set a local variable "nRewardGiven" to 1. Obviously, you still have to add the reward - in fact, you could probably do it in the same "Action Taken" script that sets the local variable! Simply check multiple check boxes. It's important to remember that the _first_ thing you want the NPC to say must appear _last_ in the list.


    Rotating Tiles: Left click drops it down, right click will rotate it. You can NOT rotate a tile once it has been dropped down.

    Trent Oster, Producer


    Linux Client: The server is pretty much ready to go. The Client is a little worse off. I haven't got any official date for when the Client will be available, but we are pushing as hard as we can to get it done.

    Examine Creatures: The system works off the CR of the creature (so do the encounters though. What you can do is change the CR of the creature in the toolset to whatever you wish and it will modify the examine text accordingly.

    Off-Hand Weapons: You drag both weapons to the same quickslot. The first weapon will go in your right hand and the second in your left.

    Localization: It all comes down to bandwidth. We don't have the people internally or even externally to complete all the language versions at the same time. The only way this could happen is if we finish the English version and hold it while we create the translated versions. Additionally there is the logistical issue of getting the duplicated copies around the world. Rest assured, we are working as hard as we can to get the rest of the world versions out as soon as possible. In summary, there is only about 100 work hours in a week.

    CR Display: We will not remove this from the game as we feel it enhances the game for people who are new to D&D. We will look into making it an option in a future patch.

    David Gaider, Designer


    Restoration: If you don't have a potion or spell that offers restoration, the priest at the temple of Tyr (where you go when you Recall) can heal you... and at the same time restore any stat loss you may have incurred.

    Is there any way to make humanoid NPCs sit down? (And maybe have a drink?): You can have them sit in a chair, if you like, using the ActionSit command (there is a script that involves having an NPC finding a vacant chair and sitting in it... can't remember the name, but I believe it's posted at NWVault). There are a number of NPC's who sit down in the official campaign... looking at their scripts should help. If you want them to sit on the floor or 'drink', you can simply tell them to play the proper animation (ActionPlayAnimation is the command, if I remember correctly). There is no animation, currently, for someone to BOTH sit and drink however.

    I want a key that disappears after 1 week game time only to reappear on the key merchant. Any idea how such a feat would be done? I want the merchant to sell but 1 key with this property.: This is a bit more complex. A key can be created readily enough using the CreateItemOnObject command... but destroying it would be a bit trickier. Maybe someone more experienced in scripting could help you with that.

    Characters: If you are trying to use a character that's been edited, Calvanar, you need to make sure that the game/server you're bringing him into doesn't have the ELC filter activated. If you're playing a multiplayer game, the ELC filter is just a toggle... shut it off and it won't give you problems regarding character legality. If you're playing single player, I think the ELC has to be shut off in the ini file... not sure how, though.

    Respawning: There are 3 scripts that will automatically get applied to any module you create (and are in the official campaign, for that matter). When you create a module, open up the module properties and look at the scripting events. You will find three events that are of importance to you: OnDeath, OnDying and OnPlayerRespawn (if I remember correctly... don't have the game in front of me at the moment). The scripts that are applied automatically will be in those slots. Change or replace them and you can control what happens to your character.

    Resting: This is easily controllable in your modules, should you wish to do so. As mentioned above, you can flat-out make certain areas impossible to rest in. By placing a script in the module's OnPlayerRest event, you can also control when they can rest. It is a very simple script to make it so that a given player can only rest once per 8 hours (or whatever) or only when the player uses the invisible magic Resting Wand on them... or however you wish to arrange it. The way resting works now (in the official campaign) is simply the default.

    Henchman: No, this is correct. Possession can screw up a henchman's AI (same with familiars, animal companions, etc), so they are exempt from possession. Henchmen can be possessed before they join the player's party, but that's it, currently, until we can find a sure-fire way of possessing not interfering with this.

    Merchants: When you create a store object and give it inventory and so forth, you have to actually place it somewhere in your module (so there is an instance of that store and not just a blueprint of it). It is invisible, however, and not accessible. The way to access it is through a script... either an object that you click on or, more simply, via dialogue. You could simply script a merchant NPC to say "Let me show you my goods, dear customer"... and then, in the 'Actions Taken' section, make a script that starts the store. All you really need is to use the StartStore scripting command, referring to the specific store object's tag and any mark-up or mark-down percentage you wish to use (on top of the store's default). So you can script a store to give better or worse prices to someone, using whatever scripting criteria you wish. Does this make sense? Do you need an example? If you're able to open up any of the chapters (even the prelude) of the official campaign, there are examples of stores in each one.

    Patrols & Conversations: 1) Does he have the standard scripts for his AI? Specifically, does he have the normal script in his OnConversation event that would tell him to start conversation with you when you click on him?

    2) Did you create a dialogue file and assign it to him? If so, did you put any starting condition scripts on the dialogue nodes?

    3) For him to resume his patrol after dialogue is done, you need to execute the WalkWayPoints() command. In the last tab on the bottom right of the conversation editor screen, you can place a script which will run when the dialogue is either ended or interrupted... you'll want to insert a script that simply calls WalkWayPoints() there.


    Triggers: Two things that might work better:

    1) Place a trigger on the inside of the door that tells your NPC to initiate dialogue with whoever has entered the trigger.

    2) Use your NPC's OnSpawn script to create a UserDefinedEvent based on his OnPerception (if he perceives an PC, in this case).


    Conversation Tokens: Hmmm... if I remember right, you can right-click in the text box where you are typing the dialogue and it will give you the option to 'Insert Token' and then give you a list of all the tokens in the game, no?

    Bars: We ran into the same thing when we were making taverns later on in development and discovered there was really nothing in the way of a 'bar' to place in a tavern. Sigh. Thankfully all you need is a decent placeable object. Until one is made, I know we used the table placeables in the official campaign... placed together in an 'L' configuration. Not pretty, but it works.

    Scripting: Well, one thing I notice is that you don't always need to declare 'int' or 'void' before scripting commands. The only time you need to do this, generally, is when you are declaring a variable.

    int nVariable = 5;

    For the above you do need to declare the 'int' because you have to say that 'nVariable' is equal to an integer. When you are telling NWScript to execute a command, however, you don't need to do this. You have already declared void main(), so declaring 'void' in front of all your commands is not necessary. As well, two other things:

    1) When using constants, make sure they are capitalized just like they are in the toolset (ie. TALKVOLUME_SHOUT).

    2) You will notice a lot of commands that have parentheses after them, like GetXP() or GetPCSpeaker()... even if nothing goes inside those brackets, you do still need to put them in your script.


    Altering Character Stats: The DM functions are the only way to permanently alter a character's stats so they remain that way once they leave the module. It can't be done similarly in scripting (yet, I suppose).

    Bob McCabe, Designer


    Script Error:

    Quote: Keep trying that and it wont compile. Quotes included? What it originally read:

    object oDoor; oDoor = GetObjectByTag(Barn1door,1);

    When referring to an object's tag, you need to include quotes around it in order for it to compile... otherwise it thinks 'Barn1door' is an undeclared variable.


    Include Files: Hmm. When I was doing my include scripts for the Fred project, I just saved them without compiling them (or adding a StartingConditional or void main() onto it). They can only be compiled when you are compiling a script where the #include is actually called (which is weird and really kludgy, but I got used to it). Would be a lot more intuitive if 'include' scripts were recognized as a third type of script and could be compiled independently.

    Default Scripts: That is a big question. I would suggest looking at the module-level events listed here... specifically at the events OnDeath, OnDying and OnPlayerRespawn. Opening up the default scripts located in those spots should also help you out as to how they're arranged.

    Scripts: Once you've gotten your script saved in the module, just open up the properties of your box. Then go to the tab labeled 'Events'... you should have all the events listed there, and all you need to do to attach a script is just press the '...' button beside it to open up the menu of scripts. Select your script and press OK and it's attached.

    Rapid Shot: Yes, you can hotkey the Rapid Shot (best way to use it, in my opinion). Just right-click on an empty hotkey and you will get your radial menu to assign a function. Rapid Shot is only available when you are in combat. Once you start firing your bow, select rapid shot and at the beginning of the next round you will see *Rapid Shot Activated!* over your head. It will remain active until you de-select it or until the combat is over.

    Henchman: The henchmen all have a certain number of potions in their inventory which they will replenish when they level up (which is when you do). But, yes, you still cannot give them new potions for them to keep in inventory. If you check out the henchmen in the toolset, you'll find that the way we had to do it (so they can level up at all) is to have a seperate version of them for each level. When they level up, the old one disappears and the new one appears. While it is possible to script them taking and equipping items, these items would disappear when they levelled (and that wouldn't be good). When and if we someday get the ability to level up an NPC the same way a PC does (albeit automatically, to boot), then having more access to the henchmen would be a cinch.

    Spontaneus Casting: Just open up your spell book by clicking on the icon or hitting the "B" key. The left panel has your complete list of spells. Drag the icon down to your quick bar, instead of to the right where you would if you were choosing it to memorize. Presto!

    Spontaneus Casting Healing Spells: To reiterate, drag the spell icon (Cure Light Wounds, for example) into your quick bar. Then fill all of your memorized slots for level one with Bless or Doom or something that isn't Cure Light Wounds. Rest. You're all set at this point. You can cast your memorized Bless or Doom over and over, or you can now cast Cure Light Wounds - which you never memorized - as many times as you have level one slots. Make sense? I hope that helps.

    Familiars: Yes, it is intentional. You can click "okay" or whatever to keep things as-is, or you can "dismiss" your familiar and take on a new one. If your familiar dies, you take 1d6 points of damage, I believe, and then you have to resummon your familiar - you may have to rest to do this, depending.

    Henchman: If you "right-click" :: "more actions" :: "examine" your henchman, you will see their character sheet. You should then see that Sharwyn has 9 ranks total in "Open Lock", but none in "Disable Trap". This means that no, she cannot disable the trap.
    What should happen with a henchman who can disable traps - I believe Tomi might be the only one who can do this - is they should charge forward toward the trap while telling you to hold up, and then immediately proceed to disabling it.


    Why The Modules Were Locked: The decision was made so as to keep people from spoiling themselves, or having to resist spoiling themselves. Once you beat a module (i.e. the prelude), it is unlocked. I don't believe I am allowed to say anything about how to do this, but there are multiple work-arounds. I am sure they will all be posted shortly

    Henchman: Behind the scenes, in imagination land , the henchman are taking their share of the loot (what - you didn't notice them picking up a share of the loot?). Everytime you stop in a store, they're picking up items. When they level up and can use those items, they are. Isn't that clever of them? Okay, seriously - the henchman's gear does improve as they level up. You just have no control over it. Stop trying to intrude upon their lives! They're real people, too! And they just want to be left alone! ... Man!

    More:

    Quote: Thanks Bio (although I wish I could be more proactive with the healing potions)

    Just drag the healing potions onto their portrait.


    Derek Collins, Quality Assurance


    Area Transitions: What you're looking for is an area transition trigger. It will serve the same purpose as a door, but will activate when a character steps onto it. So just paint an area transition trigger at the edge of one of your forests, and then connect it to an area transition trigger at the edge of your other forest.

    Greyed Out Conversation Paths: What you are looking at is a 'linked node' in that conversation. It's a usefull method for making a long complex converstion that branches off and comes back. I.E. you want an NPC to arrive at the exact same line of dialog from a few different PC choices, so you can just make that NPC line once for one PC choice, then make a link for the others.

    Identifying Items:

    Quote: So yeah, if you arent a mage of some sort, how the hell do identify items? I got mad loot that i got no idea what is.

    While you are shopping in a store, examine that item in your inventory, then press the Identify button.


    Chris Priestly, Quality Assurance


    Henchman: Hi there, Evil Chris Priestly here. Simple answer.... no. As you/they progress in levels they will get better armor/spells/weapons, but you cannot give them weapons, etc. to use. So sorry, but it is one less thing you have to worry about. Oh yeah. The potions. Thanks for being awake Urza.

    Quickbar: Sure, Evil Chis Priestly here. I can help. Instead of trying to drap it, go to the quickbar. Select the box you wish to use and right click your mouse. This will open the radial menu. From there you can "dial" to any action that you want. Most of the PCs abilities are located at 9 o'clock. Left click on the assign special abilities and then click on the appropriate icon. This should place it in the quickbar. If you go to the wrong radial menu right click and you will move back one step.

    Off-Hand Weapons: Once you have your primary weapon, say a longsword, in your hand drag it to the quickbar. Then take your secondary weapons, say a shortsword and drag it to the SAME spot on the quickbar as your longsword. Then when you trigger that quickslot it will place the seconday weapon into your off hand. Give it a try, hopefully this will work for you.

    Pat Chan, Programmer


    Ramps In The Forest: No sorry, there are no ramps in the forest tileset.

    Merchants: The merchant object (little flag thingy) is where all the objects for the store are contained. The players do not actually interact directly with the merchant object. So, one method of allowing the players to access the merchant is through a dialog with an NPC. The conversation would go something like this:

    NPC - Can I show you my wares?
    PC - Sure.

    Select the PC node, and add a script to the "Actions Taken" event. Use the script wizard and select "Perform an Action" and hit next. Then, select "Start a Merchant" and enter the tag of the merchant object and hit next. Give a name to your script and hit finish.


    Brenon Holmes, Programmer


    Sending Messages To Players:
    void main()
    {
    object oPlayer;
    oPlayer = GetEnteringObject();
    SendMessageToPC(oPlayer,"Hey, how's it going?");
    }

    More:
    You could put it in a number of places... the area on-enter script, the module on-enter script, on a trigger, Area of Effect Object... etc. GetEnteringObject() and GetExitingObject() are used for a lot of enter/exit events...


    Scripting: Ooo... heartbeats bad... You want to avoid using hearbeats whenever possible... as they tend to have huge overhead once you start checking fifteen billion different things at once... instead, try this:

    So you know when the door is unlocked and used... why don't you fire a user defined event at the door, like so:

    NWScript:
    void main()
    {
    int EVENT_CLOSELOCK_DOOR = 0;
    event evDoorLock;
    object oDoor;
    oDoor = GetNearestObject( OBJECT_TYPE_DOOR );
    evDoorLock = EventUserDefined( EVENT_CLOSELOCK_DOOR );
    DelayCommand( 10.0f, SignalEvent(oDoor, evDoorLock) );
    }

    That will get the guard to fire an event at the door to close and relock itself in 10 seconds... then in the user defined event script on the door, you'd have something like this:

    NWScript:
    void main()
    {
    int nEventId;
    nEventId = GetUserDefinedEventNumber();
    if ( nEventId == EVENT_CLOSELOCK_DOOR )
    {
    ActionCloseDoor( OBJECT_SELF );
    ActionLockObject( OBJECT_SELF );
    }
    }

    The other great benefit to this is that an object can usually toggle it's own state... ie: a door can lock/unlock itself without a key. Hopefully this helps...


    Include Files: Uh... you shouldn't have to have a void main() in your include files... if you try to compile the include files directly you'll get the compiler *****ing at you... however if you compile the files that have the include file included, all should be peachy... and yes, the compiler will whine at your include files every time you rebuild the module, but that's only because it's trying to compile it directly.

    More:
    Well, if you're getting errors compiling the *source* code when you include the *include* code, there's probably an error in the include code. Maybe something like this:

    NWScript:
    int DoFunkyStuff( int nSomething )
    {
    if ( nSomething == 2 )
    {
    return 5;
    }
    }

    That would generate the error you mentioned (or at least the error I'm thinking of...) Surgeon_general... All paths have to return a value, but then again maybe it's something else and I'm talking out of my @ss. I was having some major issues with the include files until I merged most of my separate include files into one gigantic one... didn't feel very good about it, but it seemed to fix up most of the issues I was having... what errors are you getting Ratbert?


    Scripting: In the ondeath event for the specified creature, you can do the following:

    NWScript:
    void main()
    {
    SetLocalInt( GetModule(), "m_bSpecialGuyDied", TRUE );
    // or conversely if you want the flag set on the
    // person that killed them you can do the following:
    object oKiller;
    if ( GetMaster(oKiller) != OBJECT_INVALID )
    {
    oKiller = GetMaster(oKiller);
    }

    if ( GetIsPC(oKiller) == TRUE )
    {
    SetLocalInt( oKiller, "m_bSpecialGuyDied", TRUE );
    }
    }

    The GetMaster() stuff is just in case a henchman or familiar kills the special creature. You may also want to flesh it out so that the local only gets set if the player had a specific flag on them detailing that they actually had a specific quest to kill this guy...


    Jonathon Epp, Quality Assurance


    Locking Doors: Instead of ActionLockObject, try using SetLocked(oDoor, TRUE);

    I think ActionUnlockObject and ActionLockObject use the creature's Open Lock skill. Though alternatively, you could also just give your guard a bunch of points in Open Lock.
     
    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.