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

Period-accurate sail textures

That looks good to me. Perhaps add an option for pirates to use black non-emblemed sails as well? The rest should be a good variety. :onya
 
I was just about to ask that. I think I'll change the Pirate Black Sails to have three levels, ranging from 0 (no), 1 (plain black) to 2 (emblemed black).
 
Find attached my first version of the completely rewritten sail selection code. I set it up as simply as I could figure out.
Please try it, especially on different settings, and see how it works.

Not included, but also done, is to make any ship's pre-set sails in ships_init.c take preference over anything else.
So you won't ever have the Flying Dutchman without the Flying Dutchman sails anymore. That'll solve a nice long-standing issue with that one! :woot

BTW: I am not convinced the new GeraldSails lines have quite the intended effect when emblems are in use.
See attached screenshot. Looks rather weird with two sets of emblems on each mast.... :facepalm
 

Attachments

  • kam_generalfunctions.c
    12.5 KB · Views: 119
  • kam_selectsails.c
    34.2 KB · Views: 106
  • Emblemed.jpg
    Emblemed.jpg
    122.2 KB · Views: 105
OK, I'll take a look when I can. :onya

The GeraldSails lines were organised to look good with reeflines on later ships, and emblems on the earliest ones. The point being that emblems are unrealistic in the later periods.
I don't think emblems look too bad on examples like yours, though. It could be worse. :shrug
 
Hmm... Looks weird to me. But whatever people are happy with is fine by me. I don't usually use emblems anyway.

Maybe for ships where people report that it looks bad, we can put an if-statement on their GeraldSails lines to use the old ones IF emblems are enabled?
That way, you'd have the best of both worlds. Would require some further coding, but we could do so only when people complain. :wp
 
That's what I wanted to avoid, but if we do get complaints as you say, then the extra code can be added.
Of course, the obvious solution is not to use emblems on certain ships, but that's up to the player.
 
Yep. So long story short: It's fine as-is and if people have a problem with it, we can always reconsider. And who knows... maybe nobody has a problem with it and we made things nice and simple! :woot

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

Just so everybody knows, I set things up so that ALL Spanish and Portuguese ships ALWAYS use Pure White Sails in the first two Periods, also with Weathered Sails selected.
On ships that support emblems, they have their appropriate Holy Cross emblems as well. This may not be quite ideal, but was the easiest to code and I didn't feel like making things complicated just yet.

If further adjustment is wanted, let me know what should be changed. :doff
 
BTW: This is the newly rewritten Emblemed Sails selection code for random ships:
Code:
    // Default Sail Settings
    switch(selected_sails)
    {
        case 1: // Weathered, no emblems
            tempstring = "sail_weathered_common.tga";
        break;
        case 2: // Pure White, no emblems
            tempstring = "sail_purewhite_common.tga";
        break;
        case 3: // Pure White, with emblems
            tempstring = "sail_purewhite_nation" + char.nation + ".tga";
        break;
        // default, with emblems
            tempstring = "sail_whole_white_nation" + char.nation + ".tga";
    }

    // Additional Sail Settings
    switch(sti(char.nation))
    {
        case SPAIN:
            switch(selected_sails)
            {
                case 1: // Weathered, no emblems (historically accurate!)
                    if(GetCurrentPeriod() <= PERIOD_THE_SPANISH_MAIN)
                        tempstring = "sail_purewhite_nation" + char.nation + ".tga";
                break;
                case 2: // Pure White, no emblems (historically accurate!)
                    if(GetCurrentPeriod() <= PERIOD_THE_SPANISH_MAIN)
                        tempstring = "sail_purewhite_nation" + char.nation + ".tga";
                break;
            }
        break;
        case PIRATE:
            switch(PIRATES_BLACK_SAILS)
            {
                case 1: // Plain Black
                    tempstring = "sail_whole_black_plain.tga";
                break;
                case 2: // Emblemed Black
                    if(!CheckAttribute(char,"pirateflag")) { char.pirateflag = makeint(rand(QTY_LOGOSAILS_WHOLE_BLACK)); }
                    tempstring = "sail_whole_black_pirate" + sti(char.pirateflag) + ".tga";
                break;
            }
        break;
        case PORTUGAL:
            switch(selected_sails)
            {
                case 1: // Weathered, no emblems (historically accurate!)
                    if(GetCurrentPeriod() <= PERIOD_THE_SPANISH_MAIN)
                        tempstring = "sail_purewhite_nation" + char.nation + ".tga";
                break;
                case 2: // Pure White, no emblems (historically accurate!)
                    if(GetCurrentPeriod() <= PERIOD_THE_SPANISH_MAIN)
                        tempstring = "sail_purewhite_nation" + char.nation + ".tga";
                break;
            }
        break;
        case AMERICA:
            switch(selected_sails)
            {
                case 3: // Pure White, with emblems (not available!)
                    tempstring = "sail_purewhite_common.tga";
                break;
                // default, with emblems (not available!)
                    tempstring = "sail_whole_white_plain.tga";
            }
        break;
        case PERSONAL_NATION:
            switch(selected_sails)
            {
                case 3: // Pure White, with emblems (not available!)
                    tempstring = "sail_purewhite_common.tga";
                break;
                // default, with emblems
                    tempstring = "sail_whole_white_nation10.tga";
            }
        break;
    }
Does that look about right? I tried to write it in such a way that it is fairly understandable and people can easily expand the template to be a bit more fancy.
 
That looks well organised to me. Nice and simple does the trick. :cheers

One thing I probably forgot to mention was that reeflines shouldn't be used in the first two periods either, so the "common" texture should be replaced with "plain" for those periods.
Is that easily doable?
 
Like so?
Code:
    // Default Sail Settings
    switch(selected_sails)
    {
        case 1: // Weathered, no emblems
            if(GetCurrentPeriod() <= PERIOD_THE_SPANISH_MAIN)
                tempstring = "sail_weathered_plain.tga";
            else
                tempstring = "sail_weathered_common.tga";
        break;
        case 2: // Pure White, no emblems
            if(GetCurrentPeriod() <= PERIOD_THE_SPANISH_MAIN)
                tempstring = "sail_purewhite_plain.tga";
            else
                tempstring = "sail_purewhite_common.tga";
        break;
        case 3: // Pure White, with emblems
            tempstring = "sail_purewhite_nation" + char.nation + ".tga";
        break;
        // default, with emblems
            tempstring = "sail_whole_white_nation" + char.nation + ".tga";
    }
 
Looks like that will do the trick. Is that a typo under case 2, though? "purewhite_plain.tga" is missing the "sail_" part in front.
 
Typo indeed. Thanks for catching that one! Modified in the above code excerpt too, in case somebody was intending to use it. :doff
 
I tried this and the national emblems are working better than ever on my current fleet. They hardly ever worked before.
 
What didn't work before then? :shock

Or do you mean that most ships wouldn't display them? Indeed one of the things we changed is to allow basically ANY ship to display emblems.
You can even select them on Luggers, though those don't actually display them because they don't have the required GeraldSails lines.
But in any case, at least FINALLY people will be able to use emblems on all ships they want without an arbitrary class limit intended to prevent from them displaying wrong on some ships.

Now all we need is to test various ships and various ship types on various settings and various combinations of settings.
 
What I mean is that sometimes they would show and sometimes they would not show. Or they would only show a certain country. That is why I only flew the crosses.
 
Strange. I know there were a few bugs in the original code, related to personal sail emblems and perhaps US emblems, but they should never have appeared/disappeared at will.
Anyway, it should be better now. Provided I didn't make any new mistakes. But I think Armada already caught the one I did make... :wp
 
But I think Armada already caught the one I did make... :wp
Nope, I just caught another myself for the US emblemed sails. This is the fixed code:
Code:
        case AMERICA:
            switch(selected_sails)
            {
                case 1: // Weathered, no emblems
                break;
                case 2: // Pure White, no emblems
                break;
                case 3: // Pure White, with emblems (not available!)
                    tempstring = "sail_purewhite_common.tga";
                break;
                // default, with emblems (not available!)
                    tempstring = "sail_whole_white_plain.tga";
            }
        break;
Otherwise you get "sail_whole_white_plain.tga" as the emblemed sail on all except Pure White, with emblems. :facepalm
 
Are the reef-lined sails on the USS Essex correct? I understood they should be on the lower set of sails?
 

Attachments

  • Reeflines.jpg
    Reeflines.jpg
    70.9 KB · Views: 101
Erm, apparently not. Its yard naming convention appears to be upside-down, and I forgot to take that into consideration. xD
Easy to change, though. It should have GeraldSails lines for reys a22, c2, a33, c3, c4 and b4.
 
Back
Top