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

What is required to rule a town?

Fluen

Freebooter
I think, the possibility to not just destroy a fort but also rule the town after is a great idea. In the earlier builds all I could do, was take a screenshot of the destroyed fort to keep track of my "succes". But now I plan to conquer the entire Caribbean.

But I intend to plan this well. So I ask:
1. Must I have the "land owner"-perk to be able to rule a town?
2. What types of officer should I assign to rule? (I doubt a navigator is of much use, as an island tends to stay put.)
 
1: No. You must personally have "Land Owner" for it to take effect, but it's nothing to do with capturing towns. If you have a Letter of Marque or if you're a naval officer, and you rise high enough in rank, you're awarded land by the country for whom you're working. That land gives you some free money. "Land Owner" increases that money.

To capture a colony without a fort, which is most of the pirate settlements and also Oranjstad on Aruba, you need the "Landing Party" perk. Your Master At Arms can contribute this. Capturing a town with a fort does not need any perk, it just needs a big enough ship to take on the fort.

2: At present, it doesn't matter. The fort commander might benefit from "Cannons" or "Accuracy" skill if you visit the town and an enemy ship happens to be near the fort, as he'll be the one shooting at the enemy. There's been a bit of recent discussion about making officers' skills affect the town, but nothing has been settled, let alone implemented.

For the time being at least, if you don't want to lose two of your own officers, you can sneak into town, visit the tavern, recruit a couple of random officers, then conquer the town and put them in charge. "Oi, you, Mr. Random Drunk! Think you can do a better job of running this town than the governor? Here's your chance!" xD
 
What is required to rule a town?
The following things might prevent you from hoisting your own flag in a town:
- Capture might be disabled for certain specific towns; but that's mainly just the original game towns in the Tales of a Sea Hawk storyline.
- Not having enough officers to assign as governor and fort commanders

Other than that, you should be all good to go.

@Grey Roger, if I read this correctly, you CAN capture a town for yourself even when you're a Professional Navy player:
Code:
       case "Select_New_Government":
           Dialog.Text = DLG_TEXT[4];
           iNation = sti(NPChar.nation);
           for (i = 0; i < NATIONS_QUANTITY; i++) {
               if (i == iNation) continue;
               tempstr = "l" + (i + 1);
               if(ProfessionalNavyNation() == UNKNOWN_NATION || i == ProfessionalNavyNation())
               {
                   Link.(tempstr) = DLG_TEXT[5] + XI_ConvertString("4"+GetNationDescByType(i)) + DLG_TEXT[6];
                   Link.(tempstr).go = "new_nation_" + i;
               }
           }
           i = makeint(GetTownGovernorIndex(NPChar.town) > -1) + GetTownNumForts(NPChar.town);
           if (GetPassengersQuantity(PChar) >= i) {
               Link.l10 = DLG_TEXT[7];
               Link.l10.go = "capture_for_blaze";
           }
           Link.l99 = DLG_TEXT[8];
           Link.l99.go = "First time";
       break;
Does that sound right to you?
Would you employer appreciate you taking such charge yourself...?

For the time being at least, if you don't want to lose two of your own officers, you can sneak into town, visit the tavern, recruit a couple of random officers, then conquer the town and put them in charge. "Oi, you, Mr. Random Drunk! Think you can do a better job of running this town than the governor? Here's your chance!" xD
Haha!
Pretty much, yes.

Since Colony Management is virtually non-existent, you can just assign whoever and set the tax to extreme.
Disadvantages to either thing are... tiny to zero.
 
@Grey Roger, if I read this correctly, you CAN capture a town for yourself even when you're a Professional Navy player:
Code:
       case "Select_New_Government":
           Dialog.Text = DLG_TEXT[4];
           iNation = sti(NPChar.nation);
           for (i = 0; i < NATIONS_QUANTITY; i++) {
               if (i == iNation) continue;
               tempstr = "l" + (i + 1);
               if(ProfessionalNavyNation() == UNKNOWN_NATION || i == ProfessionalNavyNation())
               {
                   Link.(tempstr) = DLG_TEXT[5] + XI_ConvertString("4"+GetNationDescByType(i)) + DLG_TEXT[6];
                   Link.(tempstr).go = "new_nation_" + i;
               }
           }
           i = makeint(GetTownGovernorIndex(NPChar.town) > -1) + GetTownNumForts(NPChar.town);
           if (GetPassengersQuantity(PChar) >= i) {
               Link.l10 = DLG_TEXT[7];
               Link.l10.go = "capture_for_blaze";
           }
           Link.l99 = DLG_TEXT[8];
           Link.l99.go = "First time";
       break;
Does that sound right to you?
Would you employer appreciate you taking such charge yourself...?
I could put a condition 'if(ProfessionalNavyNation() == UNKNOWN_NATION)' around that part to capture the town for yourself. Your only options as a naval officer would then be to capture the town for your nation (if capturing that town is not disabled) or ransoming the governor (if capturing the town is disabled).

What worries me, though, is this line:
Code:
i = makeint(GetTownGovernorIndex(NPChar.town) > -1) + GetTownNumForts(NPChar.town);
What is that supposed to do? We can reasonably assume that 'GetTownGovernorIndex(NPChar.town) > -1' is true, the town does have a governor because you're talking to him! If it's supposed to be a failsafe in case there's a problem with the governor then it won't work, because if 'GetTownGovernorIndex(NPChar.town) > -1' is false then that line sets i to the number of forts and allows you to capture the town if you have 1 officer. Perhaps change it to:
Code:
i = GetTownNumForts(NPChar.town) + 1;
if (GetTownGovernorIndex(NPChar.town) > -1 && GetPassengersQuantity(PChar) >= i && ProfessionalNavyNation() == UNKNOWN_NATION)
{
    Link.l10 = DLG_TEXT[7];
    Link.l10.go = "capture_for_blaze";
}
Or maybe leave out the check for 'GetTownGovernorIndex(NPChar.town) > -1' entirely. There might be a problem with the town's governor but there shouldn't be a problem after you've replaced him with your officer.
 
I could put a condition 'if(ProfessionalNavyNation() == UNKNOWN_NATION)' around that part to capture the town for yourself. Your only options as a naval officer would then be to capture the town for your nation (if capturing that town is not disabled) or ransoming the governor (if capturing the town is disabled).
At first thought, I'd say that makes sense.
I'm a bit surprised that wasn't already the case.

Which makes me wonder... was it ever changed on purpose?
Or did we forget about this thing until now?

What is that supposed to do?
I think it's supposed to count the number of free officers you're going to need to be able to capture the town.
You'll need one for the governor; and there MAY be more than 1 fort, but I don't think that's fully functional so it'll generally always return 1 or 2.

There might be a problem with the town's governor but there shouldn't be a problem after you've replaced him with your officer.
Is it currently broken as it is?
I don't remember anyone running into issues from that particular bit...
 
At first thought, I'd say that makes sense.
I'm a bit surprised that wasn't already the case.

Which makes me wonder... was it ever changed on purpose?
Or did we forget about this thing until now?
Probably whoever added the checks for being a naval officer didn't quite finish the job.

I think it's supposed to count the number of free officers you're going to need to be able to capture the town.
You'll need one for the governor; and there MAY be more than 1 fort, but I don't think that's fully functional so it'll generally always return 1 or 2.
It wasn't the sum which bothered me - I'd figured out that it was counting how many forts the town has and then adding one for the governor, the result being how many officers you need to take the town. What bothered me was the part 'makeint(GetTownGovernorIndex(NPChar.town) > -1)', which is 1 if the function returns a usable value and 0 if it doesn't. So if, for any reason, 'GetTownGovernorIndex(NPChar.town)' returns -1, the sum is wrong and just checks that you have enough fort commanders.

Is it currently broken as it is?
I don't remember anyone running into issues from that particular bit...
Basically, it seems to be checking for a fault condition which doesn't happen, and doing the wrong thing if the fault does happen. There haven't been any issues because the fault condition never occurred - all towns have valid governors.

Then again, Build 14 has been going for years and nobody noticed that it failed to display medical data until now. ;)
 
Probably whoever added the checks for being a naval officer didn't quite finish the job.
That would be me then. :facepalm

Basically, it seems to be checking for a fault condition which doesn't happen, and doing the wrong thing if the fault does happen. There haven't been any issues because the fault condition never occurred - all towns have valid governors.
Convincing logic right there.
If you think it's safer to simplify things, then I'm not stopping you.

Then again, Build 14 has been going for years and nobody noticed that it failed to display medical data until now. ;)
Uhm... yes.
Seems us pirates CAN be a bit permanently drunk on rum... :wp
 
I've still to do some testing, but I've modified the code thus:
Code:
           i = GetTownNumForts(NPChar.town) + 1;
           if (GetTownGovernorIndex(NPChar.town) > -1 && GetPassengersQuantity(PChar) >= i && ProfessionalNavyNation() == UNKNOWN_NATION)
           {
               Link.l10 = DLG_TEXT[7];
               Link.l10.go = "capture_for_blaze";
           }
The number of officers required is just the number of forts plus 1. The check for a valid governor, along with a check that you're not a naval officer, combine with the check that you have enough officers.

There's another way to capture a town and that doesn't check whether you're a naval officer at all, nor does it check if capturing the town has been disabled. You can go into a fort, talk to a civilian, who might be an envoy, who might be persuaded to surrender the town. I've modified it to do much the same as the governor's dialog - if the town capture is disabled then you can only demand money, otherwise a naval officer can only hand the colony to his own nation, while a privateer or pirate can do what he likes.
 
I've still to do some testing, but I've modified the code thus:
Code:
i = GetTownNumForts(NPChar.town) + 1;
if (GetTownGovernorIndex(NPChar.town) > -1 && GetPassengersQuantity(PChar) >= i && ProfessionalNavyNation() == UNKNOWN_NATION)
{
Link.l10 = DLG_TEXT[7];
Link.l10.go = "capture_for_blaze";
}
The number of officers required is just the number of forts plus 1. The check for a valid governor, along with a check that you're not a naval officer, combine with the check that you have enough officers.
Awesome!

There's another way to capture a town and that doesn't check whether you're a naval officer at all, nor does it check if capturing the town has been disabled. You can go into a fort, talk to a civilian, who might be an envoy, who might be persuaded to surrender the town. I've modified it to do much the same as the governor's dialog - if the town capture is disabled then you can only demand money, otherwise a naval officer can only hand the colony to his own nation, while a privateer or pirate can do what he likes.
Even more awesome!

Not sure how many people use the "land entrance to fort" very often these days.
But it is absolutely good to have consistency in game features.
So special thanks to you for making that happen at last! :onya
 
Here's the result of some more modifications. A very minor tweak to "Captured governor_dialog.h" so that, when you choose the new government, the soon to be ex-governor says "Then this town will belong to the British." Or whichever nation. The point is, he used to say "Then town will belong to British."

And a lot more modification to "Enc_fort_dialog.c/h". It had no provision for America or Sweden, so options for both are added. Originally I was just going to tack a couple of lines onto the end of "Enc_fort_dialog.h", until I noticed that the French and Spanish lines have hard-coded king names which are either mildly incorrect ("Long live his Most Catholic Majesty Felipe, who will restore this town to the true belief..." - which Felipe?) or completely wrong (e.g. in "Golden Age of Piracy", the king of Spain is Carlos II). Replacing the name with a preprocessed variable set by 'GetNationRoyalByType' didn't work for a privateer with all nation choices as all the "Preprocessor_Add" commands were executed, the variable being finally set by the last one, which meant the option to install a French governor included the name of the king of Spain. So there was no choice but to split the lines, which meant a lot of "DLG_TEXT" lines needed their numbers changed, which meant the text lines for Sweden and America could go next to all the others. (In the process I found that one of the existing "DLG_TEXT" lines was wrongly numbered anyway.) The dialog also checks 'isEnabledTownCapture' so that you can't continue all the way to choosing a new governor if the town is protected by the storyline.

And then the French line didn't give the king's name at all. The reason is that "Periods.c" calls the Golden Age of Piracy French king "Louis XIV le Grand", but "period_strings.txt" calls him "Louis XIV le Grande". "Grand" (without "e") is correct, as he's a king, not a queen. :D So "period_strings.txt" is now corrected.

We need some sound clips for American and Swedish governors. Especially American. If you want a laugh, start a FreePlay as an American, then go and talk to the nearest governor and listen to his voice greeting... Meanwhile, since "Enc_fort_dialog.c" wants to play a suitable voice clip for the new owner of the town, I compromised. If you hand it to America, it says "My factor will call upon your factor", while for Sweden it says "I'm not so much a governor as an agent of the monarchy" - suitably governorish lines which don't mention the wrong nation.
 

Attachments

  • Capture_town.zip
    12.6 KB · Views: 126
Wow! You did quite a lot of work there!! :shock

Really glad you discovered more bugs along the ways; otherwise I'd REALLY have hated you to invest so much effort for technically so little a thing...
 
If it hadn't been for the bug of hard-coded king names, I wouldn't have had to invest so much effort. ;)

Have you been to see the governor of Governor's Harbor yet? xD
 
Ok, I've conquered Marigot and Guadeloupe and taken the towns for myself. But whatever Grey Roger experienced, when he approached the town store and got all the rum hasn't happened for me. Grey Roger, did you get all that rum by using the console for that?
 
No, that was specifically because @The Nameless Pirate and I were pretending to co-operate on the raid. He'd knocked out the fort cannon but couldn't storm the fort itself, so I followed up with the assault. Of course, since PoTC is not a multiplayer game, we could not really join forces and then split the loot. So I made a console file to give him half of what I'd taken, which he could download and run; and also a version which took the same amount away from my hold and gold, which I ran. As for rum, there's nothing special about it when looting; I was playing a drunk pirate permanently on double rum rations and always looking for more rum.

When you have finished storming the fort and town, and are facing the governor, you have the choice of demanding money or changing government. Only if you demand money can you then loot the store, and then only if it is the same day, so make sure to start your attack well before midnight! You can go to the store and "buy" both goods and equipment as usual, but all prices will be 0. But when midnight passes and it's the next day, all the prices go back to normal. (Which means, for added amusement, take the governor's money, then loot the store for everything you can carry. Go to the tavern and wait until next day. Then make the storekeeper pay to get all his stuff back by selling it back to him. :D)
 
No, that was specifically because @The Nameless Pirate and I were pretending to co-operate on the raid. He'd knocked out the fort cannon but couldn't storm the fort itself, so I followed up with the assault. Of course, since PoTC is not a multiplayer game, we could not really join forces and then split the loot. So I made a console file to give him half of what I'd taken, which he could download and run; and also a version which took the same amount away from my hold and gold, which I ran. As for rum, there's nothing special about it when looting; I was playing a drunk pirate permanently on double rum rations and always looking for more rum.
Indeed that wasn't actually in the game.
We were just having a bit of fun despite the lack of multiplayer. ;)
 
Ok, the ransom demand gives acces to the store for free. Mystery solved.

I'm aware, that in order to maintain the main story, the towns on Jamaica and Barbados can't be conquered ahead of time. Are there other towns, that are marked as "un-conquerable"?
 
I'm aware, that in order to maintain the main story, the towns on Jamaica and Barbados can't be conquered ahead of time. Are there other towns, that are marked as "un-conquerable"?
Any that are involved in the main story - St. Pierre, San Juan, Kralendijk, Sao Jorge and Nevis Pirate Settlement. Once the main story is over and you've returned to Port Royale to talk to the new governor, restrictions are lifted and you can capture whatever you like.
 
Fine, I've already chosen to keep away from those towns for those very reasons. What about "Elizabeth Shaw's disappearance" (conversation with the governor of Phillipsburg) and "Find Angelique Moulin's father" (find an officer in the fort of Port au Prince)?

However, I may have run into some kind of bug during the landing. When I have destroyed the fort and fought all soldiers inside, the game sometimes crash, during the fight in the harbour. I believe, it's connected to my personal crewmembers, who follow me around and join me in the fight in the fort, but who are replaced with generic crewmembers, when I arrive in the harbour. It takes a short while, before the crash happens, so I don't know, precisely what causes it.

I've also experienced it, when I had one officer and some opium with me. I suspect the opium to be the cause.
 
"Elizabeth Shaw's Disappearance" and "Angelique Moulin's Father" should not affect the main story. "Tales of a Sea Hawk" is the story from the original game, which had never heard of Hispaniola or St. Martin. (It hadn't heard of Jamaica or Barbados either - the original game called them Redmond and Oxbay, and the game code still does.)

If you suspect that your extra crew are causing the crash, see what happens if you play that battle without them. Opium should not have any effect; it might have done when opium smuggling was active, if the soldiers had been messed up by the smuggling, but they should not react to it now.

Next time the game crashes, could you upload "compile.log", "system.log", and "error.log" if it exists?
 
Back
Top