Author Topic: NPC question.  (Read 494 times)

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
NPC question.
« on: February 26, 2012, 02:43:57 am »


                I noticed spawning NPC creates lag when entering an area versus them already being on the map.

So my question is should they be spawned or not?
               
               

               


                     Modifié par Knight_Shield, 26 février 2012 - 03:26 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
NPC question.
« Reply #1 on: February 26, 2012, 05:39:35 am »


               There is a little lag while the game spawns in creatures, but by not having them constantly there, a server does not have to constantly keep track of NPCs and their states/scripts/etc.  Depending on the size of a server (if going multiplayer), it's likely a better idea to go with spawning rather than permanent placement.

Personally, I only place certain NPCs that will need to be the same and in the same places at most times (such as merchants).  Village commoners, monsters, etc. I spawn in via scripting or encounter triggers.  I then have the module remove such creatures from any particular area a little while after all PCs leave that space using a "area cleaner" script (which also removes stray items from the ground, gets rid of remains/loot bags left behind, and re-closes doors that started out that way).
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
NPC question.
« Reply #2 on: February 26, 2012, 12:59:49 pm »


               Thanks Amethyst Dragon for your response.
I have downloaded a mod that does not spawn there NPC and was tinkering .I have it  on a different server.The mod seems to run great and it should because looks like some very good people have built it.I was just trying to improve on mine if I could.I think all together I have 85 NPC in  my mod total that spawn ...but was thinking of not spawing some that people would see more.
               
               

               


                     Modifié par Knight_Shield, 26 février 2012 - 01:00 .