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

A Family' Story

Bartolomeu o Portugues

Buccaneer
Staff member
Administrator
Storm Modder
Storm Modeller
My quest for Joaquim de Almeida is done :)
However, I have two problems to solve at the moment.
The first one is about triggering the quest.
My quest is in the quests_reaction.c and I try to trigger it from both_reaction.c
I changed a bit the case PLAYER_TYPE_CORSAIR for that:
Code:
                case PLAYER_TYPE_CORSAIR:
                    questRecord = "Corsair_Continue";
                    if (GetMySimpleName(PChar) == "José Joaquín Almeida")
                    {
                    LAi_QuestDelay("madero_start", 0.0);                       
                    }                   
                break;
But, this code doesn't work :oops:
The other problem is in the Quest Book interface, instead of having the name of my quest, I have the word "erro" :(
I want to inform that all the quest records added work, the only problem is just the name of the quest :confused:
 
Sorry I don't know anything about how the storylines in freeplay are triggered.
Questbook shouldn't be a problem, you have lots of them in your earlier storylines. :confused:
 
Just one thing:
In quests_reaction.c, in the case "madero_start_check" for:
if(makeint(PChar.rank) >= 1)
change the value from 1 to 10.
I let the value 1 just for testing the quest. But, I forgot to change the value before sending the files now :D
 
Thanks!

I've done a WinMerge comparison between your files and what's already in the update (or already in the game before the update archive). I've made the change to "quests_reaction.c" as you suggested. One other change - rather than have separate dialog files for Pedro Fructoso in the "FreePlay" folder, I've added your lines to his dialog files in the main "PROGRAM\DIALOGS" folder. For characters who appear in the general game regardless of storyline, it's generally better to put everything into the main dialog files so that different versions of the dialog files don't diverge over time.

So your quest should be available to anyone playing as José Joaquín Almeida after the next update. :onya
 
I'm playing my quests available in the free-play mode (Silver train, rescue the crew with Peter Blood and so on...). I noted a few things that could be improved.
I will upload the changes over the next days....
 
@Grey Roger,
Here are the fixes and small improvements for my side quests.
Just a note: the first two changes in quests_side.c are fixes that avoid the quest to stop when the player arrives in a specific location.
 

Attachments

  • fixes.zip
    84.8 KB · Views: 610
Now just a thought:
As I said yesterday to Pieter, I must say the mod now is really great
1f642.png
and the system of perks made by Levis is really good by the way.
There are so many ways to play this game. We can be just a smuggler, a naval officer, a privateer and so on
or even Davy Jones!! :woot Great idea the Kraken and the possibility of submerging the Flying Dutchman.
Excellent all these things
1f642.png

In my opinion, thanks to this mod, POTC is still the best single-player game about piracy:doff
 
Last edited:
@Grey Roger,
Here are the fixes and small improvements for my side quests.
Just a note: the first two changes in quests_side.c are fixes that avoid the quest to stop when the player arrives in a specific location.
The first change in "quests_side.c" is this, at case "depart":
Code:
           Pchar.quest.Turkshelp.win_condition.l1 = "location";           
           Pchar.quest.Turkshelp.win_condition.l1 = "location";
Is there a reason for duplicating that line? (Hmm... that could appear sarcastic. It's not. I genuinely do want to know if that needs to be there.) A second such duplication is at case "pijuanplantation":
Code:
           Pchar.quest.Santiago.win_condition.l1 = "location";           
           Pchar.quest.Santiago.win_condition.l1 = "location";
Other than that, it all looks fine and I've added it to the update.
 
Yes, the duplication fixes the bug.
If you check for instance the Lacroix quest in the quests_reaction.c in the Free-play folder, you can see a lot of examples like that.
 
Yes, the duplication fixes the bug.
If you check for instance the Lacroix quest in the quests_reaction.c in the Free-play folder, you can see a lot of examples like that.
Yikes, code creepiness!!! :shock

I've had something similar before, with perfectly correct code refusing to behave itself.
Adding a 'random garbage collection line' in-between convinced it to behave itself.
Should obviously not happen, but does anyway. :modding
 
Yikes, code creepiness!!! :shock

I've had something similar before, with perfectly correct code refusing to behave itself.
Adding a 'random garbage collection line' in-between convinced it to behave itself.
Should obviously not happen, but does anyway. :modding
Yes, sometimes the code works in a way that is not logical but the most important is the code working at the end of the story :D
 
Strange. I've been playing the LaCroix quest recently, many times (see Unconfirmed Bug - Spanish officer stays after death) and the only time it got stuck was at case "disguises". And that was because there were too many characters in Havana port so the two guards couldn't spawn. A 'vcskip' dealt with that. (I also ran into trouble when trying to go to the church as it appeared to be closed at night, so I had to spend the night in the tavern and visit the church by day. At least, until I found that there's a second door into the church which is open at night. :D)
 
In Lacroix, there is this duplication of code.
Only thanks to this duplication, i was able to finish the Turks help quest and the one with the Peter Blood ship...
 
I've done both those quests before as well, on several occasions. ;)

Two things puzzle me about the duplicate lines. One is, why has no similar problem shown up in other storylines and sidequests? The other is, all that line does is to set an attribute on the player character - you can check it by putting a 'DumpAttributes(PChar)' line right after the first "Pchar.quest.Turkshelp.win_condition.l1" line. The attribute isn't checked until later, specifically when you get to Turks lighthouse. So repeating the line can't have any effect.

Then there's the matter of how "Pchar.quest.Turkshelp.win_condition.l1" is also set at case "diegoship" to trigger case "givenews", again at case "stoplanding" to trigger case "horsville", again at case "gotoport" to trigger case "finalstory". (Three things. :cheeky) Likewise, "Pchar.quest.Santiago.win_condition.l1" is used at case "Barto_store" to trigger case "Santiago_start_check_1", at case "directjail" to trigger case "anyinfo", and then at case "pijuanplantation" to trigger case "ansegardes". Perhaps changing the attribute names so that each trigger has its own unique name would help?

However, another basic rule comes into play - "If it ain't broke, don't mess with it". With the next update about to be released and possibly used as a base for the next installer, I'll not fiddle with anything that could damage gameplay, no matter how unlikely. I don't intend to fall into the trap that scuppered some other versions of the game, altering code to make it look nicer to a programmer and fouling up the game in the process. After the next installer is out, and if I haven't found anything more interesting to do, I might try playing around with removing the duplicate lines and renaming the attribute names to see what happens.
 
However, another basic rule comes into play - "If it ain't broke, don't mess with it". With the next update about to be released and possibly used as a base for the next installer, I'll not fiddle with anything that could damage gameplay, no matter how unlikely.
That does sound wise.
If it is one of those "cursed garbage code lines", then it really does defy all apparent reason. :facepalm
 
Back
Top