Jump to content

Romancing details


Creepin

Recommended Posts

I decided to try to help a friend of mine with coding of her romance, but after studying Rastor's guide (the only one I found on the topic) I still have some technical questions and will be grateful for an explanations.

 

Most important question is how is it ever possible to associate more than one dialogue with the same creature? As I understand, there's only one offset in cre file for a dialogue reference, and there's only one reference to the dialogue that could be written there. So, how did all this xxxD.dlg, xxxJ.dlg, xxxB.dlg and even Bxxx.dlg are handled by the engine? How could I ever attach more than one dialogue to a cre? Is dialogue files naming follows some engine logic (like engine always reading xxxJ.dlg when NPC was force-talked with) or it depends only on author's whim?

Link to comment

You'll need to check out Grey's tutorial on creation of simple NPCs, the section that describes appending the file names to PDIALOGUE.2DA (it handles J-file) and INTERDIA.2DA (it handles B-file). It is done via TP2, so if you dl a small mod you can see the structure that appends both SoA dialogues, and ToB ones (the one with 25)

 

The XXXD is not a dialogue, usually. It is the dream script, the one that handles talks initiated at rest.

 

My personal preference is to keep only un-scripted banter on B-file, and every dialogue that is triggered from the script - on J, to avoid WEIGHT-ing problems that lead to substituting a scripted dialogue with a non-conditional banter.

Link to comment
My personal preference is to keep only un-scripted banter on B-file, and every dialogue that is triggered from the script - on J, to avoid WEIGHT-ing problems that lead to substituting a scripted dialogue with a non-conditional banter.

 

This is what I do when coding NPC dialogue too.

Link to comment
My personal preference is to keep only un-scripted banter on B-file, and every dialogue that is triggered from the script - on J
This is what I do when coding NPC dialogue too.

Am I understand it right that as all of lovetalks are scripted, your advice is to put all lovetalks into J?

 

//In his Romance tutorial Rastor advices to use B file for lovetalks with a remark that one could use J, "but that's quite unconventional", hence my interest.

Link to comment

Yup -- and even non-LT's -- basically, all the talk you want to initiate with StartDialogueNoSet, Dialogue, etc. triggered from a script.

 

I found this out the hard way, and Domi and Andyr (and Kismet, after I misunderstood both D and A!) set me straight. I put all sorts of conditions on the talk, set up a script to trigger it, and used Interact(Player1). Because I had not dealt with Weight yet, I assumed the correct talk would fire, but instead sometimes it would fire, and sometimes another banter (it's conditions having also been met) would fire. When I moved to J, StartDialogueNoSet, and careful conditions, it worked perfectly even with no Weight set (although I set them up for -2 Weight to match other quest dialogues I have seen).

Link to comment
I put all sorts of conditions on the talk, set up a script to trigger it, and used Interact(Player1). Because I had not dealt with Weight yet, I assumed the correct talk would fire, but instead sometimes it would fire, and sometimes another banter (it's conditions having also been met) would fire.

Hmm, strange. Any dialogue is parsed (AFAIK) from the first state to the last with first state all of which conditions are true executed. If you get some state to be sometimes executed and sometimes skipped under the same conditions without intentionally using something like RandomNum trigger... I have no doubt in your words, but I don't see how it could be technically possible :rolleyes:

Is it specific of B file parsing perhaps?

Link to comment

What happens, is that Interact() grabs the very first dialogue that satisfies the conditions in the script. Any of the non-conditional banters will because their condition is simply "SomeGlobal","LOCALS",0. That does not contradict your called condition ("AnotherGlobal","GLOBAL",1). The 0 condition is always true. Hence, unless you carefully put all B dialogues on the same file and WEIGHT them from scripted to unscripted, an unscripted dialogue from your mod or from someone else's mod that was installed before yours will "snick" up top and play instead of the scripted one.

 

Since the scripted did not play, the condition on it will either not "close" at all, or close authomatically. If it does not close (you closed it in D), it will repeat, summoning another banter, for example. Or if you have authomatically advancing trigger, the game will be happy about it and wait till the timer expires and will try to initiate the next one "skipping" the dialogue from the player's prespective. If, again, there is a non-conditional on top.... etc.

 

This problem is especially bad, when you try to script interactions for already existing NPCs.

Link to comment

I read both Ghrey's Beginner's NPC guide and his In-depth dialogue files tutorial, now I'd like to ensure that I get it all correctly, so: when NPC is joined, he will use his J file by commands like StartDialogueNoSet(), Dialogue(), and DialogueForceInterrupt()and his B file by Interact() command, right?

 

Oh, and what about cre's override level scripts - will they work even when Party AI is off?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...