Hi all,
In NWN1 I used tweaked versions of the "Flocking" script that you could find on NWVault to make spawns move about in an area. I remember that when NWN2 came out somebody said "Seamless ATs and flocking won't work any more because of ....." but can't remember the reason or find the original post. Anyone able to tell me what's changed in NWN2 that should have stopped them working? (The scripts compile OK, and creatures with the scripts move the right distance with the right time period between moves but in a straight line towards the south-west regardless of their spawn facing. )
Cheers,
Teric
Sounds like an area size discrepency. It's a great script and I used it a lot on BG. Not sure what the problem is for sure, but make sure your bounding box size correctly positions your mobs to walk within the walkable part of the entire area size (including the 4 border tiles?). But if it's not that (and it's probably not), just check your bounding box size matches your area size minus the 4 border tiles.
Will be interested to see what performance hit a server suffers using this great script. If it's working for you let us know so I can try it out on TSF.
Let me know how you go with it. I'd be keen to offer some help debugging the scripts. I'm just about to start populating Zhentil Keep in earnest so I'd be happy to help.
thangorn@gmail.com if you want to send me the erf of what you've got up to.
On indefinite real life hiatus
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
Area sizes are calculated differently, which is why AL had to make a new seamless AT script. But 1.06 added a GetAreaSize command, so it should be pretty easy to streamline that script and fix up anything else that depends on knowing the area sizes.
Thanks for the replies;
1) The script doesn't use GetAreaSize, so it's not that.
2) I have done an experiment with GetLocation() and the co-ordinates returned are measured from the total size of the area (including the unwalkable border), so that's set right.
Next dumb question is; How do you get NWN2 to generate a log file? There's lots of debugging stuff in the original but I can't get a file saved (or don't know where to look for it). Any help appreciated.
Thanks
Teric
Teric neDhalir wrote:Next dumb question is; How do you get NWN2 to generate a log file? There's lots of debugging stuff in the original but I can't get a file saved (or don't know where to look for it). Any help appreciated.
C:\Documents and Settings\<your>\Local Settings\Temp\NWN2\LOGS and ..\LOGS.0
Ahem, yes, well... I had the Min and Max size of the area of effect the wrong way round, didn't I? So the script was pushing the critters towards the edges, not away from them. Doh!
So short answer is that the Flocking script does work, you just have to add the extra 80 metres to the Min and max size of the area to allow for the unwalkable border.
I'm certain I made the same mistake when I was learning to flock.
I've been really impressed with NWN2server.exe's usage of CPU. So much so that I see flocking play a role, especially given most servers will have fewer than 20-30 exteriors per host.
Teric, have you got the code that restarts flocking behavior after an encounter? It'ss not part of the default package, but a very useful addition.
indio wrote:Teric, have you got the code that restarts flocking behavior after an encounter? It'ss not part of the default package, but a very useful addition.
No, I haven't, but would like to see it. Could you put it on the Tech ftp in the OAS folder?
Thanks
Teric