OpenXcom Forum

Modding => Released Mods => XPiratez => Topic started by: tormodino on September 15, 2016, 10:50:48 pm

Title: Chaingun remodel and palette fail
Post by: tormodino on September 15, 2016, 10:50:48 pm
I took a stab at remodelling the chaingun and imported it into the game.
I then discovered the whole palette problem, and the gun shows up in a beautiful yellow and white.
There are some posts in the modding forums to help with this, but I need to ask:

(https://i.imgur.com/cSKKcY1.png)

Is the palette  the same for Piratez as regular OXcom? (I'm sure I can work out how to install them)
Can the engine not handle other palettes? And if so, where can I change it?
Where should I submit graphics if I do more of these, for constructive critiscism if nothing else?
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 15, 2016, 10:56:11 pm
The palettes are the same, because hardcoded, which is kinda sad.
Title: Re: Chaingun remodel and palette fail
Post by: tormodino on September 15, 2016, 11:04:03 pm
That's too bad.
Any idea if that is scheduled to change? I just recently got interested in OpenXcom, and mods like Piratez one just blow the original game to pieces.
If the engine is truly open there seems to be no real limit to the content modders could create.
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 15, 2016, 11:13:32 pm
That's too bad.
Any idea if that is scheduled to change?

I'd bet on never, as far as the main dev team is concerned. But there are people making independent code additions, like all the new stuff you can see in piratez.
Title: Re: Chaingun remodel and palette fail
Post by: tormodino on September 15, 2016, 11:21:14 pm
That's great to hear. I am excited to see this mod move forward. You, and all the contributors, have done an amazing job.
Title: Re: Chaingun remodel and palette fail
Post by: yrizoud on September 16, 2016, 12:54:31 am
OpenXcom needs the palette in order to provide lighting effects identical to the original games.
The palette contains the information which let the engine know how the sprite must look when it's darkened by 1 step, 2 steps, etc. down to full black.

There has been discussion, data analysis and experiments to try produce a simple mathematical rule which can apply to arbitrary RGB colors, and produces visually identical results, but without success. As far as I can understand, the remaining options are:
- abandon the original "look"
- abandon platforms not able to run hefty pixel shaders, such as office computers
- try something very clever, like supporting an extended palette of more than 256 colors, adding 16-color ranges as they are encountered in modded images.
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 16, 2016, 01:20:20 am
How about simply allowing custom 256 pals? TFTD has different pals, yet it works. Besides, you make it sound like some insurmountable problem, while modern pixel games easily support all kinds of effects (like Terraria, for example).
The 'original look' argument isn't a strong one either, as the game looks VERY differently from the original, unless ran on an archaic CRT (I suppose - I never had a chance). LCD's, not to mention portable machines, already change the look drastically.
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 16, 2016, 10:40:52 am
How about simply allowing custom 256 pals? TFTD has different pals, yet it works.

Palettes are not hardcoded in the EXE.
They are read from data files and thus can could be modded relatively easily.
I thought it was already implemented, but it's not.
I can do it, it's quite easy, but...
... how would you use it? I mean if you change the palettes, all vanilla resources will stop working and also all modded resources will have to be recolored or completely recreated... unless you make only cosmetic changes.
Is that even feasible to think about? Or have I misunderstood something?
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 16, 2016, 10:57:37 am
Battlescape palette is broken up into 16 colors, 16 shades each. If an new palette keeps this order, and is done with skill, a palette change will keep the pictures fine, while recoloring them to modder's desire. Eg. (if it was deployment sensitive) I could slightly pull all the tones towards blue in underwater missions, or towards green in say, acid rain, or bleach them for space missions. Other modders could change global palettes completely, thus getting just the right colors they want.
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 16, 2016, 11:08:07 am
OK, I can do that.
Most of the work will be on your side anyway :)

First a global change only, for experimentation... and if it proves a worthy pursuit, I can add dependency on deployment too.
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 16, 2016, 11:36:14 am
That'd be great :) A tiny detail: would it be possible to set map background color as well? (right now it's color 15, but undersea would look much better if the now-black areas were actually deep-blue... :)
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 16, 2016, 06:49:03 pm
This is how it could look like.
Btw. the numbers down there are the current battlescape palette as a starting point.

Code: [Select]
customPalettes:
  - type: PAL_BATTLESCAPE_COPY
    target: PAL_BATTLESCAPE
    palette:
      0: [0,0,0]
      1: [252,252,252]
      2: [232,232,232]
      3: [216,216,216]
      4: [196,196,196]
      5: [176,176,176]
      6: [160,160,160]
      7: [140,140,140]
      8: [124,124,124]
      9: [104,104,104]
      10: [88,88,88]
      11: [68,68,68]
      12: [52,52,52]
      13: [32,32,32]
      14: [12,12,12]
      15: [0,0,0]
      16: [252,208,0]
      17: [236,180,0]
      18: [224,160,0]
      19: [208,136,0]
      20: [196,116,0]
      21: [180,96,0]
      22: [168,80,0]
      23: [152,64,0]
      24: [140,52,0]
      25: [124,36,0]
      26: [112,28,0]
      27: [96,16,0]
      28: [84,8,0]
      29: [72,4,0]
      30: [56,0,0]
      31: [44,0,0]
      32: [252,120,120]
      33: [236,104,104]
      34: [224,92,92]
      35: [208,76,76]
      36: [196,68,68]
      37: [184,56,56]
      38: [168,44,44]
      39: [156,36,36]
      40: [140,28,28]
      41: [128,20,20]
      42: [116,12,12]
      43: [100,8,8]
      44: [88,4,4]
      45: [72,0,0]
      46: [60,0,0]
      47: [48,0,0]
      48: [160,224,132]
      49: [136,208,116]
      50: [116,196,100]
      51: [92,184,84]
      52: [72,172,72]
      53: [60,160,64]
      54: [48,144,60]
      55: [40,132,56]
      56: [28,120,56]
      57: [20,108,52]
      58: [16,96,48]
      59: [8,80,44]
      60: [4,68,40]
      61: [0,56,36]
      62: [0,44,28]
      63: [0,32,24]
      64: [208,228,96]
      65: [184,212,84]
      66: [164,196,72]
      67: [144,184,60]
      68: [124,168,48]
      69: [104,156,40]
      70: [88,140,32]
      71: [72,124,24]
      72: [56,112,20]
      73: [40,96,12]
      74: [28,84,8]
      75: [16,68,4]
      76: [8,52,0]
      77: [4,40,0]
      78: [0,24,0]
      79: [0,12,0]
      80: [248,248,248]
      81: [232,224,224]
      82: [220,208,204]
      83: [204,188,184]
      84: [192,172,168]
      85: [176,156,148]
      86: [164,140,132]
      87: [148,124,116]
      88: [136,108,100]
      89: [120,92,88]
      90: [108,80,72]
      91: [92,68,60]
      92: [80,56,48]
      93: [68,44,40]
      94: [52,32,28]
      95: [40,24,20]
      96: [240,196,72]
      97: [224,176,64]
      98: [212,156,52]
      99: [200,136,48]
      100: [188,120,40]
      101: [176,104,32]
      102: [160,84,24]
      103: [148,72,20]
      104: [136,56,16]
      105: [124,44,12]
      106: [112,32,8]
      107: [96,20,4]
      108: [84,12,4]
      109: [72,4,0]
      110: [60,0,0]
      111: [48,0,0]
      112: [140,176,200]
      113: [128,160,188]
      114: [112,144,176]
      115: [104,128,164]
      116: [92,112,152]
      117: [80,100,144]
      118: [72,84,132]
      119: [60,72,120]
      120: [52,60,108]
      121: [44,48,96]
      122: [36,36,88]
      123: [32,28,76]
      124: [28,24,64]
      125: [24,16,52]
      126: [20,12,40]
      127: [16,8,32]
      128: [168,208,240]
      129: [148,188,224]
      130: [128,172,212]
      131: [112,152,200]
      132: [96,136,188]
      133: [80,120,172]
      134: [64,104,160]
      135: [52,88,148]
      136: [40,72,132]
      137: [28,60,120]
      138: [20,48,108]
      139: [12,36,96]
      140: [8,24,80]
      141: [4,16,68]
      142: [0,8,56]
      143: [0,4,44]
      144: [252,252,120]
      145: [236,228,104]
      146: [224,204,92]
      147: [208,184,76]
      148: [196,160,68]
      149: [184,140,56]
      150: [168,120,44]
      151: [156,100,36]
      152: [140,80,28]
      153: [128,64,20]
      154: [116,48,12]
      155: [100,32,8]
      156: [88,20,4]
      157: [72,8,0]
      158: [60,4,0]
      159: [48,0,0]
      160: [184,160,88]
      161: [172,144,76]
      162: [160,128,64]
      163: [148,112,56]
      164: [136,96,44]
      165: [124,80,36]
      166: [112,68,28]
      167: [104,56,24]
      168: [92,44,16]
      169: [80,32,12]
      170: [68,20,8]
      171: [56,12,4]
      172: [44,8,0]
      173: [32,4,0]
      174: [20,0,0]
      175: [12,0,0]
      176: [248,220,212]
      177: [232,196,192]
      178: [220,176,172]
      179: [208,152,152]
      180: [192,136,140]
      181: [180,120,128]
      182: [168,104,120]
      183: [152,92,108]
      184: [140,76,100]
      185: [128,64,92]
      186: [112,52,84]
      187: [100,44,76]
      188: [88,32,68]
      189: [72,24,60]
      190: [60,16,52]
      191: [48,12,44]
      192: [216,196,252]
      193: [200,172,236]
      194: [184,148,224]
      195: [172,128,208]
      196: [160,108,196]
      197: [152,92,180]
      198: [140,76,168]
      199: [132,60,152]
      200: [124,48,140]
      201: [116,36,124]
      202: [108,24,112]
      203: [96,16,96]
      204: [84,8,80]
      205: [72,4,60]
      206: [56,0,44]
      207: [44,0,32]
      208: [64,196,252]
      209: [56,172,236]
      210: [48,148,224]
      211: [40,128,208]
      212: [32,108,196]
      213: [28,88,184]
      214: [24,72,168]
      215: [16,52,156]
      216: [12,40,140]
      217: [8,24,128]
      218: [4,16,116]
      219: [4,4,100]
      220: [4,0,88]
      221: [4,0,72]
      222: [8,0,60]
      223: [8,0,48]
      224: [236,236,248]
      225: [216,216,232]
      226: [196,196,220]
      227: [180,180,208]
      228: [164,164,192]
      229: [148,144,180]
      230: [136,132,168]
      231: [120,116,152]
      232: [108,100,140]
      233: [96,88,128]
      234: [84,76,112]
      235: [72,64,100]
      236: [60,52,88]
      237: [52,40,72]
      238: [40,32,60]
      239: [32,24,48]
      240: [140,152,148]
      241: [132,136,140]
      242: [116,124,132]
      243: [108,116,124]
      244: [92,104,108]
      245: [84,92,100]
      246: [76,80,92]
      247: [56,68,84]
      248: [48,56,68]
      249: [40,48,56]
      250: [32,36,48]
      251: [24,28,32]
      252: [16,20,24]
      253: [8,12,16]
      254: [3,4,8]
      255: [3,3,6]
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 17, 2016, 09:37:00 am
Working on RGB numbers directly? Oh boy, this will be fun! :)
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 17, 2016, 12:10:49 pm
Working on RGB numbers directly? Oh boy, this will be fun! :)

Of course a binary palette will be supported later, there's just too much space for errors there (each application exports palettes differently).
This is just for playing around and experimenting...
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 17, 2016, 06:25:47 pm
Example of greyscale palette (standard battlescape palette, where R, G, B = max(R,G,B) from original palette).

Fun, still kinda useless :)

Code: [Select]
customPalettes:
  - type: PAL_BATTLESCAPE_GREYSCALE
    target: PAL_BATTLESCAPE
    palette:
      0: [0,0,0]
      1: [252,252,252]
      2: [232,232,232]
      3: [216,216,216]
      4: [196,196,196]
      5: [176,176,176]
      6: [160,160,160]
      7: [140,140,140]
      8: [124,124,124]
      9: [104,104,104]
      10: [88,88,88]
      11: [68,68,68]
      12: [52,52,52]
      13: [32,32,32]
      14: [12,12,12]
      15: [0,0,0]
      16: [252,252,252]
      17: [236,236,236]
      18: [224,224,224]
      19: [208,208,208]
      20: [196,196,196]
      21: [180,180,180]
      22: [168,168,168]
      23: [152,152,152]
      24: [140,140,140]
      25: [124,124,124]
      26: [112,112,112]
      27: [96,96,96]
      28: [84,84,84]
      29: [72,72,72]
      30: [56,56,56]
      31: [44,44,44]
      32: [252,252,252]
      33: [236,236,236]
      34: [224,224,224]
      35: [208,208,208]
      36: [196,196,196]
      37: [184,184,184]
      38: [168,168,168]
      39: [156,156,156]
      40: [140,140,140]
      41: [128,128,128]
      42: [116,116,116]
      43: [100,100,100]
      44: [88,88,88]
      45: [72,72,72]
      46: [60,60,60]
      47: [48,48,48]
      48: [224,224,224]
      49: [208,208,208]
      50: [196,196,196]
      51: [184,184,184]
      52: [172,172,172]
      53: [160,160,160]
      54: [144,144,144]
      55: [132,132,132]
      56: [120,120,120]
      57: [108,108,108]
      58: [96,96,96]
      59: [80,80,80]
      60: [68,68,68]
      61: [56,56,56]
      62: [44,44,44]
      63: [32,32,32]
      64: [228,228,228]
      65: [212,212,212]
      66: [196,196,196]
      67: [184,184,184]
      68: [168,168,168]
      69: [156,156,156]
      70: [140,140,140]
      71: [124,124,124]
      72: [112,112,112]
      73: [96,96,96]
      74: [84,84,84]
      75: [68,68,68]
      76: [52,52,52]
      77: [40,40,40]
      78: [24,24,24]
      79: [12,12,12]
      80: [248,248,248]
      81: [232,232,232]
      82: [220,220,220]
      83: [204,204,204]
      84: [192,192,192]
      85: [176,176,176]
      86: [164,164,164]
      87: [148,148,148]
      88: [136,136,136]
      89: [120,120,120]
      90: [108,108,108]
      91: [92,92,92]
      92: [80,80,80]
      93: [68,68,68]
      94: [52,52,52]
      95: [40,40,40]
      96: [240,240,240]
      97: [224,224,224]
      98: [212,212,212]
      99: [200,200,200]
      100: [188,188,188]
      101: [176,176,176]
      102: [160,160,160]
      103: [148,148,148]
      104: [136,136,136]
      105: [124,124,124]
      106: [112,112,112]
      107: [96,96,96]
      108: [84,84,84]
      109: [72,72,72]
      110: [60,60,60]
      111: [48,48,48]
      112: [200,200,200]
      113: [188,188,188]
      114: [176,176,176]
      115: [164,164,164]
      116: [152,152,152]
      117: [144,144,144]
      118: [132,132,132]
      119: [120,120,120]
      120: [108,108,108]
      121: [96,96,96]
      122: [88,88,88]
      123: [76,76,76]
      124: [64,64,64]
      125: [52,52,52]
      126: [40,40,40]
      127: [32,32,32]
      128: [240,240,240]
      129: [224,224,224]
      130: [212,212,212]
      131: [200,200,200]
      132: [188,188,188]
      133: [172,172,172]
      134: [160,160,160]
      135: [148,148,148]
      136: [132,132,132]
      137: [120,120,120]
      138: [108,108,108]
      139: [96,96,96]
      140: [80,80,80]
      141: [68,68,68]
      142: [56,56,56]
      143: [44,44,44]
      144: [252,252,252]
      145: [236,236,236]
      146: [224,224,224]
      147: [208,208,208]
      148: [196,196,196]
      149: [184,184,184]
      150: [168,168,168]
      151: [156,156,156]
      152: [140,140,140]
      153: [128,128,128]
      154: [116,116,116]
      155: [100,100,100]
      156: [88,88,88]
      157: [72,72,72]
      158: [60,60,60]
      159: [48,48,48]
      160: [184,184,184]
      161: [172,172,172]
      162: [160,160,160]
      163: [148,148,148]
      164: [136,136,136]
      165: [124,124,124]
      166: [112,112,112]
      167: [104,104,104]
      168: [92,92,92]
      169: [80,80,80]
      170: [68,68,68]
      171: [56,56,56]
      172: [44,44,44]
      173: [32,32,32]
      174: [20,20,20]
      175: [12,12,12]
      176: [248,248,248]
      177: [232,232,232]
      178: [220,220,220]
      179: [208,208,208]
      180: [192,192,192]
      181: [180,180,180]
      182: [168,168,168]
      183: [152,152,152]
      184: [140,140,140]
      185: [128,128,128]
      186: [112,112,112]
      187: [100,100,100]
      188: [88,88,88]
      189: [72,72,72]
      190: [60,60,60]
      191: [48,48,48]
      192: [252,252,252]
      193: [236,236,236]
      194: [224,224,224]
      195: [208,208,208]
      196: [196,196,196]
      197: [180,180,180]
      198: [168,168,168]
      199: [152,152,152]
      200: [140,140,140]
      201: [124,124,124]
      202: [112,112,112]
      203: [96,96,96]
      204: [84,84,84]
      205: [72,72,72]
      206: [56,56,56]
      207: [44,44,44]
      208: [252,252,252]
      209: [236,236,236]
      210: [224,224,224]
      211: [208,208,208]
      212: [196,196,196]
      213: [184,184,184]
      214: [168,168,168]
      215: [156,156,156]
      216: [140,140,140]
      217: [128,128,128]
      218: [116,116,116]
      219: [100,100,100]
      220: [88,88,88]
      221: [72,72,72]
      222: [60,60,60]
      223: [48,48,48]
      224: [248,248,248]
      225: [232,232,232]
      226: [220,220,220]
      227: [208,208,208]
      228: [192,192,192]
      229: [180,180,180]
      230: [168,168,168]
      231: [152,152,152]
      232: [140,140,140]
      233: [128,128,128]
      234: [112,112,112]
      235: [100,100,100]
      236: [88,88,88]
      237: [72,72,72]
      238: [60,60,60]
      239: [48,48,48]
      240: [152,152,152]
      241: [140,140,140]
      242: [132,132,132]
      243: [124,124,124]
      244: [108,108,108]
      245: [100,100,100]
      246: [92,92,92]
      247: [84,84,84]
      248: [68,68,68]
      249: [56,56,56]
      250: [48,48,48]
      251: [32,32,32]
      252: [24,24,24]
      253: [16,16,16]
      254: [8,8,8]
      255: [6,6,6]
Title: Re: Chaingun remodel and palette fail
Post by: Starving Poet on September 17, 2016, 10:42:56 pm
Example of greyscale palette (standard battlescape palette, where R, G, B = max(R,G,B) from original palette).


Man, I feel like I'm playing XCOM on a graphing calculator :-p
Title: Re: Chaingun remodel and palette fail
Post by: H0lyD4wg on September 18, 2016, 07:29:49 am
This is how it could look like.
Btw. the numbers down there are the current battlescape palette as a starting point.

Code: [Select]
customPalettes:
  - type: PAL_BATTLESCAPE_COPY
    target: PAL_BATTLESCAPE
    palette:
      0: [0,0,0]
      1: [252,252,252]
      2: [232,232,232]
      3: [216,216,216]
      4: [196,196,196]
      5: [176,176,176]
      ---- snip ----

Considering that current palettes are made up of 16 colors with 16 shades each, wouldn't the palette definition be more readable if it was indexed by two hexadecimal digits rather than decimal numbers? That way anyone working on a palette can easily mentally parse e.g. '4F' as 'darkest shade of 5th color'.
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 18, 2016, 12:53:16 pm
I am using IrfanView to export palettes I am using for testing, and it exports it in a format very similar to this.
That's the only reason.

Btw. one example of custom palette in Bootypedia ;-)

Code: [Select]
extraSprites:
  - type: BIG_CHARIOT
    singleImage: true
    width: 320
    height: 200
    files:
      0: pachyderm.png
customPalettes:
  - type: PAL_PACHYDERM
    target: PAL_UFOPAEDIA
    palette:
      0: [181,230,29]
      1: [28,23,46]
      2: [34,26,48]
      3: [33,26,45]
      4: [35,27,50]
      5: [37,29,51]
      6: [32,27,49]
      7: [30,22,45]
      8: [31,23,47]
      9: [27,20,44]
      10: [33,25,48]
      11: [30,25,48]
      12: [30,25,46]
      13: [37,32,54]
      14: [34,29,52]
      15: [40,32,51]
      16: [35,28,46]
      17: [38,35,57]
      18: [41,38,60]
      19: [48,41,58]
      20: [37,31,48]
      21: [43,37,52]
      22: [50,45,64]
      23: [41,28,46]
      24: [42,33,55]
      25: [156,116,74]
      26: [56,50,64]
      27: [60,57,76]
      28: [48,32,47]
      29: [44,42,64]
      30: [49,39,52]
      31: [58,53,72]
      32: [150,112,73]
      33: [52,49,71]
      34: [37,25,42]
      35: [143,107,72]
      36: [133,59,68]
      37: [97,77,63]
      38: [111,86,65]
      39: [134,102,74]
      40: [139,75,83]
      41: [64,54,66]
      42: [235,222,201]
      43: [97,39,50]
      44: [106,80,58]
      45: [73,60,62]
      46: [238,226,207]
      47: [167,127,82]
      48: [56,36,49]
      49: [69,58,71]
      50: [148,109,65]
      51: [141,50,57]
      52: [146,59,63]
      53: [121,39,51]
      54: [78,73,91]
      55: [173,40,53]
      56: [71,62,79]
      57: [130,67,76]
      58: [153,118,83]
      59: [64,46,60]
      60: [138,107,81]
      61: [150,90,98]
      62: [159,120,78]
      63: [111,49,60]
      64: [104,44,55]
      65: [88,71,72]
      66: [87,43,55]
      67: [125,97,69]
      68: [130,37,50]
      69: [54,47,56]
      70: [82,66,63]
      71: [90,75,86]
      72: [161,120,66]
      73: [160,84,89]
      74: [184,84,86]
      75: [118,92,68]
      76: [140,104,65]
      77: [116,87,60]
      78: [132,99,65]
      79: [122,60,69]
      80: [148,83,91]
      81: [83,50,61]
      82: [172,109,121]
      83: [71,67,86]
      84: [121,51,61]
      85: [175,131,84]
      86: [83,68,81]
      87: [161,93,98]
      88: [123,96,78]
      89: [108,84,78]
      90: [149,38,51]
      91: [56,41,58]
      92: [113,67,74]
      93: [64,53,57]
      94: [95,79,76]
      95: [73,51,63]
      96: [127,102,84]
      97: [151,49,57]
      98: [113,41,51]
      99: [64,39,54]
      100: [79,57,71]
      101: [130,53,60]
      102: [172,82,84]
      103: [175,117,128]
      104: [113,77,90]
      105: [111,56,66]
      106: [155,115,65]
      107: [90,58,70]
      108: [165,106,118]
      109: [146,112,79]
      110: [158,38,51]
      111: [189,76,77]
      112: [140,36,50]
      113: [78,66,72]
      114: [89,71,60]
      115: [169,96,102]
      116: [104,82,68]
      117: [129,77,87]
      118: [140,69,74]
      119: [64,61,82]
      120: [118,88,75]
      121: [114,95,86]
      122: [160,124,86]
      123: [157,106,119]
      124: [124,93,62]
      125: [74,44,57]
      126: [176,130,69]
      127: [91,82,99]
      128: [93,49,61]
      129: [182,44,56]
      130: [125,109,122]
      131: [102,59,71]
      132: [121,72,79]
      133: [179,110,121]
      134: [135,44,54]
      135: [145,114,87]
      136: [47,27,42]
      137: [172,101,109]
      138: [138,85,94]
      139: [182,135,72]
      140: [135,107,91]
      141: [134,118,131]
      142: [126,87,97]
      143: [165,124,74]
      144: [103,86,96]
      145: [148,99,110]
      146: [138,93,105]
      147: [178,76,78]
      148: [176,90,93]
      149: [160,100,109]
      150: [79,61,56]
      151: [102,75,87]
      152: [97,88,107]
      153: [181,137,92]
      154: [159,50,59]
      155: [115,84,97]
      156: [96,69,65]
      157: [101,67,77]
      158: [62,46,48]
      159: [116,102,115]
      160: [154,120,93]
      161: [125,104,98]
      162: [202,152,92]
      163: [75,38,51]
      164: [183,124,133]
      165: [73,54,51]
      166: [83,78,97]
      167: [166,37,50]
      168: [102,55,59]
      169: [186,115,124]
      170: [149,77,81]
      171: [144,93,84]
      172: [163,113,126]
      173: [111,94,102]
      174: [157,75,80]
      175: [68,33,46]
      176: [148,107,121]
      177: [228,198,185]
      178: [106,34,47]
      179: [233,212,192]
      180: [86,37,46]
      181: [166,77,76]
      182: [106,96,114]
      183: [99,72,51]
      184: [140,114,100]
      185: [239,216,199]
      186: [165,130,96]
      187: [191,144,96]
      188: [133,76,68]
      189: [197,90,87]
      190: [136,101,115]
      191: [222,184,177]
      192: [149,65,73]
      193: [187,96,99]
      194: [160,137,144]
      195: [89,60,50]
      196: [196,146,81]
      197: [194,129,137]
      198: [188,149,124]
      199: [126,94,108]
      200: [174,137,106]
      201: [152,121,104]
      202: [156,130,117]
      203: [131,87,78]
      204: [202,137,142]
      205: [169,125,65]
      206: [202,156,109]
      207: [162,64,70]
      208: [184,107,115]
      209: [169,138,123]
      210: [203,148,153]
      211: [168,126,138]
      212: [58,29,43]
      213: [100,89,84]
      214: [195,160,135]
      215: [186,128,112]
      216: [198,121,125]
      217: [179,109,104]
      218: [151,122,132]
      219: [169,107,92]
      220: [139,119,112]
      221: [193,141,147]
      222: [189,139,67]
      223: [189,145,111]
      224: [148,84,68]
      225: [154,103,93]
      226: [230,194,164]
      227: [218,166,167]
      228: [169,122,106]
      229: [206,104,96]
      230: [204,162,163]
      231: [202,169,145]
      232: [146,130,143]
      233: [157,92,79]
      234: [177,151,136]
      235: [115,66,55]
      236: [212,153,156]
      237: [173,52,62]
      238: [183,134,142]
      239: [195,109,115]
      240: [188,155,158]
      241: [212,168,128]
      242: [190,59,66]
      243: [236,208,177]
      244: [208,178,154]
      245: [208,175,172]
      246: [211,192,169]
      247: [223,169,148]
      248: [171,147,155]
      249: [222,188,144]
      250: [217,122,114]
      251: [214,147,130]
      252: [179,179,155]
      253: [210,207,184]
      254: [147,153,130]
      255: [117,127,106]
Title: Re: Chaingun remodel and palette fail
Post by: clownagent on September 18, 2016, 04:54:26 pm
I am using IrfanView to export palettes I am using for testing, and it exports it in a format very similar to this.
That's the only reason.

Btw. one example of custom palette in Bootypedia ;-)



The Ufopedia image with the custom pallete looks very nice. However, would it not be much easier if the ufopedia would just take the palette encoded in the images themselves. You would save a lot of ruleset text and you were no longer limited by original ufopedia palette.

This is how it works already for cutscene images in openxcom. So the code for doing this must already be there.
You just have to use 256 color indexed images.
(I think you can for some reason only use 224 or so for the cutscene images, because the last colors are used for something else).

 

Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 18, 2016, 06:38:07 pm
Palette is global for entire screen, not only for its parts.
This is a very simple one, with just background picture and some text... but you can already see that if I am taking the palette from the picture, the text will be broken.
In more complicated scenes with dozens or even hundreds of components on the screen (e.g. battlescape) this makes no sense.
I didn't check the cutscenes, but it is possible there only because the whole screen is only one single picture at a time and nothing else.

PS: the palette in the example is also global, not tied to the image... i.e. you need to define it only once... you can see it's a separate element, not within the picture

PS2: can you please remove the quote from your post? quoting several hundreds lines of text and a big picture is really pointless...
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 18, 2016, 07:19:16 pm
That'd be great :) A tiny detail: would it be possible to set map background color as well? (right now it's color 15, but undersea would look much better if the now-black areas were actually deep-blue... :)

Yeah, I can change that, but not sure if that's what you want (attached example with color 218 instead of 15).

The unexplored terrain is still drawn over the background, with maximum shade/darkness and will be black (unless you change palettes, I think).
Title: Re: Chaingun remodel and palette fail
Post by: yrizoud on September 18, 2016, 08:29:25 pm
Considering that current palettes are made up of 16 colors with 16 shades each, wouldn't the palette definition be more readable if it was indexed by two hexadecimal digits rather than decimal numbers?
You can write hexadecimal in YAML format : use prefix 0x, for example 0xFF = 255
Title: Re: Chaingun remodel and palette fail
Post by: clownagent on September 18, 2016, 09:11:17 pm
Palette is global for entire screen, not only for its parts.
This is a very simple one, with just background picture and some text... but you can already see that if I am taking the palette from the picture, the text will be broken.
In more complicated scenes with dozens or even hundreds of components on the screen (e.g. battlescape) this makes no sense.
I didn't check the cutscenes, but it is possible there only because the whole screen is only one single picture at a time and nothing else.

PS: the palette in the example is also global, not tied to the image... i.e. you need to define it only once... you can see it's a separate element, not within the picture

PS2: can you please remove the quote from your post? quoting several hundreds lines of text and a big picture is really pointless...

For the cutscenes the text color is taken always from the last 16 colors. So if you manage your image pallete correctly text is no problem.

For battlescape it makes of course no sense to take palette from the image. However, Ufopedia images are often just one image with text, so for them it makes a lot of sense.

PS2: Sure

Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 19, 2016, 07:25:59 am
Yeah, I can change that, but not sure if that's what you want (attached example with color 218 instead of 15).

Yeah that's exactly what I want, thank you :)

For battlescape it makes of course no sense to take palette from the image. However, Ufopedia images are often just one image with text, so for them it makes a lot of sense.

Idk, it'd only serve to aggravate possible infringement problems; also incosistent palettes across the Pedia are likely to look crappy unless a lot of extra care is taken. For me, it's an avenue not worth pursuing, but I might be wrong...
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 19, 2016, 11:03:46 am
For the cutscenes the text color is taken always from the last 16 colors. So if you manage your image pallete correctly text is no problem.

Hmm, are you sure?
I see that you can freely define any text color you want for cutscenes text.

In any case, taking the picture palette is also an option, I can add that.

The idea (on my side) is however that we don't have separate palette per each picture, that is not easy to maintain.
I'd rather see several palettes (up to 5-6 maybe), with slight focus on different color.
I like current pictures and their imperfections... it looks better to me... old style, just nice.
However some colors (like red or light blue for example), don't get enough attention.
So I would create some alternate palettes for pictures, which use colors not present in original palette.
One with more red shades, one with more blue shades, etc.
They would all differ from original palette only by 10% let's say, not more... and vanilla/mod-specific colors for should remain untouched (responsibility of the modder of course).

Idk, it'd only serve to aggravate possible infringement problems; also incosistent palettes across the Pedia are likely to look crappy unless a lot of extra care is taken. For me, it's an avenue not worth pursuing, but I might be wrong...

Infringement is still valid no matter how much you bastardize the palette.

The pachyderm example is a bit overexxagerated, I wanted to show the difference. In reality, I would recommend using slightly modified vanilla palette with a few more red shades... as suggested above.

PS: btw. custom palettes (via ruleset) don't need to define all 256 colors. You can define only a few overrides, the rest will be taken from target palette. Just saying if anyone would like to play with that...

A tiny detail: would it be possible to set map background color as well? (right now it's color 15, but undersea would look much better if the now-black areas were actually deep-blue... :)

Should this be a global setting or part of some other configuration, e.g. alien deployment or terrain or ...?
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 19, 2016, 04:47:10 pm
Should this be a global setting or part of some other configuration, e.g. alien deployment or terrain or ...?

Terrain - maybe a part of starting conditions? The custom pallette seems to fit into that as well.
Title: Re: Chaingun remodel and palette fail
Post by: clownagent on September 19, 2016, 10:37:29 pm
Hmm, are you sure?
I see that you can freely define any text color you want for cutscenes text.

In any case, taking the picture palette is also an option, I can add that.

It would be great if you add it.

Recently I made a cutscene for my mod and I found the images looked much better with their own palette.

I think at least the original UFO cutscene images used always the last colors for text.
So I did the same for my cutscene images because I wanted to have always the same text color this was the easiest. Since each image has a different palette it would not make much sense to use another index as text color.   
Title: Re: Chaingun remodel and palette fail
Post by: tormodino on September 21, 2016, 10:26:44 pm
Great to see that colour is less restricted that it first appeared.

I got the standard palettes to work in game for my flintlock and musket remodel, but for some reason the chaingun needs to be redone completely.

How would I go about submitting art for possible inclusion in the mod? I attached a screenshot of a gal equipped with the latest addition to my personal arsenal :)

Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on September 22, 2016, 11:04:49 am
Just post them here :) Fixing your chaingun was just a simple matter of converting it to Indexed color mode. I'm not including it, since it's not that great, but these muskets, they look really good!
Title: Re: Chaingun remodel and palette fail
Post by: tormodino on September 22, 2016, 01:30:19 pm
Thank you :)

I fully agree that the chaingun was not that good. I'll make a thread where I'll add any models I make as I play, and you can just include those you feel you can use.
Title: Re: Chaingun remodel and palette fail
Post by: Meridian on September 23, 2016, 01:06:05 pm
Small update:
- found the reserved color indices for PAL_UFOPAEDIA usage (craft, vehicle, text, imagetext) and held on to them
- did some palette magic on the original picture
- reading palette from the picture itself (no need to define custom palette)

Can you spot 5 differences?

PS: I will open a separate thread for this and give detailed guidelines about which palette is used where; which colors are reserved and how to use your own palettes correctly
Title: Re: Chaingun remodel and palette fail
Post by: tormodino on September 23, 2016, 03:10:33 pm
 I can't say what the 5 differences are, but the colours appear much richer than before. It looks really good.
The entire image being less granular does so much work.
Title: Re: Chaingun remodel and palette fail
Post by: Dioxine on August 29, 2017, 11:24:13 pm
Can we have custom battlescape palette definiable per deployment? We're cooking some nice stuff with Bloax for undersea and space missions :)