Author Topic: Debugging an NPC mod based on Ghrey's tut.  (Read 2939 times)

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Debugging an NPC mod based on Ghrey's tut.
« on: June 11, 2004, 12:58:19 PM »
Still working through Ghrey's "How to ..." guide & I've got a .tp2 which runs without errors. Hooray!!  ;D

So I approach my NPC who is where I expect, I am approached as I'd expect, but the dialogue comes from MULTI[GJ].DLG, and when I initiate a conversation using the "TALK" button, the response is also from this file.  >:(

I have checked the .cre using NI and I have DPLAYER.BCS as my default script and no override set, DPLAYER.BCS references the MULTI[GJ].DLG.

When I set the OVERRIDE to my version of Ghrey's talknow script, I find that she doesn't need to be "TALK"ed to get the MULTI talk response and she loops in this mode, albeit after she's joined.

My create script

Quote

IF
   Global("DL#BWNExists","AR0500",0)
THEN
   RESPONSE #100
   SetGlobal("DL#BWNExists","AR0500",1)
   CreateCreature("DL#BWN",[1124.3241],3)
END



DL#BWN is the .cre file name but not the Death Variable, when I reset the DV := DL#BWN, the game won't load.

The ~pdialog.2da file seems OK.

Any ideas??  :-\

Also does ARnnnn.bcs fire when entering the area? Do I have to enter the area to run a test if I change the code to append to the area script, or can I just create a save game at the meeting point.

Offline neriana

  • Planewalker
  • *****
  • Posts: 585
  • Gender: Female
    • Darien NPC for BG2
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #1 on: June 11, 2004, 04:35:56 PM »
Changing the death variable to the creature name should not cause the game not to load. There's something wrong there, and it will probably cause you many more problems down the road. Also, I recommend you use DLTCEP rather than NI to create creatures. You can find it here: http://www.dragonlancetc.com/forums/index.php?board=9;action=display;threadid=857

Are you using an .exe file or a .tp2 to get your character into the game? If you haven't done so already, make a copy of Weidu.exe and rename it to Setup-nameofyourtp2.exe.

Your create script looks fine.
The color of infinity inside an empty glass.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #2 on: June 11, 2004, 11:47:03 PM »
Make sure the creature has all the flags removed, and isn't set to "exportable".  This is displayed at the top of the file in NI.
Earn Money Sleeping.

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #3 on: June 12, 2004, 12:42:56 PM »
... stuff deleted

Are you using an .exe file or a .tp2 to get your character into the game? If you haven't done so already, make a copy of Weidu.exe and rename it to Setup-nameofyourtp2.exe.


I am doing this, but thanks

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #4 on: June 12, 2004, 12:43:22 PM »
Make sure the creature has all the flags removed, and isn't set to "exportable".  This is displayed at the top of the file in NI.

Giving it a try!!

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #5 on: June 25, 2004, 07:43:11 AM »
OK, this may be a bit long, but I have taken Ghrey's advice and am still having problems.

I enclose my most recent test Log

Quote

.cre start point


Override    = None
Default      =DPLAYER3.bcs   # NB Alternatives exist
Enemy/Ally = PC - 2             # This looks wrong, see below
DeathValue= DLBWN08        # Is this the problem, see below
                          # what do the dialog lines have to agree with

T1 Using group in the Bridge, aproached her, she is green ringed, approaches the PC and says nothing. When talked to she offers a statement and I can respond with bye or rejoin. This dialog still looks like it comes from MULTI[J].

T2 Reloaded my test game, couldn't find her, left bridge, re-entered found her in the wrong place and same thing happened, syntax on area script is OK i.e. she's green, approached and when talked to offers to leave.

DV := DL#BWN

I change the death value to DL#BWN to agree with the line in the pdialog.2da & the file system file name. T1 fails, (she aint there).

I go to the Govt Area i.e. leave the area with the adjusted script and then return and I find her out side the fishmongers, she doesn't talk and is green ringed. When I talk to her she starts a party leave dialog. (As above)

Enemy/Ally := Neutral

As before, except she's now blue ringed (as one would expect)

Override := DL#BWNTN.BCSl, Default still set to DPLAYER3.bcs

I do not have to leave the area to find her, she's basically outside the temple of helm, (where I expect her, but not where I programmed her to be), however she approaches the party but I can't speak to her. I get the red ink response "XXXXX is has nothing to say to you". NB progam location = 1124,3241, found location = 1901,2753)

Each of these tests has been undertaken once, since at the moment I am trying to debug the conversation problem, which will allow me to test the *.d file I have created.

I want to get the conversation working properly first. Any ideas? My NPC still seems to be using the Multi[J] dialogue (or nothing). I can't rember if I made the .cre using the single player or multiplayer game, I have edited with both Shadowkeeper & NI since creation. I am using weidu .tp2 files to complie my scripts into the game.

There remains the question as to what the first entry in the pdialog.2da line needs to agree with, name, death variable of file name. The line is in the file, should I be testing for any other linkages.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #6 on: June 25, 2004, 08:53:54 AM »
I change the death value to DL#BWN to agree with the line in the pdialog.2da & the file system file name. T1 fails, (she aint there).

Did the creature get created anew when you tested again, or was it one that already existed in a saved game?

Quote
I want to get the conversation working properly first. Any ideas? My NPC still seems to be using the Multi[J] dialogue (or nothing).

Did you assign the initial DLG name in the CRE file? PDIALOG and INTERDIA govern what DLG files it will once once IN the party, but the initial DLG is defined in the CRE.

Quote
There remains the question as to what the first entry in the pdialog.2da line needs to agree with, name, death variable of file name.

DV.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #7 on: June 25, 2004, 11:57:09 AM »
I change the death value to DL#BWN to agree with the line in the pdialog.2da & the file system file name. T1 fails, (she aint there).

Did the creature get created anew when you tested again, or was it one that already existed in a saved game?

It should be my disk file copy being reread. i.e. the specified ..\DL#BWN.cre.  I am using a save game created from before the .tp2 was run. Also I believe from testing that it runs the area script time on loading the area so since I quit out of the game this seems to be OK (as far as I can tell).  (I also have two copies of the .cre (with different items) and these behave as I'd expect. :D
Quote

Quote
I want to get the conversation working properly first. Any ideas? My NPC still seems to be using the Multi[J] dialogue (or nothing).

Did you assign the initial DLG name in the CRE file? PDIALOG and INTERDIA govern what DLG files it will once once IN the party, but the initial DLG is defined in the CRE.

I don't think I did this. How do I do it.  ???  ??? ???

Quote
Quote
There remains the question as to what the first entry in the pdialog.2da line needs to agree with, name, death variable of file name.

DV.


Ok, I'd got to that conclusion, so I think I'm OK here.

TIA

--
Lennon

Offline cliffette

  • Timmins Tragic
  • Planewalker
  • *****
  • Posts: 547
  • Gender: Female
  • I still like Neighbours
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #8 on: June 25, 2004, 07:07:27 PM »
Quote
It should be my disk file copy being reread. i.e. the specified ..\DL#BWN.cre.  I am using a save game created from before the .tp2 was run. Also I believe from testing that it runs the area script time on loading the area so since I quit out of the game this seems to be OK (as far as I can tell).  (I also have two copies of the .cre (with different items) and these behave as I'd expect. :D

If you want to be sure, change the cre's main colour to hot pink and you'll be able to tell easily whether she's the new cre or the old one. :)

Quote
Did you assign the initial DLG name in the CRE file? PDIALOG and INTERDIA govern what DLG files it will once once IN the party, but the initial DLG is defined in the CRE.


I don't think I did this. How do I do it.  ???  ??? ???

I usually set this using Creature Maker. You can find an entry for "Dialog File (without DLG extension)" under the Other Attributes tag - just enter the initial dialog filename there, then save. Otherwise, take a look at the .cre file in NI and go to the Edit tab. There should be a row devoted to a dialog file there (according to IESDP, it should be near the bottom of the list) and I assume you can just enter your dialog filename there. I don't really use DLTCEP, so I can't help you with that one  :-\

ETA: Well, I opened up NI - there's a row for "Dialog" - right click on that row's entry column, choose Edit as String, and enter your dlg file name (including the .dlg extension). Voila!  ;)
« Last Edit: June 25, 2004, 10:09:19 PM by cliffette »

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #9 on: June 25, 2004, 09:39:56 PM »
But both DLTCEP and NI would have fields for "Dialogue" or "DLG" or something similar to that.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #10 on: June 26, 2004, 12:36:29 PM »
ETA: Well, I opened up NI - there's a row for "Dialog" - right click on that row's entry column, choose Edit as String, and enter your dlg file name (including the .dlg extension). Voila!  ;)

I've never done it with the .dlg extension, and it works, too.
Earn Money Sleeping.

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Re: Debugging an NPC mod based on Ghrey's tut.
« Reply #11 on: June 26, 2004, 12:50:18 PM »

If you want to be sure, change the cre's main colour to hot pink and you'll be able to tell easily whether she's the new cre or the old one. :)


I used the inventory contents but I'll rember the colour, its a good idea.

[Edit]

That seems to work, I'm now not happy with the dialogue I wrote, this is going to be very addictive - Thanks and I'll be back soon

[/Edit]
« Last Edit: June 30, 2004, 09:13:37 AM by lennon »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: