aliens

Author Topic: Palettes for XCOM in GIMP/Paintshop format  (Read 104438 times)

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #30 on: June 19, 2014, 07:31:42 am »
Paintshop Pro plays nice with palettes, and it still does all the way up to X5. I would've thought that photoshop would too with the correct settings.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #31 on: June 22, 2014, 01:21:35 am »
Someone asked for TFTD palettes so figured I'd post them here too:

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #32 on: July 13, 2014, 03:05:05 am »
The bottom color line (that "green-ish/blue-ish" grey) of the Battlescape palette is usable for battlescape stuff, right ?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #33 on: July 13, 2014, 03:29:51 am »
the last 16 colors are greyish
see last line in image to ufo-battlescape https://falkooxc.pythonanywhere.com/palconvert
it can be used for all things that do not appear in ufopedia
handob,floorob,armor (inventory sprite has its own image do not use last 16 colors)
only bigobs can appear in ufopedia but there are exceptions like corpses (autopsy has its own image use research palette) or TANK-weapon-image

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #34 on: July 13, 2014, 09:42:15 am »
cool. thanks for the answer

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #35 on: July 24, 2014, 12:46:49 am »
Thanks to the "X-Com graphics in 30 Minutes" guide provided by Moriarty and SubSuper, I am now master of palettes! :D Thanks guys.

I guess I'll post the mod soon. It's nothing big, but maybe someone will use it.

Hello to all... As an X-Com veteran (I bought that game back in 1995, and played a LOT with it till very recent years), I just started to play OXC and its built in modding posibilities. This game is like an old dream came true! X-Com! Moddable! Thanks to everyone involved in this marvellous project...

I wanted to try to mod something in the game, and for my second project I would like to ask for some help...

My first project was to introduce a new Ruleset for a set of improved HWPs, inspired by the Xcomutil "Improved Ground Tanks" option present in the vanilla game ( I will upload it in the correct place).

My second project, which is almost finished was to add a HE ammo clip for the Sniper Rifle (I decided to base all of my work on OpenXcom with the Final Mod Pack added, which is also a blast!).
I could modify the ruleset file without problem, but the problem appears when I want to include a new image for that clip... I just wanted to use the regular ammo clip and change some yellow pixels in it for some red ones. I used Paint.Net, but when the file was viewed in game, the new clip did not look as intended. I think this has something to do with color palettes...

So, here is the question: which sofware can be used to modify graphics files and then be able to include in the game without problem? I currently use Paint.Net or the GIMP...

By the way, could please someone tell me where to find the "X-Com graphics in 30 Minutes" guide provided by Moriarty and SubSuper which was metioned in this same thread?

Thanks for the help pals! :-)

PS: Here are two images atteched, showing the problem I stumbled on...
« Last Edit: July 24, 2014, 12:54:27 am by guille1434 »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #36 on: July 24, 2014, 01:00:34 am »
paint.net is not useful for palette based images
gimp seems to make problems
i like https://www.aseprite.org/ its simple for simple changes

no idea where a this guide is

Offline Gifty

  • Colonel
  • ****
  • Posts: 138
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #37 on: July 24, 2014, 01:05:08 am »
Gimp is fine as long as you switch to indexed colors and apply the X-Com palette before you do anything else, and reapply it when you're done just for good measure.

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #38 on: July 24, 2014, 01:45:20 am »
I could modify the ruleset file without problem
Perhaps is it better to create your own ruleset which will overrule what you need, avoiding you to have to modify FMP anytime it is upgraded
Just name it FMPAddon.rul so that it appears after FMP.rul in mod list, and be sure you always load it after FMP (eventually toogle FMP off/on, then toggle FMPAddon off/on ; or check mod sequence in options.cfg)

So, here is the question: which sofware can be used to modify graphics files and then be able to include in the game without problem? I currently use Paint.Net or the GIMP...
 are two images atteched, showing the problem I stumbled on...
I am absolutely not expert, so others will give you right answers to this question

Anyway, I can try to give you a work around that should allow you to begin your modifications until having all information you asked

Work around :
- make a copy of a valid GIF or PGN => This will load the correct palette and correct background
- rename it, lets say MyFileName.PNG for further explanation
- open it with GIMP, cut existing pixels, then save it. WARNING ! Do not use "save" or "save as" menu options but "File > Overwrite MyFileName.PNG" [not sure as I translate it from french]
- eventually resize it if needed
- eventually fill it with background color (right click option : Edit > Fill In with BG color Ctrl+.) [not sure as I translate it from french] or copy and paste existing background color pixels
- if you don't want to redraw from scratch, you can then open your "bad" file, and copy and paste colored pixels

Do not forget to test it in game as soon as possible before dealing with other images, in order to to be sure it works as you want
« Last Edit: July 24, 2014, 01:51:07 am by Aldorn »

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #39 on: July 24, 2014, 03:11:59 am »
Guys: Thanks for the prompt answers and abundant help!

Falko: I will try Aseprite, it looks loke a nice small software piece, I hope it is more manageable to me than GIMP... :-)

Aldorn: Thanks for the detailed workaround, I will try that method also and then choose the one that suits better to me...

And also, you mentioned the idea of making a "Custom Ruleset" which I also think is a better approach to modding, the problem was that I did not know how the different rulesets loaded in the game (which one overwrote which other). But you mentioned some important info bits, please confirm if I understood them correctly:

1) .rul files present in the Rulesets folder are loaded in alphabetical order, so "A.rul" file will modified or overwritten by "B.rul" and this by "C.rul" etc...

2) .rul files are loaded in the order that is showed in the ruleset list that is generated in the options.cfg file...


Are those two facts true? Do any one of those two facts override the other?

Thanks again to all!!! :-)
« Last Edit: July 24, 2014, 07:28:03 am by guille1434 »

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #40 on: July 24, 2014, 11:54:05 am »
Aldorn: Thanks for the detailed workaround, I will try that method also and then choose the one that suits better to me...
It is just a work around, it is better to follow recommendations from others modders

1) .rul files present in the Rulesets folder are loaded in alphabetical order, so "A.rul" file will modified or overwritten by "B.rul" and this by "C.rul" etc...

2) .rul files are loaded in the order that is showed in the ruleset list that is generated in the options.cfg file...


Are those two facts true? Do any one of those two facts override the other?
No as there are opposite...  ;) => 2) is right

- Ruleset files are displayed in alphabetical order => So it is "better" to name ruleset files according to that point, for ergonomic purpose (also I recommended to name FMPAddon.rul for FMP.rul so that it is displayed just after)
- Ruleset files are taken into account depending on activation sequence :
   . if you activate B then A then C => B will be read, then overruled (if has to) by A then overruled (if has to) by C
   . if you activate A then B then C, then inactivate A (or A inactivated by system because of an error !) then reactivate it => first B will be taken into account, overruled by C (if has to) then overruled by A (if has to)
- Options.cfg shows you the real loading sequence => you can also change sequence order directly in Options.cfg, just beware to exit openxcom first

(if has to) : I mean, two rulesets may be totally independant ; one will overrule another, if it defines same properties ; beware that redefining a list should not add elements to previous list but replace old list by the new one, so if you want to add an element to a list, you normally have no other choice to rewrite entire old sequence and include your new element inside
« Last Edit: July 24, 2014, 12:00:46 pm by Aldorn »

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #41 on: July 24, 2014, 11:00:25 pm »
So, what determines the order in which mods are loaded by the game engine is the order in which they are activated, and that order gets registered in the options.cfg file. It makes sense to me now. Thanks for the explanation!  8)

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #42 on: July 24, 2014, 11:58:26 pm »
By the way, could please someone tell me where to find the "X-Com graphics in 30 Minutes" guide provided by Moriarty and SubSuper which was metioned in this same thread?

Sorry I haven't responded earlier, I was quite AFK.

Now, I can't remember what I meant half a year ago, but I was probably referring to this very thread... :)

Offline guille1434

  • Colonel
  • ****
  • Posts: 123
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #43 on: July 27, 2014, 01:09:38 am »
Success! I managed to use Aseprite software to my purpose! Here is the result: Explosive bullets for the Sniper rifle!  8) I finally could add a correctly shown image in the game screens!
I am working in a small Add-on mod to be used with the Final Mod Pack, and this item will be a part of it!

Thanks to all for the help!
« Last Edit: July 27, 2014, 01:14:48 am by guille1434 »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Palettes for XCOM in GIMP/Paintshop format
« Reply #44 on: August 20, 2014, 01:00:41 pm »
I'm doing tiles right now and several colors change when I export the bmp to .PCK files with PCKView.
For example the greys: the 49% one is changed to a 41% grey, the 41% itself shifts into 33%  (a value absent in the palette, which range is: 49-41-35-27%).
Some colors do this “shift to the darker” thing, while others are just slightly different.
The latter isn't a problem since the difference is almost unnoticeable; the former on the other hand can make things considerably darker, which is problematic especially on floors and walls.

This is a picture form a WIP map, upon which I've pasted the original items.

You can see how darker that roof floor has become, the metal wall too, and the robot. If you also check around the colors you'll notice lots of them are slightly different from the ones in the palette.

Does PCKView use a different/wrong/incomplete palette?
Is the palette on this thread really correct (its different than the one here https://www.ufopaedia.org/index.php?title=File:5_BattleScapePal.Png for sure, but this one looks even more different than the PCKView colors, there's no correspondence)?
« Last Edit: August 20, 2014, 01:02:46 pm by robin »