Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

TUTORIAL: Dialogue Editing

Made by modders for modders. Step-by-step instructions on how to achieve specific modding goals with ME3Explorer. We *strongly* encourage you to post new tutorials on the wiki.

TUTORIAL: Dialogue Editing

Postby giftfish » 14 Aug 2014, 18:38

DIALOGUE EDITING TUTORIAL
- PART 1, PREPARATION -


Wewt, dialogue! I know some folks have been waiting for this particular tutorial and I apologize I haven't gotten to it sooner. There's only so much time in the day and this one is going to be a a monster. To preserve my sanity, I'll be publishing it in parts over the next few weeks months. I'll be reserving some posts below to help me do this -- and to make linking sections of the tutorial easier.

Editing dialogue isn't necessarily difficult, but it can be a complex process due to the number of factors involved. For those reasons, this tutorial isn't going to follow a perfect series of steps to get you from point A to point B (e.g., the Codex Tutorial). Instead it will be organized by what the modder might be trying to achieve. Within each section I'll cover different ways to make the edit, and everything that (I know of) related to it. Sections I anticipate creating include: Deleting/Skipping lines, Editing lines, Adding lines, Changing Ambients to Cutscenes, Tips on Audio Editing, and TLK Creation for DLC Mods. I'm guessing there will be more.

It's very important that other modders chime in. I learned quite a bit about editing dialogue for ThaneMOD, but I don't have all the answers. JohnP, Deager, Fob, and SirCyxtryx have all edited dialogue and I am *certain* they know how to do things that I don't. My hope is that this tutorial will spur more discussion, so we can all share our knowledge and start digging into some of the tougher stuff. Things like editing Wwisebanks to add new audio, editing Face FX, camera shots, animations, adjusting model positions, and more.


CONTENTS
Part 1 of this tutorial will cover research and preparation. Aspects like what files you should expect to edit, tools you'll be using, useful websites, the planning process, and an updated research post on the Dialogue Editor Tool. The primary goal is to help you anticipate things, learn a bit from my mistakes, and provide some insights for those of you who might be interested in undertaking a large dialogue overhaul. In the next part of the tutorial, we'll begin editing.

As usual, I'll assume that the modder is walking into this relatively blind/inexperienced and be as explicit as I can.


A | PLANNING
The amount of planning you'll need to do is directly proportional to the amount of dialogue you are editing. If you are simply deleting a line here or there you don't need to do much planning at all (if any). However, a large dialogue overhaul like the Huerta conversation with Thane that ThaneMOD changes, or something akin to what JAM does with Starbrat, requires a significant amount of planning. If you are going to do something of this nature, start by thinking things through. Lay out and organize the dialogue changes before you start editing files. Doing so will save you time and frustration, and ensure you are clear about what you intend to accomplish.

Things to think about:

  • What do you want to achieve with the edit? How much time are you willing to spend on it?
  • Do you want to completely change things, or keep the conversation mostly intact and "shuffle" things around?
  • Does the dialogue vary with romance status, loyalty, and/or gender? If so, that adds complications and increases workload.
  • Do you want to replace lines with new ones you create? If so, that means you'll have to deal with facial animations that no longer match the line. You'll need to move the camera or edit facial animations to keep immersion.
  • If replacing lines with new ones, do you want to stick to the original VAs (voice actors) and pull source lines from other ME content or are you open to new voice actors?
  • Do you want to edit audio for NPCs who have their voices put through special effects (e.g., Garrus, Mordin, Thane, Grunt, Tali, etc)? If so, you need to be aware that their voices sound different in each game--sometimes dramatically so (e.g., Thane, Mordin). That means pulling source content from other games and splicing it into an ME3 conversation in a seamless manner can range from extremely challenging to near-impossible.
  • Are any of the files you want to edit also located in ME3 DLC? If so, you'll need to make all the same changes to each one. You can't assume all players will have all (or any) DLC.
  • Finally, don't forget that any audio edits for Shepard have to be done twice. Once for BroShep and again for FemShep.


B | LINKS
If you are doing a substantial re-edit of a conversation, or if you are editing a variety of dialogue, you'll want easy access to several websites as you work on the project. A very handy list of links is hidden under the spoiler. This list will be updated as I work on the tutorial:

Spoiler:
PLOT/CONDITIONAL/DIALOGUE DUMPS
------------------------------------------------------
Don't forget that YT videos can be a godsend when it comes to quickly researching and viewing conversations.
Gibbed ME3 Complete Dialogue + Plot Dump (no DLC)
ME3 DLGs Database
ME3 Plot Database
ME3 Plot Dump
ME1, ME2, ME3 bools by HJF4
Gibbed ME3 Conditionals Dump
ME3 Plot Project, ME1 and ME2

DIALOGUE EDITING
------------------------------------------------------
Dialogue Editor Research Post
ThaneMOD Huerta Dialogue Thread on ME3Exp
Modifying Conversations
Dialogues Overview
Hex editing for dialog: Subtitles & Conditionals
TLK Editing for Scenes
Dialogue String Ref Dumper

AUDIO IMPORTING
------------------------------------------------------
Audio Import Guide for ME3
Simple Voice Swaps
Replacing Sound in DLC
Adding New Sounds
Tutorial: Silencing Sounds + DLC Issues
Tutorial: ME3 Audio Import Guide

AUDIO EXTRACTORS
------------------------------------------------------
Audio Extractor for ME1
Audio Extractor for ME2
Audio Extractor for ME3

SEQUENCE EDITING
------------------------------------------------------
Sequence Editing Tutorial
UDK Kismet Guide
UDK Kismet Examples
UDK Kismet References

FACE FX
------------------------------------------------------
UDK FaceFX
UDK FaceFX External Animation Sets
FaceFX on DA Toolset Wiki

CAMERA
------------------------------------------------------
UDN Camera Technical Guide
UDN Setting up Cameras
UDN Camera Actors


C | TOOLS
When editing a dialogue you will spend most of your time editing localized PCC and TLK files (e.g., BioD_CitHub_HospitalP2_LOC_INT.pcc and BIOGame_INT.tlk) All these files have a suffix that indicates their localization; "INT" is for English, other language abbreviations are straightforward. However, you will likely need to edit other files, as well. Dialogues use conditional/bool checks to determine which branch a conversation takes. That means editing a CND file with the Conditionals Editor or creating new State Transitions with the Natives Editor. If you add a new line of dialogue you'll need to clone and assign it a facial animation, which uses the FaceFXAnimSet Editor. If you need to adjust when the NPC is available for the conversation, you'll have to edit the main PCC for the level using the Sequence Editor. If you replace audio for dialogue, you'll use Soundplorer, and so on.

Here's a list of ME3 tools that you will probably use as you edit a dialogue:

  • Conditionals Editor
  • Dialogue Editor
  • FaceFXAnimSet Editor
  • PCC Editor 2.0
  • Sequence Editor
  • Soundplorer
  • Subtitle Scanner
  • TLK Editor
  • Natives Editor

You'll likely need other programs as well, which may include:

  • Notepad ++, an awesome, free editor that can take the place of Notepad to edit text, but that also has the ability to act as a source code editor
  • Audacity, or another audio editing program
  • Wwise, an audio editor/conversion program that is mandatory if you wish to alter sound files for ME3
  • Audio Extractors for ME1, ME2, and ME3 to give you access to source files


D | ORIENT
Despite the long list of tools above, most of your time will likely be spent in the Dialogue Editor and in a XML editor like Notepad ++ (the TLK must be "translated" into an XML file for editing purposes). So, first things first:

    1. Convert the TLK into a readable and editable form. Follow the instructions in the new TLK Appendix for help on this and everything you'd ever want to know about the TLK.
    2. Get familiar with Dialogue Editor. I published a research post on this tool last year. That post has now been updated, to coincide with the release of this tutorial. Head over there and take a good look. Getting acquainted with its interface and learning how dialogues are organized are necessary before you move onto the next part of the tutorial.


E | RECORDKEEPING
If you are planning a significant dialogue overhaul, you'll need to organize and map your changes in a document. And, no matter the size of the overhaul, you'll want to keep track of any changes you make for future reference. I found that spreadsheets work very well for both. A single file allows you to organize things by sheet. If you are working on a group project with others, using Google Docs so everyone can access and edit is helpful.

Here are some screenshots of spreadsheets used for ThaneMOD. In retrospect, I'd organize things a bit differently, but that's what happens when you're learning everything on the fly :] Still, they should provide you with some good ideas:
Spoiler:
Image
Image
Image

The main things to keep in mind as you set up your documents are:

  • Organizing the dialogue by TLK string is intuitive
  • Include the text of the vanilla line and the planned edit
  • If changing audio files, keep track of the size of the audio file and the length of the vanilla line and replacement line
  • Keep track of scene animations and dialogue wheel appearances/options
  • Keep track of the entry/reply
  • Keep track of any conditional/bool checks, state transitions, etc
  • Create fields for animation/camera/timing edits

That's about it. I'll likely think of more things to add in the planning stage as I make the tutorial. If so, I'll add them as necessary :]


------------------------------------------------------------

Changelog
November 30, 2014 -- Added link to new TLK Appendix.
November 5, 2014 -- Tightened up some explanations. Added points on Natives Editor and DLC files.

giftfish has been thanked by:
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Dialogue Editing Tutorial

Postby giftfish » 14 Aug 2014, 18:38

DIALOGUE EDITING TUTORIAL
- PART 2, THE BASICS: SIMPLE DELETIONS -


Skipping dialogue is about the easiest thing you can do when it comes to changing the flow of a conversation. There are a variety of ways to do it depending on the situation and your preferences. But, before you go ahead and skip a line there are some important things to consider:

    1. Does the line trigger a StateTransition?
    If so, that means skipping over it will prevent the bool/int from being set, unless the same state transition is specified elsewhere. Assuming it isn't, it's removal could have major plot consequences if the game attempts to check it in the future. That can include in other dialogues, content controlled via sequence maps, and even in plot objects only editable in PCCEd2.

    2. Is the line subject to a "Major Decision?"
    I'm still not clear about this parameter since it doesn't always coincide with the setting of a bool (StateTransition). Because of that, my comments about StateTransitions apply here to an extent.

    3. Do you always want to skip the line, regardless of Shep's gender or romance status?
    If so, then it's easy. If not, then it's a more complicated edit that will involve more steps. It's not a simple "skip."

    4. Does the conversation still make sense with the line's removal?

    Usually removing a single line makes the most sense when it's at the end of a conversation. If the line you want to use is in the middle of a group spoken by the same speaker, or if it's a reply Shepard is making, then it will likely require more editing.

    5. Does the line you want to skip point to any other lines (even far down the convo) that you want to use?
    If so, then it's a more complex edit, similar to the gender/romance situation above.

What it comes down to is whenever you remove something from a conversation, you must do so with care. In addition, editing dialogues can have unintended consequences including changes to animations, model locations, and camera angles. Keep an eye out for these things as you edit.

Important Note: Please pay special attention to the very brief editing instructions in this part of the tutorial. I'll be referencing them in future installments.



2.A | TLK EDIT
Editing the TLK is probably the easiest way to skip a line of dialogue. All you have to do is delete the text inside of the desired string's data tags and the game will simply skip over it and move to the next entry/reply in the conversation. Thanks to Deager for discovering this :]

Spoiler:
Image

The advantage to this method is that you don't have to edit the corresponding PCC file at all. And, no entry or reply nodes are deleted so the entire conversation "skeleton" remains intact. You can remove multiple, consecutive lines using this method, as well, but when you do so it increases the possibility that you'll run into an issue with camera/models/animations.

The potential disadvantage to this method is that it will always remove the line(s) regardless of Shepard's gender or romance status, and regardless of game timeline or what plot events have been completed. A TLK edit is "all or nothing." In addition, it's important to realize when you do this, the string text will no longer appear in the Dialogue Editor (DE). Instead you'll just see an empty set of quotation marks. Also, please disregard the change in TLK position in the screenshot above. It's not relevant in this instance and is due to DLC mod conversion (to be covered later).

For guidance on how to edit the TLK, creating DLC TLKs and more, see the new TLK Appendix at the end of the tutorial.



2.B | REPOINT/REDIRECT
Another way to skip a line is to "re-point" the dialogue by editing it with the DE by modifying the replies defined in the Entry List or the entries defined in the Reply List. We'll use one of Thane's lines in his Huerta investigate dialogue as an example.

Looking at the dialogue dump below, we want to skip the line with the blue box (entry 5). This is a nice, simple example since there are no additional dialogue branches at this point, nor conditional checks. It's worth nothing that information about the surrounding entries and replies can be gleaned much more quickly by looking at the dump, than it can by having to click open multiple nodes in the DE. For that reason, it's always very useful to have the dump immediately accessible while editing:

Spoiler:
Image
To skip this line via redirect we need to edit the line in Shepard's Reply List that points to it: reply 3. Instead of it pointing to entry 5, we need to make it point to Thane's following line, which is entry 6. Simply double-click on the value and change it as done here:

Spoiler:
Image

Most fields in the Dialogue Editor can be edited in this manner. Double-clicking on the value will trigger a pop up window where you make the edit and click "Ok." That's all there's to it. Once you've done that, the game will skip the line. You can remove multiple, consecutive lines using this method, as well. Note that if you wanted to skip one of Shepard's replies, you would have to re-point by modifying the appropriate entry of Thane's in the Entry List.

Optional Step: If you know you will never again need the line--or that "spot" in the conversation skeleton--then you may select the skipped entry/reply and also delete it from the Entry List/Reply List. Edit > Remove > From Entry List. Taking this step is unnecessary, but when making a lot of changes it may help you keep things more manageable.

Important: Changes to multiple dialogues in the same file will not "stick" unless you save between loading each dialogue. File > Save Changes.

The advantage to this method of edit is it avoids a TLK edit and only edits the PCC. Therefore, if you are trying to maintain compatibility with non-DLC mods that also modify the TLK, this is a good way to do it. Like the TLK edit, it keeps the full skeleton of the dialogue intact (unless you complete the optional step) which is another good thing. And, as we'll see shortly, a re-point can be combined with conditional and bool checks to make the skip only happen sometimes.

The main disadvantage to using a re-point is that a single edit in a single dialogue results in needing to distribute the entire PCC file as part of your mod. PCC files are usually 10-20MB each, so if you're re-pointing a lot of dialogue it will result in lots of edited files and a decently large mod (and subsequent longer download times). Not to mention if you are creating a DLC Mod, TLK sizes are extremely small. ThaneMOD's TLK affects at least a dozen PCC files and has almost 2000 lines--but is only 70KB. Compare that to editing a dozen PCC files directly, which would run you around 150-200MB. TLK edits can definitely be a good way to go; use them where you can and when it makes sense.



2.C | CNX THE CONDITIONAL
Lines subject to conditional checks can be easily activated/inactivated by turning off and on the check. ThaneMOD v2.0 used this method to omit James' flirting with Shepard, which is solely based upon condition checks for Shepard's gender.

There are actually multiple ways to go about this depending on the type of check:

  • If ConditionalFunc is a plot bool, you may set the ConditionalParam field to "-1." (null)
  • If ConditionalFunc is a plot bool, setting the ConditionalParam to some other impossible value like "2" also works.
  • If ConditionalFunc contains a conditional, setting FireConditional to False works like a switch to turn the check itself "off."

Any of the above methods are preferred since they all retain the contents of the ConditionalFunc field in case you need it again in the future. However, replacing the value in this field with -1 (null) will achieve the same result.

Spoiler:
Image

The contents of the blue box above are skipped by making edit that appears to the right. Note the vanilla state for the ConditionalParam field--as seen in the dialogue dump--is "1." Altering this value to "2" creates an "impossible" situation for the game, since bools can only have a 0 or 1 value. That causes the game to fail the check and follow the branch down to entry 26.



2.D | DELETE FROM STARTING LIST
Let's say that you have a large branch of a conversation you want to get rid of. Chances are it will be controlled by a conditional and you can use the method outlined above to inactivate it. But that branch may also be controlled by its place in the Starting List, and if so, then you may be able to remove it by simply editing the list.

For example, let's say you don't use ThaneMOD (srsly?) and you wanted to remove the entire exchange between Aethyta and Liara that contains the buggy relationship dialogue about Shepard:

Spoiler:
Image

If you select the entry number that corresponds to entry 39 (number 6) and delete it, the game won't be able to locate the proper dialogue. You do this through Edit > Remove > From Starting List.

There is one important detail to be aware of, though. Deleting the entry will automatically renumber the list. As discussed in the DE Research Thread, those list numbers are used in the ConditionalParam fields for the specified entries. That means you'll also need to fix the ConditionalParam fields for all Entry List entries that correspond to positions 6-9 in the Starting List. If you don't, the dialogue won't work properly.



2.E | DIALOGUE WHEELS
More details about editing dialogue wheels are coming in Part 2. For now we'll stick to how to remove an option from a dialogue wheel or how to skip a wheel altogether.

2.E.1 | CHOICE REMOVAL VIA TLK
This is a dirty hack, but it makes things really, really easy. ThaneMOD v2.0 used this method for FemShep's flirt with Joker in Purgatory, as I was still learning the ropes. The intent was to remove it for everyone and not just those romancing Thane (which it does):

Spoiler:
Image
Just like removing a spoken line from the TLK will skip it in game, removing the string data (text) for a DW option makes it unavailable. The game will simply act like the option isn't there.

2.E.2 | SKIPPING THE WHEEL
I have a fun video to share for this section. Below is what happens when you try to remove all DW options using the TLK method:



Lol. Yeah, that was very early in my dialogue editing career. Let's go over the proper way to do this :]

Many DWs pop up due to conditional checks. That means all you need to do is cancel the conditional check for the wheel's entry in the Entry List. This is what Emerald did to remove the DW and subsequent Kaidan triangle dialogue with Thane, allowing us to completely omit that portion of the conversation (remember when editing 0=false, 1=true):

Spoiler:
Image
If the DW isn't subject to a conditional check, that means it's just a part of the natural conversation flow. You can then use the methods outlined in 2.B to re-point and skip over it. Here's what the conversation looks like with the check (top) and then without it (bottom). Note the bottom version also has many other edits.

Spoiler:




2.F | NEVER DELETE
This is probably obvious but I'll state it anyway. The focus of this part of the tutorial has been skipping/deleting/removing things, but there are things you should never skip/delete/remove. Things like the entire Starting List. The Speaker List. Stage Directions. Male/Female Animation Sets. All entries in the Entry List or Reply List. All "No Data" entries. Delete that stuff and you'll break things. You should never need to anyway. If your purpose is to delete/skip a line, a branch, or dialogue wheel, I think I've covered all of it above :]


CLOSING
As usual, if something else comes to mind I'll update the post. And, if there's something else you've thought of while reading (that pertains to skipping/removing things), feel free to ask about it below. I may (or may not) know how to fix it, lol.

FYI, this was the easiest stuff to explain. It's only going to become more complex from here, so the next part of the tutorial is going to take a few weeks months -- especially since I'm overdue for an update to the Spoilers section of the ThaneMOD website and I'm working on v3.0 edits. Hopefully this will keep folks sated in the meantime :)

------------------------------------------------------------

Changelog
November 30, 2014 -- Added reference to new TLK Appendix. Clarified a few details throughout including DE edit methods.
November 5, 2014 -- Tightened up some explanations. No new content, per se.

giftfish has been thanked by:
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Dialogue Editing Tutorial

Postby giftfish » 14 Aug 2014, 18:38

DIALOGUE EDITING TUTORIAL
- PART 3, EASY TO MODERATE CHANGES -

Time to delve into the guts of dialogue editing. This part of the tutorial could almost be endless, so instead of itemizing sections that cover changes like in Part 2, The Basics: Simple Deletions, I'm going to focus on two conversations I've edited and use those as "case studies." If there's something I don't happen to cover, hopefully between what is covered and the Dialogue Editor Research thread, people should be able to figure things out. If not, make a post and I'll help if I can.

3.A | SAM'S POST-RANNOCH AMBIENT (Easy)
BioD_Nor_203CIC_LOC.INT.pcc
nor_comm_mr_gth002_d_dlg

3.A.1 | RESEARCH
Spoiler:
This ambient dialogue requires very few edits to make a big difference. It's a good example of how modifications to the Starting List can affect the dialogue and how to restore unused content into the game. Let's start by looking at a vanilla clip of FemShep is romancing Sam (FF to 3:55):



After loading the dialogue in the editor and Gibbed dump we see the vanilla dialogue has two entries in the Starting List, thus two possible ways it can begin:

Image

BUT, upon closer inspection, however, we see entry 0 (E0) isn't actually subject to a conditional, which is a problem:

Image

Not having a conditional attached to this entry means the game will always use it since it comes first. The conversation will never make it down to trigger E12 and whatever lines are dependent upon it. Therefore, despite the presence of these lines in the files, this particular dialogue will only ever start one way, which is what we see in the vanilla clip above.

Looking at the Starting List is one good way to determine if there's unused content in a dialogue. Cross-referencing with the Gibbed dump also helps. In this case we see that there are three alternate openings BW created, which are dependent on the outcome of Priority: Rannoch. For some whatever reason, they didn't make the final cut of the game:

Image

So, let's say we want to restore these openings. First, we need to walk through the dialogue and take a closer look at what we're getting into:

  • There's a state transition at the beginning (2129).
  • Entry 12 ultimately leads to all other branches.
  • Entry 12 leads directly to replies 10 and 18.
  • Reply 10 leads to the three Rannoch outcomes. All conditionals for these outcomes are already in place (yay).
  • Reply 19 contains a "major decision" and default action. It also contains a "DISAGREE" category. This is an indication the dialogue was at one point intended to be a cutscene (very common with Sam).
  • Entry 13 (broker peace) has several new lines but ultimately leads to the vanilla opening ( ***see entry #0*** at bottom).
  • Entry 13 also contains some variations for Sam's relationship status.
  • Entry 19 (side quarians) has one new line before dumping into entry #0.
  • Entry 20 has one new line before the dialogue ends ("DIALOG END"). This is something we'll need to fix if we want to use it.

Now that we've taken a more detailed look at the dialogue we've determined a few things:

    1. It makes sense. Two of the three Rannoch outcomes already feed into E0, which is the starting dialogue we're familiar with ("I hear you were on the ground with the Reaper"). The flow between the new and old content makes sense. If it didn't, we'd have to omit the original line or take another route.
    2. Shepard's gender. There are no variations in the conversation for this. Bonus.
    3. Sam's Relationship. Conditional 885 checks for Sam's romance bool (19835=T). Conditional 883 checks to see if the player has shown interest in Sam, that they haven't broken up with her, and that all other relationships are false. Since Rannoch occurs before Cronos the player technically still has time to invite Sam to the cabin and lock the romance in, so there's a (small) chance the associated dialogue could still be used in game. That means we should keep it in place.
    4. Amend Starting List. We need to make sure the game always starts with the new lines we want to restore. That means editing the Starting List.
    5. Remove the State Transition. The ST triggered by E12 is also used by E0. Usually we'd want to figure out exactly what this ST is for, but since the game isn't using the dialogue we're restoring, we know we probably don't want to trigger the same transition twice. It needs to be removed. We'll cover how/when to change state transitions (and add new ones) in 3.B.
    6. Remove Reply 19. This line doesn't make sense in the context of what we're trying to do; it should be removed. This also addresses any issues with Major Decisions and Default Actions since the reply wasn't used by the game anyway. With our changes, it still won't be.
    7. Fix Entry 20. The final Rannoch outcome needs to be modified so it also leads to E0, otherwise the dialogue will end here for players who side with the geth.

3.A.2 | EDIT
Spoiler:
Remember that you cannot load another dialogue in the same file while editing or all your edits will be reverted. You must save your progress first. In the series of screenshots below, the vanilla version on top and the edited version is on the bottom. This is the last time during the course of the tutorial I will repeat how to do a type of edit that was already explained. From here on, I'll reference "procedures in section X.X" or whatever.

Image

1. Starting List. Select position 0 and Edit > Remove > From Starting List. The entry below will automatically re-number itself to Position 0.
2. State Transition. Expand E0 and replace 2129 with -1, then click "Ok."
3. Reply 19. R19 itself doesn't need to be removed. Instead, we'll remove the entry that points to it. That's E12. Expand E12 and its Reply List. Select the 2nd reply (1:) in the Reply List. Then, Edit > Remove > From Entry's Reply List.
4. Entry 20. Like the edit above, we need to re-point the reply E20 refers to. The easiest thing is to use one of the replies that already refers to E0. For a cutscene dialogue we'd need to be a bit careful to match up model positions and camera angles, but because this is an ambient it doesn't matter. We'll use the one E19 points to, which is R17. There are several small steps. I'll go through them once, and then refer to this procedure in the future:

  • Expand E20 and its Reply List.
  • Double-click on the only entry present, which currently refers to R18. A small window will pop up.
  • The first field asks about a "Paraphrase" String. Leave it blank and click "Ok." (So far I haven't used this field for anything).
  • The second field asks about the "Index." This actually corresponds to the reply number and is the one we want to edit. Change the value from 18 to 17 and click "Ok."
  • The third field asks about the "StringRef." This is the string ID that corresponds to dialogue wheel text (if a DW is present). Since neither R17 or R18 have a DW present, the value of the this field doesn't matter. You can retain string 639870 or replace it with the one associated with R17 (referenced in E19's reply list). We'll leave it alone. Click "Ok" when ready.
  • The fourth and final field asks about something called "Category." We'll talk about this more in part 3.B. For now leave it unedited and just click "Ok" again. The dialogue will now refresh with the edit in place.

5. Save. File > Save Changes.

Done! Notice that we didn't do any TLK editing, since none was necessary. We also didn't need to create any new conditionals or state transitions, nor did we need to edit audio, add/remove entire entries/replies, adjust InterpLengths, or swap out FaceFX. This was a very basic edit. Assuming there's no surprises, a player who brokered a peace and isn't pursuing a relationship with Sam will get this new dialogue (FF to 10:22):


3.B | Sam's Relationship 2 Conversation (easy to moderate)
BioD_Nor_203CIC_LOC.INT.pcc
nor_comm_relationship2_d_dlg

This time we're going to look at a cutscene dialogue with some slightly more complex edits. Specifically, adding a new dialogue wheel option to Sam's "Relationship 2" dialogue. Here's the vanilla dialogue with FemShep for reference:



This is one of the many dialogues in the game that contributes to Sam "ninjamancing" FemShep. As we step through the tutorial below we'll see the ninjamance results from three things: 1 - lack of neutral conversation options in ME3 (3 o'clock DW position in ME2), 2 - AGREE responses (2 o'clock) conveying increases in Sam's romance integer, and 3 - Sam's lock-in being restricted to FemShep. Since AGREE responses tend to be chosen by paragon players, this has the combined effect of paragon FemSheps always being pursued by Sam, regardless of the player's intent -- at least until a different romance is locked in.

For this series of edits we want to put the control back into the player's hands like it was in ME2. That means making it much more obvious when a DW choice will impact the relationship and implementing a true, neutral option that doesn't require the player to DISAGREE (as we know, this response often coincides with Shepard being an ***, lol). We also want to make sure Sam's "cozy" flirt doesn't happen for our new neutral option.


3.B.1 | ORIENT
Spoiler:
Now that we've watched/played through the vanilla conversation, let's again start by reviewing the entire dialogue tree:

Image
Image

Here's what we've got:
  • The conversation always begins in the same way, meaning there should be only one entry in the Starting List.
  • There's a conditional check (bool 20072) and a state transition (2345) at the beginning.
  • Reply 1 leads to two possible ways Sam can respond to Shepard's opening line. Entry 2 is subject to cnd 552 returning true.
  • Entry 8, which is Sam's "shoebox" remark, triggers a dialogue wheel with two options (note the missing "neutral" option as in ME2).
  • The AGREE option leads to reply 7, which triggers a state transition (2133) and Sam's "cozy" flirt.
  • The DISAGREE option leads to reply 9. It's the default action and a major decision. It eventually dumps into entry 11, following the same path as the AGREE option.
  • Entry 15 is the final line in the dialogue and triggers the last state transition (4595).

We now have a better idea of what we'll be editing and what needs more research:
  • State Transitions. We need to determine what 2345, 2129, 2133, and 4595 do.
  • Conditionals. We need to determine what plot event bool 20072 corresponds to. We also need to look up the expression for 552 to be certain it doesn't factor in Sam's relationship status at all. Judging by the line it shouldn't, but it's a good idea to check. It's also good practice if you're new to conditionals and dialogue editing.
  • Unused Dialogue. There isn't any this time, so no work to do there.
  • Starting List. We don't need to edit this, since there's no reason to change how the dialogue begins. We also know from comparing the video to the tree that there's no unused dialogue.
  • Dialogue Wheel. We know we need to add a new reply to entry 8. Other edits will be necessary, but we'll figure those out a bit later.
  • Default action/Major decision. This is something we need to pay attention to and may want to edit.


3.B.2 | RESEARCH | STATE TRANSITIONS
Spoiler:
In example 3.A above, we restored unused lines to Sam that were related to a major plot mission. As a result, it wasn't necessary for us to research the different state transitions present to determine what they meant -- we just needed to ensure our restoration didn't trigger the same one repeatedly. What we're about to edit is different. We want to change Sam's interaction with Shepard and what it means for their relationship. This is a big deal since many other conversations in the game can and will be affected by the changes we make. Now we definitely care because our edits could break things down the road.

As mentioned in the Dialogue Editor Research thread, state transitions control the setting of bools and integers in the game. To look them up we need to use TankMaster's Natives Editor, a utility not yet part of the ME3Exp toolset.

Since there isn't yet a primer on using the Natives Editor, I'm going to use one of the reserved posts below and locate this section of tutorial there as an appendix. This will make it easier to link in discussions on the forums. To continue down to that post, click here or scroll down until you reach Appendix II.


3.B.3 | RESEARCH | CONDITIONALS
Spoiler:
The only two conditionals used in our dialogue are bool 20072 and conditional 552.

From our state transition research we know that bool 20072 corresponds to the conversation itself. A quick look at the expression for cnd 552 shows that it checks for acquisition of Priority: Sur'Kesh, which makes sense in the context of the alternate line used:

Code: Select all
(plot.ints[10178] != 0)

No edits are needed in either situation and we want to keep both intact.


3.B.4 | EDIT | MODIFY VANILLA AGREE
Spoiler:
We're finished with research so we're ready to edit. Our first step is to make it more obvious to the player that the game views the vanilla AGREE as a relationship-building response that will result in a flirt.


1. Relocate Choice.
Since the ME3 dialogue wheel is different from ME2 (ME3's "goodbye/return" is always in ME2s neutral, 3 o'clock position), we have to follow the new conventions. That means moving the vanilla AGREE to the 11 o'clock, FRIENDLY position. Before we do this, however, we should cover a bit of background not in the DE research post.

FRIENDLY and AGREE are called EReplyCategories. All reply categories available within a PCC occur in its Name List. Our file has the following five EReplyCategories:

Image

The assigned reply category determines where the choice is placed on the wheel. Unlike the Name List, EReplyCategory wheel locations are consistent across PCCs and always have the same structure:

Image

There are also three more EReplyCategories in the game not in our PCC:

  • Reply_Category_Hostile (seen above)
  • Reply_Category_Paragon_Interrupt (not on the DW)
  • Reply_Category_Renegade_Interrupt (not on the DW)

EDIT: The current assigned category is AGREE, which corresponds to entry 1513 from the Name List:

Image

We want to use FRIENDLY instead, which is entry 1516. Changing the reply category is done via the same mechanism we covered in 3.A.2, step 4, altering the Category field.


2. Assign Conditional.
While the relocation is helpful, assigning a conditional is going to make a big difference. Since Sam is lesbian (she confirms this in BroShep's cabin visit), we're going to take the additional step of making the FRIENDLY response only be available to FemShep; BroShep won't be able to see the response on the wheel. To be consistent with game conventions, we also want to remove the potential for flirting if FemShep has already locked in a romance. While we could make a new conditional for this, cnd 887 is used in several of Sam's dialogues and will work well for this purpose:

Note: conditional modified to include Thane (19283) and Kelly (21100) romance bools.
Code: Select all
((plot.bools[19723] == Bool false) && (plot.bools[19836] == Bool false) && (plot.bools[19725] == Bool false) && (plot.bools[17662] == Bool true) && (plot.bools[19722] == Bool false) && (plot.bools[19283] == Bool false) && (plot.bools[21100] == Bool false))

EDIT: Insert conditional 887 into R7 following the methods outlined in 2.C.


3. Create New State Transition.
Let's say we also want to keep track of whether FemShep chooses to flirt during the convo. Right now ST 2133 modifies an integer but it doesn't set a bool. Setting a bool could be useful. We could then check for it in subsequent conversations and use the result to steer what happens down the road.

EDIT: The bool could be added in two ways, either by editing ST 2133 or making a new state transition. The latter is preferable since ST 2133 is referenced in multiple conversations. We don't want to change it everywhere, just in this dialogue. Click here to revisit the State Transition Appendix and make this edit, or simply scroll there yourself.


4. Insert State Transition.
Now that our new state transition is created, we just need to place it into the dialogue. Doing so will wrap up the edits to the vanilla AGREE, now categorized as a FRIENDLY flirt available only to unromanced FemShep.

EDIT: Edit the state transition for E7 from 2133 to 7603 using the methods outlines in 2.B/C. When finished, it should look like this:

Image


3.B.5 | EDIT | ADD PLATONIC AGREE
Spoiler:
Adding our new platonic AGREE is going to take several small steps. Before we can begin, we first have to figure out whether to modify an existing reply or add a new one. Looking at the Reply List, Shepard has a lot of "No Data" entries. You should read about these entries in section A.I.5 of the TLK Appendix before continuing.

R8, specifically, is in a convenient location and isn't used for a line. It also doesn't have any other events connected to it (no major decision, conditional check, state transition, etc), it just serves to "bounce" the conversation back from Shepard to Sam. Let's use it so we can see how to change a REPLY_AUTOCONTINUE into a spoken line (REPLY_STANDARD).


1. Create New DW Option.
New DW options must be added by cloning existing options. We're going to clone the top one that we've reassigned to the FRIENDLY category. Before beginning this process you should have a new TLK string ID picked out that will be used for the DW text. We'll be using 900000.

EDIT: FYI, don't worry about the "No Data" reference created in your new option. This is because the new string ID you're entering doesn't exist yet in the vanilla TLK.

  • On the Entry List tab expand E8 and its Reply List.
  • Select the top entry (0). Go to Edit > Clone > Entry's Reply List Entry. The dialogue will reload with a duplicate of E0 in the "2" position.
  • We need to edit this to change three things: the string reference for the DW text (from 640164 to 90000), the referenced reply (7 to 8), and the EReplyCategory (1516 to 1513). This corresponds to fields 2-4 in the pop up window, respectively. See 3.A.2, step 4 for a refresher on how to edit.

Image


2. Edit Reply 8.
Now to edit the reply itself. It's important to understand that one thing we can't do yet in ME3 is add new audio to dialogues. Any new audio must replace existing audio. Since we don't want to cut any lines, that means we can't add new audio for the new reply. Instead, we must use an existing line within this same dialogue. Despite it conveying a relationship integer increase, the vanilla AGREE response from Shepard doesn't sound flirty at all, so it will work well.

We also need to be attentive to camera shots and model positions as determined by the ExportID field. This was something we didn't have to worry about in 3.A because it was an ambient dialogue. Since this is a cutscene we need to account for that, as well.

EDIT: To implement these changes, expand R8 on the Reply List tab. All fields except for the Entry List and the State Transition should be edited to be identical to R7. Doing this involves changing the EReplyType which is something we haven't edited yet. This is a bit similar to EReplyCategory, but are 3 groups: Reply_Standard (spoken line), Reply_Autocontinue (no spoken line), and Reply_Dialogend (end of dialogue). Like EReplyCategory, EReplyType is edited via its Name List integer, which is 1519 in our PCC. In addition:

  • We also have to change R8's entry list. In other words, Sam's response. We don't want the "cozy" flirt. Instead, we'll re-point to her "I'm not complaining" line, which is E10. Follow the procedure in 2.B.
  • We can also implement a new bool that indicates if FemShep did NOT take the flirt. Below you can see I've created ST 7604. It triggers bool 26504 set to TRUE. If you do something like this, remember to add the same ST to the DISAGREE option (R9), since that choice also means the player did not take the flirt. All together, these edits will look like this:

Image


3. Edit Entry 9.
Since we changed a reply in Reply List, we have to make one small tweak to one of Sam's entries to make sure the conversation doesn't get stuck before we're finished. Before saving your changes, edit E9's reply list so it looks like this:

Image


4. Edit TLK.
Final step for the dialogue is to edit the TLK; see the [url= post11905.html#p11905TLK Appendix[/url] for details. We need to add the new DW text for our platonic AGREE. We could also change the "Yep" text for the DISAGREE choice since "Yep" sounds an awful lot like Shep actually agreeing with Sam's comment, lol. Doing so would make our 3 options: "You'll be okay" (friendly), "It gets better" (agree), and "Could be worse" (disagree).

Code: Select all
   
        640165
        4
        Could be worse.
   

   
        900000
        10
        It gets better.
   


That's it! In game, our edits will look like the video below (FF to 4:17). Note that we left the Major Decision/Default Action for R9 in place. While we could have changed it to our new platonic agree, there's very little chance a player who uses Action Mode would be installing an RP mod like ThaneMOD or BackOff. So, we saved a little bit of work by leaving it in place :]


_______________________________________

This example was a pretty moderate-level edit. We relocated an existing DW option and learned about reply categories and types, added a new option to the DW, did a little re-pointing with entries and replies, learned how to research and create new state transitions, changed a conditional reference, and edited some camera references (ExportID and CameraIntimacy).

The next and final installment of the tutorial should be coming sometime in January. In it we'll be hitting on more advanced edits including FaceFX references (not the animations themselves, boo), adjusting InterpLengths for lines and interrupts, doing more complex line and DW additions, making finer adjustments of camera shots, audio-editing, and some other cool stuff. It will likely be published in two "case studies," as well, one probably focusing on Kelly and the other on segments of Thane's Huerta dialogue or another of Sam's dialogues.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Dialogue Editing Tutorial

Postby giftfish » 14 Aug 2014, 18:38

Reserved for DET, Part 4: Moderate to Advanced Editing
giftfish
 

Re: Dialogue Editing Tutorial

Postby giftfish » 14 Aug 2014, 18:38

DIALOGUE EDITING TUTORIAL
- APPENDIX I, ALL ABOUT THE TLK FILE-


With Part 3 of the tutorial in production, it's necessary at this point to have a separate post the covers TLK structure and editing. Some of this information has been covered elsewhere (Inquiring's Email Tutorial & my Codex Tutorial), but I wanted to pull that information together, add to it, and make some changes.

A.I.1 | INTRODUCTION
As stated previously, TLK files contain all the text seen in game. The main game and each DLC contain their own TLKs, all in multiple versions (localizations) for seven languages:

  • English (INT)
  • German (DEU)
  • Italian (ITA)
  • French (FRA)
  • Spanish (ESN)
  • Polish (POL)
  • Russian (RUS)

Editing dialogue primarily involves making changes to localized TLK files and the PCCs that reference them. That means unless all localizations of these files are edited, any changes will only affect the localization the modder has installed. Regardless of localization, prior to editing the TLK it must be converted. It's native format is only readable by BioWare and should be converted into an XML using ME3Explorer:

    1. Open TLK Editor. Tools > TLK Editor. Ensure the "Load TLK" tab is selected in the window that opens.
    2. Locate TLK. In the upper "Current Path to TLK file" field click the "Change" button. A window will open. Navigate to the ME3 CookedPCC. Select the appropriate TLK for your game's install. Click "Open" in the lower right.
    3. Define & Name. Click the "Change" button associated with "Current path to output text file." In the window that opens navigate to the desired save location for the XML file. Name the file and click "Save" when finished.
    4. Convert. Click "Start" in the TLK Tool window to convert the file. A message will appear when finished. The TLK (xml) may now be opened in Notepad++ or other source code editor. Avoid using MS Notepad when working with large TLK files; it lacks a variety of useful features, such as numbered lines.

Use the reverse process to generate your new TLK from the edited XML. Don't forget to save your changes in the XML first.

Note: TankMaster is working on a new TLK Editor which I haven't yet tested. Once I get the opportunity, I'll edit this post accordingly.


A.I.2 | STRUCTURE
All TLK files have the same basic structure. Below is a screenshot of the simplest TLK file, specifically one extracted from the Online Pass Default.sfar. This tutorial assumes you know how to extract a file from an sfar. If not, please search the forum or play with the DLC Editor Tool; it's pretty simple to figure out.

Spoiler:
Image

Looking at the above, we can see the following:

1. UTF-8 Encoding.
The type of character encoding used for the XML file. I am unsure if this type of encoding is mandatory, or it's simply what the TLK Editor creator happened to use. Until we know, I'd suggest not changing this. If you create a new TLK from scratch, ensure it uses this encoding.

2. Strings.
TLK files contain "strings." Each string has ID, position, and data fields that are clearly labeled. These fields must be enclosed with proper tags or the game won't read the string. Absence of a forwardslash indicates "start," presence indicates "end/close." This is similar to bbcode.

Some important things to note about strings:

  • String IDs are unique within each section
  • String IDs are sequential (in order) but not consecutive (e.g, 3, 7, 10)
  • Position integers are unique, sequential, AND consecutive (e.g., 1, 2, 3)

3. Male/Female Sections.
Languages other than English tend to have gender differences for certain words, often pronouns and verbs. This is the purpose of the Male/Female TLK sections.

For example, the Spanish TLK has two entries for string 713441. "Jefe" or "jefa" is used, depending on Shepard's gender. String data at line 488256 is masculine and in the Male Section. String data at line 534548 is feminine and in the Female Section. A modder who wants to edit this line will need to edit BOTH entries to ensure the change works properly in game.

Spoiler:
Image

Image

The English language lacks gender differences for pronouns, nouns, verbs, and the like, which is why all strings in BIOGame_INT.tlk are placed in the Male Section. Any new TLK strings should also be added to this section. The Female Section is labeled, but unused.

The green text annotating the start and end of the Male and Female Sections is "commented out" (indicated with the "!") and doesn't impact the file. The specified positions can be updated as the TLK is edited, but it is for user reference only. The "real" labels the game reads for these sections are covered in #4 below.

4. Special Strings.
The bottom four strings in the Online Pass TLK screenshot are a special case. They are consistent across all TLKs and should not be edited. This includes

  • 134217729 = Folder location of TLK (main game TLK uses "BIOGame")
  • 134217730 = Localization (Spanish TLK uses "es-es")
  • 134217731 (male) = Male Section label
  • 134217731 (female) = Female Section label

Data for the top TLK string, 724024, is similar to that in 134217729. The difference is it contains the "pretty name" of the DLC. This is what the game will display on screen, if there's a DLC error upon load up, for example. It should also not be edited, but this particular string ID changes with DLC. The EC's "pretty name" is located at string 738369.


A.I.3 | EDITING TIPS
Some quick tips as you are editing the TLK:

1. Available Strings.
String IDs must be unique across all TLKs. Assume strings 0-899999 are used by the game (that includes main game and all DLC). Consult this thread to see which strings are already used by other modders.

2. String Placement.
New strings must be placed sequentially in the TLK for them to work. In other words, if string 900 is placed above/before string 500 the game won't read it properly.

3. Male/Female String IDs.
These should always match each other, as shown in the Online Pass screenshot. Keep the vanilla values. Do not edit.

4. Male/Female Label Locations.
All new TLK strings should be placed above (have a lower position integer) than the Male and Female Section Labels (IDs 134217731). They may work with higher string IDs (done in ThaneMOD v1.0), but that approach can be problematic. They may also work with when assigned a new string ID and position (done in ThaneMOD v2.0), but that can also be problematic. The simplest approach is to use IDs lower than 134217729 and physically place the strings above 134217729 in the TLK.

5. All-in-One TLK.
Mass Effect's TLK strings are continuous across all 3 games. That means ME3's main TLK contains content from both ME1 and ME2. Keep this in mind when researching. All strings below 500K are for the other games, but commandeering them for use would be unwise.

6. Avoid Confusion.
When working in Notepad ++ it is easy to get confused between string IDs and line numbers, as they are often both 6 digits long. Stay aware of this to avoid errors in documentation.

7. Ctrl+F.
Strategically searching the TLK is a good idea when it has over a half million lines.

8. Special Characters.
When converting from TLK format into XML certain characters will be corrupted. Such as:

Noverias

To rectify this do global replace for the proper character. For example, the code above seems to be used when an apostrophe should be present. There are a variety of characters that will be corrupted with different codes. Be sure you replace each code with the correct character. Making a new DLC TLK for your mod, rather than replacing a game TLK avoids this problem. Which is what we'll move onto next.



A.I.4 | DLC TLKS
JohnP has great information in his Adding DLC TLK post that doesn't need repeating, but I do want to cover a few additional details. Keep in mind everything else in this appendix applies to DLC TLKs as well as TLKs for the main game.

1. DLC TLK or Main Game TLK?
I can't recommend creating a DLC TLK enough. Creating a DLC mod with its own TLK file is infinitely better than modding the one for the main game. You'll end up with a much smaller, more manageable file that is inherently compatible with all other mods out there (assuming you've chosen your load priority wisely). The only drawback is that it can be difficult to create and mod a DLC TLK from the outset, for two specific reasons:

  • Adding strings usually results in needing to update the position integers assigned to existing strings. As your TLK grows in length, this can be very time -onsuming. A single mistake will prevent the TLK from compiling properly from the XML.
  • A DLC TLK is not a "complete" TLK. Unlike the main game TLK, DLC TLKs only contains the things the modder has changed or added. It is missing a lot of information.

When BioD_Nor203_LOC_INT.pcc is opened in the Dialogue Editor, ME3Exp loads BIOGame_INT.tlk in the background. This TLK contains all strings the game references in the dialogue. Let's say a modder wants to change a dozen strings and makes a DLC TLK to do so. They'd probably also like to see those changes in the editor by loading the new DLC TLK manually, right? Wrong. The DLC TLK doesn't contain all the strings the dialogue uses. It only contains some of them. Which means any field in the editor that references a string ID not in the DLC TLK will contain the "No Data" reference.

To fix this issue, all strings referenced in the edited dialogue could be placed into the DLC TLK--even if they remain unedited. The obvious drawback of doing this the amount of work in tracking them all down, as they all won't be in the same part of the TLK (this seems to be inevitable). Including them also makes the TLK longer, which exacerbates the issue with re-numbering position integers.

For these reasons it can be much easier to first make edits in the main TLK and create the DLC TLK when finished with all edits. This also avoids the problem of having to re-number existing position integers, since new TLK string will be appended at the bottom. The drawback to temporarily editing the main game TLK (or any other vanilla TLK) is the modder MUST keep meticulous track of every TLK change, so they know which strings to include in the future DLC TLK. The only other option is to use a file comparison program like ExamDiff to compare the modded TLK with the vanilla one to track changes. Note: The built-in comparison tool in Notepad ++ can only compare files with under 10K lines. Over that and it locks up. You've been warned :]

2. How to Start?
Easiest way is to begin is to duplicate one of the simple TLKs like the OnlinePass or the From Ashes Shared TLK. Doing so means nothing is deleted and the mandatory entries are easily located and edited. The modder then just needs to add new strings and change the name of the file.

3. File Name.
The DLC Mod TLK should be named as such: DLC_CON_MODNAME_INT.tlk. If modding a different localization use the appropriate suffix.

4. Pretty Mod Name & String ID.
Use whatever name you wish, realizing it may appear on screen. It's important to realize that the string ID used in the TLK is referenced in the Mount.dlc file. This means the string ID from Online Pass can't be used with the Mount.dlc for the EC, for example. They need to "agree" with each other.

5. Keep Copies.
When making lots of changes it's handy to keep copies at a regular interval so edits can be easily reverted without having to recompile the file.

6. String Data Formatting.
Always place new data text immediately following the first data tag. Skip a line between paragraphs. Don't indent anything. Place the closing data dag immediately after your text, rather than on the following line. There's no way to style text, so no italics, bold, etc.

7. Referencing Another String's Data Within the Same TLK.
I learned how to do this when working on ThaneMOD v2.0's Credits. Using the "dollar symbol" in front of a string ID within a data tag will reference that string's text. Which means these strings:

Spoiler:
<string>
<id>723633</id>
<position>100805</position>
<data>- Lead</data>
</string>

<string>
<id>140000101</id>
<position>172</position>
<data>coldwetn0se $723633
AndromedaShepard
AthenaisShepard
elliekrios
elvie
Emeraldfern
kittykat
JECW
mnomaha
n7Siha
quietonewisp
vickyoak</data>
</string>

...turns into this on screen:

Spoiler:
Image

A.I.5 | ALL THOSE EMPTY FIELDS
Before finishing this post I want to talk a bit more about all the "No Data" entries you've seen in the Dialogue Editor and their impact on editing dialogue.

Hopefully, by now you're gaining an understanding that for dialogues work via a constant back and forth between the Entry List and the Reply List. It's like ping pong. For each entry in the Entry List, there must be at least one reply in its Reply List (and vice versa) to keep the dialogue going--even if it refers to a "No Data" entry/reply. These "No Data" entries/replies still direct a variety of things including state transition triggers, conversation branches, changes in camera, interrupts, animations, and more. They are necessary, and in some cases, their strings can be used to insert new lines of dialogue.

This is because every "No Data" entry has a string ID assigned to it by the game, viewable in the Dialogue Editor. Unfortunately, the string's ID is missing from the TLK...sort of. Instead of the proper string ID, what appears in its place is a 10-digit number that begins with "-214." This is different from all other TLK entries that are used for spoken lines or displayed text. There is also always a "-1" inside the data tags, which indicates null/no data.

Here are two screenshots to help illustrate the TLK contents for Thane's investigate dialogue (entry 7 of the Reply List). Note: the adjacent strings in TLK screenshot have been edited; the files loaded in the DE shot are vanilla.

Spoiler:
Image
Image

This means that using a Ctrl+F in the TLK to search for a "No Data" string ID is not a good way to go about things. Instead, locate it by searching for nearby, spoken entries with the correct string ID listed.

-----------------------------------
CHANGELOG
November 30, 2014 -- Windowdressing.

giftfish has been thanked by:
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Dialogue Editing Tutorial

Postby giftfish » 14 Aug 2014, 18:38

DIALOGUE EDITING TUTORIAL
- APPENDIX II, STATE TRANSITIONS -


IMPORTANT: This post is written as a subsection of Part 3 of the Dialogue Editing Tutorial.

As stated in the Dialogue Editor Research post, state transitions (STs) are events that control the setting of bools and integers in the game. To look up their ID numbers we need to use TankMaster's Natives Editor, a utility not yet part of the ME3Exp toolset. This section of tutorial will cover how to use the editor and provide some guidance on how to determine the plot effects of a state transition.


A.II.1 | TOOL USE AND RESEARCH TIPS

1. Open.
Download the editor and run the exe. The NE window will look like this:
Spoiler:
Image
ME3's main "State Event Map" is stored in SFXGameInfoSP_SF.pcc. DLC State Event Maps are stored in their "startup" file. For example, Omega's is stored in Startup_EXP_Pack002_INT.pcc. We'll open the main file since we're editing a file in the base game. Click File > Open, then navigate to the file's location on your PC. Click on the State Event Map tab to see all the transition IDs referenced by the base game:
Spoiler:
Image
Event IDs in SFXGameInfoSP_SF.pcc range from 1 to 4914. DLC picks up with larger IDs, Citadel DLC ending in 7415. Multiplayer DLC seem to lack State Event Maps. They aren't located in the MP Startup PCC and some MP packs lack this file completely.


2. State Event 2345.
Time to check out our first transition. Locate 2345 in the list and click on it.
Spoiler:
Image
ST 2345 prompts one action: it sets plot bool 20072 to TRUE. Note from the gibbed dump screenshot in 3.B.1 that this is also the conditional checked at the start of the conversation. This means 20072 is the bool for Sam's R2 convo. It's set to true the first time the conversation is triggered. The conditional check for the bool is what prevents the same conversation from triggering again in the future. We definitely don't want to change this for our edit.


3. State Event 2129.
This is the next transition on our list. A quick look and we see it triggers an integer change rather than a bool change. The value of plot integer 10336 will be increased by one from its starting value. If the "increment" box wasn't checked, the game would change the value to one:
Spoiler:
Image
Now the hard part: figuring out what an integer means. This can be difficult. Most are plot bools and integers are unknown, but it's always worth checking the web references in 1.B before you invest a significant amount of time in a hardcore search. If that doesn't get you anywhere you'll need to dig through a variety of dialogue files and conditionals related to the character, and use your ME3 plot knowledge to figure things out. In Sam's case, conditional 943 (checked in several of her convos) references 10336, which gives us a good clue:

((plot.bools[19835] == Bool true) || (plot.ints[10336] >= 5))

Since cnd 943 also references her romance bool (19835), let's check Sam's cabin lock-in conditional (883) to see if 10336 used there, as well:
Spoiler:
Note: conditional modified to include Thane (19283) and Kelly (21100) romance bools.

(((plot.bools[17662] == Bool true) && (plot.bools[19722] == Bool false) && (plot.bools[19725] == Bool false) && (plot.bools[19723] == Bool false) && (plot.bools[19283] == Bool false) && (plot.bools[21100] == Bool false) && (plot.ints[10337] 4= 6) && (plot.bools[19836] == Bool false)) || (plot.bools[19835] == Bool true))
Nope, it isn't. This is another good clue. Further research into Sam's other conversations shows that 10336 increases by +1 every time Shepard prompts a new conversation with her in the CIC. 10336 is Sam's friendship integer. By talking to Sam, Shepard builds a friendship with her.

Since 10336 isn't involved with Sam's romance, we now know for certain that we don't need to make any changes related to ST 2129. Let's move through the last two state transitions a bit more quickly now that we better understand how to read the editor and figure out plot effects.


4. State Event 2133.
This is the transition we're most interested in since it's triggered by the AGREE response and Sam's "cozy" flirt. From the editor we see it conveys a +2 increase to a different integer: 10337. This is the same integer referenced in Sam's lock-in conditional and is known to be tied to her romance. Any Shepard who chooses AGREE during this convo will trigger this transition. In other words, the game considers AGREE to be an indication Shepard is interested in Sam romantically.

Now we're getting somewhere. This is the state transition contributing to the ninjamance. When creating our neutral response we don't want to use this.


5. State Event 4595.
This sets bool 22506 to TRUE. Running a search for both the bool and transition in the Gibbed dump doesn't turn up any other entries. Neither does a search on the common web resources posted in 1.B. ST 4595 seems to simply flag the end of the conversation as "complete." Since we don't need to make any changes to the associated line, we can safely leave it be despite not fully understanding what it does.
________________________________________________

Before moving back up to Part 3 of this tutorial, I want to mention one last thing about state transitions. A single ST can have multiple plot effects. For example, state event 28 sets eight different bools. State Event 1848 sets a bool and changes an integer. This system means that multiple changes can be triggered as a result of a single decision Shepard makes in game. This is a very important way ME3 controls plot evolution.

Time to continue on with Part 3. Click here for a shortcut, or scroll up if you prefer. We'll return to this section a bit later to use the editing features of the tool.



A.II.2 | ADDING STATE TRANSITIONS
Adding new state transitions and bools to the game is very, very easy. The most important thing to remember is that you MUST use unique ID numbers. Both the transition and bool IDs cannot already be referenced by the vanilla game (this includes DLC). To maintain intermod compatibility, you should also ensure the ID is not used by another mod author (consult this thread). Once you've chosen your numbers, then use the procedure below to add them. We'll be using 7603 for our state transition and 26503 for our bool.

Why add state transitions rather than edit?
Sometimes you want to flag certain events in game that BW hasn't. That way you can reference them in conditionals later on to mod new plot content. Also, State Transitions are a bit like conditionals: the same state transition is referenced by multiple dialogues and sequence maps. If you change it once, then you've changed it everywhere. This increases the chance of you breaking something somewhere else. Even when you really just want to edit a ST, it's generally always better to make a new one and replace it. Here's how:

    1. Select the State Event Map tab.
    2. Click the bottom left "Add" button. A new ID will be created automatically at the bottom of the list. You may change it by altering where it appears in the labeled field to the upper left.
    3. Add the new bool. Under the empty, right-hand pane there's a dropdown menu. Make sure "Bool" is selected and then click the "Add" button underneath. You should now see a new "Bool" item displayed in the previously empty pane. To the right are all the fields we discussed previously. Let's edit them.
    4. Select the "0" in the Global Bool field and type in your new bool number; ours is 26503. Then, set the "New Value" to TRUE. This is our flirt flag.
    5. We're not done yet. We need to make sure we retain the changes that ST2133 implements. That means we need to add a +2 increment for integer 10337. From the bottom dropdown select "Int" and then click "Add". Now, in the "Global Int" field enter 10337. For "New Value" type in 2 or use the arrows. Check off the "Increment" field. I'm not sure what "Instance Version" is yet, but its value is 0 in 2133 so we want to stick to that.
    6. When finished, it should look like the screenshots below. Be sure to save changes before exiting. File > Save.
Spoiler:
Image
Image
________________________________________________

A couple final comments. I haven't used any of the other State Event categories besides bool and int, so my current knowledge of state transitions is limited to those types. There are several others, including Consequence, Function, Float, Local Bool/Int/Float, and Substate. These categories are all used MUCH less frequently than Bool and Int. You can find a bit of information about them in TankMaster's Plot Natives Research thread and the Download thread.

Those of you reading this as part of the Dialogue Editor tutorial, click here to return to Part 3, or scroll up manually if you prefer.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: Dialogue Editing Tutorial

Postby giftfish » 14 Aug 2014, 18:39

reserved for Audio editing
giftfish
 

Re: TUTORIAL: Dialogue Editing

Postby Blad3Zer0 » 15 Aug 2014, 10:48

I can't wait to see what you've reserved all this space for...
Blad3Zer0
User
 
Posts: 223
Joined: 12 Aug 2013, 11:28
Has thanked: 92 time
Have thanks: 28 time

Re: TUTORIAL: Dialogue Editing

Postby giftfish » 15 Aug 2014, 13:39

Blad3Zer0 wrote:I can't wait to see what you've reserved all this space for...

Lol. I'm being generous...I hope I don't need that much room.

It's mostly for organization. I don't think I'll hit the character limit for a post or anything (some of my other tutorials are pretty long and I haven't yet, lol). But having separate posts for different topics will make it easier to link things so the person being helped doesn't have to search through the entire tutorial to find what they are looking for :)
giftfish
 

Re: TUTORIAL: Dialogue Editing

Postby giftfish » 29 Aug 2014, 21:50

Got distracted by some super cool stuff today, while I meant to work on this, so I should have the next installment up on...Monday probably :)
giftfish
 

Next

Return to Modders' Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

suspicion-preferred