Jump to content

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


Recommended Posts

Ok, so I have a very noobish question.


I already have the *.d file ready and begin making the *.cre file. Now this is where I get stuck. ;)


I open up NearInfinity and follow the tutorial.

"10) Scroll down until you get to Override Script: type in K#John (or whatever your npc's filename is)"

Huh? :D

I can type my file name but I can't make NearInfinity find it, I got a list of in-game (I guess) *.bcs files to choose from and can't do anything do make it I#Saman (the name of the file I made).


The same is with the Death Variable and Dialog.


Some help, for a poor noob, please? ;)

Link to post

It won't be able to find the files until you install them into your override. You would need code in your TP2 similar to the following:

COPY ~YourMod/scripts/i#saman.baf~ ~YourMod/scripts/i#saman.baf~
COMPILE ~YourMod/scripts/i#saman.baf~ //automatically compiles .bcs to override

If you don't actually have a script yet, just leave it blank until you do. Dialog compilation should be similar, though I don't know the exact syntax offhand. As for death variable, that is not an actual file. You should be able to just set that to whatever you want to refer to (usually same as your CRE file name).

Link to post

So... I've been following along with this tutorial (and a couple of others like it elsewhere) and have hit a snag. I've got the NPC in the game. She spawns right, she does her intro dialogue right. Then I kick her out, and she doesn't use the parting dialogue that I so lovingly coded for her. I invite her back into the party, and she persists in not using it. She uses instead some generic dialogue that I don't recognize. I wonder if anyone might have any bright ideas about what could be going wrong? Here's the contents of my .d file, if it helps:




IF ~NumTimesTalkedTo(0)~ THEN BEGIN Talk1

SAY ~Hi ho, travelers! Jessica's the name, adventuring's the game! You look like an interesting sort... Might I ask your name?~

IF ~~ THEN REPLY ~I am <CHARNAME>, strange one.~ GOTO HiThere

IF ~~ THEN REPLY ~I'm sorry, I don't have time to talk to you right now.~ GOTO NiceEnd

IF ~~ THEN REPLY ~I'm afraid I don't have the time to chat with crazies today, toots.~ GOTO RudeEnd




SAY ~You look like you're headed someplace exciting. Mind if I tag along?~

IF ~~ THEN REPLY ~Certainly.~ DO ~SetGlobal("JessJoined","LOCALS",1)

JoinParty()~ EXIT

IF ~~ THEN REPLY ~Not now, I'm afraid. Perhaps another day.~ EXIT

IF ~~ THEN REPLY ~I most certainly DO mind, nutjob. Bugger off.~ EXIT




SAY ~Hmmf! Have it your way, then!~





SAY ~Very well then. I'll just, eh, keep hanging around right here, I guess.~




IF ~NumTimesTalkedToGT(0)~ THEN BEGIN Talk2

SAY ~Well hello again, Big Important Adventurers! Feel like bringing me along this time? You won't regret it! (She brandishes her swords wildly, grinning and winking at you between the bright, flashing blades)~

IF ~~ THEN REPLY ~Why, of course! How can I turn you down after such an impressive display?~ DO ~SetGlobal("JessJoined","LOCALS",1)

JoinParty()~ EXIT

IF ~~ THEN REPLY ~Hmmm... Nope. Still not interested.~ EXIT





IF ~Global("JessJoined","LOCALS",1)~ THEN BEGIN LeaveGroup

SAY ~What's going on? I thought we were having fun?~

IF ~~ THEN REPLY ~We sure were. Let's keep going.~ DO ~JoinParty()~ EXIT

IF ~~ THEN REPLY ~Maybe you were... But the fun faded for me some time ago. Run along, now.~ DO ~SetGlobal("JessJoined","LOCALS",0)~ EXIT



IF ~Global("JessJoined","LOCALS",0)~ THEN BEGIN ComeBack

SAY ~So... Shall we re-start the party? (hot dance move)~

IF ~~ THEN REPLY ~Hell yeah. Welcome back, baby.~ DO ~SetGlobal("JessJoined","LOCALS",1)

JoinParty()~ EXIT

IF ~~ THEN REPLY ~I hate your little dance with every fiber of my being, Jessica. Stay away from me.~ EXIT



It's the "EBJesP" that I think isn't working, I guess, although... If the global "JessJoined" isn't getting set properly, that might produce my problem, right? I'm very much in the dark here, and any suggestions would be appreciated.

Link to post

Check your .tp2 file and make sure her dialogue files get appended to pdialog.2da properly. I'd also recommend to check for KickOutVar=0 in her parting dialogue(the way NPC mods usually do it), instead of checking for JoinedVar=1.

Link to post

Hey, appreciate the suggestions!


Sadly, the variable switching didn't work for me. I changed instances of "JessJoined" to "JessKickedOut" in the parting dialogue portion, and switched the ones to zeros and vice-versa. Still not working, in-game I get the same generic dialogue from the npc on kicking-out/re-joining. I think the pdialogue.2da is getting appended properly... After install I checked with NI and found all my variables slapped on the bottom of the file there. If it helps, here is the appending portion of the .tp2:


APPEND ~pdialog.2da~

~EBJes EBJesP EBJesJ EBJesD EBJes25P EBJes25J EBJes25D EBJes25~




APPEND ~interdia.2da~

~EBJes EBJesB EBJesB25~



Does this look right? I feel like there must be something simple that I'm screwing up, like a typo or something, but I can't for the life of me find it.

Link to post


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

  • Create New...