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

Limit selling navy ships

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
I have been working for a bit on a mod to disable the selling of navy ships unless you have a Letter of Marquee. This works fine at the moment. This mod will replace the REALISTIC_SHIP_PURCHASE mod. You will be able to turn it off using the same toggle.

A couple of questions though:

Which ship types should be considered navy ships?
I think at least:
- Battleship
- Lineship
- Manowar
- Corvette
- Frigate

Please post below what other ships should also be considered navy vessels.

At the moment, you just need a LoM to buy a navy ship. Maybe I should make it so that you need a minimum level with a nation? So the more promotion you make, the bigger and better the ships that become available.

Another problem is with pirate shipyards: You can't get a pirate LoM, so you can't buy pirate navy ships. Why would pirates sell navy ships anyway?

Please give your views on above issues. I think this mod should be a nice addition to the modpack. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
I am all for the intentional 'retardation' of progression within the game, so I vote 'go for it!" Plus I love the idea of having "multiple games", rather then just one game where you can 'do' everything.

A couple things that come to mind...

Make capital ships available at capital cities only?

Include a check and dialog update with the shipwrites that

A) check for LoM
B) check for rank
C) check for LoM with enemy nations

if LoM = true = enemy, dialog link to "cant serve two masters"

Actually... I am the mind to totally gut the LoM and how it works anyways... issues I have with LoM...

Historically a privateer had to give up a good percentage of the booty to the crown in exchange for LoM as many of these where done as a "venture capitol" anyways.

-game function- Your up for promotion, make this Cost $$$ not give $$$ (idea for that quest to spend more money) (it should give land and status sure) Better yet, make p.char spend his Personal cash to get rank upgrade. This concept means your spending your personal wealth on buying property with the nation you serve. It would also encourage signing articles earlier to get your cash flow up faster.

Include "officer farm", or better officers spawn in cities in which you have a high rank. Give those officers some national officer skins? as default (the more military you go, the more military you look?)

Money spent to buy a new rank, or percentage of cash looted goes back into the city to upgrade it faster (idea ripped off from Hook, but its a good idea).

City has too be of a certain rank to offer high end ships.
-Include dialog; "sorry captain, the colony is just too poor to produce the type of vessel a man of your calibre deserves".

Characters with 'captain' rank or higher HAVE to sail with there real flag up, (optional) changing flag and getting 'detected' reduces your rep/faction severly. Historically there where several privateers who where 'flag swappin' to get in a little more pirating and where subsequently tried for treason and got to test the strength of the gallos.

I think I'll end it there and see what others have to say on it heh. <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid=":whipa" border="0" alt="whippa.gif" />
 
Sounds like some good ideas. Not sure which of these ideas we should try to implement now and which ones should wait for Build 14. The limited selling of navy ships is something I already coded earlier today and it does work. It could do with some tweaking and improving, but in general it works.
 
... and then it came to me while I was contemplating life on the porcelin throne...

Unique buyables for each faction.

Similar to how the little orb is used to attack the bpearl; have each faction sell a unique buyable item that can be used at sea, on land... or a couple items...

If LoM = true, and faction = high then npc offer buyable in the govs house...

Cost = outrageous, item consumable; accessed under abilities (like the incan widget).

just some examples...

english, on land; 'press gang', all ships in your fleet have crews maxed; morale - 50%; at sea 'english will'; double defenses skill during engagement

spanish, on land; 'creative accounting', convert 20 percent of crew money to 5 percent personal wealth -20% morale; at sea 'arms shipment', adds 10 musketts to weapon locker 2 suits of silver armor 5 cheap armor.

french, on land; 'courtly manners', +10 french faction, -5 faction all other empires -10% crew morale. at sea, 'trained musketteers'; +50% crew casualties with 'musket volley perk' when boarding enemy ship.

dutch, on land; 'cargo consignment' for each cwt of inventory other then shot/powder/wheat/rum character gets int(cwt*.005) added to dutch faction, All cargo other then above removed. int(cwt/4) is added to wheat supplies, int(cwt)/5) is added to rum supplies. at sea, 'kessel run' ship speed = ship speed + shipspeed*150%; hull damaged 10%, sails damaged 10%.

portugal, on land; 'hire professional swords men', crew cash - 20%; personal cash - 20%, 10 fine swords added to wep locker, crew morale +20%, 10 silver armor added to locker, 10 small pots added to wep locker. +5 faction with portugal. at sea, 'professional boarders', while active 'instant boarding' range + 50%, chance of success +150%. ship hull -20 percent, ship sail -10 percent.

Pirate; on land 'buried treasure', 50% crew cash taken away; 10% of crew cash converted to personal wealth; crew morale +10%, rep - 5; pirate faction +10, all other factions -5, land + .005 of cash removed. at sea, 'terrifying motivation'; crew morale -10%, rep -5, ship -50% hull; all shot, powder, cargo other then rum/wheat removed from inventory; ship speed +200%, ship manuvering +200%, muskett volley perk +20 percent effect, instant boarding +20% range, +20% chance to succeed. crew restored healed +20 percent of max?

Just some randomness tossed out there...
 
Those sound like some interesting ideas for Build 14. <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

I have been working on this mod some more. I think it works quite well now. You now need a minimum rank with each nation to be able to buy navy ships. You need to reach the rank of Admiral before you can buy a Manowar now. This way buying a Manowar has become REALLY difficult. But you can tweak this mod in BuildSettings.h so that you need a lower rank.

I also tried to make it so that pirate navy ships are not available for sale. I haven't managed to yet. I added the following code into PROGRAM\Ships\ships.c in the function <i>void SetRandomStatsToShip(aref chrship, int idx, int nat)</i>:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// PB: Realistic Ship Purchase -->
// Can't buy pirate navy/war ships
if(REALISTIC_SHIP_PURCHASE && sti(CheckAttribute(refShip,"Class")) <= HIGHEST_NAVY_CLASS && CheckAttribute(refShip,"Type.War") == true && CheckAttribute(refShip,"Type.Trade") == false && nat == PIRATE)
{refShip.CanBuy = false;}
// PB: Realistic Ship Purchase <--<!--c2--></div><!--ec2-->This does not stop pirate ships from being available from appearing in the shipyards at all. Does anyone know where I have to put my code so that it DOES have effect?
Note: You can't actually BUY navy ships at a pirate shipyard, because you can't get a rank with the pirates*. However, the navy ships DO appear in the shipyard interface, even though you would never be able to buy them. I want no navy ships to appear in the pirate shipyard interface at all.

* = Unless the "fame" counts as a pirate rank.

Also I am having the following error message, but I'm not sureif it's caused by my mod or not:
<i>RUNTIME ERROR - file: ships\ships.c; line: 264
missed attribute: Price
RUNTIME ERROR - file: ships\ships.c; line: 264
no rAP data</i>

Please find attached a beta version of this mod. Please test it for a bit if you like.
 
Im going to go ahead and get this file, and run it into the ground over the next day or so as I have time; Ill let you know how it goes PB.
 
Thanks a lot. I'll try to improve my code for a bit. I had an idea for some little improvement, but that won't really change the workings of the code much.

Is there anyone else with some comments on this mod?
 
These idea's sound good but u have also to think for alternative for non alligned player . I see it works in 2 way :

1st , player's with LoM :

If we go with corvette as starting navy ship then player has to be able to sail this class fisrt then have a rank of captain then frigate with commodore and so on .

2nd , palyer's without LoM :

What a good combat ship they can get from shipyards ?? Of course those war galleon , the 50 gun pinnace , fluyte of war .. etc r not concidered a navy/combat core ships , they have the capability but not navy ships so this player is left with only an option to capture his for example battleship from other nation navy fleet where I think options should be available for any to get any ship from anywhere .

Don't want to contradict myself but as u said people can set it in the buildsetting.h file and yes I think it is a good idea .

U might also find a way to make it difficult for player's to change their allignment , for example once u buy english LoM then u r concidered an english privateer and nation hoistle with england will go after u in world map beside u will get welcomed by fort cannon's when u within it range so flying false color's wont help u here .

In off topic , did anyone found anything about CTD when in sea battle screen yet ??
 
I am making this mod in such a way that you can define the behaviour of the mod entirely to your liking. You can turn the mod off, but you can also turn it partly off. You will be able to define for each class of ship if you do or don't need a LoM and what navy rank you need for each class.

If you have a LoM, you need to gain a high enough player rank AND national rank to be able to buy navy ships. That makes it take quite some time before you can buy a navy ship.

At the moment all nations use all ships. But I want to make some nation-specific ships: Ships that only the English/Dutch/Etc. use. So if you want to have such a ship, you MUST go to quite some trouble to buy it. Or you could capture such a ship, but that would be an act of hostility towards that nation. And you don't want to do that if you want to sail FOR England. This would also be useful for the P&E mod.

If you don't have a LoM, you can get any ship by capturing her. You can also buy non-navy ships from the shipyards. You would also not be able to buy War Schooners, War Galleons, etc, because these are converted trading ships for navy use. On the other hand, you CAN buy converted navy ships for trading use, such as the Weathered Fast Merchantman. But if you want any REALLY good ships, such as a Corvette, Frigate, Battleship or Manowar, you MUST capture them or buy them, but to buy them, you must have a high enough rank with the local authorities.

Note: Navy ships are all ships that have Type.War = true and Type.Trade is false.

Anyway: You can tweak this mod to your liking. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
I like your idear Pieter 'n eveyone's elses posted in this thread!

Fortunately "bigger" ships are now more difficult to get, that makes the game more realistic and entertaining hehe...

Once again keep up the good work mates!
 
Let me start with saying THANKS alot for getting the shipintic.file in old format , now I can tweak ships data to my likikng <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

I checked the mod Pieter , works fine .. Been playing it all night and np else than CTD in seabattle but u know about that problem .

Am at lvl21 and rank 5 with england but still couldn't see any class 1 ship in redmond shipyard ?? even if i can't buy cuz of rank i should still be able to see it listed and chack the ship data .. biggest I saw was the 74 gun SOL !!
 
I have made a new version, please see attached. It doesn't crash the game, but other than that it is completely untested, because I haven't had time for testing. <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

The workings of the mod should generally remain the same, but I recoded it a bit to make tweaking it in BuildSettings.h a bit easier. Please have a look at it and see if it works as intended. Be sure to check out the BuildSettings.h toggles.

Also: The code for the disabeling of pirate navy ships has been outcommented, because it didn't work anyway.

<!--quoteo(post=160424:date=Sep 4 2006, 08:05 AM:name=PirateSam)--><div class='quotetop'>QUOTE(PirateSam @ Sep 4 2006, 08:05 AM) [snapback]160424[/snapback]</div><div class='quotemain'><!--quotec-->
Let me start with saying THANKS alot for getting the shipintic.file in old format , now I can tweak ships data to my likikng <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
You're welcome. I noticed that it was messed up, so I returned it to how it should look. If you find any other file that is messed up in the same way, please say so and I'll fix it.

<!--quoteo(post=160424:date=Sep 4 2006, 08:05 AM:name=PirateSam)--><div class='quotetop'>QUOTE(PirateSam @ Sep 4 2006, 08:05 AM) [snapback]160424[/snapback]</div><div class='quotemain'><!--quotec-->
Am at lvl21 and rank 5 with england but still couldn't see any class 1 ship in redmond shipyard ?? even if i can't buy cuz of rank i should still be able to see it listed and chack the ship data .. biggest I saw was the 74 gun SOL !!
<!--QuoteEnd--></div><!--QuoteEEnd-->
That must be your hard luck. I did nothing about the availability. I just made it so you can't buy them, but you should still see them. Just try a couple more times. Eventually you should find some. I have seen some in Redmond two days ago when testing the previous version of the mod.
 
I think the SY_RPG_STYLE forces upon that absolutly NO class 1 ships will ever be sold.

Maybe... I cant recall if it relies on the other BS.h toggle or not lol! Its been too long since I noticed! (I never bought a class 1, I would always hijack one, much more fun, and rewarding to steal a ship lol)
 
I recall having seen Class 1 ships in the Redmond shipyard this Saturday when testing my mod.

There was already a Realistic Ship Purchase mod, but that turned off the buying of navy ships completely. I have removed the code for that version and replaced it with my new code. The effect should be the same with the only difference that now you CAN buy navy ships if you have a LoM and a high enough rank with the nation.

If you installed my mod, but didn't start a new game, the old Realistic Ship Purchase mod will still be active as well, preventing you from buying navy ships completely. To solve that without having to start a new game, just press the reinitialization button. I hope that works. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Sorry people, version 2 didn't work. I tested it now and I forgot to add some ")"s. STUPID! <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
Please find attached version 3, which is the same as version 2 with the only difference that this one does work. I have been unable to test if increasing in rank actually does make new ships available due to a lack of time, but having a LoM does unlock some ships. Sombody please test what happens when increasing in rank.

Note: I only tested with England. Somebody should also check one of the other nations, I think.

I have seen no Class 1 ships today either. I might have been mistaken; maybe there INDEED are no Class 1 ships in shipyards. If that is so, can they be put back in? Why would they be gone? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->I think the SY_RPG_STYLE forces upon that absolutly NO class 1 ships will ever be sold.<!--QuoteEnd--></div><!--QuoteEEnd-->

Thats true Pieter , if u look in buildsettings_h.file under the shipyard where it determine ships availablity , lvl per class ..etc u will see somethine like class 1 ships is no longer available for sale in the end of the 5th or 6th line .

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->That must be your hard luck. I did nothing about the availability.<!--QuoteEnd--></div><!--QuoteEEnd-->

I did a change here from 8 to 0 and got all type of ships listed but no class 1 yet !!

U might try yrself and try buying class 1 ship when u get time to play and let us know if u find any .



lol , i posted in same time as u , heheh
 
<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Request to Hook or any other coder:</b><!--sizec--></span><!--/sizec-->
Can you please have a look at attached interface file and try to figure out why my pirate code isn't working? The idea is that if you are at a pirate shipyard, then the shipyard will not sell you pirate design ships unless you're a pirate yourself. It's not working yet though. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
<!--quoteo(post=160958:date=Sep 9 2006, 03:21 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Sep 9 2006, 03:21 PM) [snapback]160958[/snapback]</div><div class='quotemain'><!--quotec-->
...The idea is that if you are at a pirate shipyard, then the shipyard will not sell you pirate design ships unless you're a pirate yourself. ... <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

Is that a good idea to implement while we are still not able to get rank or even a LoM from Pirates?
 
Pieter: You've got a test in there for every nation. If your relation with that nation is better than RELATION_ENEMY the ship is marked as pirate and you cannot buy it.

But Pirate nation is included in this test. It's in the list twice, once checking to see if you're less than friend, again to see if you're greater than enemy. Both tests will make the pirate ship unavailable.

Since you will always be (character < friend || character > enemy) (this is the effect of that block of code) every ship will be marked as pirate.

Perhaps removing the test for pirate > enemy will fix the problem.

Hook
 
To Hook: I think I've thought up a way how to fix this. I am going to try now.

To Petros: With my previous versions of the Realistic Ship Purchase mod, the selling of navy ships would ALSO be limited at pirate shipyards. That was not good, because like you said: You can't get a pirate LoM. However, with the version I am now working on, the entire "LoM and rank required" part of the mod will NOT apply to pirate shipyards. Instead you just need to be a pirate yourself, which can be acchieved by joining the pirates by talking to Isenbrandt Jurcksen. I will make sure my code works as intenden, then make a release of it. If it turns out to not be working well gameplay-wise, I will either try to fix that or drop the idea entirely. I think it will work just fine though. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
Back
Top