Pocket Plane Group

Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Tess on August 14, 2005, 10:27:39 PM

Title: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 14, 2005, 10:27:39 PM
I've been attempting to use the tutorial I found on this forum on adding a very basic NPC using WeiDU, and I just keep hitting this wall.  I'm entirely new to this and only starting to understand, and I really can't get my head around this.

I'm trying to add a very simple, very ridiculous little test-NPC to my second BGII:TOB installation so as not to muck up my actual installation...I know I've followed the instructions very carefully, but everytime I attempt to run my specific Melvin-setup.exe, it gives me this message:

Install Component [Melvin for BG2:TOB]
[Y]es or [N]o or [Q]uit?
Installing [Melvin for BG2:TOB]
Copying and patching 1 file ...
[Melvin\MELVIN.cre] loaded, 2168 bytes
[override\MELVIN.cre] loaded, 2168 bytes
[override\MELVIN.cre] backed up to [Melvin\backup/0/MELVIN.cre]
Copied [Melvin\MELVIN.cre] to [override\MELVIN.cre]
Compiling 1 dialogue file ...
ERROR: compiling [Melvin\Melvin.d]!
Stopping installation because of error.

ERROR Installing [Melvin for BG2:TOB], rolling back to previous state
[Melvin\backup/0/UNSETSTR.0] SET_STRING uninstall info not found
[Melvin\backup/0/UNINSTALL.0] loaded, 20 bytes
Will uninstall   1 files for [MELVIN-SETUP.TP2] component 0.
  Restoring backed-up [Melvin\backup/0/MELVIN.cre]
[Melvin\backup/0/MELVIN.cre] loaded, 2168 bytes
Uninstalled      1 files for [MELVIN-SETUP.TP2] component 0.
ERROR: Sys_error("Melvin\\Melvin.d: No such file or directory")
PLEASE email the file MELVIN-SETUP.DEBUG to tessbrds@yahoo.com

Bother all!  Anyway, I'm just clueless as to what could be going wrong--the Melvin.d file *is* in the correct spot and it *is* named the correct thing, and everything else is properly named...could this be because I'm attempting to use a second installation?  Everything else seems to work just fine on it.

Anyway, I'm dreadfully sorry to come out of left field with bothersome questions, but any help would be vastly appreciated.

Tess
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: jcompton on August 14, 2005, 10:31:37 PM
Show us the line of your TP2 where you are trying to compile melvin.d.
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 14, 2005, 10:33:03 PM
COMPILE ~Melvin\Melvin.d~
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: jcompton on August 14, 2005, 10:45:02 PM
So you really have a file named

melvin.d

sitting in a directory named "melvin" off the BG2 directory? It's not in a subdirectory like melvin/d or melvin/dialogue or anything like that? Sometimes the mind and the eyes play tricks after a long day of modding...
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 14, 2005, 10:59:13 PM
Hrm, this might be the culprit...I did have such a file, but it was considering itself a "text" file...I opened it up with ConTEXT and resaved it as "melvin.d" and it now considers itself a "d" file and is happy.  Well, sort of happy.  Now I have a "Parsing-parse" error, whatever the devil that is, but if I'm understanding correctly it is telling me I have improper syntax at some point within the "melvin.d" file.  However, I think I'll be able to figure that out on my own.  Looks like it just must be some little error on my part.

Thanks so much for the quick reply!
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: icelus on August 14, 2005, 11:01:13 PM
Dollars to donuts it's a missing tilde.  Damn those tildes!!!

Also, mmmm... donuts...
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 14, 2005, 11:25:24 PM
Or I was a complete idiot and forgot to END the thing altogether...yikes!

This is actually pretty amusing...with every tiny change I make, I end up getting a tiny bit further before I get an error.  Now my AR baf is sad...wait, no, that was a simple stupid linebreak mistake.

Oh, ye gods...it says it installed.  Let's check...nope.  Ooops, forgot to change the variable name for spawing him...

Well, I'll be damned...there he is!  But, he's not initiating dialogue, and if my character talks to him, I get a multiplayer-ish standard "Please rejoin" response.  I know I shut off the "Export allowed" flag on the CRE...could it be a problem with the "initiate dialogue" script?

(On a side note, I've never written a single line of code of any sort before today, and I wasn't informed it would be this addictively fun...)

EDIT: Well, I went back and checked, and somehow, the initiate dialogue script wasn't turned on.  So, I turned it on and reinistalled it, and now there's an all-new problem...the NPC sees my character and runs over, but I get the same "Please rejoin/Wait here" standard dialogue.  When I ask him to rejoin, he *repeatedly* initiates dialogue, saying over and over "Hello there."

...and I'm officially in over my head. 

EDIT:  Okay.  Unfortunately, I had the "initiate dialogue" in the "override script" spot, which, I assume, is why he kept initiating standard dialogue over and over again.  I fixed that and he stopped doing so.  No, I get the standard "Please rejoin/Wait here" when he runs over to talk to me, and then, once he is in the group, nothing. 

Now, once he's in the group I don't expect him to say anything--I only wrote an initial dialogue/kickout dialogue for him. 

So, my question is: Why isn't he using the dialogue I wrote for him and is instead defaulting to multiplayer-ish standard dialogue?  The "export allowed" flag is off and his "override script" is empty, as I didn't write a .bcs as I don't even know what that is, yet.
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Kismet on August 15, 2005, 07:30:25 AM
Is his Enemy/Ally status perhaps flagged as PC rather than neutral?
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 15, 2005, 11:25:44 AM
Bless your heart, darlin', it was!  So...(now I'm starting to feel really sheepish) I changed *that*...

And, he still uses the "Multig.dlg" dialogue.  I know this because I checked in NearInfinity and that's what it says he's using as a dialogue.  So the problem must be with my dialogue, somehow...but if it is compiling properly on the install, where is the problem?  Syntax or file names again?  How do I get him to switch to using his very own .dlg? 

Never mind...I just tried manually changing his .dlg to "melvin" by editing it as a string, and it worked!

The Power, MWAAHAHAHA! 

No, seriously, that was quite exciting.

But I'm not quite through with questions.  Now his "kickout" dialogue (the "p" dialogue, is that?) doesn't fire right, I just get the standard multiplayer kickout.  I've tried everything I can think of and the file names all seem to match up all right...what could be the problem, here?

And let me thank you all yet again...your answers have been really helpful and, most amazingly, I'm understanding a tiny bit more every time I fix a mistake.
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Kismet on August 15, 2005, 11:49:08 AM
Post the part of the .tp2 where you assign his dialog files.
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 15, 2005, 07:37:08 PM
This is the entire .tp2.  It's very simple, even more simple than the tutorial example as I tried to do away with the sound-related parts...maybe I missed something?  Also, the pdialog.2da has to be a seperate file within the "Melvin" folder, right?  Does the script within it also have to occur within the melvin.d file?  I'm a little lost on that...


BACKUP ~Melvin\backup~
AUTHOR ~tessbrds@yahoo.com~
BEGIN ~Melvin~

COPY ~Melvin\MELVIN.cre~ ~override\MELVIN.cre~
SAY NAME1 ~Melvin~
SAY NAME2 ~Melvin~

COMPILE ~Melvin\melvin.d~

EXTEND_TOP ~AR0602.bcs~ ~Melvin\AR0602.baf~

APPEND ~pdialog.2da~
~TRmelvin melvinP MelvinJ MelvinD Melvin25P Melvin25J Melvin25D Melvin25~
UNLESS ~TRmelvin~

APPEND ~interdia.2da~
~TRmelvin MelvinB MelvinB25~
UNLESS ~TRmelvin~

Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Kismet on August 15, 2005, 07:52:32 PM
This is the entire .tp2.  It's very simple, even more simple than the tutorial example as I tried to do away with the sound-related parts...maybe I missed something?  Also, the pdialog.2da has to be a seperate file within the "Melvin" folder, right?  Does the script within it also have to occur within the melvin.d file?  I'm a little lost on that...


You don't have to put pdialog.2da anywhere; WeiDU knows where to find it to append it.

According to your .tp2 file, melvin.cre, melvin.d and AR0602.baf all have to be in your Melvin directory.   I'm not sure what script you're referring to.
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 16, 2005, 11:14:33 AM
Yeeeah...I need to work a little on my terminology, I fear.

But, good news is--it works now, completely!  Albiet for an unknown reason, but...I'm still pleased.

Thanks, all!

Tess
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Rabain on August 16, 2005, 03:41:55 PM
Dialog filenames should be 8 characters or less I believe, the same for script names I think.

The filenames in green should work, those in red not:

TRmelvin melvinP MelvinJ MelvinD  Melvin25P Melvin25J Melvin25D Melvin25
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: jcompton on August 16, 2005, 03:46:02 PM
Ah, good catch!

The scriptnames can be quite a bit longer, so "TRMelvin" is valid (it's only 8 characters anyway) but you're right about the other three.
Title: Re: Very New Person Asks Question About Adding NPC Tutorial...
Post by: Tess on August 16, 2005, 07:43:33 PM
*forehead smack*  Of course!  I changed the *name* of the mod, it's much shorter now, and it works...that's exactly it!

Thanks so much!  I'm so glad to know *why* it works now.

Tess