Jump to content


Photo

Can't get npc to talk


  • Please log in to reply
26 replies to this topic

#1 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 01 October 2007 - 11:34 AM

A continuation of my woes with Darian, after finally getting him to install and join the party, I've run into a new problem: he doesn't talk. Now, this isn't so unusual, as I haven't written his interjections yet and he's not a chatterbox anyhow, but even with repeated usage of ctrl-I and AdvanceRealTime, I can't seem to get him to talk, banters or lovetalks.

I figured there was a problem with his banter file, and already changed the tp2 code from

APPEND ~pdialog.2da~ ~T1Dar T1DarP T1DarJ T1DarD T1Dar25J T1Dar25D T1Dar25~
UNLESS ~T1Dar~
APPEND ~interdia.2da~ ~T1Dar BT1Dar BT1Dar25~
UNLESS ~T1Dar~

to

APPEND ~pdialog.2da~ ~T1Dar.d T1DarP.d T1DarJ.d T1DarD.d T1Dar25J.d T1Dar25D T1Dar25~
UNLESS ~T1Dar~
APPEND ~interdia.2da~ ~T1Dar.d BT1Dar.d BT1Dar25~
UNLESS ~T1Dar~

But this doesn't seem to have worked. Any ideas?

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#2 Miss Sakaki

Miss Sakaki

    Modder

  • Modder
  • 505 posts

Posted 01 October 2007 - 11:56 AM

You don't have to put .d where you append the 2das, you just need it like so:

APPEND ~pdialog.2da~ ~T1Dar T1DarP T1DarJ T1DarD T1Dar25J T1Dar25D T1Dar25~
UNLESS ~T1Dar~

APPEND ~interdia.2da~ ~T1Dar BT1Dar BT1Dar25~
UNLESS ~T1Dar~

I can't seem to get him to talk, banters or lovetalks.


You've got a problem in your script where you tell Darian when to start banters, or you've got a problem in your banter file. Have a look at Rastor's romance authoring tutorial which covers basic PC-NPC conversation, and also Blue's Road to Banter, which is a good NPC-NPC conversation tutorial.

From your Q&A posts it sounds like you're trying to do everything at once. I'd recommend testing as you do each thing and working from tutorials. If they say to do something, do it with your dialogue in the place of the tutorial dialogue. It may seem like slow going at first, but it's much easier in the long run as you're going to get more familiar with the coding and scripting language.

Edited by Miss Sakaki, 01 October 2007 - 11:57 AM.


#3 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 01 October 2007 - 12:04 PM

Yes, this really hasn't been a well-planned mod as far as actually putting it all together is concerned. I'm basically trying to do it all in one fell swoop, but it's starting to look like one swell foop.

As it is, Darian actually has everything but his interjections coded in-this is the first time I've actually been messing with Weidu. However, no one saw anything amiss about this when I've posted examples of coding of Darian's lovetalks, banters, and whatnot, and none of the proofreaders/code-checkers who volunteered to help out saw anything odd. I'm going to keep messing around, though, and hopefully I'll get him talking before long.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#4 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 01 October 2007 - 12:05 PM

What she said.

Yes, I know the temptation to leave off all the coding until the end is strong, and you just want to get it out in alpha. Resist.

Gavin's alphas and first two betas were plagued by bugs because I had to learn the advice Miss Sakaki and I are offering you the hard way.

What I'm doing with Haldamir: first I made sure Haldamir's unscripted banters worked. They do. Next, I'll test his friendhip talks and interjections, once they're finished. If he had a romance, I'd test that after his friendship talks and interjections. If he had a quest, I'd test that after his romance.

So, now that you've got your CRE sorted out, why don't you just try installing only selected portions of the mod, and comment out the other parts of the tp2?

Edited by berelinde, 01 October 2007 - 12:06 PM.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#5 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 01 October 2007 - 12:12 PM

Yes, this really hasn't been a well-planned mod as far as actually putting it all together is concerned. I'm basically trying to do it all in one fell swoop, but it's starting to look like one swell foop.
As it is, Darian actually has everything but his interjections coded in-this is the first time I've actually been messing with Weidu. However, no one saw anything amiss about this when I've posted examples of coding of Darian's lovetalks, banters, and whatnot, and none of the proofreaders/code-checkers who volunteered to help out saw anything odd. I'm going to keep messing around, though, and hopefully I'll get him talking before long.

*Ahem* we did tell you about things, like the whole !StateCheck(Myself,CD_STATE_NOTVALID) thing, and the multiple trigger thing, and the check for tildes with WeiDU_DTRAstring thing, but you seemed to be quite reluctant to follow that advice.

And proofreading code will only get you so far. The kind of thing you're finding now is stuff WeiDU catches instantly, but it would take us half of forever, if we saw it at all. Be honest. Is it fair to have modders spend countless hours proofreading code WeiDU could easily check in seconds when we've got our own projects, especially if chances are good you're not going to change it anyway until it actually makes WeiDU barf?


Edit: that line in bold is priceless!

Edited by berelinde, 01 October 2007 - 12:13 PM.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#6 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 01 October 2007 - 12:22 PM

Okay, I deserved that and then some. Impatience is starting to get the better of me, which I'm admittedly prone to. I'll do as you suggested.

Sorry if I seemed arrogant or lazy, by the way. Diplomacy isn't exactly a class skill for me. :(

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#7 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 01 October 2007 - 12:34 PM

All is not lost, though! You can still keep what you've got! Just nibble away at it, instead of trying to swallow the whole thing in one bite.

You can probably test your banters in about 15 minutes, so you might want to try that first.

Here's what you would do: comment out all the lines in your tp2 that
  • Aren't the header.
  • Don't append the 2DAs. You can append the 2DAs with files that you don't plan to compile immediately, so you should be OK with that.
  • Aren't unscripted banter files.
Then run setup-Darian.exe, install the mod, and test your unscripted banters. If they work, on to the next step.

Folks will help, if you let them. :)

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#8 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 01 October 2007 - 12:43 PM

Thanks, but I noticed something when I did an uninstall-reinstall trick with Weidu:

[Darian1240/Scripts/T1Dar.baf] PARSE ERROR at line 45 column 24-24
Near Text: )
Type mismatch in "DialogFile" argument of [StartDialogue].
Expecting type "string". Recovering.

[Darian1240/Scripts/T1Dar.baf] PARSE ERROR at line 45 column 24-24
Near Text: )
Not enough arguments to [StartDialogue]. Recovering.

Line 45 is as follows:

OR (2) Global("T1DarRomanceActive","GLOBAL",4) Global("T1DarRomanceActive","GLOBAL",2)

The bolded part is column 24.

I don't think this is the issue, but thought I'd mention it.

And a question regarding this:

Aren't unscripted banter files.


Darian has no strictly unscripted banter file. His romance is part of BT1Dar. Not sure what you want me to comment out and what to leave in.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#9 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 01 October 2007 - 12:51 PM

Oh! I see the problem! You are using the banter file for your lovetalks!

StartDialogue() and StartDialogueNoSet() both make calls to the joined dialogue file, the J file, not the banter file, the B file.

First of all, for a party joinable NPC, there is no reason to use SD() as opposed to SDNS(). I think SD() takes extra parameters, like identifying the file to use between the brackets. But it makes a call on the J file, not the B.

Your NPC isn't talking because in order to make a call on the B file, you need to use Interact(), not SD(), not SDNS().

But if you have plans to ever have crossmod content for Darian, we should really talk about whether it's a good idea to use the B file for lovetalks. Yes, many people like to do that. But there are complications, mostly involving state weighting.

I'm going to be home from work in 1.5 hours. I will look for you on IM, so we can talk about either converting your scripts to call the right file, or converting your files in general to something that is more mutually compatible with other mods.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#10 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11149 posts

Posted 01 October 2007 - 01:30 PM

As I mentioned in the other thread, don't use StartDialogue().

Secondly, compilation of scripts tend to ignore comments and additional (more than one) empty lines between blocks. This is why the line numbers don't match.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#11 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 01 October 2007 - 08:04 PM

Sorry about going MIA. Another campus-wide internet crash. I'll get this stuff y'all mentioned fixed as soon as I can. I was using the B file for Darian's lovetalks because that's what the tutorial I was looking at said to do. Guess I shouldn't shackle myself like that. Thanks anyhow.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#12 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 02 October 2007 - 03:22 AM

There are some folks that say that using B files for lovetalks is the way to go. There are others that disagree. JCompton is a strong proponent of using the B files for lovetalks, and I know at least Gabrielle has agreed in no uncertain terms. Kulyok, cmorgan, and I advocate using the J file.

Advantages of using the B file for lovetalks:
  • Tradion (cue musical number)
Disadvantages of using the B file:
  • Weighting becomes critically important, since your unscripted banter is going to go here.
  • You need to keep anything scripted at the top of the file or every unscripted banter before it will play before your scripted banter.
  • If you ever decide to add anything scripted to the file, in a separately installable file, like a bug-fix or an add-on, and you want to keep all your scripted dialogue together, you're going to have to weight your own dialogues.
  • If you ever decide to add anything unscripted to the file, like Crossmod, you're going to have to add it to the end, because you never know what has been added to the beginning, or even in the middle. That means the Crossmod dialogue will *always* play dead last. Which can be a bummer.
  • If a scripted dialogue hangs for some reason (it won't if you use the two-part activation script, but not everyone does), you miss a critical lovetalk or other dialogue.
  • If you want to add scripted Crossmod, like a romance conflict, it's going to have to go in the J, separate from the rest of the lovetalks, because adding it to the B is a nightmare because of state weights and the mix of scripted and unscripted banter in the same file.
[Advantages of using the J file for lovetalks:
  • It is organized. All scripted dialogue goes together, in the J file, all unscripted dialogue goes together, in the B file. Nice and neat.
  • You don't have to worry about state weights. If you want to add something to the J file, and want to add it before the PID, no worries, just stick a WEIGHT #-1 after the IF in the dialogue file and you're good to go. If you want to add some additional banters and you want to add them to the top of the stack, you can add WEIGHT #-1, or you can just leave it off and it will be added to the bottom. Adding a number somewhere in the middle will shift it toward the middle of the heap. In any case, nothing will be broken, because it's only unscripted banter there, so it's no big deal if it's a place or two off.
  • Should, for some reason, a scripted dialogue hang, it's easy to clear by simply force-talking the NPC. If you use the two-part scripting method, where the first script block sets the global for the dialogue and the second makes it happen, this won't occur, but it's nice to know, just in case.
  • Crossmod is easy. Very, very easy. No fussy state weights, no hassles.
Disadvantages of using the J file for lovetalks:
  • You will annoy JCompton and Gabrielle
In any case, you need this information:
J file scripted dialogue uses StartDialogueNoSet(), always.
B file scripted dialogue uses Interact(), always.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#13 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 02 October 2007 - 03:54 AM

I prefer "all scripted talks, including lovetalks" go to J file, though I really realized it months after releasing Xan. And, to put it bluntly, Xan is a mod with a lot of dialogue that works, and recoding it might change that, and I wouldn't want to. :) So if you have everything coded, I wouldn't bother, but if you're just starting, or it doesn't work anyway, then, yeah, J is the place to go.

I also think 'annoying' might be a strong word. As long as the mod works and doesn't mess up anyone's install, well. B or J, it's not as I really care. J is neater, that's all.

If you ever decide to add anything unscripted to the file, like Crossmod, you're going to have to add it to the end, because you never know what has been added to the beginning, or even in the middle. That means the Crossmod dialogue will *always* play dead last. Which can be a bummer.


Crossmod is easy. Very, very easy. No fussy state weights, no hassles.


Mmm, not exactly, I think. If all your scripted talks are in J, it's easier, because then you'll only have Bioware banters in your B file. But you will have to figure out the weights anyway. And if your scripted talks are in B, you still can weight crossmod banters - I do, for Xan. It just takes one look at your dialogues in Infinity Explorer, in both cases. Again, it's no big deal, but "all scripted stuff goes to J" is neater.

I think these posts deserve a separate topic.

#14 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 02 October 2007 - 06:06 AM

RE: annoyance...

That was hyperbole. ;)

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#15 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 02 October 2007 - 09:22 AM

Hey, Tempest, read this. This is the reason you should make sure you remove the "Export Allowed" flag.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#16 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 02 October 2007 - 10:03 AM

I'll be sure to do that, but Tuesdays are busy as hell for me. I can usually steal a few minutes to hop on message boards and whatnot, but it's unlikely I'll get this fixed and tested tonight. Sorry folks, but real life takes precedence over this.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#17 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 03 October 2007 - 02:47 PM

Okay, moved all of Darian's scripted talks to his J file, now one last question: for the StartDialogue command, do I use StartDialogue(Player1) or StartDialogue("T1Dar")?

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#18 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9202 posts

Posted 03 October 2007 - 03:16 PM

Player1, since Darian is talking to the Player. :)

#19 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 03 October 2007 - 03:19 PM

Thanks. :) Oh, and is there any difference between the StartDialogue and StartDialogueNoSet commands?

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#20 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 03 October 2007 - 04:40 PM

Tempest, please forget you ever heard of StartDialogue(). Please. There are very, very few reasons to use it, and none of them involve a party-joinable NPC.

I will give the IESDP listings, though, together with my explanations.
137 StartDialog(S:DialogFile*,O:Target*)
Starts a dialog with the target object. The dialog can be any associated ********.dlg file. Unlike the other action, Dialog(), StartDialog() will start a dialog from a distance. If the creature using this action has been assigned a dialog that has all top level conditions returning false, this action will not fail. This action also seems to set the dialog file (possibly only for the current session).


IF
	 See([PC])
	 NumTimesTalkedTo(0)
THEN
	 RESPONSE #100
		   StartDialog("andris",[PC])
END
The syntax for this would be
StartDialogue("T1Dar",Player1)
He'd start talking from across the area, as in out of visual range, as soon as the creature enters the area. So, if you placed Darian at one end of Waukeen's Promenade, and the party entered from the other, and used the script block that follows, Darian would be this mysterious disembodied voice speaking from across the Promenade.

IF
  InMyArea(Player1)
  Global("T1DarJoined","GLOBAL",0)
THEN
RESPONSE #100
StartDialogue("T1Dar",Player1)
END

Suboptimal.

And here's what the IESDP has to say about StartDialogueNoSet().
198 StartDialogueNoSet(O:Object*)
198 StartDialogNoSet(O:Object*)
Will start a dialog already assigned to the performer of this action with the object. Unlike Dialog(), this is used from a distance. It will initiate whether or not a character is in sight. If the creature using this action has been assigned a dialog that has all top level conditions returning false, this action will not work. If the target is invalid, the active creature will initiate dialog with Player1.
The syntax for this one goes
StartDialogueNoSet(Player1)

Theoretically this one, too will fire from across the Promenade, but you don't have to specify the dialogue file. Less typing=less chances to screw it up. And it's very easy to type T1Dar instead of T1DarJ.

Use StartDialogueNoSet() over StartDialogue(). You're bound to misspell a dialogue file name somewhere, and it will take you ages to figure out what you did wrong.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum