Jump to content


Photo

NPC Help


  • Please log in to reply
8 replies to this topic

#1 icelandismine

icelandismine

    Support your 2nd Amendment rights!

  • Member
  • 280 posts

Posted 23 June 2004 - 06:02 PM

I used the file to make a npc, and followed it to the letter. I have the .cre file, the .d file, the TP2 file and the .baf file. However, i get this message whenever i run Weidu (named setup-mymod) to run the TP2 file (also named setup-mymod)
The .D file is attached at the bottom.

[C:\Program Files\Black Isle\BGII - SoA\Setup-MyMod.exe] WeiDU version 155
{Setup-NPCKit.exe} Queried (pid = 80) version = 155 query done.

[SETUP-MYMOD.TP2] LEXER ERROR at line 1 column 0--1
Near Text: -
invalid character [-] (It looked like a squared off u, at the top of tthe space)

[SETUP-MYMOD.TP2] ERROR at line 1 column 0--1
Near Text: -
Parsing.Parse_error
ERROR: parsing [SETUP-MYMOD.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-MYMOD.TP2]: Parsing.Parse_error

ERROR: Parsing.Parse_error

Press ENTER to exit.



This is the coding in the TP2 file:

BACKUP ~BobTheNPC\backup~
AUTHOR Icelandismine
BEGIN ~Bob the NPC for BG2:ToB~

COPY ~BobTheNPC\J#Bob.cre~ ~override\J#Bob.cre~
SAY NAME1 ~Bob~
SAY NAME2 ~Bob~
SAY SELECT_COMMON4 ~Blah blah blah.~ [Bob1]
SAY SELECT_COMMON5 ~Give the word.~ [Bob2]
SAY SELECT_COMMON6 ~Point the way.~ [Bob3]
SAY SELECT_ACTION1 ~I'm on the job.~ [Bob4]
SAY SELECT_ACTION2 ~As you wish.~ [Bob5]

COMPILE ~BobTheNPC\J#Bob.d~

COMPILE ~BobTheNPC\J#Bob.baf~

EXTEND_BOTTOM ~Ar1000.bcs~ ~BobTheNPC\j#ar1000.baf~

APPEND ~pdialog.2da~
~J#Bob J#BobP J#BobJ J#BobD J#BobP J#Bob25J
J#Bob25D J#Bob25~
UNLESS ~J#Bob~



All help is appreciated!

Attached Files

  • Attached File  J_bob.d   0bytes   8 downloads

Edited by icelandismine, 23 June 2004 - 06:03 PM.

"What's wrong with being a trigger-happy, nationalistic, meat-eatin' neo-con who likes to shoot things, shoot 'em dead?"
-Me

"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton

#2 -Ashara-

-Ashara-
  • Guest

Posted 23 June 2004 - 06:24 PM

If I am not mystaken the error is in line 1 of your TP2 file. If it shows really weird character it might be some character recognition problem with a weird font/encoding.

#3 neriana

neriana
  • Member
  • 139 posts

Posted 23 June 2004 - 07:32 PM

One note that you may already know: You don't need to use the J# prefix. In fact, you probably shouldn't, because it's what Ghreyfain uses.

Did you save the file as a normal .txt document, no formatting?

Edited by neriana, 23 June 2004 - 07:35 PM.


#4 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 24 June 2004 - 04:00 AM

You need to put tildes around the AUTHOR statement:

AUTHOR ~Icelandismine~

The rest looks ok, at a glance. :) Though I'd follow nereina's advice and use something other than J#. There's a list of prefixes people use stickied somewhere at TeamBG.

BTW, nice nick and avatar. :)
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#5 icelandismine

icelandismine

    Support your 2nd Amendment rights!

  • Member
  • 280 posts

Posted 24 June 2004 - 08:15 AM

Found out the problem. MS Word formatted the files by itself, and messed it up. Wrote it out again in Notepad, and it worked. Just having trouble with this last bit of code. If i delete this, the NPC installs fine, but i have to use the console to create him.
This is the last part of the .D file:

BEGIN J#AR1000.baf

IF ~Global("J#BobExists","AR1000",0)~
THEN
RESPONSE #100
SetGlobal("J#BobExists","AR1000",1)
CreateCreature("J#Bob",[1137.2046],3)
END

BTW Thanks oft the help!

Edited by icelandismine, 24 June 2004 - 08:19 AM.

"What's wrong with being a trigger-happy, nationalistic, meat-eatin' neo-con who likes to shoot things, shoot 'em dead?"
-Me

"It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived."
- General George S. Patton

#6 -Ashara-

-Ashara-
  • Guest

Posted 24 June 2004 - 08:52 AM

This is the last part of the .D file:

BEGIN J#AR1000.baf


What you need to do is to create a separate flie with the extension BAF using your block and then append it to the existing AREA script (not D file, which appends to DIALOGUE) - please see Ghrey's tutorial again on how to do it.

#7 neriana

neriana
  • Member
  • 139 posts

Posted 24 June 2004 - 12:04 PM

Never use Word to create Weidu files. Use Wordpad, Notepad, or preferably a text editor like ConText, and always save in text format.

#8 -Ashara-

-Ashara-
  • Guest

Posted 24 June 2004 - 12:41 PM

I actually do use Word to write files out first and have the advantage of spellcheck etc, and then paste in Context and save in D format. It works fine, as long as the encoding/font aren't weird.

#9 neriana

neriana
  • Member
  • 139 posts

Posted 24 June 2004 - 03:32 PM

I actually do use Word to write files out first and have the advantage of spellcheck etc, and then paste in Context and save in D format. It works fine, as long as the encoding/font aren't weird.

I did that once and it totally screwed me up. I really like ConText because I can keep the dialogue and variables separate. But to each her own :).