Good news!!

A new patch to help with Turn processing is available you can find patch and more info in this topic
testers needed for Turn processing patch

HOW TO: Reduce the number of Palettes

HOW TO: Reduce the number of Palettes; support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5754
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: HOW TO: Reduce the number of Palettes

Post by thunderchero » Sun Nov 03, 2013 9:17 pm

first redownload the Lower palette files it has been updated.

Lower palette files

I am no longer getting "Texture Index 328 Not Found" error
brianmcfa wrote:One other thing I noticed that may or may not be related: When I replaced a ship, it sometimes didn't remove the old graphics files. For instance, if I replaced the vanilla Galor with any other ship I noticed that the palettes still went up. When I went into the textures section and scrolled down the file list, the old Galor's .gif files were still there and so was its palette. I would have to remove them manually to get rid of that palette.
it is not related, The only way to say it is adding ships with UE is for beginners. If you add ships manually you have much better control what gif that get replaced. when adding with UE it tries to replace files used by that model but if a new model only uses 1 texture it will replace the ***_a.gif and do nothing with the ***_b.gif and ***_c.gif. if a new model has more than 3 gifs it will use the 3 gifs assigned to the old model but will create a new gif prefix for the other gifs instead of using the unused gifs.

When I add ships I always have a list of used and unused gifs and use every possible gif before I started creating new gif prefixes. But this requires manual entering hex code for phasers and assigning textures to hobs and setting palette for each texture added.

Plus requires a lot of planning and renaming of file prefixes.

thunderchero

User avatar
brianmcfa
Lieutenant-Commander
Lieutenant-Commander
Posts: 134
Joined: Tue Aug 03, 2010 2:00 am
Location: Concrete, WA

Re: HOW TO: Reduce the number of Palettes

Post by brianmcfa » Sun Nov 03, 2013 10:36 pm

That seemed to fix the problem. I have also developed a workaround to the stray palette issue. Instead of adding ships, I made all of the ships use the Calamarian Cloud (excluding the monsters). This left me with 9 ships in use. I then deleted all the vanilla ship files instead of replacing them and this took out the b and c .gif files as well. I am now down to 17 palettes and the game is playable but all ships look like a cloud. Now I'll start adding ships back and see what happens.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5754
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: HOW TO: Reduce the number of Palettes

Post by thunderchero » Sun Nov 03, 2013 10:53 pm

That is a work around yes, but just be warned.

once your mod is created into an installer, all the vanilla gifs will still be present in the stbof.res. This is not a problem unless the user loads your mod with UE and uses the "register texture" button. (they should not need to do this if adding ship with UE only when a ship is added manually with new texture prefix.)

thunderchero

User avatar
brianmcfa
Lieutenant-Commander
Lieutenant-Commander
Posts: 134
Joined: Tue Aug 03, 2010 2:00 am
Location: Concrete, WA

Re: HOW TO: Reduce the number of Palettes

Post by brianmcfa » Sun Nov 03, 2013 11:04 pm

thunderchero wrote:That is a work around yes, but just be warned.

once your mod is created into an installer, all the vanilla gifs will still be present in the stbof.res. This is not a problem unless the user loads your mod with UE and uses the "register texture" button. (they should not need to do this if adding ship with UE only when a ship is added manually with new texture prefix.)

thunderchero
Okay, I think that's a problem I can still move forward with. I may end up adding back some of the vanilla ships anyway if I need a type and don't have a permission for a redone model.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5754
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: HOW TO: Reduce the number of Palettes

Post by thunderchero » Sun Nov 03, 2013 11:15 pm

brianmcfa wrote:I may end up adding back some of the vanilla ships anyway if I need a type and don't have a permission for a redone model.
who are you waiting on permission from?

thunderchero

User avatar
brianmcfa
Lieutenant-Commander
Lieutenant-Commander
Posts: 134
Joined: Tue Aug 03, 2010 2:00 am
Location: Concrete, WA

Re: HOW TO: Reduce the number of Palettes

Post by brianmcfa » Sun Nov 03, 2013 11:33 pm

thunderchero wrote:
brianmcfa wrote:I may end up adding back some of the vanilla ships anyway if I need a type and don't have a permission for a redone model.
who are you waiting on permission from?

thunderchero
You've been the only one I've asked so far! :lol: Basically I'm still doing a lot of experimenting right now. I'm seeing what ships will work together and from what eras. Since you posted in another post that most requests for ship use is granted, I anticipated that there wouldn't be an issue and probably jumped the gun by adding so many in my first attempt. I'm going to be a little more methodical this time.

User avatar
Zweistein000
Ensign
Ensign
Posts: 21
Joined: Mon Apr 19, 2010 2:00 am

Re: HOW TO: Reduce the number of Palettes

Post by Zweistein000 » Mon Apr 24, 2017 8:42 am

After a bit (a lot) of googling I managed to do this with GIMP. You have to follow the exact same order and have to know how to work with the program, but it works.

EDIT: and don't tick trim the palette of the unused colours :P

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5754
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: HOW TO: Reduce the number of Palettes

Post by thunderchero » Mon Apr 24, 2017 6:04 pm

Zweistein000 wrote:
Mon Apr 24, 2017 8:42 am
After a bit (a lot) of googling I managed to do this with GIMP. You have to follow the exact same order and have to know how to work with the program, but it works.

EDIT: and don't tick trim the palette of the unused colours :P
if you have some time, could you explain procedure you used with GIMP maybe some images and details?

thunderchero

User avatar
Zweistein000
Ensign
Ensign
Posts: 21
Joined: Mon Apr 19, 2010 2:00 am

Re: HOW TO: Reduce the number of Palettes

Post by Zweistein000 » Thu Apr 27, 2017 11:30 am

thunderchero wrote:
Mon Apr 24, 2017 6:04 pm

if you have some time, could you explain procedure you used with GIMP maybe some images and details?

thunderchero
Right. Here's the procedure. Assuming we've fund the textures whose palettes we want to merge and have successfully extracted them from the stbof.res. Here I'm using cs__a.gif, cs__b.gif, cf_a.gif and cf_b.gif.

cs__a.gif
Image

cs__b.gif
Image

cf_a.gif
Image

cf_b.gif
Image

We realise that cs__b.gif has the widest spectrum of colours. There for we open cs__b.gif in GIMP first (Figure 1). After this we proceed to open another texture in GIMP. Since cs__a.gif already uses the same palette we open cf_a.gif (Fegure 2).

Figure 1:
Image

Figure 2:
Image

To convert the "cf_a.gif" to the colour palette of "cs__b.gif" we first click on the "image" drop-down menu and under "mode" select RGB (Figure 3). After we've done that we open up the same drop-down menu and under "mode" select "Indexed.." (Figure 4).

Figure 3:
Image

Figure 4:
Image

A menu appears looking like Figure 5. In there we first uncheck "remove unused colurs form colourmap". This is important otherwise the GIMP will remove any unused colours form the palette, meaning that the palette of "cf_a.gif" wil not be identical to the palette of "cs__b.gif". In other words we would have achieved nothing as we would have replaced the old palette with an entirely new (yet unused) one.

Figure 5:
Image

After we have unchecked "remove unused colurs form colourmap" we select "use costum palette" we clock on the button located left of the "web". A drop-down menu of re-existing palettes appears. We scroll up the menu unit we find "Colourmap of image #1" and select that as our palette (Figure 6).

Figure 6:
Image

After this we click convert. If we were successfulm, "cf_a.gif" is no using the colour palette of "cs__b.gif" (Figure 7).

Figure 7:
Image

The final step is to export the image form GIMP. To do this we simply click "file" in the top left corner and then "overwrite cf_a.gif" (Figure 8).

Figure 8:
Image

We can now close the GIMP window for "cf_a.gif". The same process must be repeated for "cf_b.gif", after which they need to be imported back into stbof.res and their colourmap must be changed to the same colourmap as "cs__b.gif" in ultimate editor itself (under "Edit->graphics->textures").

And if at this point you're asking yourself why GIMP, when photoshop is better, the answer is that GIMP is free software.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5754
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: HOW TO: Reduce the number of Palettes

Post by thunderchero » Fri Apr 28, 2017 11:47 pm

Zweistein000 wrote:
Thu Apr 27, 2017 11:30 am
And if at this point you're asking yourself why GIMP, when photoshop is better, the answer is that GIMP is free software.
Free options is always a good thing to have, I just wish other programs had a free options.

Thanks for your tutorial.

thunderchero

Post Reply

Return to “HOW TO: Reduce the number of Palettes”

Who is online

Users browsing this forum: No registered users and 1 guest