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

Included in Build Different Shipyard Sale Prices for Naval Officers/Privateers

I'm not sure why there needs to be any factor for purchased ships. My joke about privateers buying ships aside, I know some people do buy ships - once you have high enough rank to get them and enough money to afford them, it may be quicker than hunting around for an enemy group and hoping it has the type of ship you want. Regardless if you're a merchant or a privateer, if you bought the ship then it's yours honestly and you should be able to sell it for full price, plus or minus commerce skills and perks.

Prize ships, by contrast, would normally be disposed of by an admiralty court which is why your commerce skill doesn't work, you're not the one selling them. Then you get a fixed percentage of the proceeds, i.e. the 25%.

Merchants should at most get the same 25% for captured ships as privateers. According to what I read on the Wikipedia article on LoM's, they should not get anything as they shouldn't be taking prizes anyway - it was only legal to take a prize if you had a LoM, which is why the East India Company got them for its East Indiaman ships.
 
I'm not sure why there needs to be any factor for purchased ships. My joke about privateers buying ships aside, I know some people do buy ships - once you have high enough rank to get them and enough money to afford them, it may be quicker than hunting around for an enemy group and hoping it has the type of ship you want. Regardless if you're a merchant or a privateer, if you bought the ship then it's yours honestly and you should be able to sell it for full price, plus or minus commerce skills and perks.
Fair enough. :onya

Merchants should at most get the same 25% for captured ships as privateers. According to what I read on the Wikipedia article on LoM's, they should not get anything as they shouldn't be taking prizes anyway - it was only legal to take a prize if you had a LoM, which is why the East India Company got them for its East Indiaman ships.
I say "merchants" here buy I mean anyone who isn't a pirate, privateer or navy officer.
Of course any "prize ship" from another nation can only be gained through an act of piracy.
And what about pirate ships "pirated" from the pirates by a non-player who doesn't fit into any of the other categories either?
That would certainly be possible.

Perhaps the most realistic would be if non-pirate shipyards REFUSE to purchase pirated ships.
So if you don't have a LoM, you can only sell captured ships to the pirates. They would give higher profit margins to those who actually joined them though.
For regular shipyards, the "Sell" button should then be grayed out instead.
And by definiton you CANNOT have a prize ship if you don't have a LoM or are a naval officer, so cannot sell them either.
If you DO sell them, you get that 25%. Which means that 25% is a BONUS as otherwise you could not sell the ship at all (except to the pirates for, maybe, 10%?).
 
I have reopened this thread as it appears now we've still for some improving to do....
 
Here is all the relevant pricing code from the shipyard interface:
Code:
  int price = GetShipPriceByType(GetCharacter(cn)); // KK

   // TIH --> added stolen ship price cuts (rpg style only) Jul27'06
   float sellMult = SHIPYARD_SHIP_SELL_MULT;
   if ( SY_RPG_STYLE && CheckAttribute(arCurShip,"acquired") ) {
     switch ( arCurShip.acquired ) {
       case "bought":   sellMult = SHIPYARD_BOUGHTSHIP_SELL_MULT;                           break;
       case "taken":   sellMult = makefloat(((SHIPYARD_PIRATEDSHIP_SELL_MULT+SHIPYARD_BOUGHTSHIP_SELL_MULT)/2));   break;
       case "pirated":   sellMult = SHIPYARD_PIRATEDSHIP_SELL_MULT;                           break;
       /*default:*/   sellMult = SHIPYARD_BOUGHTSHIP_SELL_MULT;
     }
   }
   // TIH <--

   // LDH 26Nov05 moved back here so cargo doesn't take a hit on sales price.  You can sell cargo at the store for full price anyway.
   // Levis moved up here so the cannon price is taken into account properly
   float Charmod = GetCharPriceMod(PChar, PRICE_TYPE_SELL, true);
   if(IsInAnyService()) Charmod = 1.0; //Professional Navy and LoM sells for full price -Levis
   price = makeint(price * Charmod * sellMult); // TIH moved down here where it is SUPPOSED TO BE - NK now use central func 05-04-19. Yes there is an extra *0.25, not just straight tradeprice.  //price /= (2 * 2 * 2); //pricescalar * orig div * extra div

   //Levis: ProfessionalNavy and LoM sell for only 25% percent because they give it to the country.
   if(IsInAnyService()) price = price * 0.25; //This should later be made variable depending on your relation with the country etc.

Plus the values of the #defines:
Code:
#define SHIPYARD_SHIP_SELL_MULT       0.30   // FLOAT - multiplier to sell price for ship - non rpgstyle shipyards
#define SHIPYARD_BOUGHTSHIP_SELL_MULT   0.80   // FLOAT - SY_RPG_STYLE - multiplier to sell price for a LEGIT ship (one you bought originally)
#define SHIPYARD_PIRATEDSHIP_SELL_MULT   0.20   // FLOAT - SY_RPG_STYLE - multiplier to sell price for a PIRATED ship (one you acquired through force, death or prisonment of captain) - sale prices for other ships gotten at sea are somewhere between this and BOUGHTSHIP_SELL_MULT

How a ship was acquired is defined when you assign a captain to a captured ship:
Code:
    // TIH --> acquired ship modifier for shipyard buy prices (rpgstyle shipyard) Jul27'06
     if(CheckAttribute(refEnemyCharacter,"position")) {
       ref shipsNewOwner = GetCharacter(n);
       switch(refEnemyCharacter.position) {
         case "corpse":   shipsNewOwner.ship.acquired = "pirated";   break;
         case "captive":   shipsNewOwner.ship.acquired = "pirated";   break;
         /*default:*/   shipsNewOwner.ship.acquired = "taken";
       }
     }
     // TIH <--
The exception is DoBuyShip in the shipyard interface code to set that a ship was purchased:
Code:
chref.ship.acquired = "bought"; // TIH tag on how they acquired this ship (rpgstyle shipyard) Jul27'06

So we need to do several things:
1. Disable the "Sell" functionality for "pirated" ships in every shipyard, excepting any pirate ones
2. Disable the "Sell" functionality for "taken" ships in every shipyard unless you are officially in the service of the nation whose shipyard you're in
(Possibly: Have this work from any shipyard EXCEPT a pirate one to make it less difficult to sell your prizes).
3. Link the pirated/taken status to the logic we established in UpdateRMRelation rather than checking if you killed the captain or not

Then we can remove the 25% for ProfessionalNavy and LoM again as that is already taken care of earlier.
After all, if you capture a ship if that does NOT apply to you, then that ship is either "taken" (if you took a pirate one) or "pirated" (if you took any other one).

-----------------------------------------------------------------------------

Would you guys consider it a good idea to ACTIVELY PREVENT players from selling ships in certain cases as appropriate?
And how should we distinguish between different nations' shipyards? I figure pirates should buy EVERYTHING, but at reduced price if you're not one of them.
Any other nation should buy ships, but only if you're in the service of a nation that is neutral or friendly to them.
No selling ships captured from your enemies right back to them! o_O
 
What about the peaceful merchant/explorer or whatever who is attacked by a hostile nation ship but somewhat surprises them by boarding and siezing the attacking ship. Is their reward simply a "well done" on return to port with the prize or even censure for piracy? Or have I missed something?

If I haven't then there should definitely be a choice of a way of playing that avoids most of this "real world" legalese - however tying it to arcade mode would rob the player of other more realistic bits within the gameplay that they may wish to include.

Would you guys consider it a good idea to ACTIVELY PREVENT players from selling ships in certain cases as appropriate?
Yes
I figure pirates should buy EVERYTHING, but at reduced price if you're not one of them.
Yes
Any other nation should buy ships, but only if you're neutral or friendly to them. (not "in the service of" - this is still privateer or navy mode only thinking)
No selling ships captured from your enemies right back to them!
Yes - fair enough
 
What about the peaceful merchant/explorer or whatever who is attacked by a hostile nation ship but somewhat surprises them by boarding and siezing the attacking ship. Is their reward simply a "well done" on return to port with the prize or even censure for piracy? Or have I missed something?
That would be a minor act of piracy and a pirated ship if you actually capture them, but not if you decide to let them go.

If I haven't then there should definitely be a choice of a way of playing that avoids most of this "real world" legalese - however tying it to arcade mode would rob the player of other more realistic bits within the gameplay that they may wish to include.
Of course just buying a LoM will get past all that. That's specifically why those existed in real life, after all. ;)

Any other nation should buy ships, but only if you're neutral or friendly to them. (not "in the service of" - this is still privateer or navy mode only thinking)
If we go through with my above proposal, purchased ships can be sold anywhere.
To sell captured ships, you'd need to be "in the service of" AND in a shipyard neutral or friendly to you, which makes it profitable again to get a LoM.
And of course pirates will buy anything. They're not picky. :cheeky

All the above being said, a simplified mode that is closer to the stock game might be needed if players find all this new, realistic stuff to be a bit too much of a good thing.
Linked to Arcade Mode with a separate toggle near the top of InternalSettings.h, I'd imagine. But only if we really DO need it.
And then main query is: WHAT exactly needs simplifying here? And why? And can we get around that through sensible gameplay rather than adding a toggle for it?
 
Ok so I disagree. As I said above I would wish a method of disabling all of this or a choice for it not applying. I can read the implications but don't want that style of gameplay personally except maybe as a once in a while variation. I guess I'll stick with 3.4 and retrospectively fix the bugs.
 
Ok so I disagree. As I said above I would wish a method of disabling all of this or a choice for it not applying. I can read the implications but don't want that style of gameplay personally except maybe as a once in a while variation. I guess I'll stick with 3.4 and retrospectively fix the bugs.
Then tell me how you'd want your game to play out.
If I'm going to add a toggle, I need to know what needs toggling. ;)
 
I could do it too; I've already done a bit of looking into it earlier today.
Seems relatively straightforward.
Please, I want to do some more balancing on the fantom characters etc because that is becoming a pain and I want to look into the merchants. Both will probably annoy me already because of double or tripple code etc.
 
I was planning to look into linking the "pirated/captured" status to what goes on in the UpdateRMRelation function.
That one is part of ShipTaken and therefore fits in here:
Code:
// KK -->
     ShipTaken(GetCharacterIndex(refEnemyCharacter.id), KILL_BY_ABORDAGE, n); // Stone-D 19/07/2003 <----------------------------------
     SwapCabinChests(n, sti(refEnemyCharacter.index));
// <-- KK
     ISetShipAttributes(GetCharacter(n)); // copy ship from enemy to companion officer
     SeaAI_SetOfficer2ShipAfterAbordage(GetCharacter(n),refEnemyCharacter);
     LAi_SetCurHP(refEnemyCharacter, 0.0);
     refEnemyCharacter.Killer.Status = KILL_BY_ABORDAGE;
     refEnemyCharacter.Killer.Index = GetMainCharacterIndex();
     // TIH --> acquired ship modifier for shipyard buy prices (rpgstyle shipyard) Jul27'06
     if(CheckAttribute(refEnemyCharacter,"position")) { <----------------------------------
       ref shipsNewOwner = GetCharacter(n);
       switch(refEnemyCharacter.position) {
         case "corpse":   shipsNewOwner.ship.acquired = "pirated";   break;
         case "captive":   shipsNewOwner.ship.acquired = "pirated";   break;
         /*default:*/   shipsNewOwner.ship.acquired = "taken";
       }
     }
     // TIH <--
Whether the capture was an act of piracy or not should therefore be carried from ShipTaken down so it can be used to set ship.acquired .

Plus I was thinking of greying out the "Sell" button as appropriate in the Shipyard Interface and replacing the text with something that explains why.

But you're welcome to do that plus the changes to calculating the prices as well, of course.
If there happens to be a part in there you'd like me to look into though, just let me know.
I'm not greedy when it comes to work. ;)
 
Please look into this. Think this is more up your alley at the moment. I've got my hands full already :).
 
Please look into this. Think this is more up your alley at the moment. I've got my hands full already :).
Sure, will do! I thought you meant that you WANTED to do this. Must have misunderstood. :facepalm
 
So we need to do several things:
1. Disable the "Sell" functionality for "pirated" ships in every shipyard, excepting any pirate ones
2. Disable the "Sell" functionality for "taken" ships in every shipyard unless you are officially in the service of the nation whose shipyard you're in
(Possibly: Have this work from any shipyard EXCEPT a pirate one to make it less difficult to sell your prizes).
3. Link the pirated/taken status to the logic we established in UpdateRMRelation rather than checking if you killed the captain or not

Then we can remove the 25% for ProfessionalNavy and LoM again as that is already taken care of earlier.
After all, if you capture a ship if that does NOT apply to you, then that ship is either "taken" (if you took a pirate one) or "pirated" (if you took any other one).

-----------------------------------------------------------------------------

Would you guys consider it a good idea to ACTIVELY PREVENT players from selling ships in certain cases as appropriate?
And how should we distinguish between different nations' shipyards? I figure pirates should buy EVERYTHING, but at reduced price if you're not one of them.
Any other nation should buy ships, but only if you're in the service of a nation that is neutral or friendly to them.
No selling ships captured from your enemies right back to them! o_O
In reality, you'd put a junior officer in command of the prize ship and then send it off to a friendly port, where it would be disposed of by the admiralty and in due time you'd get your share of the prize money. Good luck implementing that! As a compromise, I thought we'd decided that you can sell a prize ship at any port at the same rate (25% of value) as you'd get in a friendly port, so that you don't need to return to a friendly port every time you take a prize.

The same could apply to pirates - would they also have put a subordinate in command of a captured ship and sent it off to Tortuga while the captain went looking for more prey? Or would he not trust the subordinate to (a) not sell the ship and keep the proceeds for himself, and (b) not get mugged or ripped off when he got to Tortuga?
 
In reality, you'd put a junior officer in command of the prize ship and then send it off to a friendly port, where it would be disposed of by the admiralty and in due time you'd get your share of the prize money. Good luck implementing that! As a compromise, I thought we'd decided that you can sell a prize ship at any port at the same rate (25% of value) as you'd get in a friendly port, so that you don't need to return to a friendly port every time you take a prize.
I remember the same thing, which is why I thought I'd ask. Based on that, I figured allow selling ships at any port that is friendly or neutral to you.
Selling ships to your enemies does seem rather weird to me.

Sending an officer away with the prize ship does not sound impossible, though I'd prefer looking at that after setting up the "personal selling part" the way we want it.
Also, should that apply ONLY to Naval Officers or to Privateers as well?

The same could apply to pirates - would they also have put a subordinate in command of a captured ship and sent it off to Tortuga while the captain went looking for more prey? Or would he not trust the subordinate to (a) not sell the ship and keep the proceeds for himself, and (b) not get mugged or ripped off when he got to Tortuga?
We could set it up so that you can sell a pirated ship for 10% of the price at ANY shipyard.
But I'd be curious to see what happens if we allow selling pirated ships ONLY to pirate shipyard.
Would be a bit of an inconvenience to players, but it would make the whole "act of piracy" behaviour mean a lot more plus make it quite visible too.
Especially if the Sell button is grayed out and says "Cannot Sell - Pirated Ship".
 
I remember the same thing, which is why I thought I'd ask. Based on that, I figured allow selling ships at any port that is friendly or neutral to you.
Selling ships to your enemies does seem rather weird to me.
If you've managed to sneak into an enemy port, weren't recognised and are actually able to sell the ship to the shipyard, why not? Again, the real world justification is that you're sending the ship off and getting the proceeds from it. In game, if the shipyard owner is talking to you then he hasn't recognised you as an enemy, which includes that he hasn't recognised the ship you're trying to sell him.

Sending an officer away with the prize ship does not sound impossible, though I'd prefer looking at that after setting up the "personal selling part" the way we want it.
Also, should that apply ONLY to Naval Officers or to Privateers as well?
Both. They'd both be following the same procedure, which is that the ship is disposed of by the admiralty and the captain gets a share of the prize money.

If you do manage to arrange for a junior officer to take the ship to a friendly port, then you get your prize money and your officer back when you visit that port, it would then make sense to disable selling taken ships at hostile or neutral ports.

We could set it up so that you can sell a pirated ship for 10% of the price at ANY shipyard.
But I'd be curious to see what happens if we allow selling pirated ships ONLY to pirate shipyard.
Would be a bit of an inconvenience to players, but it would make the whole "act of piracy" behaviour mean a lot more plus make it quite visible too.
Especially if the Sell button is grayed out and says "Cannot Sell - Pirated Ship".
Again, if you're recognised as a pirate then you won't be able to do anything at the shipyard. If you're not recognised then you ought to be treated as if you were a merchant because the shipyard owner thinks you are a merchant. :D Once you're a famous pirate, you probably won't be able to do anything much except at a pirate port anyway.
 
If you've managed to sneak into an enemy port, weren't recognised and are actually able to sell the ship to the shipyard, why not? Again, the real world justification is that you're sending the ship off and getting the proceeds from it. In game, if the shipyard owner is talking to you then he hasn't recognised you as an enemy, which includes that he hasn't recognised the ship you're trying to sell him.
True, the same occurred to me during lunchtime.

Of course if we go completely by the "not recognized = let's do business" logic, then it would hardly make sense to have ships that were acquired in different ways to be sold for different prices.
My thinking was to at least create a clear difference to show to the players that this system exists and a bit of how it works too.
But I just had a different idea: Just show in the Shipyard Interface (perhaps on the Buy button) how the ship was acquired.
So "Sell Pirated Ship" or "Auction Prize Ship" depending on the situation. The price would then match with the situation and at least players would notice there is a difference.
Might lead to a simpler solution for now, no?
 
In reality, I'd imagine the shipyard would know there's something dodgy about the ship you're trying to sell because you don't have papers proving you own it. (Which you would have if you'd bought the ship, and that's why you can get the full value for a ship you purchased previously.)

Hmm... and then, if you can't produce a LoM to show that you captured the ship legally, he knows you pirated it. So there's the justification for having different prices in the shipyard. :D

The idea of having different labels depending on how you acquired the ship has some merit, though if you're admitting up front that you're selling a pirated ship, perhaps there ought to be some consequences... (You become recognised when you leave the shipyard, or the next person you meet on the street automatically defaults to the conversation about recognising you as a pirate, or a guard wants to arrest you if you don't pay a bribe, or make up something better.) Or maybe only allow selling pirated ships if you have the "Trustworthy" perk. (This, of course, does not apply if you're selling the ship in a pirate port!)
 
In reality, I'd imagine the shipyard would know there's something dodgy about the ship you're trying to sell because you don't have papers proving you own it. (Which you would have if you'd bought the ship, and that's why you can get the full value for a ship you purchased previously.)

Hmm... and then, if you can't produce a LoM to show that you captured the ship legally, he knows you pirated it. So there's the justification for having different prices in the shipyard. :D
We could also have the functionality work EXACTLY as you suggest there.
So rather than storing whether a ship was pirated or an honest prize ship, not bothering with that at all.
That would actually be simpler than storing it correctly at the time you get the ship and then using that status later when you try to sell her.
Less fancy as well, but probably more logical and realistic. Perhaps easier for the player to understand as well?

Let me know if that seems like a good idea that we should implement instead as it could save me a fair bit of development time! :cheeky

The idea of having different labels depending on how you acquired the ship has some merit, though if you're admitting up front that you're selling a pirated ship, perhaps there ought to be some consequences... (You become recognised when you leave the shipyard, or the next person you meet on the street automatically defaults to the conversation about recognising you as a pirate, or a guard wants to arrest you if you don't pay a bribe, or make up something better.) Or maybe only allow selling pirated ships if you have the "Trustworthy" perk. (This, of course, does not apply if you're selling the ship in a pirate port!)
The "labels" idea is mainly to communicate to the player that it makes a difference how you got the ship so hopefully they'll notice that has an impact on the prices.
Of course we could build on that as you suggest. Definitely fun ideas. :yes
 
Back
Top