Jump to content
Kulyok

How to ensure your banters always run when you want them to.

Recommended Posts

Thanks! It is good to know. I suspected it was fast, too.

 

I guess I'd still add an InParty/See or something, just in case of a *veeeery* malevolent player. But for now I'm off to sleep, and I'll be eager to read the consensus(and to edit the first post) in the morning. :)

Share this post


Link to post

Am I right that this splitting of setting the variable and triggering of the dialogue only makes sense (only is required) for NPCs, not for non-joinable characters?

Share this post


Link to post

I'd think so, though I usually break it into two anyway.

 

The biggest thing that causes these misfires is the player issuing movement commands. Since the player doesn't issue movement commands to non-joinables, their script isn't likely to be interrupted.

 

Just to say it: I leave the script blocks in the dream script alone. They fire when the player hits rest, so the script won't be interrupted by movement anyway.

Share this post


Link to post
Just to say it: I leave the script blocks in the dream script alone. They fire when the player hits rest, so the script won't be interrupted by movement anyway.
That's an important hint in connection to this tutorial.

 

For non-joinable characters, that's what I thought. Thank you!

 

Kulyok, the idea behind this tutorial is really great. Thank you for writing it! Ajantis will be coded that way and Drizzt.

Share this post


Link to post

Thank you. :)

 

And, yes, you don't have to split the blocks for

- non-joinable characters

- dream scripts.

Share this post


Link to post
So... do you think we've solved the problem, now that the second block runs immediately no matter what?
What was the last word on this? In my trigger blocks I repeat conditions, like See(Player1) !StateCheck() etc. just to prevent the rare occasion where this might be of importance, and I see BG1NPC is coded that way, too.

 

So, was it no conditions or including See etc. checks?

Share this post


Link to post

The last word for me is RE and Xan, I guess. :)

Here:

 

// Break-up talk
IF
Global("O#XanRT15","GLOBAL",0)
OR(2)
GlobalGT("AsylumPlot","GLOBAL",54)
GlobalGT("Chapter","GLOBAL",4)
InParty(Myself)
Global("O#XanRomanceActive","GLOBAL",1) 
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
CombatCounter(0)
!See([ENEMY])
THEN
RESPONSE #100
SetGlobal("O#XanRT15","GLOBAL",1)
END

IF
Global("O#XanRT15","GLOBAL",1)
InParty(Myself)
See(Player1) // not needed if StartDialogueNoSet
!StateCheck(Player1,CD_STATE_NOTVALID) 
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("O#XAN")
Interact(Player1)
END

 

If you're using J file and StartDialogueNoSet, you don't really need a See() check in the second block, since SDNS is more forgiving - even if characters are in different areas, a banter will trigger without en error; however, if you prefer to avoid that for the sake of realism, See() or Range() or InMyArea() would still be preferable.

Share this post


Link to post

Usefull tutorial. I've read about issues with interject(), especially annoying during romances and less good than StartDialogueNoSet, so is there really no issue with StartDialogueNoSet ?

Share this post


Link to post

You mean Interact(), right?

 

It doesn't much matter, except that if you're going to use the B file instead of the J file, state weighting becomes very important.

 

State weighting is still important in the J file as well, but all you've got to do is get scripted dialogue ahead of the PID with WEIGHT #-1.

Share this post


Link to post

I should probably know this by now but i haven't found the answer.

 

IF

InParty(Myself)

See(Player1)

Global("MyBanter","GLOBAL",1)

THEN

RESPONSE #100

Interact(Player1) // calls forth a banter from BMyNPC.d

END

 

where do you tell the game what file to look for? my banter file is JK#NanyJ. should it find it automatically? or where do i put in the directory?

Share this post


Link to post

Full treatment:

 

Dialog Files and How They Are Referenced tutorial

 

It leads you through the information step by step.

 

Shortcut:

 

Your banters are not in JK#NanyJ, they will be in JK#NanyB or JK#BNany or something like that - j = joined, b = banter, p = (post) after-joined-and-dropped, no designation = non-joinable.

 

Adding the references to pdialog.2da tells te game where to look automatically.

 

The game can tell which file to look at by the call used in the script; Interact() calls b-file, Dialog() (and all related calls) calls the j-file.

 

But the tutorial steps you through all of this, provides samples, and provides a list of (almost all) existing NPC file names in released mods.

Edited by cmorgan

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...