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

New custom sails and a minor fix for Kieron (screenshots)

iamthejarha

Landlubber
As much as I've been screwing around with textures and ships, and customizing everything I've got the skill to customize, I decided I wanted some sails specifically for my character. To that effect, I started working on an emblem, but very quickly realized that my creativity doesn't extend to pirate logos. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":blah:" border="0" alt="tongue.gif" />

My girl wanted to see what `blood-red` sails look like in the game, and it gave me this idea. I think they turned out well, and even though they're lighter in the game than I created them, I still think they pose an ominous picture on the horizon:

<img src="http://goheels.sytes.net/redsails.jpg" border="0" class="linked-image" />

<img src="http://goheels.sytes.net/redroger.jpg" border="0" class="linked-image" />


These sails were my original intention. Black sails, with the basic Jolly Roger emblem, but in crimson instead of the usual white. The effect is striking, in my opinion.

<img src="http://goheels.sytes.net/blackroger.jpg" border="0" class="linked-image" />


Took me forever to get the transparency done on the torn version..

<img src="http://goheels.sytes.net/tornroger.jpg" border="0" class="linked-image" />


Most of my time was actually spent digging through the files used in Kieron's "Sails Select" mod, so I could add my sails into the selection process. In the process of testing, I discovered a slight error in calculations with the mod; when you set "refShip.EmblemedSails.nationFileName" for a ship in Ships_init.c, the mod doesn't read it properly and instead uses the default sails for your nation. This only happens on ships of class 3 and above, but the fix is simple. It's in the file "BattleInterface.c" (or "procGetSailTextureData.c" if you've installed Kieron's PA! Sails), in the "procGetSailTextureData()" function. I just added this little snippet beneath Kieron's code:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->      if(CheckAttribute(shref,"EmblemedSails.normalTex"))

     {

   BI_objRetValue.normalTex = shref.EmblemedSails.normalTex;  // so if the ship has a normal sails type defined in ships_init.c (e.g. xebec br), that takes precedence

     }



// added by iamthejarha -->      

     if(CheckAttribute(shref,"EmblemedSails.nationFileName"))

     {

   nationFileName = shref.EmblemedSails.nationFileName;

     }

// added by iamthejarha <--<!--c2--></div><!--ec2-->

That little addition fixes it all right up. Note that this problem <i>only</i> occurs when you explicitly set a ship's sail data in Ships_init.c, <i>a la</i> Duke's Xebec Barbarossa, but it's still a handy fix to have. Anyway, these are my first attempts at custom sails, so feedback is welcome! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/pirate2.gif" style="vertical-align:middle" emoid=":p:" border="0" alt="pirate2.gif" />

(Side note: the ship in the picture is a version of the Mefisto, recolored by me to remove the crimson from the hull and make it suitable for "regular" pirate use.)
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> Great!!!
 
hee hee hee, wicked. I'd like to see black skulls on red sails... and meaner looking skulls, at that. All splintered bones and scowls and frowns.

When can I have the sails and the fix?
 
<!--QuoteBegin-alan_smithee+--><div class='quotetop'>QUOTE(alan_smithee)</div><div class='quotemain'><!--QuoteEBegin-->hee hee hee, wicked. I'd like to see black skulls on red sails... and meaner looking skulls, at that. All splintered bones and scowls and frowns.

When can I have the sails and the fix?<!--QuoteEnd--></div><!--QuoteEEnd-->

I'd considered making the Jolly Roger on the red sails black instead of white, but it was somewhat difficult to see in the original texture, so I scrapped it. I may try it again, but it'll probably replace the `white-on`-red--I'm not looking forward to the prospect of adding another sail. <img src="http://www.ganotherapyusa.com/extras/modding.gif" border="0" class="linked-image" />

The thing about making this available for download is that there was quite a bit of editing involved, and it <i>requires</i> Kieron's PA! Sails pack. To distribute my sails, I'd also have to distribute his--the way the sail code's written, there's no other way to do it.

As far as the fix goes, if you've installed Kieron's PA! Sails pack, open <span style='color:red'>PROGRAMBATTLE_INTERFACEprocGetSailTextureData.c</span> if you haven't) and find this line of code:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->         if(CheckAttribute(shref,"EmblemedSails.normalTex"))

        {

           BI_objRetValue.normalTex = shref.EmblemedSails.normalTex;      // so if the ship has a normal sails type defined in ships_init.c (e.g. xebec br), that takes precedence

        }<!--c2--></div><!--ec2-->

Once you find it, simply add this bit of code directly beneath it.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// added by iamthejarha -->        

        if(CheckAttribute(shref,"EmblemedSails.nationFileName"))

        {

           nationFileName = shref.EmblemedSails.nationFileName;

        }

// added by iamthejarha <--<!--c2--></div><!--ec2-->
That's the only edit you need to make the fix.
 
VERY nice! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
oh i've been usurped <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> thanks iamthejarha. i had made the change in an updated procGetSailTextureData.c which is sitting on my hard disk. (honest! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" /> )

in your version of procGetSailTextureData.c have you also got the bit of code which makes class 4 or lower ships have 'unmodded' white sails rather than the 'posh' white sails i made? it's just a few lines of code:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->  if (BI_objRetValue.normalTex == "shipskam_nologosails.tga")      // if plain white sails have been selected as the 'normal' texture...

 {

     if (GetCharacterShipClass(char) > 3)        // ...and the ship is class 4 or lower...

     {

   BI_objRetValue.normalTex = "shipsparus_common.tga";  // ...then it gets the "common" sails rather than the "nologosails" (which match the emblemed sails)

     }

 }<!--c2--></div><!--ec2-->

if not, then you can add it in if you want. it goes just after the section you've just edited, after the <b>}</b>, just before the following lines:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->  st = GetCharacterShipType(char);

 if(st!=SHIP_NOTUSED)<!--c2--></div><!--ec2-->

if you'd like, we could make red sails selectable on the f2 menu too?
 
<!--QuoteBegin-Kieron+--><div class='quotetop'>QUOTE(Kieron)</div><div class='quotemain'><!--QuoteEBegin-->oh i've been usurped <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> thanks iamthejarha. i had made the change in an updated procGetSailTextureData.c which is sitting on my hard disk. (honest! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" /> )

in your version of procGetSailTextureData.c have you also got the bit of code which makes class 4 or lower ships have 'unmodded' white sails rather than the 'posh' white sails i made? it's just a few lines of code:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->  if (BI_objRetValue.normalTex == "shipskam_nologosails.tga")      // if plain white sails have been selected as the 'normal' texture...

 {

     if (GetCharacterShipClass(char) > 3)        // ...and the ship is class 4 or lower...

     {

   BI_objRetValue.normalTex = "shipsparus_common.tga";  // ...then it gets the "common" sails rather than the "nologosails" (which match the emblemed sails)

     }

 }<!--c2--></div><!--ec2-->

if not, then you can add it in if you want. it goes just after the section you've just edited, after the <b>}</b>, just before the following lines:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->  st = GetCharacterShipType(char);

 if(st!=SHIP_NOTUSED)<!--c2--></div><!--ec2-->

if you'd like, we could make red sails selectable on the f2 menu too?<!--QuoteEnd--></div><!--QuoteEEnd-->

I was wondering about those sails and why they weren't used. I didn't have that update, but I do now! Thanks, Kieron! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />

Actually, I'm already ahead of you on the selectable sails. It took me about an hour of editing, but I used your PA! Sails pack as a reference for which files to edit, then added my sails in the hard way. There's <i>got</i> to be an easier way to add sails to the F2 screen, LOL. But they're in there, and they work.
 
ya, that interface needs expanding a bit now. if we were to do it professionally (heh <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" /> ) then you should be able to select:

  • not torn
    • white
      • plain
      • with nation logo
      • with pa logo
      • with pirate logo
      • with custom logo
        • red
          • plain
          • with nation logo
          • with pa logo
          • with pirate logo
          • with custom logo
            • black
              • plain
              • with nation logo
              • with pa logo
              • with pirate logo
              • with custom logo
                • torn
                  • white
                    • plain
                    • with nation logo
                    • with pa logo
                    • with pirate logo
                    • with custom logo
                      • red
                        • plain
                        • with nation logo
                        • with pa logo
                        • with pirate logo
                        • with custom logo
                          • black
                            • plain
                            • with nation logo
                            • with pa logo
                            • with pirate logo
                            • with custom logo


                              • so the interface needs a bit of updating, reckonz me <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" /> i think as well as the image scroller, there should be a set of buttons above it to select between 'not torn' and 'torn', and a set to select between 'white,' 'red' and 'black' (using that little green tick symbol like on the options interface). each time one of those buttons was selected the fillscroll() function would `re-run` and update the images on display... ehhh i'm thinking out loud. shall i do that? or do you want to do something to it yourself? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />

                                also, do you think sails should only be changeable at a shipyard? and for a fee? originally i allowed sails to be changed without visiting a shipyard (since you used to be able to change your nation at any time, and your sails would change automatically when you did that anyway)... but after i've changed the governor dialogues, you'll only be able to change your nation by talking to them, so maybe you should only be able to change your sails at the shipyard... hmm... or at least only at port. whaddya think?
 
Hmm... What if you set up an extra dialog at the shipyards to <i>sell</i> extra sails sets, like the tailor's shops sell extra player skins? You could change the sails at any time the same way you do now (interface changes notwithstanding), but you'd have to buy the new sails first.

As far as the flags go, I agree that there should be a game reaction to switching colors (and therefore a <i>reason</i> to do so), but I'm not sure it should be done through the governors' dialogs. After all, any ship captain can run up any colors he likes at sea--who's there to stop him? I was thinking that the interface you've set up already is perfect, but it should be set up so that when you change colors, other ships react as though you belong to the nation whose flag you're flying. So, if you're hostile with the Spanish and French and fly a British flag, flying a <i>French</i> flag would make you neutral to Spanish and French ships, and hostile to British (so you'd better remember to switch colors before sailing into a British port!).

What you're describing should, in my opinion, be tied to the Letter of Marque. So rather than talking to a governor to change <i>flags</i> and taking a rep hit, you talk to the governor to <i>work</i> for that nation, and take a rep hit for switching allegiances.
 
you're right, real captains would be able to change colours at any time. the problem with that is that you can then get away with sacking as many british ports and sinking as many british ships as you like, flying french colours, then you can happily switch to british colours and sail right into a british port. i think that takes away an important part of the gameplay.

does anyone know how this would have worked in real life? i seem to remember someone said there were secret flag sequences that ships would fly, so for example french ships would recognise if they were really french or not. or perhaps that was just for military ships?
 
yes probably because in Hornblower he captuerd a french ship and some how found his way in to a Spanish fleet and they raised these flags and attacked Hornblowers ship or somthing like that

Cool Sails
 
<!--`QuoteBegin-Kieron`+--><div class='quotetop'>QUOTE(Kieron)</div><div class='quotemain'><!--QuoteEBegin-->you're right, real captains would be able to change colours at any time. the problem with that is that you can then get away with sacking as many british ports and sinking as many british ships as you like, flying french colours, then you can happily switch to british colours and sail right into a british port. i think that takes away an important part of the gameplay.[/quote]

Excellent point, that would create a loophole that would allow people to sack towns, then change flags and sail into port without incident. I was trying to figure out a way to separate ship relations from town/fort relations, which is the only way my idea would work, but I haven't come up with anything yet. Maybe when a player first changes flags, you could use a function to place the original "nation" in a new attribute, then set the new flag's nation in a <i>different</i> attribute: ships use one, forts and towns use the other. Could something like that work? I'm still not too familiar with the codebase, so I'm more or less throwing out ideas right now.
 
As a `quick-and`-dirty method, you could tie it to the pc's fame.
If getfame(pchar) > some_number, you're "known" as the player, and uses the player's current relations. If not, then you're not recognized and use the generic nation's status.

With some random factor too.
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->does anyone know how this would have worked in real life? i seem to remember someone said there were secret flag sequences that ships would fly, so for example french ships would recognise if they were really french or not. or perhaps that was just for military ships?<!--QuoteEnd--></div><!--QuoteEEnd-->


The complicated fineries of the ruse de guerre. First off it depends what time period you are talking about. As we move from 1500 to 1900 they become more complex, harder to break, but also much harder to succeed at.

During the early period of the age of sail (say 16th century and early 17th) the ruse de guerre was commonly nothing more than sailing under false colors. However, there were a variety of variations on it. On one occasion a Spanish Treasure ship heading back to Cadiz, heavily loaded with silver, spotted a French Privateer before the Frenchie spotted them. They rose the Cross of St. George and pretended they were English knowing that at this point in time the French and English (as far as the Caribbean was concerned) were at peace. They also brought extra planks and yards ondeck and painted them all black. The yards the aligned along the side of the hull like cannon and the planks they dressed in the sailor's extra clothing. The hope was that from far off and through a glass the Spanish merchant might be mistaken for a large, heavily armed, and heavily crewed `man-of`-war. Apparently it worked, the Frenchie turned tail and ran.

The important thing to take away from that story, however, is not that the Spaniard sailed under false colors outright, but that he chose something other than the French flag. You see, had he put up the French flag, maybe that French privateer would have sailed away for a real target, but maybe he would have come down to say hello.

On the opposite side of the dabloon, as you might say, there are tails of the early English Sea Dogs under Spanish colors sneaking into Cadiz and burning anchored Spaniards. It all depended on the situation.

As we move closer to the present the Ruse became more complicated. Nations developed secret signals which prevented the enemy from pretending from the same country. You might sail with the Portuguese flag from your mizzen, but your main top, and foretop have pendants and flags with the proper signals. Usually the signal was more than just a simple pendant or flag. You might, raise a red pendant, lower it, fire one gun to windward, which was to be answered by two guns to winward in close succession followed by a dip in the colors at the mizzen. This way you knew exactly if they were of your nation or not. These signals would change all the time too, so the enemy had the damndest at trying to fake it. If they captured the signal book on the other hand, they might be able to fake it until the new signals came out. They changed fairly regularly, but I can't recall the general interval.

So, with the new system, If I were a Spaniard, I would not fool a British `man-o`-war by flying the Union Jack. They would smoke me right away. However, if I flew the flag of little old Napoli, that was a different story. While nations allied with each other might not attack each other, they certainly didn't trust each other enough to share secret signals.

By the 18th century every vessel at sea was always considered hostile until it was absolutely certain they were not... hence the modern designation between the words "contact" and "bogie." A contact is exaclty what the word implies... we have made contact with another vessel. Once the identity of that vessel has been verified it is either upgraded to "bogie" (a bad guy) or "friendly" (a good guy). A sail on the horizon could mean anything. Perhaps one of the scariest things imaginable to small `man-o`-war alone out at sea, was to spot a single unidentified sail on the horizon... and then hear a gun. The gun was generally a signal to the rest of the squadron still sunk below the horizon that they have spotted a contact (unless the single gun was in itself a ruse de guerre, trying to make it look like there was a squadron of ships below the horizon, when in fact there was not).

The truly successful ruse de guerre involved so much more than simply sailing under false colors. Ships were easily recognizable and remembered. The odds were always against success. It is for that reason that Aubrey, in the film Master and Commander, goes to such great lengths to hide his true identity towards the climax of the film. Simply sailing under false colors would never answer... everything had to appear like they were a whaler, form flag, paint, speed, to smoke, uniforms, and above all, seamanship. Seamanship was absolutely crucial. Merchantmen should never appear too good, and `men-of`-war should always seem `navy-like`. Hence he says, "Your handling of the sheets is to be lubberly, and `un-navy` like."

How does this translate into POTC?

Ideally the flag change option could be done by pressing enter and scrolling over to the command "raise flag" which would then open a sub heading with a number of flag options; at least all the flags in the game, more would be great. You would select what ever flag you want and then the flag would immeadiately change and on the map, the color of the vessels would change accordingly. You would draw closer. The player's luck and leadership skills balanced against the luck and leadership of the enemy captains would determine how close you could get before they find out who you are. If you are saling under the colors of their nation, then they would get a bonus in seeing through your disguise.

Before you open fire you must hit enter again and choose your real colors. If you don't, your reputation takes a large hit. If you do, a very small bonus.

I don't know how you could it, but it would also be great if there was a way for enemy vessels to also sail under false colors, with again your leaderships and luck against their leadership and luck determining when you figure out who they really are.

Of course, there would have to be some sort of modifier to account for squadron size. The larger the squadron is, the less likely the ruse should work.

Like Nathan suggested, Fame would be an excellent modifier as well. If there were someway to create "reoccurring" enemy encounters and characters always using the same ship... etc (kinda like encounter an Ace in flight simulators... with their skills updating etc as time goes on).


Perhaps one feature that would really make this more interesting, would be to add two new items buyable from shops and street merchants: flags and uniforms. You would have to buy flags before they appear in your flag library. By making them expensive, the player would have to think long and hard about which flag to get. Uniforms would allow you to outfit your crew like the enemy to assist in the ruse. I think this would have to be a superficial change, something equipable in the inventory, and not an outright skin change since before you board you would be obliged to remove the disguise.

I hope I have helped make the ruse de guerre a little bit easier to understand, although I would not be surprised if I in reality just confused everyone further.

JMV
 
That was great JMV 575! You should submit it as an article for the main page. Very interesting and a lot of fun. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />

I like how they characterize Aubrey's efforts in disguising his ship in the Master and Commander series; it's either amusing the enemy or entertaining the enemy. It's even funnier when they're trying to explain to Dr. Maturin why they are trying to make their Brig, which is not a Brig, look like a Snow. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Yes, I echo Sir Christopher's comment about making this an article for the main page articles collection - VERY well done, and quite an interesting subject! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<!--`QuoteBegin-iamthejarha`+--><div class='quotetop'>QUOTE(iamthejarha)</div><div class='quotemain'><!--QuoteEBegin-->Hmm...  What if you set up an extra dialog at the shipyards to <i>sell</i> extra sails sets, like the tailor's shops sell extra player skins?  You could change the sails at any time the same way you do now (interface changes notwithstanding), but you'd have to buy the new sails first.[/quote]

I've been thinking about this idea, and rather than setting it up like the tailor's shops are set up (all `dialog-based`), what if an interface was built that looks sort of like a cross between the main shipyard interface, and the current F2 screen interface? Unfortunately, I haven't deciphered the web of files and functions that goes into the design of an interface, so I'm not sure where to begin, but the backend shouldn't be all that difficult. At the same time, the entire sails selection backend could be reworked to use an array or the like, instead of being built on the case basis that it is now. It'd be a pretty sizable undertaking, but it could definitely work.
 
<!--`QuoteBegin-jmv575`+--><div class='quotetop'>QUOTE(jmv575)</div><div class='quotemain'><!--QuoteEBegin-->I hope I have helped make the ruse de guerre a little bit easier to understand, although I would not be surprised if I in reality just confused everyone further.[/quote]

absolutely not! i feel all enlightened <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />

i really like the idea about flags/uniforms being equippable in the inventory, or being activated via the battle interface. unfortunately i don't know a way of making the flag change instantly (currently it only changes when you exit to worldmap and `re-enter` the battle interface). does anyone know how that could be done? if it can't be done, no matter, we can achieve this by having an icon that appears on the screen as long as the false colours are raised (like the hourglass that appears while you have `fast-forward` activated).

perhaps there should be a new `relation-states` on the battle interface, in addition to friendly, neutral and hostile: "hasn'`t-got`-`close-enough`-`to-decide`-yet" ( <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> ). raising false colours would only have an effect if the enemy fleet was still in the undecided state. to make <i>that</i> work, we need to figure out how to call a function in the code when a ship comes within a certain distance of your ships (that distance would be decided by a number of things, including the enemy's sailing skill and the size of your ship, i suppose).

when the enemy comes within that distance, the function would run, and the enemy fleet would go from 'undecided' to one of the other states, depending on your nation (if you aren't famous, or if you have a letter of marque) or your personal relation with that nation (if you are famous). if you have raised false colours, however, the function would calculate whether the enemy was 'convinced' by your colours, according to your ideas (whether it's their flag or someone else's you've raised, the size of your fleet, your sailing and luck skills, your fame etc.), and the enemy would go from 'undecided' to one of the other `relation-states` based on that. do you think there should be a rep hit for trying to fly false colours and being unsuccessful?

tied in with that, the distance at which you are 'free' to escape to the map screen should be increased a <i>lot</i>. the distance at which you start encounters has been increased, but not the 'escape' distance, so currently you begin an encounter outside of the escape distance and can escape to the map screen as soon as battle has begun, which seems a bit pointless!

ooooh this is so interesting, what does anyone else think of that?
 
Back
Top