Efficiency of NESS

NESS requires that it be hooked into the OnHeartBeat event of every area that it is used in. How efficient is it in practice? Would it slow things down if your module have 50 or 100 areas?

yes you can notice this on a PW, i was hellping on PW with similar spawn system and I found out that the heartbeat of some areas vary from 6 to 10seconds. It also affected AOE spells in area and module time though module time itself is going to break without NESS if you have 100+ areas.

I reworked the spawn system on that PW to use module heartbeat and loop all areas that has specific waypoint placed inside. It helped a bit.

Still not an issue in singleplayer, this can be issue only on PWs.

EDIT: Just for clarification. I am not saying NESS shouldn’t be used by PWs. I know there are PWs that uses it without problems. All I am saying is that using a lot of code in heartbeat of 100+ areas will lead to potential lags, whether is it NESS being used there or something else equally complicated. Either way, NESS can be used without area heartbeat as pointed my meaglyn.

2 Likes

What do you mean?

Any updates on the encounter system you were going to show us? :slight_smile:

1 Like

NESS does not require use of the area OnHeartBeat. It comes with a setup to use a pseudo-hb which only runs when PCs are in the area and for a little while after. It tracks PC enter and exit so you need to add hooks to those events. It’s in the documentation at least of the scripts. Take a look at spawn_smpl_onent.nss.

3 Likes

What I mean is that any module with 100+ areas (no matter if you use heartbeat or not) ran via nwserver.exe will mostly be affected by the clock issue where clocks on ingame compass won’t update. I am not sure if this was fixed in NWN:EE yet, but it is an issue in 1.69. It can be workarounded by setting ingame time in heartbeat as scripting returns correct time it is just not sent to clients. This workaround has unfortunately side effect of switching from day->night or night->day without sunrise/sunset effects amongs other things (prematurely ending effects were also reported by some).

No update on my encounters yet sorry.

2 Likes

Finally finished it.

https://neverwintervault.org/project/nwn1/script/trigger-based-spawn-system-shadooow

It took quite a lot of work, I had to completely translate it as it was written in my native language, translate internal variable names to help scripters read the code, translate comments and translate local variable names to be easier to use for builders. And write proper documentation.

I also removed some features, reworked some code and added feature to limit number of times spawn can spawn creatures.

I tested it briefly but not exhaustively, so it is possible that after all the changes I did on this there are functionalitites which won’t work properly, so please report any issues.

Unfortunately there is no example module. I was thinking about maybe using one of the areas from my module (it will never see the light of the world anyway since I am constantly working on 10+ projects and cannot lead anything into the finish) but because those areas were using old code with variables in czech language, i decided not to as I would have to rework it completely or upload as is which would be with old code… So no test/example module sorry.

3 Likes

Thank you for this @Shadooow. Looks like a good alternative to the standard encounter system! Will test it out!