Skip to content

Issues with Neshke's Extendable Spawning System (NESS) v8.1.3 in NWN:EE

Has anyone encountered issues using this in NWN:EE? I am experiencing some issues with it such as zones with waypoints using SA_ crashing the client upon entering, and spawns continuously spawning without limit when using SD05M01 but not if I use not variance (such as SD05). I have also seen the number spawned when using a variable number SN03M01 being more than the max, but seemed to respect non-variable tags like SN03. Have I done something wrong or is there some sort of incompatibility with NWN:EE and NESS?

To note, for anyone who tries to test. Make sure you do a build of the module before testing. I imported the NESS erf into a fresh module just to test and I crash upon entering if I use SA on the waypoints. If anyone has a solution I'd love to hear it cause I really like how the system works and would prefer not to switch to something different if possible.

Comments

  • ForSeriousForSerious Member Posts: 493
    edited February 6
    I downloaded the 8.1.4 version that no one else seems to have downloaded.
    They declared an integer outside of the scope of where it gets used. I guess this lets it pass compilation, but when it tries to increment it, nothing happens. This makes a memory leak, in that: it spawns until your RAM is full.

    in spawn_main line 239, copy and delete that whole line. "int jCount;"
    On line 1407 press enter and paste that line.
    Should look something like:
    if (nSpawnAllAtOnce == FALSE)
                        {
                            // Spawn another Creature
                            DoSpawn(oSpawn, nTimeNow);
                        }
                        else
    this is line 1407   {
                        int jCount; // This is the added line
                            if (nSpawnNumberAtOnce > 0)
                            {
                                if (nSpawnNumberAtOnceMin == 0 || nEmptyChildSlots >= nSpawnNumberAtOnceMin)
                                {
                                    // Spawn Sets of Creatures
                                    for (jCount = 1; ((jCount <= nEmptyChildSlots) && (jCount <= nSpawnNumberAtOnce)); jCount++)
                                    {
                                        DelayCommand(0.0, DoSpawn(oSpawn, nTimeNow));
                                    }
                                }
                            }
                            else
                            {
                                // Spawn All Creatures
                                for(jCount = 1; jCount <= nEmptyChildSlots; jCount++)
                                {
                                    DoSpawn(oSpawn, nTimeNow);
                                }
                            }
                        }
    

    Compile all the scripts, and try it again.
  • ForSeriousForSerious Member Posts: 493
    edited February 6
    That was specifically for SA crashing. I didn't look at the other issues you mentioned, but they're probably from the same type of incorrect code placement. I can look into them later.
  • meaglynmeaglyn Member Posts: 153
    That int jCount declaration should have been fine where it was. It does not need to be in that else clause. I believe OP's issues to be due to the broken compiler in the latest release. Nothing wrong with that code.
  • ForSeriousForSerious Member Posts: 493
    It was declared outside of the function it was used in. Since there's no main function, that's probably how it slipped past the compiler—and maybe that was possible to do in older versions, but it is still a really bad way to code.
    Obviously there is something wrong with that code since moving it to an expected scope fixed the issue.
  • ForSeriousForSerious Member Posts: 493
    Also, broken compiler? I've heard no mention of this before nor seen anything on my 100+ scripts.
  • meaglynmeaglyn Member Posts: 153
    In the version I looked at it was not declared outside the function, just way up at the top, some 1200 lines before it was used (it's a huge function...) That's not a problem. There was no main because it's an include called from other scripts. Also global variables work fine so even if it was outside the function it would have worked. Not ideal design but would still work.
    There's no reason for it to have not worked as it was written so randomly moving it to a new location in the code text should not have changed anything. But, maybe you have a non broken compiler so when you moved it you recompiled.

    See the thread on the vault.

    Any compiler for nwscript in which it is not possible to code that the way it was originally done is broken and not implementing nwscript correctly.
  • Nic_MercyNic_Mercy Member Posts: 424
    I found out the issue was due some sort of bug in NWN:EE's compiler. Using a 3rd party compiler fixed the issue for me. I am not sure why its only that specific set of scripts the compiler has an issue with though. But if anyone else encounters a similar issue, try using a 3rd party compiler if nothing else works.
Sign In or Register to comment.