• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Dialogue Gender Overhaul

That's the character ID, not the character's name. The player character is always "Blaze", regardless of your name or gender. Do not change that or it will not work! It's not changed to the player character's name in the quest, it's changed right on that line. 'Characters[GetCharacterIndex(DLG_TEXT[6])]' is the character associated with the ID in DLG_TEXT[6], which is "Blaze", so that's the player character. Therefore 'GetMyName(&Characters[GetCharacterIndex(DLG_TEXT[6])])' is the player character's name.

It shouldn't do any harm to replace fixed "sir" and "man" with preprocessed placeholders, though the implied romance between Nathaniel and Danielle is going to take on a whole new twist if you play this storyline as a female character. ;)
 
That's the character ID, not the character's name. The player character is always "Blaze", regardless of your name or gender. Do not change that or it will not work! It's not changed to the player character's name in the quest, it's changed right on that line. 'Characters[GetCharacterIndex(DLG_TEXT[6])]' is the character associated with the ID in DLG_TEXT[6], which is "Blaze", so that's the player character. Therefore 'GetMyName(&Characters[GetCharacterIndex(DLG_TEXT[6])])' is the player character's name.

Alright, good, glad I didn't dare touch any such lines then :p

It shouldn't do any harm to replace fixed "sir" and "man" with preprocessed placeholders, though the implied romance between Nathaniel and Danielle is going to take on a whole new twist if you play this storyline as a female character. ;)

Rawr, at some point in the future maybe one can expand that and do something more fun :cool:
 
It shouldn't do any harm to replace fixed "sir" and "man" with preprocessed placeholders, though the implied romance between Nathaniel and Danielle is going to take on a whole new twist if you play this storyline as a female character. ;)
:rofl :rofl :rofl
 
I can't quite wrap my head around an exchange in quest_pirate_01
Code:
if (pchar.quest.main_line == "blaze_to_incas_collection_begin_1")
            {
                Dialog.snd = "voice\QUP1\QUP1006";
                dialog.text = DLG_TEXT[9] + pchar.lastname + DLG_TEXT[10];
                link.l1 = pcharrepphrase(DLG_TEXT[11], DLG_TEXT[12]);
                link.l1.go = "blaze_to_incas_collection_begin_2";
            }

The pirate says "Are you Lastname?", so far so good. If the players rep is above neutral, he or she answers "Perhaps. Do you know anything about Indian trinkets?"

The part I dont understand is if your rep is negative, you answer the question about your identity with DLG_TEXT[12] which is "I do indeed, sir. And a bit more on the topic, if you follow my meaning.", which is a very weird way to respond to that question. In fact it seems like something the pirate would say in respons to the players question. Am I misunderstanding something or is this a mistake?

Otherwise I'm making good progress, gonna play for a while with it and see if I get any problems :bounce I can't realistically test all the dialogues I've changed alone so if all works out I think its time to share it and hope it's a hit! :p
 
Maybe you found a mistake in the dialog code.
Wouldn't surprise me; the game doesn't really encourage you to play with a low reputation, so possibly nobody ever tried and noticed that before.
 
It does indeed look like a mistake. The easiest thing to do would probably be to change the "link.l1" line to simply 'link.l1 = DLG_TEXT[11];'. The next dialog text line is then unused and effectively becomes a placeholder in case there are further consequences of having a low reputation further in the quest. If so, a more meaningful line could be substituted.
 
It does indeed look like a mistake. The easiest thing to do would probably be to change the "link.l1" line to simply 'link.l1 = DLG_TEXT[11];'. The next dialog text line is then unused and effectively becomes a placeholder in case there are further consequences of having a low reputation further in the quest. If so, a more meaningful line could be substituted.
Yessir, glad I wasn't that bad at reading the code :p

Ran into another problem that's a bit of a puzzle; when gambling the opponent uses some dialog lines from habitue_dialog but it calls them from INTERFACE\gamble.c, and it doesn't use dialog.text but infoText

Example:
Code:
if(playerCount<gambleCount)
       {
           infoText = DLG_TEXT[101] + XI_ConvertString(GetCardsCombination(gambleChar)) + cardsInCombo + DLG_TEXT[36];
           VewGamble(infoText);
           UpdateBet("lose");
           return;
       }

Adding a preprocessor seems to break it. That particular case I think I could solve with a rewrite like this: infoText = DLG_TEXT[101] + XI_ConvertString(GetCardsCombination(gambleChar)) + cardsInCombo + DLG_TEXT[36] + GetCharacterAddressForm(PChar, ADDR_INFORMAL, false, false) + "!"; since line 36 is "! You lose, lad!", so I'd just remove the last part. But there is another line where I can't do that, so the alternative there is a rewrite to a gender neutral line or finding a way to make Preprocessor_Add work. Any tricks I don't know about? xD
 
The best I can think of right away would be to add another line to the end of "habitue_dialog.h":
Code:
"! You lose, lass!",
If you put it on the end then you don't need to renumber lots of "DLG_TEXT" lines in "habitue_dialog.c". So, unless you've been adding more lines already, that would make the new line DLG_TEXT[118]. (Don't forget to change the 'string DLG_TEXT[118]' at the top of both "habitue_dialog.h" and "gamble.c" from 118 to 119. ;))

Add this somewhere near the top of "gamble.c":
Code:
string you_lose = DLG_TEXT[36];
if (PChar.sex = "woman") you_lose = DLG_TEXT[118];
Then, wherever the code says 'DLG_TEXT[36]', change it to 'you_lose'. The net result is that variable "you_lose" should be set to either "! You lose, lad!" or "! You lose, lass!" depending on whether you're female, and any dialog which would previously have included "! You lose, lad!" will now include the appropriate version.
 
I assume that whatever 'VewGamble' does, it does not include the usual evaluation of preprocessors. :facepalm
 
The best I can think of right away would be to add another line to the end of "habitue_dialog.h":
Code:
"! You lose, lass!",
If you put it on the end then you don't need to renumber lots of "DLG_TEXT" lines in "habitue_dialog.c". So, unless you've been adding more lines already, that would make the new line DLG_TEXT[118]. (Don't forget to change the 'string DLG_TEXT[118]' at the top of both "habitue_dialog.h" and "gamble.c" from 118 to 119. ;))

Add this somewhere near the top of "gamble.c":
Code:
string you_lose = DLG_TEXT[36];
if (PChar.sex = "woman") you_lose = DLG_TEXT[118];
Then, wherever the code says 'DLG_TEXT[36]', change it to 'you_lose'. The net result is that variable "you_lose" should be set to either "! You lose, lad!" or "! You lose, lass!" depending on whether you're female, and any dialog which would previously have included "! You lose, lad!" will now include the appropriate version.
Had some trouble with this first because of some commas and I missed that PChar is playerChar in that file to shake things up, but now it works great! Thanks again :cheers
 
I think it's ready! :bounce Ive played some hours yesterday and today and have checked and rechecked the files several times to find lingering problems. still, I'd be shocked if I hadn't missed anything. :modding

Also fixed some spelling and grammar errors where I came across them. One exception are the dialogs of the pirate captains you can find hidden here and there. They are a bit of a mess and to fix them felt like it was outside the scope of this project :p maybe I'll do that later if there's interest

As a bonus I made a nation agnostic version of the Gambler/Rogue start. I liked the concept of it, but previously your character spoke with french flavor words no matter your starting nation which I felt was a bit of a shame. I made it so it changes depending on your starting nation. Pirates and personal nation chars use english mostly.

You are still told to go to Pointe a petre or whats the name when you escape the starting island, but that was the case before too, so I left it as it is for now. Hope your starting nation isn't hostile with france I guess. It's in a separate file, to make it easier to pick and choose.

Thanks a lot for the help! I have signed most of my changes to make it easier to troubleshoot, but I may have missed some here and there. Special shoutout for the Ardent storyline, it was of great help :cheers
 

Attachments

  • Nation Agnostic RogueGambler Start.rar
    15.5 KB · Views: 130
  • Dialogue Gender Overhaul.rar
    925.6 KB · Views: 148
One exception are the dialogs of the pirate captains you can find hidden here and there. They are a bit of a mess and to fix them felt like it was outside the scope of this project :p
Indeed those are an especially bad case... :wp
 
Pirate captains can be expected to have bad grammar! So can less educated citizens. Also, I did a bit of correcting and gender-overhauling myself a while ago, though nothing like on this scale - I just fixed a few as I encountered them while playing through some sidequests. Some files had poor dialog because the person who wrote them was not a native English speaker. And where the character also was not a native English speaker, I intentionally left the errors, the reasoning being, if a real person from another country makes that sort of mistake then a character from another country might do likewise. Correct Yoda's grammar, you would not! :D

Anyway, I'm working my way through the whole lot with WinMerge to see what has changed. Most of it seems alright, though the change to Father Jerald's wedding service is not needed. It's only used by the "Hornblower" storyline, and although I left variables in place so that it can be used if anyone else wants Father Jerald to conduct their wedding, the nature of the service is that the groom speaks first. Things get a lot more complicated if you have to contend with the player being female, and anyone wants to allow for that should look to Padre Magarino. His wedding was written for the "Ardent" storyline which gives you a choice of male or female character, so the ceremony had to allow for the fact that a male player character speaks first but a female player character speaks second.

"kapitein_guards_dialog" is something I wrote for the "Kapitein of Kralendijk" sidequest. No gender substitution is needed there because if that dialog is active then you're disguised as a soldier. If the guard recognises you as female then your cover is blown!

"Spanish lugger captain_dialog" is for a sidequest I'm working on. You will be playing as Horatio Hornblower, whether by continuing the storyline or by freeplay. If you are playing a female character then you won't see this dialog!
 
I took one look at "Armand Delacroix_dialog" when I was playing that sidequest and gave up. A good deal more is needed than to simply switch between "frère" and "sœur", starting with putting the correct accent on "frère". ;) You'd have to switch between "mon frère" and "ma sœur". If you're female then you're probably "ma capitane", not "mon" capitane". Basically, "my" translates to "mon" or "ma" depending on whether you're male or female. Good luck with "You are a prince among men, mon capitane!" So, for all that I tried to make any sidequest which I played work for female characters, I gave up on that one. He's drunk anyway. xD
 
Pirate captains can be expected to have bad grammar! So can less educated citizens. Also, I did a bit of correcting and gender-overhauling myself a while ago, though nothing like on this scale - I just fixed a few as I encountered them while playing through some sidequests. Some files had poor dialog because the person who wrote them was not a native English speaker. And where the character also was not a native English speaker, I intentionally left the errors, the reasoning being, if a real person from another country makes that sort of mistake then a character from another country might do likewise. Correct Yoda's grammar, you would not! :D

Anyway, I'm working my way through the whole lot with WinMerge to see what has changed. Most of it seems alright, though the change to Father Jerald's wedding service is not needed. It's only used by the "Hornblower" storyline, and although I left variables in place so that it can be used if anyone else wants Father Jerald to conduct their wedding, the nature of the service is that the groom speaks first. Things get a lot more complicated if you have to contend with the player being female, and anyone wants to allow for that should look to Padre Magarino. His wedding was written for the "Ardent" storyline which gives you a choice of male or female character, so the ceremony had to allow for the fact that a male player character speaks first but a female player character speaks second.

"kapitein_guards_dialog" is something I wrote for the "Kapitein of Kralendijk" sidequest. No gender substitution is needed there because if that dialog is active then you're disguised as a soldier. If the guard recognises you as female then your cover is blown!

"Spanish lugger captain_dialog" is for a sidequest I'm working on. You will be playing as Horatio Hornblower, whether by continuing the storyline or by freeplay. If you are playing a female character then you won't see this dialog!

I didn't mean to include Spanish lugger actually since I discovered today just that, but it must have accidentaly slipped in anyway :p I suspected the same thing for Jerald but I'm glad it may be of some use xD

I tried to take context in mind for all changes, but I read the kapitein as you being a dutch officer and didn't suspect you were under disguise, so feel free to dump changes that don't make sense :onya


I took one look at "Armand Delacroix_dialog" when I was playing that sidequest and gave up. A good deal more is needed than to simply switch between "frère" and "sœur", starting with putting the correct accent on "frère". ;) You'd have to switch between "mon frère" and "ma sœur". If you're female then you're probably "ma capitane", not "mon" capitane". Basically, "my" translates to "mon" or "ma" depending on whether you're male or female. Good luck with "You are a prince among men, mon capitane!" So, for all that I tried to make any sidequest which I played work for female characters, I gave up on that one. He's drunk anyway. xD

looking at it now and oh boy, you're right. must have done a very poor job reading through that file, maybe it was one of those I did late at night :p I did some searching about the "mon capitane" when I encountered it tho, and it as far as I can gather it seems it's "mon" whether you're male or female? In the modern navy they have taken to just saying "capitaine" to get around this problem, don't know how to do here.. should we just keep it as it is? how I missed all the hundreds of thousands of frère in the file is a mystery tho :p

EDIT: It seems I left a Peter Fructoso_dialog.c.original in there too, I was planning to change that to .c but it slipped my mind
 
I already spotted "Pedro Fructoso_dialog.c.original", looked through it to make sure it was doing what was needed for "Pedro Fructoso_dialog.h", and renamed it when I copied into my update archive.

In "Blacksmith6_dialog", references to "madam" aren't to the player. This dialog is for the blacksmith of St. Pierre, who is a woman, so "madam" is you talking to her.

Still going through the files to see what has changed...
 
I already spotted "Pedro Fructoso_dialog.c.original", looked through it to make sure it was doing what was needed for "Pedro Fructoso_dialog.h", and renamed it when I copied into my update archive.

In "Blacksmith6_dialog", references to "madam" aren't to the player. This dialog is for the blacksmith of St. Pierre, who is a woman, so "madam" is you talking to her.

The "madame" preprocessor in blacksmith6_dialog is actually for the player to use their nation specific honorific when addressing the blacksmith, but that has the problem of your character switching address when switching flags, so it's an error none the less :p

Still going through the files to see what has changed...
It's quite a lot of text, innit :ko


Also, I gave poor Armand's dialogs a shot too and tried to rescue it, see what you think :D I added a new line at the bottom for "prince among men"; "queen among beggars". Not 100% sure about the beggar part, but I think it's alright, it's a very small detail after all :p

EDIT: I had messed up patrol_dialog.c completely too, like real bad, every single edit was wrong. Uploading a fixed version!
 

Attachments

  • Armand Delacroix_dialog.c
    7.4 KB · Views: 157
  • Armand Delacroix_dialog.h
    6.3 KB · Views: 158
  • patrol_dialog.c
    3.4 KB · Views: 137
Last edited:
I'm not sure whether "mon capitaine" should be "ma capitaine" when addressing a female captain, but it's certainly better than it was.

A few of your dialogs have constructs like "#sgender#self". That works in English but doesn't work in any other language, and as I know someone is trying to write a Spanish translation, I don't want to create problems for him. So I replaced them with "#shimself#", then put this into the "dialog.c" file:
Code:
               if (PChar.sex == "woman") Preprocessor_Add("yourself", XI_ConvertString("herself"));
               else Preprocessor_Add("yourself", XI_ConvertString("himself"));
"RESOURCE\INI\TEXTS\ENGLISH\common.ini" needed entries for "himself" and "herself" for that to work, so I've added them. Likewise for "gentleman", which now becomes either "gentleman" or "gentlewoman" by a similar mechanism, though "common.ini" translates "gentlewoman" to "lady". (I didn't want this "lady" to get confused with the one which can appear as the reputation of a female character.)

If you can change the "standard" storyline dialogs to use pre-processed placeholders for Danielle's name and gender, it should then be possible to arrange for a female character to have a male partner. The character ID will still be "Danielle" but will be assigned a male model and name - probably Nathaniel Hawk, then you can switch the story around completely by playing as Danielle. (Remember, the player character's ID is always "Blaze", so the game won't get confused if your name is "Danielle" and the other character's ID is "Danielle". :D)

Meanwhile, I'm now working my way through the "Freeplay" and "standard" dialogs. The non-storyline dialogs are checked, though all I did was see what had changed in the "dialog.h" files and then trust that you'd done what was needed in the corresponding "dialog.c" files. So I didn't pick up on the errors in "patrol_dialog.c" - thanks for spotting that! I've also made a backup copy of the entire "DIALOGS" folder so that, if any of the revised dialogs is broken, I can easily revert to the original until it's fixed.
 
I'm not sure whether "mon capitaine" should be "ma capitaine" when addressing a female captain, but it's certainly better than it was.

A few of your dialogs have constructs like "#sgender#self". That works in English but doesn't work in any other language, and as I know someone is trying to write a Spanish translation, I don't want to create problems for him. So I replaced them with "#shimself#", then put this into the "dialog.c" file:
Code:
               if (PChar.sex == "woman") Preprocessor_Add("yourself", XI_ConvertString("herself"));
               else Preprocessor_Add("yourself", XI_ConvertString("himself"));
"RESOURCE\INI\TEXTS\ENGLISH\common.ini" needed entries for "himself" and "herself" for that to work, so I've added them. Likewise for "gentleman", which now becomes either "gentleman" or "gentlewoman" by a similar mechanism, though "common.ini" translates "gentlewoman" to "lady". (I didn't want this "lady" to get confused with the one which can appear as the reputation of a female character.)

If you can change the "standard" storyline dialogs to use pre-processed placeholders for Danielle's name and gender, it should then be possible to arrange for a female character to have a male partner. The character ID will still be "Danielle" but will be assigned a male model and name - probably Nathaniel Hawk, then you can switch the story around completely by playing as Danielle. (Remember, the player character's ID is always "Blaze", so the game won't get confused if your name is "Danielle" and the other character's ID is "Danielle". :D)

Meanwhile, I'm now working my way through the "Freeplay" and "standard" dialogs. The non-storyline dialogs are checked, though all I did was see what had changed in the "dialog.h" files and then trust that you'd done what was needed in the corresponding "dialog.c" files. So I didn't pick up on the errors in "patrol_dialog.c" - thanks for spotting that! I've also made a backup copy of the entire "DIALOGS" folder so that, if any of the revised dialogs is broken, I can easily revert to the original until it's fixed.

That makes sense; now that I'm more comfortable with the dialog and language systems I will have such things in mind if (if=when, let's be honest, modding is addictive :p) I come across other such cases.

I will probably have another look at especially the standard questline to make it more dynamic! My dream goal is to be able to do my own sidequests, and I don't wanna poke in the Ardent questline since that is already very good and enjoyable, so taking a stab at the standard one is maybe a good way to start learning :onya just simple changes to start with tho, like changing names and models and trying to trace which code does what, I won't go crazy yet :p gonna take a few days break from more sweeping changes to the dialogs tho to rest my brain, i think :ko
 
Back
Top