e-mods.net

Nod Engine SDK => Mapping in Embrace => Topic started by: Barnabas on 2008-03-03, 13:04:46

Title: Placing NPCs
Post by: Barnabas on 2008-03-03, 13:04:46
Is it possible to place NPCs on a map, so that some of them walk around ( following the interests points ), while other NPCs stand still, without modifying the NPC files?
Title: Re: Placing NPCs
Post by: Javokis on 2008-03-05, 07:36:49
Yes. You can override an NPC's AI file by pressing N in the embrace editor after selecting the npc you want to modify. In the Things&Templates window click the Overrides tab. In the AIClass input box you can input an AI file (.NAI). I would recommend using guard.nai since it wont attack enemies by default until someone causes trouble - it also doesn't follow interest points like the ped.nai file does.

Title: Re: Placing NPCs
Post by: Barnabas on 2008-03-06, 04:46:56
Yeah  ;D thank you, that helped alot^^
Title: Re: Placing NPCs
Post by: Devair on 2008-04-18, 02:56:49
I did that the hard way, obviously... thanks Jakovis.  (That's a real "thank you" not sarcastic.  Sometime it's hard to tell by just text.)   I followed the Battle Milkmaid again and created a new NPC to plant where I wanted him.  I needed a Gargoyle which wasn't going to stomp everyone who wasn't an enemy.  I thought I was going to have to create all of them almost from scratch if they were going to behave any differently than how they are in the regular Single Player game.     ::)

It was kind of fun making him, though, and I was really proud to have my gargoyle squatting behind the bar there in London.  :P
Title: Re: Placing NPCs
Post by: Devair on 2008-04-18, 15:26:51
This is driving me mad.  I went to try this and also read an earlier thread on the subject.

On both threads here about NPCs there's reference to "Pressing N in the Embrace Editor after selecting an NPC you want to modify" and a "Things & Templates window" which opens into an "Override Tab."

Where is this?  I assumed this means Embrace from the NOD STK Editor but although I have figured out a few really basic things in there, I can't find anything which has to do with NPCs.  Just in case I had the wrong Embrace, I also opened up the game and went to the ST mode (which I think is also called Embrace?) for a LAN multiplayer game.  I opened an empty map where you can place objects, people, and so forth by point and click.  I tried selecting an NPC on one of those maps and hitting "N" as well, but nothing happened.

This is driving me crazy - what am I missing? 

Edit: Ah ha.  I was missing a tutorial.  LOL  I found one which will start me from scratch and had an image of the Things and Templates function.  At least I know where to look now.   :P  This is actually fun now that I know which way to go.
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-13, 03:18:47
I tried to override the AI scripts, but where do I find the .nai files? Do I have to unpack anything before, like the codex.nob?
Another thing is, how do I create dialogues for NPCs. I want some small dialogues for some of my NPCs, so that the ST does not have to control every single NPC in the game. Does there a tutorial exsist for dialogues?
And one last question in this reply  ;D : Is it possible to give a NPC a specific sound? So that the sound get played when the players click on the NPC?
Title: Re: Placing NPCs
Post by: Javokis on 2008-06-13, 09:56:47
Check here:

https://e-mods.net/forum/index.php?topic=443.0.html

Could be helpful.
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-13, 13:08:06
Thank you, but where am I able to get JDK 118, the link in the thread doesn´t work anymore....
Title: Re: Placing NPCs
Post by: Javokis on 2008-06-13, 13:31:09
Oops. Fixed now. Try it again.  ;)
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-13, 13:39:27
Thanks  ;D
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-14, 07:11:26
Still have the question with the AI script for NPCs  ::)
Title: Re: Placing NPCs
Post by: Javokis on 2008-06-14, 08:45:24
NAI files are located in Resources.nob so open with winzip. They go inside the misc/AI folder.
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-14, 09:28:10
Thanks^^
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-17, 12:40:26
And again a question about placing NPCs: I set a lot of interestspots in maps, but always interestspot 0 and it worked good so far. But there are 9 interestspots to set, what are the others for? Am I able to set a specific way for a specific NPC?
Title: Re: Placing NPCs
Post by: Javokis on 2008-06-17, 13:03:03
In the ped.NAI file there is an interestnum parameter. It is always set to 0, but I think you can create new NAI files for NPC's to chase after another number in the NAI file then spawn that interest point on your map.

So if want an NPC to chase after InterestNumber 6 only then spawn interest number 6 on your map then create an NPC with custom NAI file that as an interestnum of 6. This could be good for when you're building cities where there is a slum zone. The poor NCPs will only wander around the slums, while other NPCs will stay out. I think the crows are another example.
Title: Re: Placing NPCs
Post by: Ezykeyal on 2008-06-17, 16:29:30
That's right and if you should ever run out the 9 you can add more yourself, actually you can add anything yourself like playerstarts.
Just edit the entities.def in your NODSDK folder.
Might be helpful for you since you are building a rather large city and you want more playerstarts than the editor provides by default.
Title: Re: Placing NPCs
Post by: Barnabas on 2008-06-21, 01:51:24
Shit, hoped that I can add an individual ped.nai to a NPC with embrace, but it didn´t work  >:(