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

Solved Naval Officer, sacking colonies

Anorn

Landlubber
Hi everyone,
First of all, great mod, it’s quite impressive what you managed to do when compared to what the stock game features.
I have two questions, the first regarding the naval officer “playing style”.
What file do I need to modify to allow sacking colonies when a naval officer ? I looked at “capture_colony.c” and “fortcapture.c” in PROGRAM/INTERFACE and quite a few other files but I was not able to find the lines limiting that. I found where the limitations on swapping ships and buying ships are (althought I don’t intend to change that) but for the sacking of colonies, well no luck so far.
And can enemy nations reconquer captured colonies ? I don’t think it’s possible regarding the limitations of the base game, but asking just to be 100% sure.
Thanks in advance.

Edit : After taking a second look at the files, I found what I was looking for at PROGRAM/DIALOGS/Captured governor_dialog.c
 
Last edited:
What file do I need to modify to allow sacking colonies when a naval officer ?
You mean "just ransom for money"?
Indeed you found the right file and it looks like we disabled that.
The idea is of course that as Naval Officer, you should give any towns you capture to your nation.

And can enemy nations reconquer captured colonies ?
Nope, they don't.

I don’t think it’s possible regarding the limitations of the base game, but asking just to be 100% sure.
If somebody would program it in, it would certainly be possible.
But nobody did.
 
Thanks for the answer.
You mean "just ransom for money"?
Yes that's what I meant, sorry about that.
The idea is of course that as Naval Officer, you should give any towns you capture to your nation.
I agree it is the logical choice, since Naval Officers don’t just ransom towns on behalf of their nations. But since enemy nations can’t recapture towns, I prefer to have the option to not capture to begin with without avoiding attacking towns altogether.
Thus despite my almost nonexistent programming capabilities, I tried to balance the changes I made for my files. So I replaced lines 53 to 61 in Capture governor_dialogs.c from :
if(ProfessionalNavyNation() == UNKNOWN_NATION || !isEnabledTownCapture(NPChar.town))
{
Link.11 = DLG_TEXT[1] + NPChar.nBooty + DLG_TEXT[2];
Link.11.go = "Colony_Ransomed";
}
if (isEnabledTownCapture(NPChar.town))
{
Link.12 = DLG_TEXT[3]
Link.12.go = "Select_New_Government";
}
To :
if (isEnabledTownCapture(NPChar.town) && ProfessionalNavyNation() == UNKNOWN_NATION)
{
Link.11 = DLG_TEXT[1] + NPChar.nBooty + DLG_TEXT[2];
Link.11.go = "Colony_Ransomed";
}
if (isEnabledTownCapture(NPChar.town) && ProfessionalNavyNation() != UNKNOWN_NATION)
{
int navycut = 0;
NPChar.nBooty = makeint((makefloat(GetTownGold(NPChar.town)) * TOWN_GOLD_SACK_SCALAR * (0.75 + frand(0.25) + makefloat(GetShipSkill(PChar, SKILL_SNEAK)/20.0)))*0.2);
navycut = makeint(NPChar.nBooty * 0.125);
AddWealthToCharacter(GetMainCharacter(), navycut);
Link.11 = DLG_TEXT[1] + NPChar.nBooty + DLG_TEXT[2];
Link.11.go = "Colony_Ransomed";
}
if (isEnabledTownCapture(NPChar.town))
{
Link.12 = DLG_TEXT[3];
Link.12.go = "Select_New_Government";
}
It’s a little messy but it gets the job done.

Anyway I’m not advocating for changes, the mod is great as it is :onya
 
Yes that's what I meant, sorry about that.
No worries; I gathered it from the context.
Thanks for confirming. :doff

It’s a little messy but it gets the job done.

Anyway I’m not advocating for changes, the mod is great as it is :onya
As long as it works and it makes you happy, that's the main thing that matters.

Adjusting stuff to your liking is a pretty great way to learn modding anyway. ;)
 
Back
Top