Author Topic: NPC creation questions  (Read 9247 times)

Offline Kish

  • HEROISM OK
  • Planewalker
  • *****
  • Posts: 790
    • Oversight mod.
Re: NPC creation questions
« Reply #25 on: April 13, 2004, 11:29:20 PM »
A locals variable applies to a particular character.  So you can be at Lovetalk 4 for Aerie, Lovetalk 2 for Jaheira and Lovetalk 6 for Viconia.  A global variable applies to the whole game--if you have a global variable called LoveTalk, that's the only global variable called LoveTalk that anything can check for or alter.
Beauty standing amidst fiery destruction.

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: NPC creation questions
« Reply #26 on: April 14, 2004, 06:28:05 AM »
So if you're going to make your particular lovetalk variable "GLOBAL" then don't use "LoveTalk" as the variable name.  I personally use a "GLOBAL" variable because I want other NPCs to be able to check the LT variable.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline neriana

  • Planewalker
  • *****
  • Posts: 585
  • Gender: Female
    • Darien NPC for BG2
Re: NPC creation questions
« Reply #27 on: April 19, 2004, 04:11:17 PM »
Something very strange is happening in my B file, and I can't trace it. Hopefully someone else has run into a similar problem and can help me out.

My NPC's lovetalks and his timer work fine. All of his banters with other party members work EXCEPT one with Minsc. Minsc spouts his first line, then Darien replies with one of his lovetalk lines.  The conversation then proceeds with the PC as in the LT, which otherwise works completely as it should. This happens whether or not the LT in question has taken place. The banter with Minsc is named "DarMinscBoo1", and the global set after his first line is ("E#DarMin","GLOBAL",1). The LT line that Darien spouts is called DarLTFOURChildren. Before I put the 4th LT in the game, the Minsc banter worked fine. Ideas?  ???
The color of infinity inside an empty glass.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: NPC creation questions
« Reply #28 on: April 19, 2004, 04:38:58 PM »
I think you're going to have to show your B file to someone. Send it to jcompton@pocketplane.net.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

shgg

  • Guest
Re: NPC creation questions
« Reply #29 on: August 16, 2004, 05:41:13 PM »
Hello,

Could you, please, help me?
I'm making a banter between my custom NPC and Minsc. Here's a part of my NPC's baf file:
Code: [Select]
IF
  RealGlobalTimerExpired("SaeminBanter","GLOBAL")
  InParty(Myself)
  IsValidForPartyDialog("Minsc")
THEN
    RESPONSE #100
    StartDialogNoSet(Player1) //I've tried with "Minsc" too, but it also doesn't work.
END

Here's part of my NPC's banter file:
Code: [Select]
CHAIN
IF
  ~InParty("Minsc")
  See("Minsc")
  !StateCheck("Minsc",STATE_SLEEPING)~
THEN Bsaemin SaemBooTalk
~Blah blah?~
== BMINSC
~Blah blah blah?~
== Bsaemin
~Blah blah blah!~
EXIT

And this is not working. I'm resetting timer "SaeminBanter" to 0, Saemin and Minsc turns to each other, but the dialogue is not starting. Please, tell me, what's wrong?

Thanks in advance,

--
shgg.

Offline SimDing0™

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: NPC creation questions
« Reply #30 on: August 16, 2004, 06:01:14 PM »
You're using StartDialogNoSet to initiate the dialogue, but judging my the filename, it's the B***.DLG file that the conversation's in. This has to be triggered using the Interact() action. StartDialogNoSet will always call the ****J.DLG file for NPCs.

shgg

  • Guest
Re: NPC creation questions
« Reply #31 on: August 16, 2004, 06:23:00 PM »
You're using StartDialogNoSet to initiate the dialogue, but judging my the filename, it's the B***.DLG file that the conversation's in. This has to be triggered using the Interact() action. StartDialogNoSet will always call the ****J.DLG file for NPCs.

I've changed that, but unfortunatelly, it's still not working.

--
shgg.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: NPC creation questions
« Reply #32 on: August 16, 2004, 06:33:00 PM »
Is the timer expired when you're trying to test it?
Earn Money Sleeping.

shgg

  • Guest
Re: NPC creation questions
« Reply #33 on: August 16, 2004, 07:07:13 PM »
Is the timer expired when you're trying to test it?

No, but I'm forcing it to expire, by resetting to 0.

--
shgg.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: NPC creation questions
« Reply #34 on: August 16, 2004, 07:33:57 PM »
Expire timers by setting them to 1, not 0.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

shgg

  • Guest
Re: NPC creation questions
« Reply #35 on: August 16, 2004, 07:49:01 PM »
Expire timers by setting them to 1, not 0.

Ok, thanks :) But it didn't changed anything.

--
shgg.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: NPC creation questions
« Reply #36 on: August 16, 2004, 07:59:06 PM »
I have found  IsValidForPartyDialog() , which at the best of times is cranky, tends to work not at all in scripts. Try replacing it with InParty/See/!Dead.

Also, you'll need to amend that scripting to use a one-shot variable, otherwise that scripting bit will loop continuously once you DO get it working.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

shgg

  • Guest
Re: NPC creation questions
« Reply #37 on: August 16, 2004, 08:35:58 PM »
Well, I don't think it's something with IF conditions. It looks like if there was banter file missing (but of course it's not) or if it was some error in it.

--
shgg.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: NPC creation questions
« Reply #38 on: August 16, 2004, 09:02:29 PM »
Are you sure the banter file has been assigned properly?

1) Your .cre has "no flags set".
2) You're not working from a saved game where the .cre is in stasis and any changes you make won't affect it.
3) You have the proper entries in interdia.2da for your NPC.
Earn Money Sleeping.

shgg

  • Guest
Re: NPC creation questions
« Reply #39 on: August 17, 2004, 04:37:55 AM »
3) You have the proper entries in interdia.2da for your NPC.

Aahh, I didn't know about this file, thank you. Now, I've added entries to interdia.2da and the dialog actually starts, but after my NPC sais the first line, and I'm pressing Enter to switch to Minsc, the game crashed...

--
shgg.

 

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)?: