NathanKell
...
[A Call for Help] Improving Text and Voice
Both for quality, and for ease in localizing the build to different languages.
Jason in this thread ( <a href="http://forum.piratesahoy.net/index.php?showtopic=5698" target="_blank">http://forum.piratesahoy.net/index.php?showtopic=5698</a> ) brings up the problem of how the player is addressed (due to rank troubles). Lass, in the New Characters thread, mentions similarly gender-based problems, and also brings up adding new voice clips.
Rather than go through the game files more than once, fixing a different problem each time, let's organize.
Note: this is not all mine, not in the least; ste--err, borrowing, quite specifically from Jason and Lass (as above), and probably from many before too at various points.
We have the following problems:<ol type='I'><li>Textual - Note: This is not just in dialog, but in interface and logs too!<ol type='A'><li>Address forms.<ol type='1'><li>Rank.<ol type='i'><li>At the moment player title overwrites first name. We need to use GetMyXXX() calls to fix this shortcut.</li><li>We also need a way to handle special case titles (Captain Hawk vs. Sir Nathaniel) for ranks. If we always use GetMyXXX() calls, we can do the special-case-handling there.</li><li>We also need to differentiate between the name of the rank, and the title the rank gives you (both male and female). That is, Knight gives Sir/Dame + Firstname.</li><li>Once we change all text to correctly use GetMyXXX() calls, we can rewrite UpdateTitle() to not overwrite names.</li></ol></li><li>Gender. We just need to change all /hard-coded/ direct gender-based titles ("Mister") to GetMyXXX() calls. The game already usually uses Address_form.nat which is gender specific.</li><li>Nationality. We need to convert any direct access of Address_form.nat with GetMyAddressForm(NPChar), which will check NPChar's nationality as well as pchar's sex for returning the correct address form. Note that we need to remove all direct calls to the address_form object (which we can do simply with global search-replace, this is the easiest to fix).</li></ol></li><li>Pronouns--gender. Per Lass, I've written GetMyPronounXXX() functions and added them to the other GetMyXXX() functions in dialog_func.c. We will need to replace all him/his pronouns that refer to the player with calls to those functions.</li><li>Anachronisms. For those who like even their dialog as realistic as possible. I know nothing about this, but others do, so please fire away. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /></li><li>'Basic' Text problems--grammar, word choice, etc. The text is a translation, and it shows. It needs editing. Sub-note: adding accents and other non-English characters to where they are needed; Kieron has done much of that already but there is probably a good bit left to do.</li><li>Multiple-language readiness<ol type='1'><li>Placing all dialog text in the H files.</li><li>Going through all interface files and making sure all text used exists in common.ini--remember, you don't necessarily have to use an XI_ConvertString() call, that's often automatic, but the text you assign to a string must exist in common.ini or it will not change when language changes.</li><li>Going through all logs and making sure that every time text is logged, the string is translated by a call to XI_ConvertString() and the associated string exists in common.ini</li><li>Going through all location labels--land, sea, and map, and making sure they exist in common.ini for translation, and that the code will use the converted string.</li></ol></li></ol></li><li>Voice<ol type='A'><li>First, we need someone(s) to go through all the voice clips and:<ol type='1'><li>Categorize them (looking at the sound alias INI will help here)--normal/taunt/flee/sound-effect, civilian/soldier/pirate/merchant/etc., nationality, and so forth (I am sure there are other useful categories)</li><li>Write down what's said</li><li>That way, when we need to use a sound clip, we can find the category and then easily see which clip will be best.</li></ol></li><li>Second, we need to use those categories and divide up the sound clips in the alias INIs. No more French-accented quips from Thomas O'Reily!</li><li>With an accurate list of what we have, we'll have a better sense of what we need. And especially with female voice clips, we need a lot. So we need some volunteers to do voice work.</li><li>We can then go back and assign more variety, make taunts and flee sounds used more, etc.</li></ol></li></ol>We have the following aids:<ol type='I'><li>A very talented bunch of folks here. Even if you're not a modder, you can help! We need writing and editing and voice acting and historical knowledge and lots more. This is a great chance for those who may not have been involved previously, but want to, to get involved!</li><li>The game does have built in support for multiple languages, all we need to do is take advantage of it. You can OpenLanguageFile() to get translated text based on the entry name you pass, and you can ConvertString() to find what the local version of a miscellaneous string is from the language's Common.ini file. The game even does some of that automatically--usually strings you assign in interfaces are automatically run through Common.ini looking for a match before they are displayed.</li><li>For automatic dialog address, we have the GetMyXXX() functions in dialog_func.c (added in b12? b11? I forget). They are:<ol type='A'><li>Name/Title:<ol type='1'><li>GetMyNationAddress(NPChar, tochar): will return the address form the NPChar's nationality uses for the tochar (often passed PChar)</li><li>GetMyFullName(chr): will return the full name of character chr (Title + Firstname + Middlename + Lastname)</li><li>GetMyFormalName(chr): will return character chr's title + lastname, or default_title if no title specified. We need to fix this! Both for two different default titles (for two sexes) and for which name portion a title uses (last or first).</li><li>GetMyName(chr): will return the plain name of character chr (firstname + lastname). Question: What should we do about middle names?</li><li>GetMyAddressForm(NPChar, tochar, int addresstype): Can be passed -1 for type to choose address type based on NPChar, or can be passed one of the defined types (in the block above the function define in dialog_func.c). Currently just uses NationAddress. Feel free to mod this.</li></ol></li><li>Pronoun:<ol type='1'><li>GetMyPronounSubj(chr): he/she based on gender of chr</li><li>GetMyPronounObj(chr): him/her</li><li>GetMyPronounPoss(chr): his/hers</li><li> Special: GetMyPronoun(chr, model). Where chr is the character and model is one of the desired pair. I.e. GetMyPronoun(PChar, "his") would return his if pchar is male or hers if pchar is female. This is so you don't have to remember what the desired pronoun function is called.</li></ol></li></ol></li><li>For voice clips: we can add the character's nation as a prefix to the PlaySoundType() calls that trigger citizen/merchant/etc. clips.</li></ol>Attached is the updated dialog_func.c file that has those new pronoun functions. Let me know if they work right for everyone. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" />
EDIT: My original upload didn't work (forgot some 'break' statements). Fixed now.
EDIT: Now has current form of GetMyAddressForm; what used to be this is now GetMyNationAddress, and the former now chooses what other address function to use. Attachment updated.
Both for quality, and for ease in localizing the build to different languages.
Jason in this thread ( <a href="http://forum.piratesahoy.net/index.php?showtopic=5698" target="_blank">http://forum.piratesahoy.net/index.php?showtopic=5698</a> ) brings up the problem of how the player is addressed (due to rank troubles). Lass, in the New Characters thread, mentions similarly gender-based problems, and also brings up adding new voice clips.
Rather than go through the game files more than once, fixing a different problem each time, let's organize.
Note: this is not all mine, not in the least; ste--err, borrowing, quite specifically from Jason and Lass (as above), and probably from many before too at various points.
We have the following problems:<ol type='I'><li>Textual - Note: This is not just in dialog, but in interface and logs too!<ol type='A'><li>Address forms.<ol type='1'><li>Rank.<ol type='i'><li>At the moment player title overwrites first name. We need to use GetMyXXX() calls to fix this shortcut.</li><li>We also need a way to handle special case titles (Captain Hawk vs. Sir Nathaniel) for ranks. If we always use GetMyXXX() calls, we can do the special-case-handling there.</li><li>We also need to differentiate between the name of the rank, and the title the rank gives you (both male and female). That is, Knight gives Sir/Dame + Firstname.</li><li>Once we change all text to correctly use GetMyXXX() calls, we can rewrite UpdateTitle() to not overwrite names.</li></ol></li><li>Gender. We just need to change all /hard-coded/ direct gender-based titles ("Mister") to GetMyXXX() calls. The game already usually uses Address_form.nat which is gender specific.</li><li>Nationality. We need to convert any direct access of Address_form.nat with GetMyAddressForm(NPChar), which will check NPChar's nationality as well as pchar's sex for returning the correct address form. Note that we need to remove all direct calls to the address_form object (which we can do simply with global search-replace, this is the easiest to fix).</li></ol></li><li>Pronouns--gender. Per Lass, I've written GetMyPronounXXX() functions and added them to the other GetMyXXX() functions in dialog_func.c. We will need to replace all him/his pronouns that refer to the player with calls to those functions.</li><li>Anachronisms. For those who like even their dialog as realistic as possible. I know nothing about this, but others do, so please fire away. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /></li><li>'Basic' Text problems--grammar, word choice, etc. The text is a translation, and it shows. It needs editing. Sub-note: adding accents and other non-English characters to where they are needed; Kieron has done much of that already but there is probably a good bit left to do.</li><li>Multiple-language readiness<ol type='1'><li>Placing all dialog text in the H files.</li><li>Going through all interface files and making sure all text used exists in common.ini--remember, you don't necessarily have to use an XI_ConvertString() call, that's often automatic, but the text you assign to a string must exist in common.ini or it will not change when language changes.</li><li>Going through all logs and making sure that every time text is logged, the string is translated by a call to XI_ConvertString() and the associated string exists in common.ini</li><li>Going through all location labels--land, sea, and map, and making sure they exist in common.ini for translation, and that the code will use the converted string.</li></ol></li></ol></li><li>Voice<ol type='A'><li>First, we need someone(s) to go through all the voice clips and:<ol type='1'><li>Categorize them (looking at the sound alias INI will help here)--normal/taunt/flee/sound-effect, civilian/soldier/pirate/merchant/etc., nationality, and so forth (I am sure there are other useful categories)</li><li>Write down what's said</li><li>That way, when we need to use a sound clip, we can find the category and then easily see which clip will be best.</li></ol></li><li>Second, we need to use those categories and divide up the sound clips in the alias INIs. No more French-accented quips from Thomas O'Reily!</li><li>With an accurate list of what we have, we'll have a better sense of what we need. And especially with female voice clips, we need a lot. So we need some volunteers to do voice work.</li><li>We can then go back and assign more variety, make taunts and flee sounds used more, etc.</li></ol></li></ol>We have the following aids:<ol type='I'><li>A very talented bunch of folks here. Even if you're not a modder, you can help! We need writing and editing and voice acting and historical knowledge and lots more. This is a great chance for those who may not have been involved previously, but want to, to get involved!</li><li>The game does have built in support for multiple languages, all we need to do is take advantage of it. You can OpenLanguageFile() to get translated text based on the entry name you pass, and you can ConvertString() to find what the local version of a miscellaneous string is from the language's Common.ini file. The game even does some of that automatically--usually strings you assign in interfaces are automatically run through Common.ini looking for a match before they are displayed.</li><li>For automatic dialog address, we have the GetMyXXX() functions in dialog_func.c (added in b12? b11? I forget). They are:<ol type='A'><li>Name/Title:<ol type='1'><li>GetMyNationAddress(NPChar, tochar): will return the address form the NPChar's nationality uses for the tochar (often passed PChar)</li><li>GetMyFullName(chr): will return the full name of character chr (Title + Firstname + Middlename + Lastname)</li><li>GetMyFormalName(chr): will return character chr's title + lastname, or default_title if no title specified. We need to fix this! Both for two different default titles (for two sexes) and for which name portion a title uses (last or first).</li><li>GetMyName(chr): will return the plain name of character chr (firstname + lastname). Question: What should we do about middle names?</li><li>GetMyAddressForm(NPChar, tochar, int addresstype): Can be passed -1 for type to choose address type based on NPChar, or can be passed one of the defined types (in the block above the function define in dialog_func.c). Currently just uses NationAddress. Feel free to mod this.</li></ol></li><li>Pronoun:<ol type='1'><li>GetMyPronounSubj(chr): he/she based on gender of chr</li><li>GetMyPronounObj(chr): him/her</li><li>GetMyPronounPoss(chr): his/hers</li><li> Special: GetMyPronoun(chr, model). Where chr is the character and model is one of the desired pair. I.e. GetMyPronoun(PChar, "his") would return his if pchar is male or hers if pchar is female. This is so you don't have to remember what the desired pronoun function is called.</li></ol></li></ol></li><li>For voice clips: we can add the character's nation as a prefix to the PlaySoundType() calls that trigger citizen/merchant/etc. clips.</li></ol>Attached is the updated dialog_func.c file that has those new pronoun functions. Let me know if they work right for everyone. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" />
EDIT: My original upload didn't work (forgot some 'break' statements). Fixed now.
EDIT: Now has current form of GetMyAddressForm; what used to be this is now GetMyNationAddress, and the former now chooses what other address function to use. Attachment updated.