Author Topic: At a loss here - ExcuteScript, Conversations ...  (Read 383 times)

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
At a loss here - ExcuteScript, Conversations ...
« on: August 24, 2014, 04:13:18 pm »


               

I've run into a little snag while building, and I may have done something today while populating a city with NPCs. Although, I can't recall doing anything out of the ordinary. My override directory is always empty while building, and I've not imported any script sets either, or modified the hakpak for about four days now.


 


OnEnter scripts for an area work fine. NPCs are spawned in to their waypoints. Heartbeat scripts for an area work as well in testing to try to track this down, but it's the list below that is of a big concern.


 


 


1. A conversation for an NPC I wrote yesterday does exist on the NPC, but when I click on the NPC to initiate conversation, nothing happens. In checking the NPC, the dialog file is there, the dialog exists, and their OnConversation script is the default x2_def_onconv. This also is a problem now with all NPCs now in the module, even those that are marked complete and are no longer being modified.


 


2. Any script that calls ExecuteScript() is no longer firing. Taverns and Inns that got populated with random NPCs are not firing. The NPCs exist in the toolset, all the waypoints are accounted for. Basically, I've not modified any completed tavern or inn, but those completed areas now experience this issue.


 


3. Any OnUserDefined script on an NPC, such as NPCs that are bartenders, cooks, waitress, etc., that would normally move to specified objects, just stand there now. These NPCs also encounter the issue with #2. In one instance, clicking on an NPC waitress in one of the completed inns to track this down, crashed the module.


 


4. A backup of the module from July works as expected.


 


5. I don't know if perhaps I've reached a 16k limit that I've read about, but I can't quite recall how to check that. Here is the statistics from the /temp0 directory if that is of any assistance:


 


Size: 107 MB (112,658,162 bytes)


Size on Disk: 156 MB (164,098,048)


Contains: 16,409 Files, 0 Folders


 


6. The only difference between yesterday and today, is the population of an inn in progress, with additional scripts, waypoints and created NPCs.


 


I am stumped and need some guidance to track this down.


 


FP!



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
At a loss here - ExcuteScript, Conversations ...
« Reply #1 on: August 24, 2014, 05:41:32 pm »


               

When last I checked 16k was 16 * 1024, which is 16384.  According to your report on temp0 you've got  more files than that in your module.  I don't know the symptoms for going over 16k files in a module, so I don't know if that's the actual problem you are hitting, but you have gone over 16k.


               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
At a loss here - ExcuteScript, Conversations ...
« Reply #2 on: August 24, 2014, 08:39:57 pm »


               

I agree with -meaglyn-, it appears you surpassed the module's resource limit.


 


Myself, I remove all non-essential resources from my module before hosting. I also keep 3 seperate modules to help manage my resources.


 


Module 1 - A builder only module with over 10k of premade placeables, triggers, doors and waypoints. I use this to prebuild areas and then export the areas for use in my master and hosted modules later.


 


Module 2 - My master building module. This only has around 600 placeables and my NPCs and their encounters. I finalize and test any new additions/changes here first.


 


Module 3 - My hosted module. This is merely a copy of the previous module with the following resources removed from the pallettes: NSS files (the non-compiled text versions of scripts), encounters, triggers, waypoints and doors. Deleting these generally reduces my module's size by 15meg and removes around 6k resources. Essentially, anything not spawned in via a script or encounter or created by a DM gets removed.


 


As a test ... copy your module with a new name (can just add a preffix or suffix to the current), then while its open in the toolset, go to your NWN Module Folder and open the "temp0" folder. Do a search and delete all files ending in ".nss". Then refresh pallettes and save and test your module. You're not far past the resource limit sothis should do the trick for now. Long term will likely require better resource management.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
At a loss here - ExcuteScript, Conversations ...
« Reply #3 on: August 25, 2014, 09:12:10 am »


               

The other option is to move resources to hakpaks, of course.



               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
At a loss here - ExcuteScript, Conversations ...
« Reply #4 on: August 25, 2014, 07:02:37 pm »


               

To update this, that's exactly what the issue was. Too much junk in the trunk! That dropped the temp0 directory to 10,211 files. Running a in-game test, everything is back to normal.


 


Thank-you!


 


I think your way of building is smart building, kalbaern. It never dawned on me to have a builder module to export the areas into the real module. Then the real module only has what's needed in the pallette, rather than an entire resource and list of placeables.


 


A few days ago I was talking to Rolo Kipp, you might have seen him lurking on the forums here, and we spoke about scripting and variables. One of the biggest mess in any of the modules I've built are duplicate scripts saved for the same purpose using a different name - area transitions as an example - and it clunks the module down. I'm doing my best to use variables on areas, placeables, transitions with one general script to pull Waypoint information, conversation names, etc., but even so, I forget and the scripts continue to pile up and up.


 


Thanks again guys for the tip!


 


FP!



               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
At a loss here - ExcuteScript, Conversations ...
« Reply #5 on: August 25, 2014, 10:16:05 pm »


               

I forgot to mention I have a fourth module as well. Its for creating both store and loot selections. Merchant waypoints and my master loot chests don't require that their items be found on the hosted module's pallettes. So I create them in a Loot/Merchant Module and then just copy and paste them from there into my master builder as needed. I've roughly 12k custom items as part of my loot, merchants and foraging systems and none reside on my pallettes IG.