Author Topic: Scripted NPC Generation...  (Read 319 times)

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Scripted NPC Generation...
« on: January 18, 2011, 05:36:51 pm »


               Is this possible? Instead of creating a blueprint for a NPC can one randomly create one using scripts? Then assign them stats, inventory & scripts they use? This would be so much easier to me than tediously creating random NPC's to fill in an area... See what I am making is a marketplace and I want customers walking up and down the lanes checking out the various venders in a generic fashion to give it life... If I could do this all using a script I could have variations of clothing and appearence instead of the same NPC looping through waypoints over and over... What I need I suppose is a function set that sets stats and appearence and gives the NPC inventory... Assigns scripts for the AI etc...
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #1 on: January 18, 2011, 06:14:49 pm »


               I did a system for Tyndrel that created different heads on NPC so that there would be variety in the peasants. That combined with changing clothing should suffice. Let me see if I can find that script.
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #2 on: January 18, 2011, 06:22:29 pm »


               Sorry, can't seem to find that script. Are you using CEP?
               
               

               


                     Modifié par Baragg, 18 janvier 2011 - 06:23 .
                     
                  


            

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #3 on: January 18, 2011, 06:28:30 pm »


               Yeah 2.3 version inc all expansions... I could figure it out if I was pointed to the right functions to do that... Thanks!
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #4 on: January 19, 2011, 05:28:53 am »


               "SetCreatureBodyPart" to change the npc head. And as far as doing the clothes you'd need to "CreateItemOnObject" and then "ActionEquipItem".

This could all be mashed into an OnSpawn script for the npc. Using randoms for the head and clothes res refs.
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #5 on: January 19, 2011, 05:53:39 am »


               You might be interested in checking out this. It will populate an area with NPCs for you, if you wish for them to move through your area, although slight modification will be required if you want them to stop at corner shops and the like.

I used this script system and modified it for Almraiven to populate city streets.

FP!
               
               

               


                     Modifié par Fester Pot, 19 janvier 2011 - 05:53 .
                     
                  


            

Legacy_keyofrassilon

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #6 on: January 19, 2011, 05:31:43 pm »


               Hey thanks! That will save me alot of work!
               
               

               
            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #7 on: January 24, 2011, 09:37:33 pm »


               Random npcs
Random stats
....................both are on the vault and tested.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Scripted NPC Generation...
« Reply #8 on: January 25, 2011, 01:38:19 am »


               There is this one too:
http://nwvault.ign.c....detail&id=3668