PDA

View Full Version : Dialog Problems.



Groucho2
10-21-2009, 07:15 AM
I have not been able to get a dialog to work or display. I must be doing something wrong.

I add a dialog object to the map. Open its attributes and add a dlg_line, select the character I want to say the dialog and type in some text.

I then add a woman mesh and configure it to be visable on start, animations, etc.

Under the Trigger attribute for the woman I have "ActiveTrigger" set to "true".

OnExecute<Action> I added one item and selected the "act_Dialog".

Then I select the dialog I created.

On "IconUse" I have "Talk" selected.

When I start the game I can walk up to the woman and I get the Talk trigger but when I push the use key the IconTalk "Talk" word dissappears but nothing else happens. None of the text I have in the dialog is displayed.

Can anyone tell me what I am doing wrong?

Groucho2
10-21-2009, 07:15 AM
I have not been able to get a dialog to work or display. I must be doing something wrong.

I add a dialog object to the map. Open its attributes and add a dlg_line, select the character I want to say the dialog and type in some text.

I then add a woman mesh and configure it to be visable on start, animations, etc.

Under the Trigger attribute for the woman I have "ActiveTrigger" set to "true".

OnExecute&lt;Action&gt; I added one item and selected the "act_Dialog".

Then I select the dialog I created.

On "IconUse" I have "Talk" selected.

When I start the game I can walk up to the woman and I get the Talk trigger but when I push the use key the IconTalk "Talk" word dissappears but nothing else happens. None of the text I have in the dialog is displayed.

Can anyone tell me what I am doing wrong?

seir
10-21-2009, 10:48 AM
Do you have subtitles enabled in game options?

wookash_b
10-21-2009, 02:03 PM
I believe this is due to the fact that the field sTextID is not in fact the text displayed. It is the ID of the text to display from localized strings. This probably means the sTextID refers to a string in some file with all the text translated into different languages. But I have no clue what to do about it http://forums.ubi.com/groupee_common/emoticons/icon_frown.gif

To be honest all I need is to display subtitles and have the characters move their lips at the same time, so that it looks like they actually say the lines. How could this be done?

seir
10-22-2009, 01:40 AM
Yes, it's based on ID's and we need to fix it.

wookash_b
10-22-2009, 07:01 AM
So is there a way to make characters move their lips to simulate talking?

Groucho2
10-22-2009, 08:08 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by seir:
Do you have subtitles enabled in game options? </div></BLOCKQUOTE>

Seir,

I must be an idiot. I can't find this setting anywhere in the editor. Are you saying it's something in the settings you can change when you launch the game?

seir
10-22-2009, 08:27 AM
IN GAME http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

wookash_b
10-22-2009, 01:46 PM
Well, I have subtitles enabled, they appear in single player game, the act_InstantIngameSubtitle appears in custom maps, but I have no subtitles when I use the method mentioned above.

seir
10-23-2009, 01:25 AM
I'm doing research how to do dialogs properly and I'll give you feedback when it's done.

Eltaar
10-23-2009, 07:01 AM
There is a way to include audio and localized texts in your dialogues.

To do that you'll have to create a new script file - all engine scripts are ordinary text files, so you can use Notepad or similar tools to edit them.

Create a new text file in your map directory and change it's name to: &lt;MAP_NAME&gt;_strings_En.scr, where &lt;MAP_NAME&gt; is the name of your .map file. Last two letters of the file name represent language version of your dialogue lines, En stands for English, Fr = French, De = German, etc. This is the example content of such file:

!String(s,s)
String("dlg1_01_Thomas", "This is a dialogue line.")
String("dlg1_02_Ray", "This is a second dialogue line.")
(...)

The first set of values ("dlg1_01_Thomas", "dlg1_02_Ray" etc.) will be used as IDs for your dialogue lines. The second value always represents the actual text that will be spoken by your NPC.

Now insert a Dialog object in the editor, add a new dialogue line, but instead of typing the content of the dialogue itself, insert an id from the .scr file surrounded by '&' symbols, for instance: &dlg1_01_Thomas& will represent the first dialogue line from the example file above.

If you want to add audio file to your dialogue, just place an .ogg (or wave) file in your map directory and change it's name to match the chosen ID. For example dlg1_01_Thomas.ogg will be played whenever you execute a dialogue line with &dlg1_01_Thomas&.

If you want to add support for multiple languages, just create multiple .scr files (for example: map_strings_En.scr, map_strings_It.scr, map_strings_Es.scr, ...). Use the same dialogue IDs in every version, just change the dialogue content. The game will choose an appropriate .scr file depending on a language version installed in your system.

As for the lips animation - it is currently not possible to include phoneme files (.anno) without manually editing map .pak files, thus you can't upload such maps using the "Publish" tool built into the editor.

Groucho2
10-23-2009, 12:14 PM
Eltaar,

Thanks for the reply. That helps me understand alot more about dialogs and now I know how to play sounds with those dialogs http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

Any chance you could explain how to create the phoneme files (.anno) and how they work in the method you described above?

Again thanks!

Eltaar
10-23-2009, 02:19 PM
The phoneme files have to be generated by an external tool, which isn't currently a part of the Modding Package. We might look into this matter and present some kind of a solution later on.

In the meantime I saw some attempts to utilize .anno files currently present in the file system - the ones that are used for the dialogues in the original CoJ:BiB. The truth is: if you copy such files into map directory, rename them to match the localized IDs and manually customize their content, such procedure should successfully fake the lip-sync. The problem is the .anno files will not be included in the .pak file generated by the editor when you publish the map on cojmodding.com, so the lip movement will not be visible for the people who download your map from the website.

wookash_b
10-24-2009, 08:31 AM
Thanks Eltaar for this explanation. I managed to have subtitles now http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif However I noticed that if at the end of your .scr file you keep the "(...)" the subtitles will not be displayed properly. So your file should be like that:

!String(s,s)
String("dlg1_01_Thomas", "This is a dialogue line.")
String("dlg1_02_Ray", "This is a second dialogue line.")

Obviously you probably meant that the lines should continue, but someone (like me) may think this is the end of the script :P

Another thing is that sometimes for some characters I have their name appear, and sometimes not. For example I made a new map with one man only and in the dialog he is called Vendor, even though I can't find which property calls him that. In another map (one of my old test maps) the characters have no name. What is this related to?

And one last thing that is very important. If you want to see the subtitles you need to log into your profile first. You will not see any subtitles when you launch the map first time from the editor. You need to quit to menu, log into profile and then test the map. Very irritating but that is how it works (maybe a possible fix?)

Eltaar
10-29-2009, 04:08 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Obviously you probably meant that the lines should continue, but someone (like me) may think this is the end of the script :P </div></BLOCKQUOTE>

That's right: "(...)" symbol was meant to imply that the rest of the file may be filled with more lines using a similar pattern. Maybe I should explain it earlier, I didn't mean to confuse anyone. http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Another thing is that sometimes for some characters I have their name appear, and sometimes not. </div></BLOCKQUOTE>

In fact dialogue ID can be used not only to identify and localize specific lines of text, it can also describe the speaker. As you may have noticed in my example dialogue, both lines match the same pattern: "dlg1_01_Thomas", "dlg1_02_Ray". The last part of both IDs ("_Thomas" and "_Ray") define the name of the actor speaking that particular line. This name can be defined in the localized .scr file as well. Here's an example script defining a custom character name:

!String(s,s)
String("MyActor_Name", "Bandit")
String("dlg01_MyActor", "Hello, I am a bandit.")

And here's a little explanation of how the game will interpret such script:

My dialogue line ID "dlg01_MyActor" contains a speaker ID (_MyActor). If the last part of an ID is separated with a '_' sign, the game will extract this part (in this case: MyActor) and transform it to a default character ID, by adding "_Name" on the end of the extracted text. Then it will try to find a corresponding speaker ID - in my example it will search for the script defining localized name for "MyActor_Name". I added such a script line before the dialogue itself - all speakers definitions must be present before the actual dialogues! My script assigns the name "Bandit" to "MyActor_Name". If I now play this dialogue line (dlg01_MyActor) in the game, the content of the subtitle should look like this: "Bandit: Hello, I am a bandit."

I know it might look a bit complicated, but that is how it works http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif If something is not clear enough, feel free to ask.

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Very irritating but that is how it works (maybe a possible fix?) </div></BLOCKQUOTE>

I have reported this bug to the software development team. Also I've noticed that it isn't necessary to exit to the main menu - you can go to Options &gt; Audio and turn subtitles on without selecting a profile or aborting the mission.

wookash_b
10-29-2009, 02:55 PM
It is not complicated, in fact it makes perfect sense http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif I just like to know how things work. i was just wondering how come I got the name Vendor if my string is dlg1_01. Now I know that probably this id defines the name Vendor somewhere, or the lack of name defaults to Vendor. Thanks for explanation http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

Vladd90
12-06-2009, 06:24 AM
As I understand, if i will create &lt;mapname&gt;_strings_En.scr file, only english versions of game will use it. If I will create &lt;mapname&gt;_strings_Ru.scr, only russian versions will use it. Is there any way to create one dialog file, which any versions of game could use?

seir
12-06-2009, 08:57 AM
No, you need to create separate file for language.

assassin2601
08-09-2010, 12:31 PM
I have a problem with this method. I had a working file with strings. But when I added new values to this file, the engine stopped to read this file. ChromeED doesn't want to change strings &something& into proper dialogues. The game also shows only words with "&...&". However, the game plays proper sound files. Seir, any ideas how to solve this problem?

seir
08-10-2010, 01:28 AM
No "Enter" on the end or a little mistake that forces parser to stop reading file.

cr1m3
01-29-2012, 10:44 PM
In response to teamoutlawsmod


Well,

it won't be easy to do it but first i suggest you to read and look the tutorials i'll show you then ask with more details on what you want to do exactly .

Dialogs:

http://forums.ubi.com/showthread.php/227512-TUTORIALS-BY-PLAYER

http://forums.ubi.com/showthread.php/629994-Dialog-Problems/page2

Voices:

http://forums.ubi.com/showthread.php/320715-Changing-the-AI-speech

Movies - cutscenes:

http://forums.ubi.com/showthread.php/471787-Movie-animation-and-multiple-cameras

http://www.cojmodding.com/?id=tutorials

http://www.cojmodding.com/tuts/tutorial_cutscenes.zip

http://forums.ubi.com/showthread.php/440343-Cut-Scenes

http://forums.ubi.com/showthread.php/504376-ChromED-Tutorial-How-to-create-in-game-cut-scene

http://forums.ubi.com/showthread.php/588824-Create-skippable-cutscene-Forums (http://forums.ubi.com/showthread.php/588824-Create-skippable-cutscene/page2) (page 1!)

Movie fading:

http://forums.ubi.com/showthread.php/517167-Movie-fading

Techland's exemple maps:

http://www.cojmodding.com/?id=tools&sub=addons

http://www.cojmodding.com/tools/MexicoExploration_Source.zip

http://www.cojmodding.com/tools/MinersShooting_Source.zip
(http://www.cojmodding.com/tools/MinersShooting_Source.zip)
There's also useful tutorials here:

http://www.worldofleveldesign.com/categories/call-of-juarez-2-bound-in-blood/call-of-juarez-bound-in-blood-leveldesign-part1.php
most of them are already on cojmodding.

You can also look in Custer's last stand map pak to see how i added subtitles in my dialog script.