Jump to content

A basic question about dialogue timing and what goes where


Ieldra

Recommended Posts

I',ve been busy writing a lot of dialogue, but I'm still puzzled about what goes where in the dialogue files. I've read the two tutorials but they didn't tell me what I wanted to know, so I've looked into Amber's files and tried to track the dialogue flow. This has been confusing, but this is what I've come up with, and I'd like to know if I'm wrong or I've overlooked anything important before I do anything stupid:

 

(1) Anything randomly timed goes into Bxxxxx.d, whether it be banters, floating lovetalks or anything else.

(2) Flirts go into xxxxxxJ.d

(3) Interjections where your NPC reacts to something said by someone else can go basically anywhere, because they're always EXTERNed into, but go traditionally into xxxxxxJ.d.

(4) Any dialogue initiated by the NPC in a deterministic way - timed talks, any dialogue where the NPC reacts to events rather than to something said by anyone else, regardless whether it's considered banter, romance or whatever, must be called explicitly by a script (usually the NPC's override script), which means it can also go anywhere.

 

Is that correct so far? Have I overlooked anything?

Link to comment

One thing to keep in mind is that the B file is always designated for random banter, ie banters that have no initial condition upon them.

 

The problem that it could potentially cause is in the fact that those banters could 'sneak' into place of a scripted banter, and cause problems if not Weighted properly.

 

That's the reason I always put anything scripted with a non-0 condition (ie anything that is NOT a random banter) on J file, because they will all be called from script, and therefore will never substitute for one another.

Link to comment

Yes, I understand that anything in the B file can appear randomly. What I meant when I said "can go anywhere" was that I might just create an additional dialogue file for scripted dialogue and not use the standard ones. That way I could keep the romance apart from the rest of the stuff, for instance. I prefer organization on file level, if it can be done.

Link to comment

If you want to keep your romance stuff together, you might be better off putting everything in the J-file, then, and using StartDialogueNoSet(Player1) to initiate it.

 

Your flirts are always going to go in the J.

 

If you like to organize big time, you might actually prefer to keep all scripted banter separate from all unscripted banter. It will certainly make your life easier.

 

I wish that I had more time to answer this question thoroughly and completely. Since I don't, I'll see if I can fid a post I made a while ago about organizing your banter file, and the discussion that followed. Kulyok and JC weighed in on the issue.

 

Here's the link:

http://forums.gibberlings3.net/index.php?showtopic=11317

Link to comment

Heya, I just wanted to add that Amber is probably not the best example for a beginning coder. :( We've used some unorthodox practises (the N dialogue file, the player 2 romance and the talk that exploits the player1.dlg, for example) and the mod is a rather large. So, I'd recommend some other less complicated NPC that is not the first (messy) work of it's author. Unless those unorthodox practises are something you want to use in your own mod, that is.

Link to comment
Heya, I just wanted to add that Amber is probably not the best example for a beginning coder. :( We've used some unorthodox practises (the N dialogue file, the player 2 romance and the talk that exploits the player1.dlg, for example) and the mod is a rather large. So, I'd recommend some other less complicated NPC that is not the first (messy) work of it's author. Unless those unorthodox practises are something you want to use in your own mod, that is.

We'll see. I found Amber's code very useful. I definitely don't plan for a player2 romance, but the extra dialogue file gave me ideas. Otherwise, I'm unafraid of technical complexity, and pretty much the only serious problem I have with the technical side of IE modding is that there isn't much of the structuring I'm used to in WeiDU code (mainly, no user-defined functions to substitute for sequences of, for instance, setting five globals), which for that reason I find somewhat hard to get into at first.

 

@berelinde:

Thanks for your comments. What you said in the linked post is exactly the reason I'm thinking of using extra dialogue files as Amber does. In my scripts, I can always control which dialogue file is used, so why put all scripted dialogue into one file, which, to make things worse, already contains something else? While I'm at it: is there a compelling reason not to use *several* extra dialogue files? That would make some aspects of coding quite a lot easier.

Link to comment

You can organize your files any way you want, but you can still only have one "joined" dialogue file, one "banter" dialogue file, and one "post" dialogue file. These things are assigned in a 2da file, and while you can change them using script, you can't have more than one entry in each column at any one time.

 

Unless I really haven't understood what Meira is talking about. :(

Link to comment
You can organize your files any way you want, but you can still only have one "joined" dialogue file, one "banter" dialogue file, and one "post" dialogue file. These things are assigned in a 2da file, and while you can change them using script, you can't have more than one entry in each column at any one time.

Indeed. But if you're writing a character with a story or a romance, almost all of the dialogue concerning them will be scripted - probably half of all dialogue added by the mod. Mainly, only player-initiated in-party dialogue *must* go into the J file (or *I* misunderstood something), and only random talks *must* go into the B file. Everything else can go into separate files. Or can't it?

Link to comment

I'm talking about after compilation.

 

I've got all Gavin's lovetalks in one file, but I compile that to the J.

 

This is going to have to wait until I have more time to explain, and that isn't going to happen until next week. Sorry. I hope someone else can jump in and explain it in the meantime.

Link to comment

Keep it simple I say.

 

********.dlg (Character name dialog) Used for first greetings, joining.

*******P.dlg Used for parting, kick out, rep below or above their likes.

*******J.dlg Interjections with non-joinable npcs, comments on events, npc quest related dialogs.

B*******.dlg Banters with other npcs in the party, romance dialogs.

 

That is to my understanding.

Link to comment

For staring out, Gabrielle and berelinde have good advice...

 

but if you are already a programmer, or have some modding backround, ever since I saw Amber code, I have been wondering.

 

Perhaps the easiest way to avoid problems with BioWare standard NPCs modded with a ton of mods might be to basically use Darious and Mieira's ideas, and swap *all* participant's dialogues temporarily via script - there might be some serious power in being able to avoid complications with other folks trying to interject into standard dialogue, or a mod accidentally falsing out or redirecting something else. If a script can switch a dialogue file for both participants, then you have created an isolated bubble, and the only thing you have to woirry about is your script and whether or not someone has changes a DV.

Link to comment

True... but the real thing that it might avoid is what the other guy (who has decided on destructive modding of original states, or simply didn't knwo hoew to COPY_TRANS) is doing to your mod.

 

But it was mostly a speculative thought about what *could* be done, if (for instance) someone uses a destructive overwrite of Imoen's Banter file.

Link to comment

Well, I *am* a programmer, which is why I was looking for some means to encapsulate elements, the reasoning being that if I can do that, once I've written something I can often just forget about it, instead of wondering how it will behave if I add something to the file that really shouldn't touch elements I've already finished.

 

@jcompton:

Weights don't seem hard to understand - but is there anything special about WEIGHT #-1 compared to some other number? If I read the description correctly, you can use any number, so the only special ones should be the lowest possible and the highest possible numbers (as weight numbers seem not to be unsigned numbers, -1 isn't the highest).

 

BTW, turning around your argument, I could say "Weights are a way to control things if you don't want, or can't have, or can't deal with, object-level modularity". Since both ways are possible, it's only a matter of what's easier for you. The only objective benefit I can see of keeping things in one big file, apart from sticking to established conventions (something I'm not very good at anyway), is to minimize the number of files in the override folder. Which admittedly counts for something considering the size of the override folder in multi-modded games. But it's not non-negotiable.

 

Along the same line, you say "learn what the four dlg files are for". Well, in part it's not so obvious. I read Gabrielle's post and ask myself "Why the hell would I put a romance dialogue in the file designed for random appearance?". In all romances I've tracked so far, these dialogues were timed and deterministic, so putting them into the B file complicates things beyond necessity. And again, why put them into the J file? OK, to make them appear at the wrong time takes sloppy coding, but why even take the chance? Why not put them somewhere external, where they *can* only appear when explicitly called by a script? Really, I don't understand it...

Link to comment

As I understand it the majority of romance "banters" are on a timer. When the timer expires the next banter will be called but not unless you specifically call it via script. Otherwise the banter engine will eventually get to it as it periodically reads the B dialog file for valid blocks.

 

It is becoming the standard practice to avoid this as sometimes the banter engine will pick up an actual npc to npc banter instead of your intended romance banter. So, many modders now call their romance dialog via script so they get what they want when they want it. If you choose to do it this way it doesn't matter which file the dialog is in as you are directing the engine to your particular dialog file each time.

 

However as JS pointed out weighting your romance dialogs to the top of the banter file will mean the engine will find your romance dialog first rather than choosing the first available npc to npc banter that is valid.

 

The only downside to multiple dialog files is that anyone wishing to view your dialogs for potential crossmod content will have to trawl all your dialogs as you will have various names.

 

My preferred option would be to do as berelinde suggests and create your dialog in a separate file but Append it into the J dialog file at install. This way everything can be found in the various dialogs listed in the 2da for your npc but will be organised to your satisfaction within your mod folder.

Link to comment

Archived

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

×
×
  • Create New...