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

Annoying problem at shipyard

Yep make the save game file a ZIP by archieving it (right click add to...) and then upload that :yes
 
What?? :?

Notepad? there is no file and why notepad, ziping/raring the file is all you need to do and then attach it :shrug
 
I will do it in the morning. Can yu maybe tell me how to create a zip? I'm not really a computer guy (except for modding)
 
Yep make the save game file a ZIP by archieving it (right click add to...) and then upload that :yes
My options to add to are:
- add to archieve
- add to "".rar
(using winRAR)

Both of these options work with the second one not requiring any other step, it will have the file in the same location as your save but with the extenstion RAR instead of sav
 
If your reputation is Hero, you can talk to store/shipyard owners if you are Hostile to their nation
If your reputation is Neutral or above, you can talk to store/shipyard owners if their nation is Wary or better
If your reputation is Swindler or above, you can talk to store/shipyard owners if their nation is Neutral
If your reputation is below Swindler, you can talk to store/shipyard owners if you've got enough crew to intimidate them (= 3x more crew than the town has troops)
If you've got a rank with their nation, you can always talk to store/shipyard owners
Pirate shipyard owners will not talk to you if your reputation is above Neutral
As found by miklkit, there is one situation here that isn't covered:
If you have a Letter of Marque, your relation with that nation is going to be ABOVE neutral.
Therefore none of the lines that allow you to continue the talk will ever return true until you are promoted again.
This makes no sense whatsoever and we need to fix that. How does this sound?
Code:
//find if merch will allow char to trade, based on char's RMRel with merch's
//nation, and char's rep.
bool TradeCheck(ref char, ref merch, bool first)
{
if (LAi_IsCapturedLocation) return true; // KK
int mNation = sti(merch.nation);
int rep = sti(char.reputation);
float rel = 0.0;
// KK -->
if (ENABLE_FLAGS == 0)
rel = GetRMRelation(char, mNation);
else
rel = GetActualRMRelation(mNation); // PB: was GetFlagRMRelation
// <-- KK
//find loc
bool strengthcomp;
int locIdx = FindLoadedLocation();
if(locIdx<0) return true;
if( !CheckAttribute(&Locations[locIdx],"townsack") ) return true;

// PB: Recoded Checks -->

// -- Town fight strength vs. squadron fight strength --

// Store/shipyard owner can be intimidated if player has three times more crew than the town has troops
int ttroops = GetTownNumTroops(Locations[locIdx].townsack);
int ptroops = GetSquadronCrewQuantity(char);

if(ptroops > ttroops * 3) strengthcomp = true;

// -- Actual Checks --

// If you are Hostile with their nation, but you are a Hero
if(rel <= REL_WAR         && rep >  TRADEREP_ALL                     ) return true ;

// If their nation is Wary of you, but you are Neutral or better
if(rel <= REL_AFTERATTACK && rep >  TRADEREP_NEUTRAL                 ) return true ;

// If their nation is better than Wary and you are a Swindler or better
if(rel > REL_AFTERATTACK  && rep >= TRADEREP_STRENGTH                ) return true ;

// If their nation is better than Wary, you are worse than a Swindler, but you can intimidate them
if(rel > REL_AFTERATTACK  && rep <  TRADEREP_STRENGTH && strengthcomp) return true ;

// You have a Letter of Marque with the nation and have been promoted at least once
if(GetRank(GetMainCharacter(), mNation) > 0                         ) return true ;

// Pirates will not talk to you if you are too much of a nice guy
if(mNation == PIRATE      && rep >  TRADEREP_NEUTRAL                 ) return false;

// PB: Recoded Checks <--

//MAXIMUS -[we are here already, why we can't complete our mission?]->
if(first && CheckQuestAttribute("generate_trade_quest_progress", "begin") || CheckQuestAttribute("generate_trade_quest_progress",  "failed"))
{
if(CheckQuestAttribute("generate_trade_quest.iTradeNation", GetCurrentLocationNation()) && char.quest.generate_trade_quest.iTradeColony == GetCurrentTownID()) return true;
}
//MAXIMUS <-[we are here already, why we can't complete our mission?]-
return false;
}
This replaces the existing function in PROGRAM\Characters\CharacterUtilite.c .
 
Looks like those "Recoded Checks" of mine for being able to trade or not based on nation relations and your reputation weren't doing what they were intended to do.
I was able to trade with the Hostile Americans just fine while being a mere "Bloke". It should be much harder to do business with nations that don't like you!
Here is some new code for PROGRAM\Characters\CharacterUtilite.c:
Code:
    // Pirates will not talk to you if you are too much of a nice guy (above Matey)
    if(mNation == PIRATE)
    {
        if(rep <= TRADEREP_WAR)    return true ;
        else                    return false;
    }
 
    // If you are Hostile with their nation, but you are a Hero
    if(rel <=  REL_WAR        && rep >= TRADEREP_ALL                    )    return true;
 
    // If their nation is less than Hostile to you and you are Matey or better
    if(rel  >  REL_WAR        && rep >= TRADEREP_WAR                    )    return true;
 
    // If their nation is better than Wary and you are Neutral or better
    if(rel  >= REL_AFTERATTACK && rep >= TRADEREP_NEUTRAL                )    return true;
 
    // If their nation is better than Neutral, you are Swindler or better and can intimidate them
    if(rel  >= REL_AMNESTY    && rep >= TRADEREP_STRENGTH && strengthcomp)    return true;
 
    // You have a Letter of Marque with the nation and have been promoted at least once
    if(GetRank(GetMainCharacter(), mNation) > 0                          )    return true;
 
    // PB: Recoded Checks <--
Hopefully that behaves better. :woot

If you do NOT fit in any of the above mentioned categories, you should be told to "Get out, otherwise I call the guards!"
However, IF you have Commerce > 5, you can do business at double the price.
 
Also ran into something VERY weird in the Standard storyline's Lambrecht Fobes dialog:
Code:
        case "continue1":
            NPC_Meeting = "1"; 
            d.Text = DLG_TEXT[32];
            Link.l1 = DLG_TEXT[33];
            Link.l1.go = "continue3";
            Link.l2 = DLG_TEXT[34];
            Link.l2.go = "exit1";
            
            if(makeint(PChar.skill.leadership) > 200)
            {
                d.Text = DLG_TEXT[35];
                Link.l1 = DLG_TEXT[36];
                Link.l1.go = "exit2";
            }
        break;
WHAT is THAT???
Seems that if you manage to have Leadership > 200, which is just plain impossible, you get some sort of "Pirates_vs_Blaze" fort case thingey.
Apparently there are some offended pirates in quests_reaction.c related to that too. Could it be one of those unfinished quests?
I wonder if we can reinstate that.
 
Holy crap, post before yours was mine back in 2010... it really was a long time I was out of it hey!

Sounds good and that second part is bizarre, I might have a look to see how where that quests go to if you want Pieter
 
Holy crap, post before yours was mine back in 2010... it really was a long time I was out of it hey!
HA! Indeed, it has been a while. Though I don't think that was your last post. Actually, I don't know what was.

Sounds good
That's what we thought last time. And that didn't work. As I only now found out, two years later.
And only because I was trying to fix a different bug that happened to only be triggered at Vanderdecken and supposedly also enemy nation shipyards.
Except that it didn't. Which is when I started looking into this again. :facepalm

that second part is bizarre, I might have a look to see how where that quests go to if you want Pieter
Not so bizarre; there was more than a little bit of unfinished quest code in the original game. There was even supposed to be a Danielle main quest, traces of which are still around here and there.
In this particular case, I traced the story as far as this:
Code:
        case "Pirates_fight2":
            LAi_SetPlayerType(PChar);
            LAi_group_Register("bandits");
            LAi_group_MoveCharacter(CharacterFromID("offended_pirate1"), "bandits"); 
            LAi_group_MoveCharacter(CharacterFromID("offended_pirate2"), "bandits"); 
            LAi_group_MoveCharacter(CharacterFromID("offended_pirate3"), "bandits"); 
            LAi_group_MoveCharacter(CharacterFromID("offended_pirate5"), "bandits"); 
            LAi_group_FightGroups("bandits", LAI_GROUP_PLAYER, true);
            LAi_group_SetCheck("bandits", "Come_to_papa");
        break;
However, case "Come_to_papa" does not exist. So if we'd want to put this back, we'd have to continue that unfinished story in some sensible fashion and tie it back in with...
whatever it is supposed to be tied in with. :cheeky
 
Looks like those "Recoded Checks" of mine for being able to trade or not based on nation relations and your reputation weren't doing what they were intended to do.
I was able to trade with the Hostile Americans just fine while being a mere "Bloke". It should be much harder to do business with nations that don't like you!
Here is some new code for PROGRAM\Characters\CharacterUtilite.c:
Code:
    // Pirates will not talk to you if you are too much of a nice guy (above Matey)
    if(mNation == PIRATE)
    {
        if(rep <= TRADEREP_WAR)    return true ;
        else                    return false;
    }
 
    // If you are Hostile with their nation, but you are a Hero
    if(rel <=  REL_WAR        && rep >= TRADEREP_ALL                    )    return true;
 
    // If their nation is less than Hostile to you and you are Matey or better
    if(rel  >  REL_WAR        && rep >= TRADEREP_WAR                    )    return true;
 
    // If their nation is better than Wary and you are Neutral or better
    if(rel  >= REL_AFTERATTACK && rep >= TRADEREP_NEUTRAL                )    return true;
 
    // If their nation is better than Neutral, you are Swindler or better and can intimidate them
    if(rel  >= REL_AMNESTY    && rep >= TRADEREP_STRENGTH && strengthcomp)    return true;
 
    // You have a Letter of Marque with the nation and have been promoted at least once
    if(GetRank(GetMainCharacter(), mNation) > 0                          )    return true;
 
    // PB: Recoded Checks <--
Hopefully that behaves better. :woot

If you do NOT fit in any of the above mentioned categories, you should be told to "Get out, otherwise I call the guards!"
However, IF you have Commerce > 5, you can do business at double the price.

Would I have to start a new game for this to work? Otherwise, I don't think it's working properly... :(
Britain is hostile to me (-119), I'm a bloke, yet can trade with the Shopkeeper and Shipyardmaster just fine.
Edit: Commerce skill is 3, forgot to mention that
 
New game should not be required. :no

Bloke = 55
REL_WAR = -60
TRADEREP_ALL = 80
TRADEREP_WAR = 60

So that's strange. Looking into it...
 
Even stranger. I just started a new Standard storyline game, set my nation relation to England to -119 as you have and went to the shipyard and store.
They wouldn't talk to me unless I was a Hero, just like it is coded to work. Can you give that a try, just to see if you're getting the same results?
Execute this through console to set England at war:
Code:
SetActualRMRelation(ENGLAND, -119);
 
Started a new game (Jack Sparrow Storyline), executed the command and still could trade with the shopkeeper.
What's strange though, is that despite being at -119 and hostile in the relations screen, when I hit F11 it tells me Britain is neutral.
 
F11? Why are you Reinitializing the game?
I'm beginning to wonder if you do have my rewritten code in your game. Please extract attached to PROGRAM\Characters , then try again.
 

Attachments

  • CharacterUtilite.zip
    32.9 KB · Views: 184
F11? Why are you Reinitializing the game?
I'm beginning to wonder if you do have my rewritten code in your game. Please extract attached to PROGRAM\Characters , then try again.
Alright, working now! I've copied the code, but it's very much possible that I've done something wrong. With your file it's working! And no idea, to be quite honest, but I've noticed some things need reinitializing to work, so I thought I'd try, couldn't hurt...
 
Reinitialize is already executed when you start a new game, so it makes no difference to execute it manually straight after. :shrug
It basically just reloads a whole bunch of files, such as ships_init.c, the character init files and more.
That allows you to update those without having to start a new game.
 
Oh yes I remember the "Danielle" storyline (or parts of that were left)... I'll have a look at the storyline up to the come to popa case and see if I can any connection of where it was heading
 
Back
Top