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

Limiting ships to certain nations

I replaced EVERYTHING. I DO have the mast where the flag is supposed to be attached; the flag just doesn't show up. And to make this even weirder: If I anchor, I DO see the flag on my anchored ship. Just not in 3D sailing mode. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
now that you mention it, i do remember my flag going missing once in a while. i've got no idea why it happens, but the last time i noticed it i was sailing a bermuda sloop. i'm sure it was there a while before.
 
Thomas the Terror set some more <i>.nation</i> attributes for ships and according to him, this mod is actually working like it should! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
I was thinking, perhaps we should also add something like a skipnation attribute so that we can exclude some ships from some nations.

Will you look at this:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if(CheckAttribute(rShip, "startyear")) { if(sti(rShip.startyear > curyear)) { continue; } }
        if(CheckAttribute(rShip, "endyear")) { if(sti(rShip.endyear < curyear)) { continue; } }<!--c2--></div><!--ec2-->Looks like the appearance and disappearance date code is already in there. We just need to set the years. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

Also I am still trying to decypher this code:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if(CheckAttribute(rShip,"skipnat"+iNation)) //so you can skip nations too
        {
            string tmp = "skipnat" + iNation;
            if(sti(rShip.(tmp))) { continue; }
        }<!--c2--></div><!--ec2-->This code seems to be intended to do the same as I tried to do here. But would it work?

And what would this code do???<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if(CheckAttribute(rShip,"Nation") && iNation != -1)
        {
            shipnation = sti(rShip.Nation);
            if(shipnation != iNation && frnd() > NatSkipChance) { continue; }
        }<!--c2--></div><!--ec2-->
HELP PLEASE! <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
Code block 1 looks good.

Code block 2 looks like it will work.

Code block 3 sets it up so that even if a ship has the correct years, there's a chance that it won't show up.

Hook
 
Hook! Nice seeing you again! How have you been doing lately? Thanks a lot for your reply! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

I am pretty sure code block 1 would work. It looks exactly the same as I had wanted to write it before I found out it was already there. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
I am not sure how to use code block 2. Should I add an attribute to each ship "refShip.skipnatPIRATE = true;" or something like that? Somehow that looks odd to me... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
Code block 3 has to do with years? <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
I thought perhaps code block 3 was meant so that a ship might be used by another country than refShip.nation if these nations are very much hostile or something like that. But I'm still a bit confused. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--quoteo(post=223015:date=Nov 24 2007, 01:04 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Nov 24 2007, 01:04 PM) [snapback]223015[/snapback]</div><div class='quotemain'><!--quotec-->Hook! Nice seeing you again! How have you been doing lately? Thanks a lot for your reply! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

Code block 3 has to do with years? <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
I thought perhaps code block 3 was meant so that a ship might be used by another country than refShip.nation if these nations are very much hostile or something like that. But I'm still a bit confused. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

I was assuming block 3 followed the other two in the same code, and the year test was already passed. Whatever else it's doing, it's skipping some ships based on a random number and the defined chance to skip that ship.

I've been off playing Sims 2, playing and modding the Orbiter space flight sim <a href="http://www.orbitersim.com" target="_blank">http://www.orbitersim.com</a> and currently working on the Steel Beasts tank sim <a href="http://www.steelbeasts.com" target="_blank">http://www.steelbeasts.com</a> Doing well, thanks. And I love your new portrait. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Hook
 
<!--quoteo(post=223015:date=Nov 24 2007, 01:04 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Nov 24 2007, 01:04 PM) [snapback]223015[/snapback]</div><div class='quotemain'><!--quotec-->I am not sure how to use code block 2. Should I add an attribute to each ship "refShip.skipnatPIRATE = true;" or something like that? Somehow that looks odd to me... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

It's converting the value of that attribute to an integer. I don't remember if "true" resolves to 1 in those cases.

Either use what you suggested, or "refShip.skipnatPIRATE = 1;"

Hook
 
If I would rewrite it like this (adding a dot):<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if(CheckAttribute(rShip,"skipnat."+iNation)) //so you can skip nations too
        {
            string tmp = "skipnat" + iNation;
            if(sti(rShip.(tmp))) { continue; }
        }<!--c2--></div><!--ec2-->Then I would have to add "refShip.skipnat.PIRATE = 1;", right? That looks a bit more normal to me. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

<!--quoteo(post=223072:date=Nov 25 2007, 03:14 AM:name=Hook)--><div class='quotetop'>QUOTE(Hook @ Nov 25 2007, 03:14 AM) [snapback]223072[/snapback]</div><div class='quotemain'><!--quotec-->I was assuming block 3 followed the other two in the same code, and the year test was already passed. Whatever else it's doing, it's skipping some ships based on a random number and the defined chance to skip that ship.<!--QuoteEnd--></div><!--QuoteEEnd-->It does follow the other two. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
What the *** IS <i>frnd()</i> anyway? I see it in the code occasionally and I have NO idea what it is, what it does and why. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
And how could iNation be -1? When the randomly generated ship is not of any valid nation?

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    if(iNation == PIRATE) { NatSkipChance = NOSKIP_CHANCE_WRONGNATION_PIRATE; }
    else { NatSkipChance = NOSKIP_CHANCE_WRONGNATION; }<!--c2--></div><!--ec2-->It looks like it has something to do with the ship being used by the wrong nation. So I *think* that when you set <i>refShip.skipnat</i>, a ship is DEFINITLY not used by that particular nation and if you set <i>refShip.nation</i>, that ship will be more often used by that nation than by other nations, but there IS a chance that it is used by the "wrong" nation. This chance is based on <i>frnd()</i>, whatever that might be. Is it some sort of "float random" function, by any chance? That generates a random number between 0 and 1? <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
<!--quoteo(post=223113:date=Nov 25 2007, 06:05 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Nov 25 2007, 06:05 AM) [snapback]223113[/snapback]</div><div class='quotemain'><!--quotec-->What the *** IS <i>frnd()</i> anyway? I see it in the code occasionally and I have NO idea what it is, what it does and why. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

From Keywords.c

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->float frnd(); //returns random number from 0.0 to 1.0<!--c2--></div><!--ec2-->

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->And how could iNation be -1? When the randomly generated ship is not of any valid nation?<!--QuoteEnd--></div><!--QuoteEEnd-->
I never figured out why someone would set iNation to -1. It's obviously an invalid nation, but I searched and could never figure out why it was set to -1 or why you'd want to have it that way. I remember finding places where iNation was -1 where it should have been a valid value.

Hook
 
Ah! Thanks a lot! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
I think there were once experiments with adding a "Catalonian" nation as sort-of neutral thing. But that was before my time. There's still some references to it in the code though. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
oh man, you should definately add the Americans. And then if you do what was suggested about making FDF a more military based colony and make America aligned with France, you'll definately get me based out of FDF (besides, I've always liked the town itself, I just hardly ever go there because I'm almost always at ends with the French <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> ).

And of course, it does depend on time period, but all of the warships in potc are from the napoleanic era or only a few decades earlier. Frigates were quite new in the 1700s (wasn't it actually a German ship that was the first "frigate"?). All of the ships of the line are much too big to be from any other time period before the mid 1700s to napeleanic era. The <i>Royal Soveriegn</i> was a good example of the change of warships. I don't care what is said by anyone, the ships (with the exception to the ghost ships), the weapons, etc. from the movies were all napoleanic era. Ships like the <i>Dauntless</i> were only found in the later part of the 18th century. Regardless of what the game developers/hollywood intended the series takes place in the late 1700s.

Also, Spain probably had the largest (though most unweildly) ships of the line. And though Spain is known for the galleon, it was actually England who is responsible for the improvement over carracks. Up until the developement of the frigate, nearly all large ships fielded by any nation were essentially galleons. The Spanish galleons were so well known because it was the Spanish galleons that were full of gold. <img src="style_emoticons/<#EMO_DIR#>/treas1.gif" style="vertical-align:middle" emoid=":treas" border="0" alt="treas1.gif" /> But I can see how you could make at least a treasure galleon exclusive to Spain. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> I know we don't have any, and it's probably impossible, but one ship that was pretty much exclusive to Spain (among major powers) during the Napoleanic era was the galley.

If you want a ship to be exclusive to France, it would a lugger. The English for one did not use luggers, and it was actually widely recognized as a French ship. And you can make all French designed warships better than everyone elses (except America) because they were (the problem was that England had better, more experienced seaman, better gun crews, better discipline). But then that would of course unbalance the gameplay.

You could also make some kind of schooner a Dutch exclusive ship. And the fleut was dutch designed, but it was so good that other nations used it too. If I'm not mistaken, <i>Queen Ann's Revenge</i> was actually an overhauled fleut. I for one wouldn't mind the fleut (or at least some versions of the fleut) to be Dutch exclusive (even though I never play as the Dutch).

I really like the idea of improving FDF though and especially adding America.


<img src="style_emoticons/<#EMO_DIR#>/monkeydance.gif" style="vertical-align:middle" emoid=":mi" border="0" alt="monkeydance.gif" />
 
i fully agree and can confirm what he says. if you want a small typically dutch ship, use the cutter. the dutch design is a little different, but almost identical. the corvette is definately from the 1800's, and i say so because it has rounded bulwarks on the bow. the rounded bulwarks didn't excist yet in the 1700's. you're right about luggers. in fact, it was called a chasse-marée, as i mentioned earlier. it was used as a smuggling vessel and hunter. concerning england using galleons, i must say that england made by far the most beautiful ones. most of the time, at least. there was of course the occasional ugly duckling. here's an example of the english galleon, the ark royal:

<a href="http://users.triera.net/poldolfi/galerija-maket-ladij/ark-royal.jpg" target="_blank">http://users.triera.net/poldolfi/galerija-...j/ark-royal.jpg</a>
 
Americans would be fun. We do have some Colonial type ships in the game that we might use. Not that easy to add them though. Worth a try when somebody wants to though. Does anyone still have a good American flag for flagall.tga.tx? We can see if we can put an additional nation in the game and put their ships on the worldmap.
 
The "Betsy Ross" flag, a recognizable flag for generic use. (1776)
<img src="http://thepatrioticgentleman.com/God-Bless-America/images/First-American-Flag-by-Betsy-Ross.gif" border="0" class="linked-image" />

Here's the "Serapis" flag, thought to be the flag of choice for John Paul Jones and an excellent 'Naval ensign'. (1779)
<img src="http://www.crwflags.com/fotw/images/u/us-sera2.gif" border="0" class="linked-image" />

The "Star Spangled Banner", good for Napoleonic use. (1814)
<img src="http://www.historical-flag.com/downloads/starspangledbanner13.gif" border="0" class="linked-image" />

So it sort of depends on what point in American history we want to put in the game... Pre and early revolution? Heart and end of the revolution? Or War of 1812?
 
Let me rephrase my question: Does anyone still have a flagall.tga.tx file with the America flag on it? We can just use whatever we already have available. Provided that somebody is willing to experiment with this.
 
I have the file that replaces the character's flag with a Star Spangled Banner, the British have a red RN ensign, and the French the Tricolour... only problem is the attachments section won't let me upload the file... says its the wrong type.
 
and if we did add America, it would be cool to bolster up FDF. I finished reading "Captain from Conneticut" by C.S. Forester this semester and I really think it would work well to have the Americans based out of the FDF. Maybe we could eventually put an American Ambassador in the governor's home or something that you could get a letter of marque from.

<img src="style_emoticons/<#EMO_DIR#>/sailr.gif" style="vertical-align:middle" emoid=":sail" border="0" alt="sailr.gif" />
 
Adding the Americans to Falaise de Fleur would save us the trouble of adding an American colony to the game AND would add something interesting to the French colony. I think each and every colony should have something special that no other colony has. Examples:
- American ambassador on Falaise de Fleurs
- EITC headquarters in Redmond
- VOC headquarters at Douwesen
- Naval base at Antigua

<!--quoteo(post=223716:date=Nov 29 2007, 02:20 AM:name=Commodore John Paul Jones)--><div class='quotetop'>QUOTE(Commodore John Paul Jones @ Nov 29 2007, 02:20 AM) [snapback]223716[/snapback]</div><div class='quotemain'><!--quotec-->I have the file that replaces the character's flag with a Star Spangled Banner, the British have a red RN ensign, and the French the Tricolour... only problem is the attachments section won't let me upload the file... says its the wrong type.<!--QuoteEnd--></div><!--QuoteEEnd-->Try to put it in a ZIP-file. You can't upload .tga.tx files straight to the forum.
 
Back
Top