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 News

Discussion in 'Game/SP News & Comments' started by NewsPro, Dec 12, 2003.

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


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

    Here are today's Neverwinter Nights forum highlights. Please take into account that these are only single parts of various threads and should not be taken out of context. Bear in mind also that the posts presented here are copied as-is, and that any bad spelling and grammar does not get corrected on our end.

    Georg Zoeller, Designer

    Missile Storm: Hey, it's not a bug. Since missile storm now correctly checks SR on the first missile, the game won't fire any subsequent missiles if the first one is resisted, as they all would be resisted.

    Mark Brockington, Lead Research Scientist

    DelayCommand Bug: The intended behaviour has always been to run the events that were delayed at the same time in the order that they were run.

    DelayCommand(0.5f,SpeakString("1"));
    DelayCommand(0.5f,SpeakString("2"));
    DelayCommand(0.5f,SpeakString("3"));

    should be forcing a character to say "1", "2" and "3". Why did we make the optimization? Because there are many more events in Hordes than in Shadows or the NWN Official Campaign. Handling of events came up as a major use of CPU time during profiling, and we rationalized that a lot of your modifications would probably also benefit from the speed increase of delayed events.

    Imagine all of the events are stored in a ordered linked list. Now, when it comes time to enter an event, we have to scan the list from the top down until we pass all of the events with the same time (time being stored down to a millisecond as an integer, not as a floating point value). There are many events to be run immediately (such as AssignCommand()s), so these are still handled the same way. The huge delays were coming from events that were delayed by a couple of seconds. They had to hop over ALL of the events that were stored at the front of the queue every time we added them. Thousands of comparisons didn't make the CPU very happy.

    So, the optimization was to reverse how we handled *delayed* events. Instead of starting at the head of the sorted list, we turned the queue around and started at the tail. But, we forgot to examine what specifically happened when events had equal time. Because we simply reversed all assumptions about ordering, our CompareWorldTimes() function went from == -1 to == 1. (Note that when times are equal, the result is 0). So, to preserve the intended ordering, the code should have been != -1.

    There is a significant risk with making this fix. There is also a significant risk associated with removing the optimization. We will investigate the repercussions of restoring this to the proper ordering for a future patch. In the meantime, wrap your Delays in a function (as Georg mentioned earlier) or, if that is not an option, I would wholeheartedly recommend separating all DelayCommands by at least 2 milliseconds or 0.002f to avoid any rounding issues associated with bringing floating point numbers into the game engine. This will ensure that if we restore the proper ordering in a future patch, we won't break your scripts a second time. However, there is another point that was brought up recently about the DelayCommand(0.0f,foo()) versus foo() which runs immediately ... this is not a bug. Commands that are assigned or delayed are always run subsequent to the end of the currently running script completing successfully. This is the intended behaviour. So if I do this in code:

    SpeakString("1");
    DelayCommand(0.0f,SpeakString("2"));
    SpeakString("3");

    Your character will say: "1", "3", and "2". Similarly, if SpeakString("2") is assigned to another character, your object will say "1" and "3" before the other object says "2".


    Craig Welburn, Live Team Programmer

    Launching The DM Client Directly:

    Yes you can do this (This is for WinXP).
    - Create a normal shortcut to nwmain.exe.
    - Then right click on the shortcut and select properties.
    - Click on the Shortcut tab at the top.
    - Under "Target" add the command line switch "-dmc" to the end.
    - Apply the change.

    It should now launch the game as the DM Client.


    Tom Ohle, Communications Assistant

    The Live Team: Rest assured that the live team is extremely busy We definitely plan on supporting the Neverwinter Nights community in 2004, though we're not quite ready to talk about any details yet. We are planning on holding a chat in the coming week or so, where that may be one of the potential topics of conversation.
     
    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.