Author Topic: NPC's not spawning  (Read 607 times)

Legacy_omen_shepperd

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NPC's not spawning
« on: January 13, 2013, 07:44:48 pm »


               I have a question for the community that I am hoping someone
can answer. I built an market district and placed down my merchant NPC’S.  I went through and built my shops and placed
them down and connected the npcs to the shops. When I went in to test them none
of them spawned. Mind you I have no scripting attached to this area. And I am
using cep 2.4, prc 3.3 a merge hak for them, I am using some tileset haks CTP and
a couple of WORMS tilesets as well. I am using some other haks for clothing,
armor, and weapon appearances in addition. The area I built uses the (CEP) City
Exterior.  Now the NPC’S show up in
toolset but not in game. What might be causing this?
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
NPC's not spawning
« Reply #1 on: January 13, 2013, 11:22:53 pm »


               There are a few possibilities

1. The model you chose for your npcs- definitely viewable by your client? Maybe the npcs are invisible because the model isn't displaying?
2. On spawn scripts- check the merchants in your toolset for variables and onspawn scripts that may be telling them to port to locations or destroy object on itself.
3. Maybe they are being killed before you get there?
   Check for faction issues- love thy neighbour an all- maybe your merchants are being killed by a near by npc who is of different faction?
4. Maybe the npc is alive elsewhere? Give him a new tag, and create an on use item that will jumpToObject when used- tell it to port you to the merchant. It will either 1. Not move u at all- meaning the merchant is really gone, or 2. It will port you to the merchant: if he can't be seen- u know he's there, he just isn't visible.

Hope this helps
               
               

               
            

Legacy_omen_shepperd

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NPC's not spawning
« Reply #2 on: January 13, 2013, 11:32:34 pm »


               thank you for the response,
1. I can see the model in the toolset, just not in game.
2. No scripting attached other than the shop connected via conversation.
3. I am checking the mod via single player game mode, no creatures in the area to attack merchants.
4. ill give this a shot.
               
               

               
            

Legacy_AndarianTD

  • Hero Member
  • *****
  • Posts: 725
  • Karma: +0/-0
NPC's not spawning
« Reply #3 on: January 14, 2013, 12:53:25 pm »


               Quick thoughts: 1) Although rare, it's definitely possible for some models to appear in the toolset and NOT appear in game; I've seen this myself. 2) Put a script in the heartbeat of some of the missing NPCs that echoes their location to the console (get the area and its name, get NPC name, location and tag, parse the information out and print it), and then calls their regular heartbeat script. That should give you a lot of the information you need to diagnose the problem.
               
               

               
            

Legacy_omen_shepperd

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NPC's not spawning
« Reply #4 on: January 14, 2013, 07:04:21 pm »


               thanks AndarianTD,I will try and write up a couple of scripts to try and get more info.
               
               

               
            

Legacy_omen_shepperd

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NPC's not spawning
« Reply #5 on: January 24, 2013, 03:42:56 am »


               Ok I know now that it is not the area, nor the NPC, but the shops. I can get npc's to spawn in the area when I remove shops. Could it be too many shops or too many items in shops?
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
NPC's not spawning
« Reply #6 on: January 24, 2013, 04:16:44 pm »


               Merchants can only have
OnOpenStore
OnStoreClosed

Events.

Since you have no npc's you cannot be opening or closing any shops - so the merchant objects shouldnt be affecting the npcs'

When you added the debug messages to your merchant npc's on Spawn script - what was the result.

Did they spawn? What messages were wrote to the log.
Are you painting them down?
Or Are you using Encounters?
Are you using a special script related to the shops?
Eg- one that fires on item acquired/unacquired etc?

Acquired fires for every inventory carrying object in the game - when it is spawned.
Merchants have inventories, even though they are not npc's
Are you 100% certain that you dont have a module wide onAcquire/UnAcquire event that may be responsible for destroying object on corpses etc?

It could mistakenly be seeing the merchants, and determining that they are dead (because they were never alive) - and destroying object on them - thinking they are corpses that need cleaned up?


Try removing all event scripts from your module events, and do the same for the area.
And see if the npc's spawn with the shops.
               
               

               
            

Legacy_omen_shepperd

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NPC's not spawning
« Reply #7 on: January 24, 2013, 11:48:26 pm »


               

Baaleos wrote...

Merchants can only have
OnOpenStore
OnStoreClosed

Events.

Since you have no npc's you cannot be opening or closing any shops - so the merchant objects shouldnt be affecting the npcs'

When you added the debug messages to your merchant npc's on Spawn script - what was the result.


Nothing happened, though not sure if it was the mod or the scripting, as I used lilac soul's generator to do most of the scripting. I am still trying to understand scripting/programing in genneral.

Did they spawn? What messages were wrote to the log.


No,  I dont think I scripted that part right, all it did was post the mod loaded, I logged in and logged off, and the mod ended.

Are you painting them down?

Yes I painted them down.

Or Are you using Encounters?

No

Are you using a special script related to the shops?

  No just the standerd script created when connecting a NPC to a shop.

Eg- one that fires on item acquired/unacquired etc?

Not that I know of, I did grab a couple of items from the vault.

Acquired fires for every inventory carrying object in the game - when it is spawned.
Merchants have inventories, even though they are not npc's
Are you 100% certain that you dont have a module wide onAcquire/UnAcquire event that may be responsible for destroying object on corpses etc?

I can look at the scripts attached to the Mod Properities. I have a few things connected to them so this may take a moment.

It could mistakenly be seeing the merchants, and determining that they are dead (because they were never alive) - and destroying object on them - thinking they are corpses that need cleaned up?


Try removing all event scripts from your module events, and do the same for the area.
And see if the npc's spawn with the shops.


I will try removeing the Module events, the area events were removed a bit ago when i first discovered the problime. One thing i did do was export two areas from the mod into a mod clear of scripting, i removed one hak from the mod, and gave it a go. What happened then was I was able to get spawns in my starting area but not in the merchant area. I forgot to mention I checked all this as a player first, then DM. What resulted was NPC's in the starting area, but when i went into the merchant district nothing showed up. So i went in and removed the shops and all map pin waypoints. On the next try I got spawns in both areas. I tried just one shop attached to one merchant, as opposed to merchants haveing a couple to five shops attached to them. Any time I added shops into the mix it would not spawn NPC"S. I hope some of what i posted makes sense and may be helpful to others in explaining my situation.
               
               

               


                     Modifié par omen_shepperd, 25 janvier 2013 - 12:17 .