Hi all, I'm finally writting this short tutorial. I understand this is far from being a major improvement for the game, but anyway.
First : what am I talking about? In stock PotC as in Build 13, when you enter dialog mode, the face of the person with whom you're talking appears on the top left corner of the screen in a little frame. Its lips move while you hear the greeting sounds of the person, and then it stay idle. The face doesn't show any expression like fear or angryness, whatever is said in the dialog.
You'll agree with me that it appears pretty useless for now.
A thing we could do is removing those talking heads. That is easy : we only have to delete all files in \RESOURCE\MODELS\Heads, and in \RESOURCE\animation\Heads. Then we could edit \RESOURCE\Textures\Dialog\dialog.tga.tx in order to remove the frame and to have the dialog interface being nicer, Seadogs-styled or even more simplificated then Maximus attempt (see http://www.piratesahoy.net/forum/index.php...mp;#entry172212 ).
On the opposite we could try to improve the current talking heads system. Is it possible to have the talking heads being a little more expressive? Yes : there is an easy way to convince yourself.
- Launch TX convertor
- Convert into .tga \RESOURCE\Textures\Characters\Pirat11.tga.tx
- Now copy \RESOURCE\animation\Heads\AN\h_pirat10.an into \RESOURCE\animation
- Launch Inez Dias' Tool.
- Set for the texture directory RESOURCE\Textures\Characters.
- Set for the animation file h_pirat10.an (in stead of man.an, just under the texture directory and right of the ad_x_to filenames check box)
- uncheck 'show skeleton'
- Open the gm file \RESOURCE\MODELS\Heads\h_pirat11.gm. Hey it's Barbossa! What a surprise...
- click on 'cycle animation'
Now do you see what I was meaning?
Now next question : how does it works.
Easy : each model have its related head model in .gm in \RESOURCE\MODELS\Heads, with the same name with 'h_' in front, and using the same texture files than the character model. Animation data is located in the .an files in \RESOURCE\animation\Heads\AN\ - we cannot change thoses - and the .ani files in \RESOURCE\animation\Heads - you can open them with Notepad.
Now try to open one of those .ani file. You'll see something like that :
An huge file for nothing : the game only use 'dialog_all' and 'dialog_idle' (as you can see in \RESOURCE\INI\dialog.ini). And apparently you cannot do anything against that because it's coded in a .DLL file, DIALOG.dll, in the MODULES folder.
Now I'm going to propose my method to thwart this stock game limitation. If somebody has got a better one, I'd be happy to hear it!
I'd be using an exemple : you are about to annonce Rys Bloom that your talk with the Harbor Master was a succes. He should look happy!
First :
- copy \RESOURCE\MODELS\Heads\h_Chameleon.gm and paste it as h_Chameleon_happy.gm
- copy \RESOURCE\animation\Heads\h_Chameleon.ani and paste it as h_Chameleon_happy.ani. You don't have to do the same with h_Chameleon.an.
- open your new .ani file, and delete all the 'Normal', 'Angry', & 'Afraid' part ; then remove all the '_smile' part in the []s. Save your file.
- now time to add some code in a dialog file. Open 'Rys Bloom_dialog.c' in PROGRAM\DIALOGS. In case "Help_succesful_2", add this magic line :
- save your file and test that ingame!
I'll end up by a few advices.
- always rename your files by adding '_happy', '_angry', or '_afraid' at the end of the original name : h_pirat11_angry, h_h_Soldier_Eng_afraid, etc. That way we will be able to use those kind of formula :
- To have the head speaking again in a dialog, use this : SetEventHandler("frame", "DialogPlayGreeting", 1); By changing the greeting sounds at the same time, you understand this option is interesting! note : this is working only up to Build 13. In Build 14, the greeting code have been changed and this won't work - heads doesn't move their lips anymore anyway.
- I haven't try yet to use the noding animation (the guy saying yes or no by moving his head)
I agree, those are minor changes. But in the future that could lead to interesting features. Like the facial expression of your crewmate changing with your ship moral. Same with your officers. Noticing that an officer who don't like you and have a 'scoundrel' reputation has got suddenly a smiling and happy face could mean he's preparing a mutiny. Etc...
First : what am I talking about? In stock PotC as in Build 13, when you enter dialog mode, the face of the person with whom you're talking appears on the top left corner of the screen in a little frame. Its lips move while you hear the greeting sounds of the person, and then it stay idle. The face doesn't show any expression like fear or angryness, whatever is said in the dialog.
You'll agree with me that it appears pretty useless for now.
A thing we could do is removing those talking heads. That is easy : we only have to delete all files in \RESOURCE\MODELS\Heads, and in \RESOURCE\animation\Heads. Then we could edit \RESOURCE\Textures\Dialog\dialog.tga.tx in order to remove the frame and to have the dialog interface being nicer, Seadogs-styled or even more simplificated then Maximus attempt (see http://www.piratesahoy.net/forum/index.php...mp;#entry172212 ).
On the opposite we could try to improve the current talking heads system. Is it possible to have the talking heads being a little more expressive? Yes : there is an easy way to convince yourself.
- Launch TX convertor
- Convert into .tga \RESOURCE\Textures\Characters\Pirat11.tga.tx
- Now copy \RESOURCE\animation\Heads\AN\h_pirat10.an into \RESOURCE\animation
- Launch Inez Dias' Tool.
- Set for the texture directory RESOURCE\Textures\Characters.
- Set for the animation file h_pirat10.an (in stead of man.an, just under the texture directory and right of the ad_x_to filenames check box)
- uncheck 'show skeleton'
- Open the gm file \RESOURCE\MODELS\Heads\h_pirat11.gm. Hey it's Barbossa! What a surprise...
- click on 'cycle animation'
Now do you see what I was meaning?

Now next question : how does it works.
Easy : each model have its related head model in .gm in \RESOURCE\MODELS\Heads, with the same name with 'h_' in front, and using the same texture files than the character model. Animation data is located in the .an files in \RESOURCE\animation\Heads\AN\ - we cannot change thoses - and the .ani files in \RESOURCE\animation\Heads - you can open them with Notepad.
Now try to open one of those .ani file. You'll see something like that :
Code:
animation = Heads\AN\h_pirat10.an
data = "Turn speed", "4.0"
;-------------------------------------------------
; Normal
;-------------------------------------------------
[dialog_stay2]
start_time = 1
end_time = 42
data = "Blend time", "0.1"; sec
[dialog_stay3]
start_time = 42
end_time = 64
data = "Blend time", "0.1"; sec
[dialog_stay4]
start_time = 64
end_time = 103
data = "Blend time", "0.1"; sec
[dialog_stay5]
start_time = 103
end_time = 125
data = "Blend time", "0.1"; sec
[yes4]
start_time = 125
end_time = 148
data = "Blend time", "0.1"; sec
[no4]
start_time = 148
end_time = 170
data = "Blend time", "0.1"; sec
[dialog_all]
start_time = 1
end_time = 170
data = "Blend time", "0.1"; sec
[dialog_idle]
start_time = 170
end_time = 250
data = "Blend time", "0.1"; sec
;-------------------------------------------------
; Smile
;-------------------------------------------------
[dialog_stay2_smile]
start_time = 251
end_time = 292
data = "Blend time", "0.1"; sec
[dialog_stay3_smile]
start_time = 292
end_time = 314
data = "Blend time", "0.1"; sec
[dialog_stay4_smile]
start_time = 314
end_time = 353
data = "Blend time", "0.1"; sec
[dialog_stay5_smile]
start_time = 353
end_time = 375
data = "Blend time", "0.1"; sec
[yes4_smile]
start_time = 375
end_time = 398
data = "Blend time", "0.1"; sec
[no4_smile]
start_time = 398
end_time = 420
data = "Blend time", "0.1"; sec
[dialog_all_smile]
start_time = 251
end_time = 420
data = "Blend time", "0.1"; sec
[dialog_idle_smile]
start_time = 420
end_time = 500
data = "Blend time", "0.1"; sec
;-------------------------------------------------
; Angry
;-------------------------------------------------
[...]
Now I'm going to propose my method to thwart this stock game limitation. If somebody has got a better one, I'd be happy to hear it!

I'd be using an exemple : you are about to annonce Rys Bloom that your talk with the Harbor Master was a succes. He should look happy!
First :
- copy \RESOURCE\MODELS\Heads\h_Chameleon.gm and paste it as h_Chameleon_happy.gm
- copy \RESOURCE\animation\Heads\h_Chameleon.ani and paste it as h_Chameleon_happy.ani. You don't have to do the same with h_Chameleon.an.
- open your new .ani file, and delete all the 'Normal', 'Angry', & 'Afraid' part ; then remove all the '_smile' part in the []s. Save your file.
- now time to add some code in a dialog file. Open 'Rys Bloom_dialog.c' in PROGRAM\DIALOGS. In case "Help_succesful_2", add this magic line :
Code:
Dialog.headModel = "h_Chameleon_happy";
I'll end up by a few advices.
- always rename your files by adding '_happy', '_angry', or '_afraid' at the end of the original name : h_pirat11_angry, h_h_Soldier_Eng_afraid, etc. That way we will be able to use those kind of formula :
Code:
Dialog.headModel = "h_" + NPChar.model + "_happy"
- I haven't try yet to use the noding animation (the guy saying yes or no by moving his head)
I agree, those are minor changes. But in the future that could lead to interesting features. Like the facial expression of your crewmate changing with your ship moral. Same with your officers. Noticing that an officer who don't like you and have a 'scoundrel' reputation has got suddenly a smiling and happy face could mean he's preparing a mutiny. Etc...