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

Maximum image size for .tga.tx files

konradk

Privateer
Storm Modder
Storm Modeller
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> all,

I'd like to ask for advice all experienced moders who work with *.tga.tx files.

Today I have find quite interesting possibility of putting differently looking flags on a one ship. For example, a Dutch ship had a flag of Netherlands (which I wanted reserve for warships) on a foremast and Dutch WIC flag (for merchant ships) on main mast. That means that we could, for example, put ensign on one mast and pannon on another.

Unfortunately, to take full advantage of this flagall.tga.tx <b>must</b> be very wide to hold all of those flag images (for instance: 5 flags for warships + 5 flags for tradeships + 5 pennants for nations + some variations for Pirates flags with pennants + some variations of Nathaniel flag with pennants gives quite a lot of space). TX Converer supports only files of maximum image size of 2048x2048.

Do somebody knows how to override it to allow larger files?

pirate_kk
 
I see what you mean. I tried, but the TX Converter indeed didn't want to go larger than 2048x2048. But does that have to be a problem? The current flagall can't be wider than it is, but we could add more flags below the current ones. If 2048x2048 is the maximum, there is room for 130 more flags, according to my calculations. That is, of course, assuming that, somehow, you can convince the program to use the flags below the current ones. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

BTW: Might I recommend you to not test with the Dutch/WIC flags? Something odd is the matter with the Dutch flags, because the Dutch flag is misspelled in rigging.ini and isn't mentioned at all in rigging.dll. So if something works with the Dutch flag, it doesn't nescessarily mean it will work for any other flag. On the other hand, if something works for, say, the English flag, it will work for the others (except, perhaps, the Dutch).

How are you changing the flags through code? Maybe you could convince PotC to somehow use a different file instead after all? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Pieter in bermuda sloops post you tell 4096x4096 now say no more than 2048x2048? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

I made spended 3 weeks and more than 100 hours making textures and mapping to ship my file to size 4096x2048 base on what you and you say will not work? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

My heart is very sad about this or is there easy way to fix this without have to texture map ships all again a repeat?

Please help! <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Sorry about that. I didn't know about the limitations of the TX Converter. I only now heard about it and Pirate_KK is right; the TX Converter won't convert it. I am terribly sorry; I didn't know. <img src="style_emoticons/<#EMO_DIR#>/ib012.gif" style="vertical-align:middle" emoid=":cry" border="0" alt="ib012.gif" />
 
Hello,

I have figured out how to correctly display different flags on one ship(previously I had it only by coincidence when working on different flags for warships and merchants and didn't really know what happens - now I know answer to question "why").

<!--quoteo(post=147031:date=Apr 30 2006, 03:30 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Apr 30 2006, 03:30 PM) [snapback]147031[/snapback]</div><div class='quotemain'><!--quotec-->
That is, of course, assuming that, somehow, you can convince the program to use the flags below the current ones. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
I'll try to do it tomorrow. Wish me luck, please!

<!--quoteo(post=147031:date=Apr 30 2006, 03:30 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Apr 30 2006, 03:30 PM) [snapback]147031[/snapback]</div><div class='quotemain'><!--quotec-->
BTW: Might I recommend you to not test with the Dutch/WIC flags? Something odd is the matter with the Dutch flags, because the Dutch flag is misspelled in rigging.ini and isn't mentioned at all in rigging.dll. So if something works with the Dutch flag, it doesn't nescessarily mean it will work for any other flag. On the other hand, if something works for, say, the English flag, it will work for the others (except, perhaps, the Dutch).
<!--QuoteEnd--></div><!--QuoteEEnd-->
I have changed configuration to display white flag with British and Dutch WIC flag (current flag for Nathaniel) with French and it worked correctly (I sailed a bit around Oxbay and check encountered ships).

<!--quoteo(post=147031:date=Apr 30 2006, 03:30 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Apr 30 2006, 03:30 PM) [snapback]147031[/snapback]</div><div class='quotemain'><!--quotec-->
How are you changing the flags through code? Maybe you could convince PotC to somehow use a different file instead after all? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
I'll think about this if tommorow tries fail. It seems less probable than to convince program to read images from lower ranks, but who knows?

Now the only thing which stops me from starting development is that awful limitation of tga.tx image size... I'm angry like Barbossa, Blackbeard, l'Ollonais and Dawg all together! I caught myself on thinking about throwing computer through the window. I think I'm going mad. I'm SO close and only one stupid obstacle is separating me from success! I don't want to stop at this point...

Best regards,
pirate_kk
 
<img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />

pirate_kk: Yew be doin a fine thing ere matey.......now just yew em sit back fer a few Mugs o Rum, and be clearin yer head afore yew proceed......

You will do great things here, I can feel it in the Force....ooops wrong quote

Thanks for all the work.....have Faith!
 
<!--quoteo(post=147116:date=May 1 2006, 12:00 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ May 1 2006, 12:00 AM) [snapback]147116[/snapback]</div><div class='quotemain'><!--quotec-->
Sorry about that. I didn't know about the limitations of the TX Converter. I only now heard about it and Pirate_KK is right; the TX Converter won't convert it. I am terribly sorry; I didn't know. <img src="style_emoticons/<#EMO_DIR#>/ib012.gif" style="vertical-align:middle" emoid=":cry" border="0" alt="ib012.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

Pieter so sorry for panic <img src="style_emoticons/<#EMO_DIR#>/bounce.gif" style="vertical-align:middle" emoid=":b:" border="0" alt="bounce.gif" /> after i take care to resize from 4096x2048 change to 2048x2048 some look better than before and other not that much to notice differ.

Thank you Pieter for easy solve to save me many more hours work. <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<!--quoteo(post=147155:date=May 1 2006, 08:45 PM:name=pirate_kk)--><div class='quotetop'>QUOTE(pirate_kk @ May 1 2006, 08:45 PM) [snapback]147155[/snapback]</div><div class='quotemain'><!--quotec-->
I'll try to do it tomorrow. Wish me luck, please!
<!--QuoteEnd--></div><!--QuoteEEnd-->
I wish you the very best of luck! <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />

If the worst comes to the worst, you could decrease the size of the flags again, so that there will be space to add more again. Do you know how the game knows where the borders are for each flag? Does it take the width of the texture and divide it through TextureCount (<img src="style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="8)" border="0" alt="cool.gif" />?
Could you please show me the code you use to change the flags on the ships? Is there any input to the code that defines what flagfile it's using? Is there any mention of the FLAGS from rigging.ini? If there is, you might be able to change it. I don't know how to convince the game to use the line below the current flags. In pictures.ini, you can define what part of the texture is which flag, but you can only define numbers in rigging.ini and not the coordinates. <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
The key function is "procGetRiggingData()" in PROGRAM\BATTLE_INTERFACE\BattleInterface.c. It works following way: it's executed each time the flag is about to be drawn and works accordingly to values of two event data variables (n - nation code and i, which I don't know what's for). The function returns index of flag equal to that from rigging.ini. Now, if I store data about current ship in external variable I can know what type of this ship is (warship or merchant) and thus put appropriate flag. If I remember which time this function was called for a given ship I can set different flag for separate masts of the same ship (i.e. ensign and pennon).

Unfortunately I didn't find any way to set coordinates for a picture - if I do everything would be easy. That one which you mention in pictures.ini are coordinates for those small flag pictures seen over ship icons in SailTo and GiveCommand buttons. In case of flagall.tga.tx the only thing which I found was number of textures and indices in rigging.ini.

pirate_kk

PS. Fatal. When I added second row I simply got "double" flag. <img src="style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
BLAST! Then all that's left to do seems to be to decrease the size of the flag textures again. Or somehow figure out how to make the file larger, but that doesn't seem possible. <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
To all:

Do somebody have or know how to obtain source code for TX Converter? If I get it I could figure out if creating larger tga.tx files is possible and maybe change it...

pirate_kk
 
I don't even know where the TX Converter came from, whether it came from Akella or if somebody else made it (one of the Russians, perhaps?).
 
Wait... when I run the program second time with two rows of flags the british was double, but white was normal although theoretically it should be double too... I definitely must know why this occured.

pirate_kk

PS. It was only an unknown bug. I didn't see it again anymore. Or I simply saw what I wanted to see.
 
<!--quoteo(post=147208:date=May 2 2006, 01:54 AM:name=pirate_kk)--><div class='quotetop'>QUOTE(pirate_kk @ May 2 2006, 01:54 AM) [snapback]147208[/snapback]</div><div class='quotemain'><!--quotec-->
To all:

Do somebody have or know how to obtain source code for TX Converter? If I get it I could figure out if creating larger tga.tx files is possible and maybe change it...

pirate_kk
<!--QuoteEnd--></div><!--QuoteEEnd-->

iirc the tx converter was made by and original release by Akella. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
i no think they will give source code? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
good luck to your efforts! <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

I'd like to ask everyone for opinion about what to do with flags in PotC. I was about to realize a Pieter idea of different flags for mercantile shipping and warships but encountered a possibility of improving it even wider. Unfortunately the limitations of tga.tx format and/or Akella-Bethesda marketing product named Storm Engine 2 are halting me from doing this without sacrficing other aspects. So we need to decide what to do.

I only see following solutions:
1. Leave everything as is now (use Merciless Mark file).
2. Return to old sizes and it would give 16 places (5 for nation warships, 5 for nation merchants, 1 white flag, leaving 5 flags for various Pirate and Nathaniel flags).
3. Sacrifice quality a bit more and horizontally "shrink" flag images to half (I have learned how to "expand" them back in game) which would give 32 places. Then we could have 5 ensigns for warships + 5 pennons, 5 ensigns for merchants + 5 pennons, 1 white flag and:
a) 5 variations (together) for Pirate and Nathaniel flags with separate pennons for every flag;
b) 8 variations (together) for Pirate and Nathaniel flags if we decide to make universal pennon for warships and merchants;
c) more variations for Pirate and Nathaniel flags in case of universal pennon for warships, merchants and pirarte ships - how much depending of the amount of flags for Nathaniel and Pirates).

In case of options 2 and 3 I could do some research and open a new tread with proposals for different flags (as historically accurate as possible), wait some time for your suggestions and create appropriate file.

Personally I'd prefer 3b.

What would you decide?

pirate_kk
 
I would say we need at least the following flags:
Dutch
Dutch WIC (for Dutch trade vessels)
English
English navy (for English naval vessels)
Spanish
Portuguese
French
Pirate
Player's Flag

It would be nice to have less detailed versions of flags for the pennons and to have a few different flags for pirates. I personally think 3 or 4 different pirate flags would do. Most nation flags wouldn't need to differentiate; only the Dutch WIC and English navy should have completely different flags.

I personally think shrinking the flags horizontally would have the best result. Then you still have some improved quality vertically, so the quality should be better than when shrinking them to 50% of total. I'd rather have lower quality on the flags, but have more different flags than the other way around. Plus the flags are usually reasonably small and animated anyway, so lower quality doesn't show that much. It would be nice to keep slightly better quality than the stock PotC flags though.
 
<!--quoteo(post=147334:date=May 3 2006, 08:44 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ May 3 2006, 08:44 PM) [snapback]147334[/snapback]</div><div class='quotemain'><!--quotec-->
Most nation flags wouldn't need to differentiate; only the Dutch WIC and English navy should have completely different flags.
<!--QuoteEnd--></div><!--QuoteEEnd-->

I'd like to give Spain different flags too - it had large navy and they used various flags, AFAIK.

pirate_KK
 
I am loathe to loose Natahiel's Perosnal colors and heartily endorse Pieter's idea/promise? epxressed elsewhre to change it something more appropriate. The eassiest thing for me to give up is some the priate flags. I never sale as a priate and I like the histroical pirate flags the more contemporary ones can go.

For British Merchants are you thinking of the East India Company or something else?
 
<!--quoteo(post=147337:date=May 3 2006, 08:52 PM:name=Jason)--><div class='quotetop'>QUOTE(Jason @ May 3 2006, 08:52 PM) [snapback]147337[/snapback]</div><div class='quotemain'><!--quotec-->
For British Merchants are you thinking of the East India Company or something else?
<!--QuoteEnd--></div><!--QuoteEEnd-->

I don't know what symbol of the East India Company looked like yet...

I'll search some available sources of information regarding the subject of markings used in navy and mercantile shipping aroud 1690. I want to wait a bit until I got some response, develop a code when I have free time and create graphics when software side of this project is working. When I finish looking for flags from the era I'll publish them in new thread and everyone will have opportunity to submit remarks and suggestions.

pirate_kk
 
Back
Top