• 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!

WIP Improve Baldewyn Coffier & Arnaud/Sabine Matton Sidequests

This is what traslatestring doe:
Code:
string TranslateString(string strData1, string strData2)
{
    string tmpData = " ";
    if (strData1 == "" || strData2 == "") tmpData = "";
    string joinString = strData1 + tmpData + strData2;//default for English
    string resultString = "";
    string str1 = strData1;
    string str2 = strData2;
    string rStr1 = "";
    string rStr2 = "";
    bool swap = false;

    resultString = SpellString("", "", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    rStr1 = str1;
    rStr2 = str2;

    str1 = strData1;
    str2 = strData2;
    resultString = SpellString("", "interface_strings.txt", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    if (rStr1 == "") rStr1 = str1;
    if (rStr2 == "") rStr2 = str2;

    str1 = strData1;
    str2 = strData2;
    resultString = SpellString("", "characters_names.txt", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    if (rStr1 == "") rStr1 = str1;
    if (rStr2 == "") rStr2 = str2;

    str1 = strData1;
    str2 = strData2;
    resultString = SpellString(GetStorylinePath(FindCurrentStoryline()), "characters_names.txt", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    if (rStr1 == "") rStr1 = str1;
    if (rStr2 == "") rStr2 = str2;

    str1 = strData1;
    str2 = strData2;
    resultString = SpellString("", "ItemsDescribe.txt", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    if (rStr1 == "") rStr1 = str1;
    if (rStr2 == "") rStr2 = str2;

    str1 = strData1;
    str2 = strData2;
    resultString = SpellString(GetStorylinePath(FindCurrentStoryline()), "ItemsDescribe.txt", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    if (rStr1 == "") rStr1 = str1;
    if (rStr2 == "") rStr2 = str2;

    str1 = strData1;
    str2 = strData2;
    resultString = SpellString("", "GoodsDescribe.txt", &str1, &str2, joinString);
    if (resultString != "") return resultString;
    if (rStr1 == "") rStr1 = str1;
    if (rStr2 == "") rStr2 = str2;

    string sPref = "";
    if (DEBUGINFO) sPref = "@";
    if (rStr1 == "" && strData1 != "") rStr1 = sPref + strData1;
    if (rStr2 == "" && strData2 != "") rStr2 = sPref + strData2;
    switch(LanguageGetLanguage())
    {
        case "Russian":
            resultString = rStr2 + tmpData + rStr1;
        break;
        case "Polish":
            resultString = rStr2 + tmpData + rStr1;
        break;
        resultString = rStr1 + tmpData + rStr2;//default for English
    }

    return resultString;
}

So Indeed I suggest using XI_ConvertString. The function TranslateString will go trough all files it seems while XI_ConvertString is only using the common.ini
You can also use LanguageConvertString(tmpLangFileID, strData1); where you select which file to use to transtlate it.
 
"XI_ConvertString" it is, then. That seems to be simplest both for me and for the translator. Everything being translated is in "common.ini", so that's where I need to look to make sure my words are in there, and that's what the translator is going to have to translate anyway. It saves me and him from having to search for different translation files all over the place.

"Laurence Wellman_dialog.c", take 2 - now with added 'XI_ConvertString'.
 

Attachments

  • Laurence Wellman_dialog.c
    5.5 KB · Views: 197
Your interpretation is completely correct. All player characters in the game are "Blaze", even the female ones.
You can try to check the player gender instead of the player ID.

This means I am now faced with 3 options:-:checklist

1 – Replace the Blaze/Danielle code with a player gender check as per above, this should have the Sabine Matton Quest play through as originally intended:-
Male Player Character – Sabine says Hello and nothing more as in current broken state
Female Player Character - Sabine talks to player about running away from father etc.

To do this in Sabine Matton_dialog.c

Code:
case "First time":
       Dialog.defAni = "dialog_stay1";
       Dialog.defCam = "1";
       Dialog.defSnd = "dialogs\0\017";
       Dialog.defLinkAni = "dialog_1";
       Dialog.defLinkCam = "1";
       Dialog.defLinkSnd = "dialogs\woman\024";
       Dialog.ani = "dialog_stay2";
       Dialog.cam = "1";     

       if (npchar.quest.meeting == "0")
       {
         Dialog.snd = "voice\SAMA\SAMA001";
         Dialog.Text = DLG_TEXT[0] + GetMyFullName(NPChar) + DLG_TEXT[1] + npchar.nickname + DLG_TEXT[2];
         Link.l1 = pcharrepphrase(DLG_TEXT[3] + GetMyName(NPChar) + DLG_TEXT[4] + GetMyFullName(PChar) + DLG_TEXT[5], DLG_TEXT[6] + GetMyFullName(PChar) + DLG_TEXT[7] + GetMyName(Pchar) + DLG_TEXT[8]);
         Link.l1.go = "exit";
         link.l2 = pcharrepphrase(DLG_TEXT[9], DLG_TEXT[10]);
         link.l2.go = "first_time_01";
         npchar.quest.meeting = "1";
         NextDiag.TempNode = "First time";
         if (pchar.id == "Blaze")   npchar.quest.hire = "blaze_begin";
         else             npchar.quest.hire = "danielle_begin";
       }
       else
       {
         Dialog.snd = "voice\SAMA\SAMA002";
         Dialog.Text = DLG_TEXT[11] + GetMyName(Pchar) + DLG_TEXT[12];
         if (makeint(pchar.rank) > 3)
         {
           Dialog.snd = "voice\SAMA\SAMA003";
           Dialog.text = Dialog.text + DLG_TEXT[13];
         }
         Link.l1 = pcharrepphrase(DLG_TEXT[14], DLG_TEXT[15]);
         Link.l1.go = "exit";
         NextDiag.TempNode = "Second time";
       }
     break;

What would I replace
Code:
if (pchar.id == "Blaze")   npchar.quest.hire = "blaze_begin";
else             npchar.quest.hire = "danielle_begin";

in the above case with?

Also in Arnaud Matton-dilaog.c

Code:
case "quests":
       iTest = 0;
       dialog.snd = "Voice\ARMA\ARMA008";
       Dialog.text = DLG_TEXT[26];
       //////////////////////////////
       // Âûäà÷à êâåñòîâ
       //////////////////////////////
       if (characters[GetCharacterIndex("Sabine Matton")].quest.hire == "blaze_begin" && makeint(pchar.reputation) > 40) // NK bugfix
       {
         Link.l6 = DLG_TEXT[163];
         link.l6.go = "daughter";
       }
       if (characters[GetCharacterIndex("Baldewyn Coffier")].quest.hire == "0")
       {
         link.l7 = DLG_TEXT[27];
         link.l7.go = "baldewyn";

I assume I would have to change the quest.hire == "blaze_begin" in

Code:
if (characters[GetCharacterIndex("Sabine Matton")].quest.hire == "blaze_begin" && makeint(pchar.reputation) > 40) // NK bugfix

as well?
So what would I change that to?



2 – My Thoughts - What I had originally thought of trying (before @Pieter Boelen 's suggestion), based on the following reasoning, and the extensive use of pcharrepphrase in the character’s dialog files:

PCharRepPhrase - function

Used to make different things happen (different dialog options - dialog text – or links to different dialog cases) depending on the Player’s reputation.

Defined in Dialog_Func.c

Code:
string PCharRepPhrase (string Var1, string Var2)
{
   ref pchar = GetMainCharacter();

   if(makeint(pchar.reputation) < 41)
   {
     return Var2;
   }
   else
   {
     return Var1;
   }
}

So if the player has a bad reputation (less than Neutral/Damsel) the dialog can be different from that for a player with a good reputation ( Neutral/Damsel or better).

Example – in Sylvie Bondies_dialog.c

Code:
case "goddaughter_denied":
       Dialog.snd = "voice\SYBO001\SYBO013";
       dialog.text = DLG_TEXT[63];
       link.l1 = pcharrepphrase(DLG_TEXT[64], DLG_TEXT[65]);
       link.l1.go = pcharrepphrase("goddaughter_denied_1", "goddaughter_denied_2");
     break;

Which gives the following dialog:-

Sylvie Bondes:- Why what are you the do with her?
Player (Good Reputation):- Don’t worry. I’ll keep your god-daughter nice and safe. - (takes player to "goddaughter_denied_1” case)

Player (Bad Reputation):- Easy now. I am the one who decides what to do with the girl, and trust me. I’ll find a use for her. - (takes player to "goddaughter_denied_2" case)


Arnaud Matton – Sabine Matton

Arnaud will only trust the player with his daughter if the player has a good reputation

In Arnaud Matton_dialog.c

Code:
case "quests":
       iTest = 0;
       dialog.snd = "Voice\ARMA\ARMA008";
       Dialog.text = DLG_TEXT[26];
       //////////////////////////////
       // Âûäà÷à êâåñòîâ
       //////////////////////////////
       if (characters[GetCharacterIndex("Sabine Matton")].quest.hire == "blaze_begin" && makeint(pchar.reputation) > 40) // NK bugfix
       {
         Link.l6 = DLG_TEXT[163];
         link.l6.go = "daughter";

This means Arnaud will not give the player the quest if they have a bad reputation (Rascal or below).

Therefore all the dialog and dialog options for bad reputation players are wasted because a player with a bad reputation cannot get the quest (the options may be available if the player managed to lower their reputation by doing lots of other bad things while doing the quest).

PROPOSAL:-

If the
Code:
npchar.quest.hire = "danielle_begin"

cannot be activated ( so the player does not get Sabine’s long speech about wanting to run away from Arnaud) then I suggest replacing the code with something based on player reputation instead. For instance :-

Good Reputation (Bloke -> Hero) – Sabine tells player all her troubles & about wanting to run away from Arnaud, since she trusts the player because of his good reputation .

Bad Reputation (Bloody Terror -> Neutral) - Sabine tells player nothing (because she does not trust player).


So replace in Sabine Matton_dialog.c in case "First time":
Replace

Code:
if (pchar.id == "Blaze")   npchar.quest.hire = "blaze_begin";
else         npchar.quest.hire = "danielle_begin";


With code that does the above (not sure how to code it )




Then make Arnaud Matton trust players with a lower reputation :shock(after all you have got him his money from Baldewyn :yes ) and let them have Sabine by changing in Arnaud Matton_dialog.c

Code:
case "quests":
       iTest = 0;
       dialog.snd = "Voice\ARMA\ARMA008";
       Dialog.text = DLG_TEXT[26];
       //////////////////////////////
       // Âûäà÷à êâåñòîâ
       //////////////////////////////
       if (characters[GetCharacterIndex("Sabine Matton")].quest.hire == "blaze_begin" && makeint(pchar.reputation) > 40) // NK bugfix
       {
         Link.l6 = DLG_TEXT[163];
         link.l6.go = "daughter";

The 40 to either 20 or 30 (Swindler or Rascal) - I assume I would also have to remove the quest.hire == "blaze_begin" from that line of code - so I am not sure what that line should be :shrug

Thus players with a lower reputation will be able to play the Sabine Matton quest and all the dialog options should be available.


3 – a combination of the 1 and 2 above

Use the player gender check and make Arnaud Matton trust players with a lower reputation.

This would mean that Sabine would only give her long speech about running away from her father to female player’s characters, but all player characters with bad reputations ( say Swindler and better reputation) would still be able to get the quest.

So in Sabine Matton_dialog.c in case "First time":
Replace

Code:
if (pchar.id == "Blaze")   npchar.quest.hire = "blaze_begin";
else         npchar.quest.hire = "danielle_begin";

Replace this with a player gender check

And in Arnaud Matton_dialog.c
Code:
if (characters[GetCharacterIndex("Sabine Matton")].quest.hire == "blaze_begin" && makeint(pchar.reputation) > 40) // NK bugfix
       {
         Link.l6 = DLG_TEXT[163];
         link.l6.go = "daughter";
       }

Remove the:- quest.hire == "blaze_begin" and change the 40 to 20 or 30.


So I am not sure what to do now. :facepalm


Which would be preferable :read

:cheers
 
I don't see how option 2 could enable you to use all the now unused dialog things.
Besides that I always like to have more use of stuff and make things a bit different so a replay can be interesting so I opt for 3
 
It is very likely that a bit more work might be required to get this fully operational, since it was never completed.
Will definitely be great to have it finished though! :cheers

What would I replace
Code:
if (pchar.id == "Blaze") npchar.quest.hire = "blaze_begin";
else npchar.quest.hire = "danielle_begin";
in the above case with?
Probably replace it with:
Code:
if (PChar.sex == "man") npchar.quest.hire = "blaze_begin";

I suggest replacing the code with something based on player reputation instead.
Then you could use:
Code:
if (makeint(pchar.reputation) < 41) npchar.quest.hire = "blaze_begin";
 
I don't see how option 2 could enable you to use all the now unused dialog things.

I was going to remove the player male/female difference and have all the dialog variations only dependent on the players reputation.

Also:-

On looking at the code again

In Sabine Matton-dialog.c - this is the only occurance of npchar.quest.hire = "blaze_begin";

Code:
if (pchar.id == "Blaze") npchar.quest.hire = "blaze_begin";
else npchar.quest.hire = "danielle_begin";


It is then used in Arnaud Matton_dialog.c

Code:
if (characters[GetCharacterIndex("Sabine Matton")].quest.hire == "blaze_begin" && makeint(pchar.reputation) > 40) // NK bugfix
{
Link.l6 = DLG_TEXT[163];
link.l6.go = "daughter";
}

Which seems to mean that Arnaud will only trust a male player with taking his daughter to her god-mother on Puerto Rico.. :rofl What a fool !!

While npchar.quest.hire = "danielle_begin"; goes to

in Sabine Matton_dialog.c

Code:
case "Second Time":
if (npchar.quest.hire == "danielle_begin")
       {
         Dialog.snd = "voice\SAMA\SAMA004";
         dialog.text = DLG_TEXT[21] + GetMyName(Pchar) + DLG_TEXT[22];
         link.l1 = pcharrepphrase(DLG_TEXT[23], DLG_TEXT[24] + GetMyFullName(PChar) + DLG_TEXT[25]);
         link.l1.go = "danielle_1";

and activates Sabine's request to run away from Father. But since it is not in Arnaud's code a female player can't get the quest to take Sabine to Puerto Rico :(

:read
 
Is there some code I could put in the console to give me a log message ( on screen) showing my current reputation ( the number value - not the word )

Thanks

:drunk
 
[
USER=10773]@Talisman[/USER] I think" DumpAttributes(pchar); " will do the job.


Edit, Sorry! it will show the number but not onscreen!
 
Last edited:
Looks like @Talisman has this in hand.

One thought I had (for your option3) was to add a way for a female character to get the Puerto Rico element via tweaking the dialogue once (or if) she lets Sabine on the ship - when she next talks to Arnaud for him to have a response around case danielle_daughter 3 that since she's on your ship could you take her to Sylvie (and jump back to that line of cases as per male character checking/adjusting the dialogue to ensure it is asexual - or alternatively, with a lot more work, virtually copying the cases to Danielle instead of Blaze to allow a continued female orientated dialogue).
 
Attached zip file contains some fixes for the Sabine Matton Story.

Can now play either as a Male or Female character.

Female character - talk to Sabine in the store a couple of times & she will ask to run away with you - then talk to Arnaud - EITHER deny all knowledge & keep Sabine OR ransom her on the beach OR Arnaud asks you to take her to Sylvie Bondies ( ransom her or take back to Arnaud & ransom )

Male character plays as before - Sabine does not ask to run away - take Sabine to Sylvie Bondies - ransom or keep her - & take back to Arnaud & ransom.

Sabine will offer to run away with a Female character whatever their reputation - & Arnaud will ask Female Character to take her to Sylvie whatever their reputation.

Arnaud will only trust a male character with a reputation of Swindler or better to take Sabine to Sylvie Bondies.

Sabine now appears in Sylvie Bondies house when player hands her over


Things Not fixed -

I am not sure when you keep Sabine that she becomes an Officer each time - did not manage to check the code for this at all the points where player can keep her.

Letters between Arnaud & Sylvie - Arnaud gives player a letter for Sylvie & Sylvie gives player a letter to take back ( I have not added these items - got confused where to add item to player and where to take it away - in the code )

People walking around in Sylvie Bondies house - these are probably Vice City mod characters - needs a vcskip code somewhere - since the Sabine story code is currently all in the dialog files I did not know where to put this. May need a case created in the Quests_side.c file. :shrug

Sylvie Bondies house is open all the time and she is there all the time ( just has simple "Who are you?" dialog ) even when the Sabine Story quest is not active. - Don't know if this should be changed or not.

EDIT: -> Also when you ransom Sabine in St Pierre Store & Arnaud calls the guards - no Soldiers appear - Have not fixed this either :modding

There are other bits of code in Sabine Matton_dialog.c - which indicate that there were going to be other possibilities - but none have been activated or developed.

Files contained in the zip

Sabine Matton_dialog.c
Arnaud Matton _dialog.c
Sylvie Bondies_dialog.c

these go in Program> Dialogs

Arnaud Matton_dialog.h

this goes in Program>Dialogs>English


Anyone who wants to continue to improve this story please feel free to do so :keith

:drunk
 

Attachments

  • Sabine_Matton.7z
    13.6 KB · Views: 176
Last edited:
Awesome, @Talisman!

I seem to recall until now you've done mainly fixes, so this is quite a step up.
So I do believe congratulations are in order! :cheers
 
I seem to recall until now you've done mainly fixes, so this is quite a step up.

:no

It was actually only about 6 lines of code :rofl

- it took me so long because I had problems following/finding things in Arnaud Matton's file :modding

- the two ladies files are quite straight forward.

:cheers
 
I hope you can read this:

3fc4a60c7d9301fa74c7b795c2079be6.jpg
 
I have done some more polishing to the Arnaud and Sabine Matton sidequest. :wp

1) I have added the two possible letter items and given and taken them as appropriate (I hope)

2) I have set Sylvie Bondies to only appear in her house once pchar is set to sail to take Sabine to her, there is also a vcskip in the house once she is set. I have also changed her nationality to French (as per the storyline - so she now addresses pchar as Monsieur or Madamoseille)

3) I have removed the original reason for taking Sabine to Isla Muelle (attack on Oxbay/ hostility English/French) and made it so Sabine can have a woman's influence on her so the sidequest fits better in all periods and any nation relations.

4) I have reworked many other dialogue elements to try and ensure consistent context and removing any male references now that Talisman has opened up the female dialogue line in part of the story.

5) There are still unwritten cases/attributes (Trade_guild, escape and love) for possible extension - and if you really screw up Arnaud you are still left with him refusing to deal with you - so an obvious tie-in to get Baldewyn Coffier his business back (particularly if Sabine is now serving you as an officer) and you gaing a little long term discount as a reward. The undeveloped guild opening could see a clash with EITC. I might take a stab at these sometime if no-one else does. There are a couple of extra "hints" to some of this in the revised dialogues.

6) I have currently locked Sylvies House once Sabine has been freed (or joined you) to avoid repetitive used dialogues.

7) Finally I have tweaked the dialogue of "ransom Stupid" so pchar says they are leaving before the guards arrive to explain why they don't turn up (rather that bothering with arranging a few).

As always it is a subject for testing. :shrug
 

Attachments

  • Sabine Matton.7z
    135 KB · Views: 174
2) I have set Sylvie Bondies to only appear in her house once pchar is set to sail to take Sabine to her, there is also a vcskip in the house once she is set. I have also changed her nationality to French (as per the storyline - so she now addresses pchar as Monsieur or Madamoseille)
As Sylvie Bondies is supposed to have lived there for several years, shouldn't she be there permanently? The vcskip could also be made permanent.

Talking of San Juan, you tell Arnaud Matton:
Your girl is now safe on #sIsla Muelle#.
#sIsla Muelle# is the town, #sisland_Isla Muelle# is the island. Should it not be "Your girl is now safe in #sIsla Muelle#" or "on #sisland_Isla Muelle#"?
 
Additional: the version of "initItems.c" contained in that file has the revised weapon prices and stats of the ZIP updates, which are not going into my fixes-only collection. On the other hand, it does not have other items added for the "Woodes Rogers" storyline, which is going in. Could you add your new letter items to this version, please?
 

Attachments

  • initItems.c
    318 KB · Views: 207
Back
Top