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

Included in Build Interface Screenshots for Ships

Armada

Sea Dog
Staff member
Administrator
Project Manager
3D Artist
Storm Modder
I have now uploaded the PSD files for all four interface screenshot grids here: ShipInterfaceScreenshotPSDs.7z

For whoever wishes to take charge of these:
  • Each individual screenshot must be 256x256 pixels.
  • Traditionally, each ship was captured sailing from left to right, towards the camera, against a plain daytime background.
  • Once edited, export the image to TGA format and remove the "_layered" string from the filename. In GIMP, make sure RLE Compression is OFF when exporting.
  • Traditionally, I reduced the brightness of the whole image by 10% before saving as a TGA file, so the images don't look too bright when using ENB in the game.
  • Compare with existing TGA.TX versions in the game to see which settings to use in TX Converter.

Original post below:
Ingame screenshots sound better to me. However, without the code support in place, there's not much that can be done yet.
In fact, somebody already DID make screenshots of a lot of ships and put them on the FTP, which we could try to use for the most part.
Remains to be seen if/when we can get the code support done though.
Did anyone ever figure out the coding, here? I've been nosing around (out of curiosity) and I think I get how it currently works now. :dance
Am I right in saying the 'refShip.BI.pic and .tex' lines determine the ship's interface pictures?
And that each image in 'ship-16.tga.tx' is 128x128 pixels?
Surely this is a step in the right direction... :?

Note: This thread was split off from a discussion in Additional Ship Balancing: http://forum.pirates...post__p__381736
 
Last edited:
Hehe... definitely a step in the right direction:

[attachment=5639:Ship_interface_pic.jpg]

I added a 128x128 version of an image of Victory to ships-16.tga.tx, then put this line in pictures.c:
Code:
picture = Victory1,0,384,128,512
Where (0,384) is the top left pixel of the image, and (128,512) is the bottom right.
It turned out a bit bright, though, and set all other ships in that file to have a black background (which won't matter if we replace them with screenshots!) :woot

As for the battle interface image (at sea), I don't yet know where the code is for that. :mm Anyone else know?

EDIT: I've even managed to merge the image with a copy of 'EmptyBorder.tga.tx', which works really well.
 
That is really cool! I wonder how we can adjust the system though so that putting in hundreds of pictures will work. And preferrably easily.
I tried to convince the game to load a ship-specific texture from RESOURCE\Textures\INTERFACES\Ships for the interfaces,
but unfortunately didn't manage to get that working because I don't understand the interface coding enough.
Still, I believe it shouldn't be impossible.
The same would be good for character portraits also: do away with the numbers and use the model-names instead!

As for your texture work causing all backgrounds to be black: that is something we can fix.
All we need to do is retain the original alpha map, which I think I know how to do.
But as you point out, once we use textures for all ships, that will make no more difference.

For the battle interface, there's some related code in PROGRAM\BATTLE_INTERFACE\BattleInterface.c:
Code:
// KK -->
BattleInterface.CommandTextures.list.t10.name = "battle_interface\ships_16.tga";
BattleInterface.CommandTextures.list.t10.xsize = 4;
BattleInterface.CommandTextures.list.t10.ysize = 4;

BattleInterface.CommandTextures.list.t11.name = "battle_interface\ships_1.tga";
BattleInterface.CommandTextures.list.t11.xsize = 1;
BattleInterface.CommandTextures.list.t11.ysize = 1;

BattleInterface.CommandTextures.list.t12.name = "battle_interface\ships_2.tga";
BattleInterface.CommandTextures.list.t12.xsize = 1;
BattleInterface.CommandTextures.list.t12.ysize = 2;

BattleInterface.CommandTextures.list.t13.name = "battle_interface\08shs_02.tga";	//Mod Ship by Duke Surak'nar 17/08/2003
BattleInterface.CommandTextures.list.t13.xsize = 1;
BattleInterface.CommandTextures.list.t13.ysize = 1;

BattleInterface.CommandTextures.list.t14.name = "battle_interface\ships_32.tga";
BattleInterface.CommandTextures.list.t14.xsize = 4;
BattleInterface.CommandTextures.list.t14.ysize = 4;
// <-- KK
I'm not sure how this part of the code works, but I'm sure Pirate_KK does.
He is quite busy with other things these days, but I'm sure he'd be willing to explain a thing or two to us if need be. :yes
 
That is really cool! I wonder how we can adjust the system though so that putting in hundreds of pictures will work. And preferrably easily.
I tried to convince the game to load a ship-specific texture from RESOURCE\Textures\INTERFACES\Ships for the interfaces,
but unfortunately didn't manage to get that working because I don't understand the interface coding enough.
Still, I believe it shouldn't be impossible.
True, there must be a way. I was wondering, since pictures.c displays this:
Code:
[SHIPS16]
sTextureName		= ships-16.tga
wTextureWidth		= 1024
wTextureHeight		= 512
... followed by a list of models and coordinates, would it be possible to have individual texture files, containing a single ship's image, coded here, with the resolution (128x128) then the model name and coordinates?

As for your texture work causing all backgrounds to be black: that is something we can fix.
All we need to do is retain the original alpha map, which I think I know how to do.
But as you point out, once we use textures for all ships, that will make no more difference.
Well what I was going to do was temporarily give all the other ship images a textured background (copies of 'EmptySea.tga.tx'), so that they look like they used to.
But if you can do the alpha mapping, that might make more sense.
However, I've had to darken the entire image to make the Victory screenshot appear less blindingly bright in-game. :facepalm
So maybe it would be a good idea to get together all the screenshots previously taken by others, and see what we can achieve?

For the battle interface, there's some related code in PROGRAM\BATTLE_INTERFACE\BattleInterface.c:
Yes, I noticed that, but didn't know what to make of it.
What confuses me is that the 'refShip.BI.pic' is a number; where is that number linked to a section of 'ships_1, 2, 16 or 32.tga.tx'?
I've searched high and low, but seen nothing declaring what the numbers mean. :?
 
... followed by a list of models and coordinates, would it be possible to have individual texture files, containing a single ship's image, coded here, with the resolution (128x128) then the model name and coordinates?
That might be possible. I'm just a bit cautious of doing that for 200+ ships because of something that happened with the sounds in the game.
The sounds were originally also handled through INI alias files and then we found that when we'd add too many, some sounds would start dropping out.
I'm not sure if this would happen to the pictures as well, but it might which would put a lot of hard work to waste. :facepalm

Well what I was going to do was temporarily give all the other ship images a textured background (copies of 'EmptySea.tga.tx'), so that they look like they used to.
But if you can do the alpha mapping, that might make more sense.
You're editing the original file, right? I think all you need to do is to convert the file from TGA back to TX, using settings that retain the alpha maps.
This can be done in the TX Converter; just don't use R5G6B5 but one of the options that has an alpha map mentioned.
This has to be done in the bottom part of the conversion dialog under "Output texture format for with alpha channel images",
though to be sure I always set the top and bottom selection to the same to ensure it does what I want.

The only problem you'll be left with then is that the picture you removed might still have the old alpha map,
so you might get a screenshot with the transparency of the old picture on top.
To fix this, you'd need to actually edit the alpha map, but that isn't too hard if you can find the button for it.
What program do you use? I've got Adobe Photoshop CS2.

However, I've had to darken the entire image to make the Victory screenshot appear less blindingly bright in-game. :facepalm
So maybe it would be a good idea to get together all the screenshots previously taken by others, and see what we can achieve?
I don't quite understand why you would need to do anything with the brightness of anything.
Unless ENB is the culprit in making it brighter, beause the regular game shouldn't do that.

Yes, I noticed that, but didn't know what to make of it.
What confuses me is that the 'refShip.BI.pic' is a number; where is that number linked to a section of 'ships_1, 2, 16 or 32.tga.tx'?
I've searched high and low, but seen nothing declaring what the numbers mean. :?
I suspect the number might be an index number used to refer to the picture, rather than the game looking for the correct picture name.
In fact, I suspect that the picture names in the INI files do not matter whatsoever and you might as well call them Ship1, Ship2, etc.
 
That might be possible. I'm just a bit cautious of doing that for 200+ ships because of something that happened with the sounds in the game.
The sounds were originally also handled through INI alias files and then we found that when we'd add too many, some sounds would start dropping out.
I'm not sure if this would happen to the pictures as well, but it might which would put a lot of hard work to waste. :facepalm
So maybe we should make files which group images, say 10 per file, so that we have only 20-ish files. :shrug

You're editing the original file, right? I think all you need to do is to convert the file from TGA back to TX, using settings that retain the alpha maps.
This can be done in the TX Converter; just don't use R5G6B5 but one of the options that has an alpha map mentioned.
This has to be done in the bottom part of the conversion dialog under "Output texture format for with alpha channel images",
though to be sure I always set the top and bottom selection to the same to ensure it does what I want.
That's the problem; I didn't change any settings when converting back to TX. I'll change that, then.

The only problem you'll be left with then is that the picture you removed might still have the old alpha map,
so you might get a screenshot with the transparency of the old picture on top.
To fix this, you'd need to actually edit the alpha map, but that isn't too hard if you can find the button for it.
What program do you use? I've got Adobe Photoshop CS2.
I didn't remove any images, I just added the screenshot to the file, under the rest of them, just for the experiment.
So hopefully alpha maps shouldn't be an issue for the new image?
I'm just using GIMP 2.6, nothing fancy. ^_^

I don't quite understand why you would need to do anything with the brightness of anything.
Unless ENB is the culprit in making it brighter, beause the regular game shouldn't do that.
That's probably it, since ENB tends to affect the menus as well as the game interface. :facepalm

I suspect the number might be an index number used to refer to the picture, rather than the game looking for the correct picture name.
In fact, I suspect that the picture names in the INI files do not matter whatsoever and you might as well call them Ship1, Ship2, etc.
But that still doesn't explain which images the numbers represent (although we can find that out in-game) and where that link is made, therefore I don't know how we can set numbers to new images for the battle interface. There must be a file somewhere which contains that info. :mm
 
So maybe we should make files which group images, say 10 per file, so that we have only 20-ish files. :shrug
Well, the original files group 16 in one picture, which I reckon should work fine.

I didn't remove any images, I just added the screenshot to the file, under the rest of them, just for the experiment.
So hopefully alpha maps shouldn't be an issue for the new image?
I'm just using GIMP 2.6, nothing fancy. ^_^
Based on a quick internet search, it looks like GIMP also allows you to do work with alpha maps.

But that still doesn't explain which images the numbers represent (although we can find that out in-game) and where that link is made, therefore I don't know how we can set numbers to new images for the battle interface. There must be a file somewhere which contains that info. :mm
It looks like it works exactly the same as the item interface pictures. See here for an example of that:
Code:
[ITEMS_1]
sTextureName	= items1.tga
wTextureWidth	= 512
wTextureHeight	= 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512
As you can see, the "names" here are just "itm1" to "itm16" and that's the same numbering as the ships would have.
Eg. the first line would be "1" and the last would be "16". The numbering is sequential starting from 1 at the upper left,
4 is upper right and then 5 is the first picture on the second line and 16 is the bottom right corner.
 
As for the battle interface, we could decide against using screenshots for that,
since that would give away a very accurate ship type and possibly nationality too and defeat the purpose of the Realistic Game Mode.
Though we could change the coding to hide this in Realistic Game Mode, we could just go to easy way and not bother with it?

As for ship pictures, you might be able to use these that Doober made: http://www.pyratesahoy.com/build/Ship%20Pics/
They're a bit old now, some ships will be missing and others have the interface interfering with it, but it's better than nothing, no?
 
Well, the original files group 16 in one picture, which I reckon should work fine.
The current ships-16 file actually contains 19 (excluding Victory, but including the Galeoth, Warship and Lineship).
And it seems as though that 1024x512 file can fit up to 32 images at once. Surely that would be best to conserve space?

Based on a quick internet search, it looks like GIMP also allows you to do work with alpha maps.
Yes, I've noticed that feature, but I don't fully understand how to use alpha maps, or lots of other things in GIMP (most of which I don't need to use anyway).

It looks like it works exactly the same as the item interface pictures.
[...]
As you can see, the "names" here are just "itm1" to "itm16" and that's the same numbering as the ships would have.
Eg. the first line would be "1" and the last would be "16". The numbering is sequential starting from 1 at the upper left,
4 is upper right and then 5 is the first picture on the second line and 16 is the bottom right corner.
I see, but I'm yet to find which file contains that for the Battle Interface images. It certainly isn't 'pictures.ini'. :?

As for the battle interface, we could decide against using screenshots for that,
since that would give away a very accurate ship type and possibly nationality too and defeat the purpose of the Realistic Game Mode.
Though we could change the coding to hide this in Realistic Game Mode, we could just go to easy way and not bother with it?
This would solve the above problem! :yes
And I suppose the main aim of the screenshots in the interface is to make repainting easier in-game, anyway.

As for ship pictures, you might be able to use these that Doober made.
They're a bit old now, some ships will be missing and others have the interface interfering with it, but it's better than nothing, no?
Thanks, I'll have a look there. :onya
But what kind of bugs me is that I've once again managed to give myself another project to do by default, since I became involved in it. :facepalm
(That's not to say I'm not willing to do it, before you say anything :rolleyes: )
Perhaps I can get someone else to do some of the work as well? It involves a long process, which is best shared out, I reckon.
 
The current ships-16 file actually contains 19 (excluding Victory, but including the Galeoth, Warship and Lineship).
And it seems as though that 1024x512 file can fit up to 32 images at once. Surely that would be best to conserve space?
We might be able to go up to 1024x1024 and fit 64 ships in the same imagine. Maybe we could go even further to 2048x2048 and make it 256 ships.

But what kind of bugs me is that I've once again managed to give myself another project to do by default, since I became involved in it. :facepalm
(That's not to say I'm not willing to do it, before you say anything :rolleyes: )
Perhaps I can get someone else to do some of the work as well? It involves a long process, which is best shared out, I reckon.
I know what you mean; it IS a lot of work and sharing out would be much better.
The question though is where we'd find someone willing and capable to help out. I would be willing for sure, but I've also got some other large projects still to do,
including but not limited to removing some ships, then cleaning up the ships' textures folder and finishing the location-specific loading screens.
 
We might be able to go up to 1024x1024 and fit 64 ships in the same imagine. Maybe we could go even further to 2048x2048 and make it 256 ships.
:shock Now that could get confusing, but if done properly might just work. And it may even save us some space, putting the images into one file.
One thing to note is that the new images need borders, so I could make a HUGE template with borders, and we could then fill in the gaps with the separate images (on a layer behind the template).
Is that worth doing, or are we not going to bother with a border?

I know what you mean; it IS a lot of work and sharing out would be much better.
The question though is where we'd find someone willing and capable to help out. I would be willing for sure, but I've also got some other large projects still to do,
including but not limited to removing some ships, then cleaning up the ships' textures folder and finishing the location-specific loading screens.
Of course; you've got enough on your plate as it is, I wouldn't expect you to have to do this. :no
But until someone volunteers, I'll do what I can. And I'll also try to fit in the occasional rigging improvement, too. ;)
 
:shock Now that could get confusing, but if done properly might just work. And it may even save us some space, putting the images into one file.
One thing to note is that the new images need borders, so I could make a HUGE template with borders, and we could then fill in the gaps with the separate images (on a layer behind the template).
Is that worth doing, or are we not going to bother with a border?
I do think borders could look nice. Though we might be able to place those on top automatically through code.
Alternatively, make a template with borders that have holes in them later and then we can stick it on top of the ship pictures.
I think that's what I did for item interface pictures once...
 
Well believe it or not, I've made the HUGE 2048x2048 grid of 128x128 borders already.
At least this way, we've got plenty of space for every ship and about 20 more, all in one file! :woot
But now we need to decide on some sort of order; do we put the ships in the file according to their order in ships_init or RESOURCE/MODELS/Ships?
 
Their order in ships_init.c was once meant to be by class, but I think by now it's become quite messy again.
The order of the model folders would make sense, were it not that we'll probably rename some,
remove some others and there might be ships added inbetween as well.
Truth be told, I have no idea how to come up with a system for this that'd truly make sense.
I suppose it doesn't matter too much, as long as the code will match up and things appear correctly ingame.
 
Their order in ships_init.c was once meant to be by class, but I think by now it's become quite messy again.
The order of the model folders would make sense, were it not that we'll probably rename some,
remove some others and there might be ships added inbetween as well.
Truth be told, I have no idea how to come up with a system for this that'd truly make sense.
I suppose it doesn't matter too much, as long as the code will match up and things appear correctly ingame.
Too right! It's hard to make sense of the order in ships_init these days. :wacko:
How about the order of the ships' names in common.ini? That's not going to change much, I guess.

But anyway, before even considering that, I've only managed to pick out a handful of images, from Doober's big collection, which are potentially good enough.
I looked at:
  • Brightness
  • Size (of the ship being focussed on)
  • Angle (how much of the ship is shown)
  • Sail positions
I did notice that some of the later pictures had no interface clogging the image, but also the ships had no flags.
Do we really want that, or should we go by the original images and include flags? :?
 
Since we've made so many changes since (was the Different Flags mod even used for those pictures?), maybe we should make all-new pictures.
But that's a bigger project still. But I figure, we might as well do it right the first time instead of having to redo them in better quality later on.
 
I've got good and bad news:

Good news- I've figured out what refShip.BI.tex and .pic mean!
For BI.tex:
10 = ships_16.tga
11 = ships_1.tga
12 = ships_2.tga
14 = ships_32.tga
For BI.pic, 0 is the top left image, and the pattern continues to the right, then begins a new line etc.
This is the same for both the highlighted and normal images in the files.

Bad news- there's a slight problem with these new screenshots in the shipyard interface:

[attachment=5640:Shipyard_pic.jpg]

All the images are shifted up, to avoid the writing covering the hull in the image. This doesn't look right for screenshots with no alpha maps.
And I certainly don't want to cut out an outline for 200+ ships! :shock

EDIT: Yes, all-new screenshots might be the way forward. Any volunteers? xD:
 
I see what you mean! It seems that the pictures are rendered at square 256x256 and, as such, their top parts fall outside the boundaries.
It seems the boundaries are rendered as 256x215 (approximate), so maybe the ship pictures should match that.
Alternatively, maybe someone (Pirate_KK?) could make some adjustments to the interface code so that square pictures do render correctly.
I'll ask him to have a look at this thread.
 
Back
Top