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

Ideas for the future!

Prisoned_dialog.c handles most of the ransoming, so there should be a reference there to the calculation.
Should be possible to use that to track down where it happens.
"Prisoned_dialog.c" calls function 'GetPrisonRansomCost', which in turn calls 'CalculatePrisonRansomCost', both defined in "CharacterUtilite.c". 'CalculatePrisonRansomCost' looks like this:
Code:
int CalculatePrisonRansomCost(ref captive)
{
   // ref shipt = GetShipByType(0); // NK bugfix 04-06 - Swindler 2006-07-10: not necessary anymore, as GetShipByType() now does this check.
   float srank = sqrt(sqrt(pow(sti(captive.rank),3.0)));
   float sclass;
   float sweight;

   if (CheckAttribute(captive, "shiptype"))
   {
       ref shipt = GetShipByID(captive.shiptype);
       sclass = makefloat(10 - sti(shipt.Class));
       sweight = sqrt(makefloat(sti(shipt.Weight)) / 10000 * 508); // This not changed by PRS3 sadly.Changed 04-09-19 to be more accurate, was simply /19.7
   }
   else
   {
       sclass = 6.0;
       sweight = 22.0;
   }

   return makeint(sclass * sweight * srank * makefloat(50 + rand(50 + CalcCharacterSkill(GetMainCharacter(), SKILL_SNEAK)*10))/10.0);
}
Your move. :D (Partly because I'm currently working on what governors are going to do to privateers and naval officers who execute too many prisoners, and partly because I'd like someone else's name in the credits for fixes!)
 
Meanwhile, I've been putting the new code dealing with honourable surrenders and prisoner executions to the test:
surrender1.jpg surrender2.jpg

If you've promised good treatment and then give him the chop anyway, the prisoner doesn't take it well:
execution_traitor.jpg
You lose even more reputation for that than you do for killing a prisoner normally.

If you keep killing prisoners, you'll be given a warning next time you try to claim a promotion:
promotion_warning1.jpg promotion_warning2.jpg promotion_warning3.jpg promotion_warning4.jpg promotion_warning5.jpg promotion_warning6.jpg
And just to make sure you remember:
execution_log.jpg

A lot of this doesn't apply to pirates. I'm still keeping score of your executions if you're a pirate, but pirate governors don't care about it. This is so that, if you signed up with the Brotherhood and also got a LoM, the nation who gave you the LoM will still object. So pirates can throw their prisoners overboard if they want, or be thrown overboard by naval officers. But you're in trouble if you're a naval officer or privateer who does it to prisoners from enemy nations. For that reason, there's a new section in "The Art of War":
art_of_war.jpg
 
Further testing is complete. That last part of the governor's speech, about writing to ambassadors of other nations from whom you have a LoM, only appears if you do in fact have multiple LoM's. When you get this warning from the governor, it is only this nation whose relation is set back down to the minimum level for your current rank. So if, for example, you have LoM's from both France and Spain, you've done a bit more raiding and are now ready to collect a promotion from Spain, then the Spanish governor is the one who gives the speech, your relation with Spain is reduced, but your relation with France is unaffected. A bit of console trickery to remove the French LoM means the Spanish governor doesn't continue to the bit about writing to ambassadors even if you also have a "rank" with Pirates - they don't count in the number of LoM's.

If you then go and kill some more prisoners anyway, you lose all your LoM's. But not your standing with Pirates - in fact, if you weren't a pirate before, you are now. I didn't force the leaving of service to be on bad terms, but if your reputation is low enough then it's on bad terms anyway - and your reputation probably will be low after killing all those prisoners. Which means you don't want to do it while you're in port because the fort's gun crews might react to you dumping bodies overboard!

And now this is about ready to go into the next update...
 
I looked at your screenshots just now and really like this. Well done! :woot
 
Next: change the rules for when a surrendered captain really surrenders and when he duels you. Currently, he'll fight you if he thinks you're a wimp. This is decided first by skills, then by abilities. Your combined Leadership, Fencing and Grappling skills are compared to his, and if his combined score is higher, he fights. If he has the "Professional Fencer" and "Iron Will" attributes, and you don't, then he fights. If you have the higher combined skill, and if you have both abilities or he doesn't, then he surrenders.

One thing I've already done and which is in the current update is to use your effective skills as modified by items rather than the raw attibute that was originally used ('CalcCharacterSkill(PChar, "Leadership")' instead of 'sti(PChar.skill.Leadership)'). So you'll get the bonuses from items. But you won't get help from your officers because you face the captain alone - even your active party officers aren't there.

What I'm now considering is ship class. If his ship is at least two tiers smaller than yours then he'll surrender regardless of skills and attributes. Conversely, if his ship is at least two tiers larger than yours, he'll fight - that's to stop you from taking a much nicer ship for yourself too easily, especially if you joined a battle in progress and waited for someone else to force an enemy ship to surrender.

Another factor is location. If you're on deck, it probably means the enemy ship surrendered at sea, so it really ought to be a surrender - though this will take lower priority than the ship size comparison, so this won't apply if his ship is much larger than yours. It also won't apply if he's a pirate or he has an evil reputation; either way, he's allowed to be dishonourable!

If you're not on deck then you've boarded his ship and he may be duelling you to avoid further loss of crew lives. Or maybe his crew have given up fighting but he hasn't. In any case, the ship wasn't seen to raise a white flag, so the captain isn't bound by it.
 
Currently, he'll fight you if he thinks you're a wimp. This is decided first by skills, then by abilities. Your combined Leadership, Fencing and Grappling skills are compared to his, and if his combined score is higher, he fights. If he has the "Professional Fencer" and "Iron Will" attributes, and you don't, then he fights. If you have the higher combined skill, and if you have both abilities or he doesn't, then he surrenders.
Frankly, I don't like that old logic at all.
It's really fuzzy and probably feels almost random to the average player.

The new logic you describe sounds far more sensible.
So as far as I'm concerned, you need to have no more loyalty to the old system than what you think is warranted.
 
What I'm now considering is ship class. If his ship is at least two tiers smaller than yours then he'll surrender regardless of skills and attributes. Conversely, if his ship is at least two tiers larger than yours, he'll fight - that's to stop you from taking a much nicer ship for yourself too easily, especially if you joined a battle in progress and waited for someone else to force an enemy ship to surrender.

This is a big in game problem,and I think this is a great solution.:bow
 
May want to factor in crew counts as well. I can't tell how many times a crew/captain has wanted to fight when I have them down to like 20-30 and I have 300.
 
Frankly, I don't like that old logic at all.
It's really fuzzy and probably feels almost random to the average player.
The average player won't know the exact mechanism but the basic idea should be pretty clear - if you try to take a ship, especially a better one than your own, early in the game, you'll have to fight for it. Later on, when you're big and scary, enemy captains are more likely to surrender. If you aren't up to the fight, you shouldn't be trying to board the ship in the first place. :p One reason for the exception for a smaller ship is that, if you're in a tier 5 ship (the largest you can have at the start of the game without cheating or picking a special character) and you're boarding a tier 7 ship, you won't have to face an excessively tough duel.
May want to factor in crew counts as well. I can't tell how many times a crew/captain has wanted to fight when I have them down to like 20-30 and I have 300.
I did think about that, started to implement it, and decided against it. The reason is that if the other ship surrenders, either you've been doing a lot better in the boarding action than the enemy, or you hammered it with grapeshot to reduce the crew's morale; either way, the crew is probably very low, which means that exception would activate most of the time.
The enemy captain is duelling you precisely because his crew is very low - it's now his only chance of winning! :duel:
Or, he knows his ship is lost, and he's going to take you with him. "To the last will I grapple with thee. From hell's heart, I stab at thee. For hate's sake, I spit my last breath at thee!"
 
The average player won't know the exact mechanism but the basic idea should be pretty clear - if you try to take a ship, especially a better one than your own, early in the game, you'll have to fight for it. Later on, when you're big and scary, enemy captains are more likely to surrender. If you aren't up to the fight, you shouldn't be trying to board the ship in the first place. :p One reason for the exception for a smaller ship is that, if you're in a tier 5 ship (the largest you can have at the start of the game without cheating or picking a special character) and you're boarding a tier 7 ship, you won't have to face an excessively tough duel.
You've definitely got the right idea! And I think you also expertly described the current issue: the players generally would not understand the basic idea.
In other words: It's great that you're now reworking this to something more sensible!
I'm certain this will be a huge addition to the fun people have with this game and mod. :onya

+100 for the Khan reference :thumbs1
That's what I thought of at first as well, but then I remembered... Khan's words are itself a reference; to Moby Dick!
 
That's what I thought of at first as well, but then I remembered... Khan's words are itself a reference; to Moby Dick!
I knew they were from Moby Dick, but I can never hear those words in anyone but Khan's voice. xD

And @Grey Roger, I love your blueprint for the surrender scenarios. It will make a welcome difference in gameplay, and a logical one to boot.
 
I knew they were from Moby Dick, but I can never hear those words in anyone but Khan's voice. xD
You've got me there! :rofl

(Literally... I'm exactly the same way. My conscious mind knows it's Moby Dick; but my unconscious mind goes straight into space upon hearing it. ;) )
 
I have an excuse. Long ago, "Star Trek II: The Wrath of Khan" was the first time I heard that line. Later I found out its true origin, but the association had already been made.

It's also not the only line that was copied from "Moby Dick". Recognise this?
I'll chase him round Good Hope, and round the Horn, and round the Norway Maelstrom, and round perdition's flames before I give him up.
 
I have an excuse. Long ago, "Star Trek II: The Wrath of Khan" was the first time I heard that line. Later I found out its true origin, but the association had already been made.
Sounds like we all had the exact same excuse! :rofl

It's also not the only line that was copied from "Moby Dick". Recognise this?
Yes, indeed.
I think Khan's "lust for vengeance" was very deliberately inspired on Moby Dick.
In fact, isn't that book mentioned and/or shown at some point early in the movie? I can't quite remember now...

They had another deliberately Moby Dick influence in another Star Trek movie: First Contact.
There it was even more obvious with, strangely, the normally very wise and stable Jean-Luc Picard behaving very much like Captain Ahab.

Coincidentally or not, around that same time, Patrick Steward also starred as the real Captain Ahab in a TV production of Moby Dick
(which has impressively good music by a composer who doesn't get enough to do!).
 
Next problem: reputation. The idea is to have different dialog text depending on reputation. If the ship surrenders but the captain fights anyway, it may be because he's a pirate or evil, in which case he can use the existing text in which he insults you and then fights. If he isn't a pirate and has a neutral or better reputation, he'll get different text - either the crew surrendered without his order, or he's challenging you to a duel to spare further crew casualties on both sides.

Except that all random enemy captains seem to have Neutral reputation. A 'trace' statement which I put into "Cabinfight_dialog.c" shows that their reputation isn't set, and a character who has no "reputation" attribute is assumed to be Neutral. One option is to put this into "Cabinfight_dialog.c":
Code:
   if (!CheckAttribute(NPChar,"reputation"))
   {
       NPChar.reputation = rand(20) + rand(20) + rand(20) + rand(20) + 5;   // If reputation not already set, this should give a random number between 5 and 85, biased towards average of 45 i.e. neutral
   }
A better option might be to put it into "Leveling.c", at the same place where alignment is randomly assigned. "Leveling.c" really ought to be doing this for all random characters, shouldn't it?
 
A better option might be to put it into "Leveling.c", at the same place where alignment is randomly assigned. "Leveling.c" really ought to be doing this for all random characters, shouldn't it?
That would make sense to me. I'm surprised it doesn't already do that! I kind-of thought it did... :shock
 
"Leveling.c" does not set reputation. In fact, "Leveling.c" does not even contain the word "reputation". xD

Quest characters will be exempt, as usual. If the person who created the quest character didn't add a "reputation" attribute, either the character's reputation doesn't matter or it's supposed to be Neutral. 'GetCharacterReputation' returns REPUTATION_NEUTRAL if the attribute isn't set (which is why random enemy captains are all Neutral at the moment).
 
Back
Top