aliens

Author Topic: can someone s'plain me how to edit D0...D3.LBM files?  (Read 3557 times)

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
can someone s'plain me how to edit D0...D3.LBM files?
« on: August 15, 2015, 09:27:06 am »
I'm trying to use UFO battlescape palette into TFTD  using hex + ufopedia I managed to figure out  kinda where it starts 768 bytes 5th palette but openxcom doesn't recognize my file whatever I do. i'm assuming i'm doing it wrong.

is there some overhead or some file info a the beginning. there is no begin end info in ufopedia for tftd tactial lbm palettes.

i know is a 3 byte color. i know there are 256 colors. i know is a total f 768 bytes per palette.
i know ufo has 5 and tftd has 3 + d0....d3 lbm files for tactical at various depths

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #1 on: August 15, 2015, 09:33:32 am »
the file appears to be Activision IFF type or contains iff data so I must fit my palette inside some container format. i'm trying t find the length of the header online.

openxcom gives me various errors if i copy palette at the start says file cannot be read, if i copy it later says iff chunk can't be read

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #2 on: August 15, 2015, 09:39:21 am »
k so it seems lbm is interleavened bitmap file not same as regular palette.dat so i need a program to open it up

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
    • Email
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #3 on: August 15, 2015, 11:26:24 am »
I'm trying to use UFO battlescape palette into TFTD

Do you want to overwrite "outside of water" TFTD palette with battlescape palette from UFO:EU?

Offline Yankes

  • Commander
  • *****
  • Posts: 2765
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #4 on: August 15, 2015, 11:51:48 am »
D0.lbm are normal graphic files that xcom use as container for palettes.
You can use grafx2 to open it change palette and save it.
but you need I have small problems with this, grafx2 have bug that clobber two last color in palette, instead of two dark blue colors it create two gray one.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #5 on: August 15, 2015, 12:46:13 pm »
In settings, set "Safety colors: NO".

Offline Yankes

  • Commander
  • *****
  • Posts: 2765
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #6 on: August 15, 2015, 01:49:18 pm »
This explain why nobody report this "bug" before :D I think they should did that in more oblivious way.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #7 on: August 15, 2015, 03:21:18 pm »
Do you want to overwrite "outside of water" TFTD palette with battlescape palette from UFO:EU?

is done ssems to work fine

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #8 on: August 15, 2015, 05:04:28 pm »
This explain why nobody report this "bug" before :D I think they should did that in more oblivious way.
Sorry :( It's a limitation of the program being itself in the same 256 colors as the image, and I still have a lot of work to port the interface to truecolor mode.

Offline Yankes

  • Commander
  • *****
  • Posts: 2765
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #9 on: August 15, 2015, 06:06:12 pm »
Probably better way would be overwriting display palette without touching original one. And new shortcut to toggle between them.
This will allow maintaining original look without sacrificing UI usability.

Or even more, have long list of different palettes and toggle between them at will. This would be very helpful if you want do some palette tricks.
Over all I think 256 colors isn't limitation but opportunity :D Each index can have its meaning not only color (vide solders face&hair recoloring, and overall idea of shade in OXC).


Offline Hobbes

  • Commander
  • *****
  • Posts: 2100
  • Infiltration subroutine in progress
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #10 on: August 15, 2015, 06:46:23 pm »
I'm trying to use UFO battlescape palette into TFTD  using hex + ufopedia I managed to figure out  kinda where it starts 768 bytes 5th palette but openxcom doesn't recognize my file whatever I do. i'm assuming i'm doing it wrong.

is there some overhead or some file info a the beginning. there is no begin end info in ufopedia for tftd tactial lbm palettes.

i know is a 3 byte color. i know there are 256 colors. i know is a total f 768 bytes per palette.
i know ufo has 5 and tftd has 3 + d0....d3 lbm files for tactical at various depths

Are you trying to use TFTD's depth settings on UFO terrains?

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: can someone s'plain me how to edit D0...D3.LBM files?
« Reply #11 on: August 16, 2015, 02:18:45 am »
ok guys figured the lbm files is essentially a different type of bitmap and you just manually edit the palette or import an new one.

what i am trying to do is use xcom1 palette as a base to create another palette system for xcom2 . xcom1 uses one palette.dat tat contains 5 palettes but xcom2 uses 3 palettes + 4 lbs for different depths. i managed to make tactical depth 0 work fine with xcom1 palette (no 5).

now i just have to fool around get the colors i need. im removing or editing out the purple and cooler green bands and adding more orange and yellow and i probably need black color. i won't worry about depth 1+ as i think is not even supported for modding yet. for now i am focusing on land only.

once my palette looks good i m gonna convert most of the assets that i need t my palette mde then edit out the 3 palettes in palette.dat in xcom which requires bit more work and hex editing.

for now i am simply gonna make a tftd version of xcom1 palette.

why? cause xcom2 pallete is very puke green and yellowed out and while i really like it for underwater doesn't work that well on land. xcom1 is more clear and universal palette able to work pretty much anywhere.