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

Fixed Kill Ferro Cerezo - not in tavern

Alright, I'll try this:

In case "prepare_ferro_to_Sea":
Code:
       Characters[GetCharacterIndex("ferro cerezo")].nation = PORTUGAL;
       Characters[GetCharacterIndex("ferro cerezo")].skipRM = true;
So his flag and 'skipRM' are in place before you're at sea. And in case "to_sea_for_capture_cerezo":
Code:
       Characters[GetCharacterIndex("ferro cerezo")].recognized = true;
The whole lot is going into "quests_reaction.c", at least for now, because if it goes into his character definition then it won't be read until a new game is started, and I've no intention of restarting "Tales of a Sea Hawk" over again!
I think this is more a problem with the actual stories than with the Nations Relations system though.
Except that the stories were there first, and worked. So it's the Nation Relations system which is breaking them, rather than the other way round. ;)
 
In case "prepare_ferro_to_Sea":
Code:
Characters[GetCharacterIndex("ferro cerezo")].nation = PORTUGAL;
Characters[GetCharacterIndex("ferro cerezo")].skipRM = true;
So his flag and 'skipRM' are in place before you're at sea. And in case "to_sea_for_capture_cerezo":
Code:
Characters[GetCharacterIndex("ferro cerezo")].recognized = true;
The whole lot is going into "quests_reaction.c", at least for now, because if it goes into his character definition then it won't be read until a new game is started, and I've no intention of restarting "Tales of a Sea Hawk" over again!
The "recognized" attribute should really be in place before being reloaded to 3D Sailing Mode, so you can probably set it at the same point as "skipRM".
I can think of no reason not to.

Except that the stories were there first, and worked. So it's the Nation Relations system which is breaking them, rather than the other way round. ;)
The Nations Relations system was also unbelievably messy and did stuff wrong left, right and centre.
And of course now that actions actually matter, of course that will have consequences.
Those consequences having an impact on the stories is not exactly unexpected either.

It was really, really bad before. At least now I can claim relatively safely that the system does what it was actually meant to do. And that definitely wasn't the case before!
The only reason why it "seemed OK" in the past is because nothing ever mattered anyway. If you want to go back to that, be my guest.
False flags won't work though. And the game will assume that you're English regardless of your actual nationality/flag flown (especially for the worldmap follow ships).
And with a bit of luck, it'll mix up the two separate "nation relation systems", so half the game will think you're hostile to a nation, while the other half will think you're friendly.

I put in a ridiculous amount of hard work to clean up all that mess and get it all to behave itself.
If this is the amount of appreciation I can expect in return for all that, maybe I shouldn't even bother to try and fix stuff that is broken anymore.
 
The "recognized" attribute should really be in place before being reloaded to 3D Sailing Mode, so you can probably set it at the same point as "skipRM".
I can think of no reason not to.
The only reason I put it there is that I went searching for an example of "recognized" already in use so I could copy it, and found it in "quests_side.c", case "fight_with_mefisto", which is where you've just put to sea to engage the Animist frigate. It seems to work. I've got an ex-Animist frigate as a companion ship as evidence. :D

I put in a ridiculous amount of hard work to clean up all that mess and get it all to behave itself.
If this is the amount of appreciation I can expect in return for all that, maybe I shouldn't even bother to try and fix stuff that is broken anymore.
I apologise for any offense caused, and of course thank you for all that work. Joking aside, this is why I went through "Assassin" to make sure it fits the new system, and am now trying to persuade "Tales of a Sea Hawk" to comply as well. And, of course, although I had my diffences of opinion about exactly how the memory system should work, "Ardent" doesn't just work with that system, it relies on it - you can't now steal the payroll ship from under the nose of Santiago fort and expect to sail the same ship right back into Santiago port next time you visit!
 
The only reason I put it there is that I went searching for an example of "recognized" already in use so I could copy it, and found it in "quests_side.c", case "fight_with_mefisto", which is where you've just put to sea to engage the Animist frigate. It seems to work. I've got an ex-Animist frigate as a companion ship as evidence. :D
Indeed I do remember that bit works. And actually I was surprised that it does!
It seems the quest case is triggered BEFORE the battle interface is intialized, so it does get set before it is checked.
It may be a bit safer to do it earlier (could in theory even be in the Character Init files), but as long as it works, that's all that matters. ;)

I apologise for any offense caused, and of course thank you for all that work.
I might be getting a bit disheartened by the apparent lack of anyone caring about all the hard work put into the Beta 4.1 WIP over the past months.
Makes me wonder if it is worth putting in much more effort, if nobody really bothers with it anyway. :facepalm

Joking aside, this is why I went through "Assassin" to make sure it fits the new system, and am now trying to persuade "Tales of a Sea Hawk" to comply as well.
I much appreciate that! Changes to core game functionality affecting quests is, of course, a bit unfortunate, but not unexpected.
It is nearly impossible to avoid that. All that really matters is that such issues are found and dealt with.
Ultimately, that is the only way forward.

And, of course, although I had my diffences of opinion about exactly how the memory system should work, "Ardent" doesn't just work with that system, it relies on it - you can't now steal the payroll ship from under the nose of Santiago fort and expect to sail the same ship right back into Santiago port next time you visit!
In the end, I think we got quite a fine solution there. I still think the extra toggle is a bit silly, but it doesn't do any harm and keeps you happy, so that's fine by me.
All your other changes are definite improvements and I'm really glad you made those changes. :onya
 
Alright, I'll try this:
Thanks! Added to my game like this now:
Code:
    case "prepare_ferro_to_Sea":
       pchar.quest.main_line = "killing_ferro_cerezo";
       pchar.quest.to_sea_for_capture_cerezo.win_condition.l1 = "location";
       if (pchar.location == "Muelle_tavern")
       {
         pchar.quest.to_sea_for_capture_cerezo.win_condition.l1.location = "IslaMuelle";
       }
       else
       {
         pchar.quest.to_sea_for_capture_cerezo.win_condition.l1.location = "Conceicao";
       }
       pchar.quest.to_sea_for_capture_cerezo.win_condition = "to_sea_for_capture_cerezo";
       AddQuestRecord("search_danielle", 6);
       // GR: Hostile to player, but neutral to fort -->
       Characters[GetCharacterIndex("ferro cerezo")].nation = PORTUGAL;   // Neutral to fort, so must be same nation
       Characters[GetCharacterIndex("ferro cerezo")].recognized = true;   // Forces hostility to player, regardless of nation relations and flags
       Characters[GetCharacterIndex("ferro cerezo")].skipRM = true;     // Avoids any consequences upon sinking/capturing
       // GR: Hostile to player, but neutral to fort <--
     break;
I think that should do the trick. :onya
 
Apart from different comments, I added similar lines to my version, then tested it. Ferro Cerezo does show a Portuguese flag, does attack me, the fort doesn't intervene, and I don't get any drop in reputation despite being under a British flag the whole time. So it seems to work.

As for removing Ferro Cerezo, it would need to check that he's not a passenger. It's possible for him to surrender, though I've only seen it happen once - rather fortuitously, it was the first test of the previously modified code when the immortality had not been cancelled. I couldn't damage his ship so I boarded, and the duel would probably have ended badly for me, except that it didn't happen because Ferro Cerezo surrendered as soon as I got on board. So, by the time you meet the slavers in Bridgetown canyon, if Ferro Cerezo is still a prisoner because you didn't ransom or hire him, or an officer because you did hire him, you don't want him to suddenly disappear!
 
As for removing Ferro Cerezo, it would need to check that he's not a passenger. It's possible for him to surrender, though I've only seen it happen once - rather fortuitously, it was the first test of the previously modified code when the immortality had not been cancelled. I couldn't damage his ship so I boarded, and the duel would probably have ended badly for me, except that it didn't happen because Ferro Cerezo surrendered as soon as I got on board. So, by the time you meet the slavers in Bridgetown canyon, if Ferro Cerezo is still a prisoner because you didn't ransom or hire him, or an officer because you did hire him, you don't want him to suddenly disappear!
True point. I've put this back to "Fix in Progress" until we've sorted that.

Is it possible to complete that Ferro quest without killing him at all?
If so, that is the only path that needs to remove him. As soon as you get into the sea battle, there is no need anymore.
Since he's at sea, he's not in the tavern and it no longer matters.
 
Yes. You can buy the documents from him.
Then maybe we can restore that "LocationExit" quest I added at some point to remove him and have that triggered only if you buy those documents.
I think that should take care of it, right?
 
Looking through the code, Ferro Cerezo is placed in the tavern, then it's up to you to talk to him. The dialog can trigger certain quest cases but, tracing through "Ferro Cerezo_dialog.c", buying the documents does not trigger anything. As far as I can tell from looking at the code, he just sits there and reverts to default dialog. Which means if you add that "LocationExit" quest, or even a quest triggered by going to sea, there's nothing to initialise it. If it's set up when you first enter the tavern, it will be triggered when you next leave the tavern (or put to sea), and will probably not do what we want if the player leaves the tavern (or puts to sea) before talking to Ferro Cerezo.

But if we leave the line to remove him where it is now, at the point where you meet the slavers in Bridgetown canyon, and put a condition in front of it to detect that he is still sitting in Sao Jorge tavern, that ought to prevent it from triggering unnecessarily (he's not in the tavern if he's at the bottom of the sea or in your cargo hold). Perhaps this?
Code:
if (characters[GetCharacterIndex("Ferro Cerezo")].location == "Conceicao_tavern") ChangeCharacterAddress(characterFromID("Ferro Cerezo"), "None", "");
 
But if we leave the line to remove him where it is now, at the point where you meet the slavers in Bridgetown canyon, and put a condition in front of it to detect that he is still sitting in Sao Jorge tavern, that ought to prevent it from triggering unnecessarily (he's not in the tavern if he's at the bottom of the sea or in your cargo hold). Perhaps this?
I think that should do the trick quite nicely! Thanks. :cheers

Back to "Fixed" as far as I'm concerned. :onya
 
I have never got that option, is there a certain reputation you need?
There are quite a lot of conditions in his dialog:
Code:
if (CalcCharacterSkill(pchar, SKILL_LEADERSHIP)>7 && sti(pchar.reputation)<30)
...
if ( sti(PChar.rank) > 7 )
...
if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 4 && sti(pchar.money >= 10000))
...
if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 5 && sti(pchar.money >= 9000))
....
if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 6 && sti(pchar.money >= 8000))
...
if (CalcCharacterSkill(pchar, SKILL_LEADERSHIP) && makeint(pchar.reputation) < 30) // I think there is something missing here!!!
...
if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 4 && makeint(pchar.money >= 10000))
...
if (CalcCharacterSkill(pchar, SKILL_LEADERSHIP) && makeint(pchar.reputation) < 30) // Again??? There should be a number to check against!
...
if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 5 && makeint(pchar.money >= 9000))
...
if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 6 && makeint(pchar.money >= 8000))
...
if (CalcCharacterSkill(pchar, SKILL_LEADERSHIP) > 4)
I am not certain which ones apply in which cases, but this suggests at least something. :doff
 
I don't even know how it gets to half of them. Case "First time" checks quest attribute "pchar.quest.main_line" for "search_for_Ferro_Cerezo" and "search_for_Ferro_Cerezo_find", leading down one sequence of dialog; but it also checks for quest attribute "Story_DominguesCompromat", leading down another sequence. Except I can't find reference to "Story_DominguesCompromat" anywhere else.

So, following down the first sequence, it proceeds to case "talk_in_tavern", "talk_in_tavern_2", "talk_in_tavern_3" and "talk_in_tavern_4". There's a check on your reputation and "Leadership" skill - if your reputation is low enough and your "Leadership" is high enough then you can scare Ferro Cerezo into giving you the documents for free. Otherwise it goes to case "money", which looks like this:
Code:
     case "money":
       if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 4)
       {
         dialog.snd = "Voice\FECE\FECE028";
         dialog.text = DLG_TEXT[69];
         link.l1 = DLG_TEXT[70];
         link.l1.go = "money_2";
         if (makeint(pchar.money >= 10000))
         {
           link.l2 = DLG_TEXT[71];
           link.l2.go = "money_end";
           pchar.quest.money_to_ferro = 10000;
           if(AUTO_SKILL_SYSTEM)
           {
             AddPartyExpChar(pchar, "Leadership", 1000);
             AddPartyExpChar(pchar, "Sneak", 10);
           }
           else { AddPartyExp(pchar, 1000); }
         }
         link.l3 = DLG_TEXT[72];
         link.l3.go = "money_11";
       }   
       else
       {
         dialog.snd = "Voice\FECE\FECE029";
         dialog.text = DLG_TEXT[73];
         if (CalcCharacterSkill(pchar, SKILL_LEADERSHIP) && makeint(pchar.reputation) < 30)
         {
           link.l1 = DLG_TEXT[74];
           link.l1.go = "leadership";
         }
         link.l2 = DLG_TEXT[75];
         link.l2.go = "talk_exit";
       }
     break;
If your "Commerce" skill is at least 4 then Ferro Cerezo opens with a demand for 10000 gold. By default you offer 5000, option 2 is to accept the demand for 10000 and option 3 is to decline entirely, leading to the sea battle. If your "Commerce" is less than 4 then Ferro Cerezo isn't interested in selling, you get another chance to scare him if you're really evil, otherwise the dialog exits. But if your "Commerce" skill is better than 4 then the haggling can begin - skill 5 can get the price down to 9000, skill 6 can get the price down to 8000 - except:
Code:
     case "money_3":
       if (CalcCharacterSkill(pchar, SKILL_COMMERCE) > 6)
       {
         dialog.snd = "Voice\FECE\FECE033";
         dialog.text = DLG_TEXT[83];
         link.l1 = DLG_TEXT[84];
         link.l1.go = "money_none";
         if (makeint(pchar.money >= 8000))
         {
           link.l2 = DLG_TEXT[85];
           link.l2.go = "money_end";
           pchar.quest.money_to_ferro = 9000;
         }
       }
       else
       {
         dialog.snd = "Voice\FECE\FECE034";
         dialog.text = DLG_TEXT[86];
         link.l1 = DLG_TEXT[87];
         link.l1.go = "talk_exit";
       }
     break;
Spot the mistake? You might have argued him down to 8000, then it looks like he's going to take 9000 anyway!
 
Except I can't find reference to "Story_DominguesCompromat" anywhere else.
I can see references in claudio burrieza_dialog.c, quest_sailor_tmp.c and Ferro Cerezo_dialog.c .
But it looks like it only ever gets set to "after_speak" IF it is "Find" before. But it never gets set to that, so none of this can ever happen.
Good chance it is unfinished stock game code.

EDIT: That's confirmed. All these errors were already in the original game. :yes

Spot the mistake? You might have argued him down to 8000, then it looks like he's going to take 9000 anyway!
I spotted it immediately when I was looking through that code and already corrected it on my side.
Didn't bother mentioning it, since it'll be corrected for the next update anyway.
I should have known you'd pick up on it though. Nothing slips by you! :cheeky
 
Back
Top