Jump to content

Discussion: How to make an NPC if you are a NOOB.


Recommended Posts

Guest Chronis

This was very helpful thanks, probably saved me hours of work trying to figure this all out.

 

One small typo

 

SAT HAPPY ~This group is great~

 

should be SAY

Link to comment

I have a question about making a NPC, and since I'm a n00b, I think (hope) this is the best place to ask this:

I read through the tutorial, and when it starts out by describing how to have that first NPC dialogue, it describes a NPC that just kinda walks up to the PC and starts the conversation (obviously, of course). However, I wanted to have my NPC's introduction come in the middle of someone else's conversation--when you're accosted outside of the Copper Coronet by the duo that insults you, I want to have my NPC attempt to interject on your behalf. Is it possible to do that?

Link to comment

Sure that's possible. Basically, in this case you don't want a script block like the one described above to start the dialogue (though of course your NPC will eventually need a script). And of course you'll want to extend the area script so your NPC spawns.

 

You'll then want to use INTERJECT to start your dialogue (the WeiDU readme has a fairly decent example of how to use INTERJECT). At the end of your interjection you'll do EXTERN mynpcfilename restofthedialogue where restofthedialogue is some block as described in the tutorial.

 

Here's an example:

 

BEGIN G#BOB

INTERJECT GARREN 29 G#StartingInterjection
== G#BOB ~Hello my name is Bob!~
EXTERN BOB dialoguecontinues

APPEND G#BOB

IF ~~ THEN BEGIN dialoguecontinues
SAY ~As I was saying, blah blah...~
//etc etc
END

//All your other blocks

END

 

Note I've included my prefix (G#) for filenames and variable names so you can see how it works. Please don't actually use my prefix for your mod.

 

Edit: If you don't like the whole APPEND business you can instead put your INTERJECT bit at the end of your filename and then you don't need it:

 

BEGIN G#BOB

IF ~~ THEN BEGIN dialoguecontinues
SAY ~As I was saying, blah blah...~
//etc etc
END

//All your other blocks

INTERJECT GARREN 29 G#StartingInterjection
== G#BOB ~Hello my name is Bob!~
EXTERN BOB dialoguecontinues

 

It doesn't matter in the slightest that they are 'out of order'.

Link to comment
Guest Vociferate

I am trying to make a small mod with a friend for bg1, are there any good sites still up to grab some resources and tutorials from? I have succecfully made a npc using a tutorial very much like this one, for bg2, and I wonder how much different it is for bg 1.

Link to comment

thank you grim squeaker,

 

we will use easy tutu since I think it will be less of a transition--

 

the idea is simply to make some of the more interesting (non joinable) npc's from baldur's gate 1 (for example, when Mulahey surrenders in the bottem of nashkel--maybe an evil party might welcome him into their ranks.) contiunue into bg 2.

 

Maybe some other breadth/depth improvements.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...