Grid Sage Forums

Grid Sage Forums

  • November 14, 2024, 04:14:48 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Author Topic: REXpaint color tags do not match CDDA color tags  (Read 148 times)

Boondiggle

  • Unaware
  • *
  • Posts: 4
    • View Profile
REXpaint color tags do not match CDDA color tags
« on: November 09, 2024, 01:42:45 PM »

Hello!

I made some ascii art for the guns a few years ago, but had to put that on hold for personal reasons. I'm back and ready to continue, but a problem I had then is cropping back up now.
Some colors, when exported to CDDA format using ctrl+j, are either different colors than what's in-game (some values of yellow in REXpaint become shades of brown in CDDA, for example), or are color combos that do not work at all (e.g. 'color_yellow_brown' throws an error and does not display. 'yellow with a brown background' does exist in-game, but it's called 'color_yellow_yellow' instead).

I looked through the REXpaint settings/config and could not find a way to change or add color tags for export. I looked through the directory, too, but didn't see any files I could open in notepad that had these color tags defined anywhere.

I'm motivated to get this working. I'll run a test later to see exactly which ones aren't working and what they should be instead. If I get a list of "bad color > good color" together, is this something that can be fixed?
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4474
    • View Profile
    • Cogmind
Re: REXpaint color tags do not match CDDA color tags
« Reply #1 on: November 09, 2024, 05:54:25 PM »

This might have to do with the version of CDDA you are using? CDDA itself had inconsistent use of colors and issues with its docs/source not matching up, but this was resolved specifically for REXPaint years ago later in this original thread. Or maybe CDDA formatting has changed again in the time since? I already updated it once specifically due to CDDA bugs :P

Technically I can update it with yet another patch, but one would need to be 100% sure that it actually works in the latest version and track down when and why it changed from when it was originally working just fine. Kind of annoying that CDDA broke compatibility again if that's the case...

In the meantime, depending on your needs I guess there'd be the option of using find and replace to change tags in the art file itself.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Boondiggle

  • Unaware
  • *
  • Posts: 4
    • View Profile
Re: REXpaint color tags do not match CDDA color tags
« Reply #2 on: November 11, 2024, 12:52:04 PM »

I have the latest stable steam version. I'm discussing this with the CDDA discord and trying to figure out if there is a way to include all the color combos instead of only half of them (this is internal CDDA stuff, nothing to do with REXPaint yet). For the ones that do work, I already have a list of exported color tags vs what they should be. I'm doing more testing this evening with it. Thanks! REXPaint has been an invaluable tool for ascii art creation for CDDA, and I'll use it regardless.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4474
    • View Profile
    • Cogmind
Re: REXpaint color tags do not match CDDA color tags
« Reply #3 on: November 12, 2024, 12:27:27 AM »

Awesome, in any case you can use the text replacement approach for now, and yeah let me know if and when there are changes or a confirmed stable list. I could release a patch, but ideally once it's actually final (again).

Also not sure if the Steam version diverges from non-Steam in this regard... plus there are plenty of forks out there, though I imagine none of them would really touch this stuff, it's a mainline concern (and likely same as Steam, as I understand it).
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Boondiggle

  • Unaware
  • *
  • Posts: 4
    • View Profile
Re: REXpaint color tags do not match CDDA color tags
« Reply #4 on: November 13, 2024, 11:30:09 PM »

Here is an image exported from REXPaint 1.70 using all of CDDA's possible colors

Code: [Select]
  {
    "type": "ascii_art",
    "id": "22cb",
    "picture": [
      "<color_black_red>ƒ</color><color_red>ƒ</color><color_green_red>ƒ</color><color_brown_red>ƒ</color><color_blue_red>ƒ</color><color_magenta_red>ƒ</color><color_cyan_red>ƒ</color><color_light_gray_red>ƒ</color><color_dark_gray_red>ƒ</color><color_light_red_red>ƒ</color><color_light_green_red>ƒ</color><color_yellow_red>ƒ</color><color_light_blue_red>ƒ</color><color_pink_red>ƒ</color><color_light_cyan_red>ƒ</color><color_white_red>ƒ",
      "</color><color_black_green>ƒ</color><color_red_green>ƒ</color><color_green>ƒ</color><color_brown_green>ƒ</color><color_blue_green>ƒ</color><color_magenta_green>ƒ</color><color_cyan_green>ƒ</color><color_light_gray_green>ƒ</color><color_dark_gray_green>ƒ</color><color_light_red_green>ƒ</color><color_light_green_green>ƒ</color><color_yellow_green>ƒ</color><color_light_blue_green>ƒ</color><color_pink_green>ƒ</color><color_light_cyan_green>ƒ</color><color_white_green>ƒ",
      "</color><color_black_brown>ƒ</color><color_red_brown>ƒ</color><color_green_brown>ƒ</color><color_brown>ƒ</color><color_blue_brown>ƒ</color><color_magenta_brown>ƒ</color><color_cyan_brown>ƒ</color><color_light_gray_brown>ƒ</color><color_dark_gray_brown>ƒ</color><color_light_red_brown>ƒ</color><color_light_green_brown>ƒ</color><color_yellow_brown>ƒ</color><color_light_blue_brown>ƒ</color><color_pink_brown>ƒ</color><color_light_cyan_brown>ƒ</color><color_white_brown>ƒ",
      "</color><color_black_blue>ƒ</color><color_red_blue>ƒ</color><color_green_blue>ƒ</color><color_brown_blue>ƒ</color><color_blue>ƒ</color><color_magenta_blue>ƒ</color><color_cyan_blue>ƒ</color><color_light_gray_blue>ƒ</color><color_dark_gray_blue>ƒ</color><color_light_red_blue>ƒ</color><color_light_green_blue>ƒ</color><color_yellow_blue>ƒ</color><color_light_blue_blue>ƒ</color><color_pink_blue>ƒ</color><color_light_cyan_blue>ƒ</color><color_white_blue>ƒ",
      "</color><color_black_magenta>ƒ</color><color_red_magenta>ƒ</color><color_green_magenta>ƒ</color><color_brown_magenta>ƒ</color><color_blue_magenta>ƒ</color><color_magenta>ƒ</color><color_cyan_magenta>ƒ</color><color_light_gray_magenta>ƒ</color><color_dark_gray_magenta>ƒ</color><color_light_red_magenta>ƒ</color><color_light_green_magenta>ƒ</color><color_yellow_magenta>ƒ</color><color_light_blue_magenta>ƒ</color><color_pink_magenta>ƒ</color><color_light_cyan_magenta>ƒ</color><color_white_magenta>ƒ",
      "</color><color_black_cyan>ƒ</color><color_red_cyan>ƒ</color><color_green_cyan>ƒ</color><color_brown_cyan>ƒ</color><color_blue_cyan>ƒ</color><color_magenta_cyan>ƒ</color><color_cyan>ƒ</color><color_light_gray_cyan>ƒ</color><color_dark_gray_cyan>ƒ</color><color_light_red_cyan>ƒ</color><color_light_green_cyan>ƒ</color><color_yellow_cyan>ƒ</color><color_light_blue_cyan>ƒ</color><color_pink_cyan>ƒ</color><color_light_cyan_cyan>ƒ</color><color_white_cyan>ƒ",
      "</color><color_black_light_gray>ƒ</color><color_red_light_gray>ƒ</color><color_green_light_gray>ƒ</color><color_brown_light_gray>ƒ</color><color_blue_light_gray>ƒ</color><color_magenta_light_gray>ƒ</color><color_cyan_light_gray>ƒ</color><color_light_gray>ƒ</color><color_dark_gray_light_gray>ƒ</color><color_light_red_light_gray>ƒ</color><color_light_green_light_gray>ƒ</color><color_yellow_light_gray>ƒ</color><color_light_blue_light_gray>ƒ</color><color_pink_light_gray>ƒ</color><color_light_cyan_light_gray>ƒ</color><color_white_light_gray>ƒ",
      "</color><color_black_dark_gray>ƒ</color>       <color_dark_gray>ƒ</color>       ",
      "<color_black_light_red>ƒ</color>        <color_light_red>ƒ</color>      ",
      "<color_black_light_green>ƒ</color>         <color_light_green>ƒ</color>     ",
      "<color_black_yellow>ƒ</color>          <color_yellow>ƒ</color>    ",
      "<color_black_light_blue>ƒ</color>           <color_light_blue>ƒ</color>   ",
      "<color>ƒ</color>            <color_pink>ƒ</color>  ",
      "<color_black_light_cyan>ƒ</color>             <color_light_cyan>ƒ</color> ",
      "<color_black_white>ƒ</color>              <color_white>ƒ"
    ]
  },

And here's what it looks like in-game (tested with 0.G and 0.G STEAM)



Here is the same code, but updated with color tags that match definitions in the current stable version of CDDA

Code: [Select]
    {
    "type": "ascii_art",
    "id": "22cb",
    "picture": [
      "<color_black_red>ƒ</color><color_red>ƒ</color><color_green_red>ƒ</color><color_brown_red>ƒ</color><color_blue_red>ƒ</color><color_magenta_red>ƒ</color><color_cyan_red>ƒ</color><color_light_gray_red>ƒ</color><color_dark_gray_red>ƒ</color><color_light_red_red>ƒ</color><color_light_green_red>ƒ</color><color_yellow_red>ƒ</color><color_light_blue_red>ƒ</color><color_pink_red>ƒ</color><color_light_cyan_red>ƒ</color><color_white_red>ƒ",
      "</color><color_black_green>ƒ</color><color_red_green>ƒ</color><color_green>ƒ</color><color_brown_green>ƒ</color><color_blue_green>ƒ</color><color_magenta_green>ƒ</color><color_cyan_green>ƒ</color><color_light_gray_green>ƒ</color><color_dark_gray_green>ƒ</color><color_light_red_green>ƒ</color><color_light_green_green>ƒ</color><color_yellow_green>ƒ</color><color_light_blue_green>ƒ</color><color_pink_green>ƒ</color><color_light_cyan_green>ƒ</color><color_white_green>ƒ",
      "</color><color_black_yellow>ƒ</color><color_red_yellow>ƒ</color><color_green_yellow>ƒ</color><color_brown>ƒ</color><color_blue_yellow>ƒ</color><color_magenta_yellow>ƒ</color><color_cyan_yellow>ƒ</color><color_light_gray_yellow>ƒ</color><color_dark_gray_yellow>ƒ</color><color_light_red_yellow>ƒ</color><color_light_green_yellow>ƒ</color><color_yellow_yellow>ƒ</color><color_light_blue_yellow>ƒ</color><color_pink_yellow>ƒ</color><color_light_cyan_yellow>ƒ</color><color_white_yellow>ƒ",
      "</color><color_h_blue>ƒ</color><color_h_red>ƒ</color><color_h_green>ƒ</color><color_h_brown>ƒ</color><color_blue>ƒ</color><color_h_magenta>ƒ</color><color_h_cyan>ƒ</color><color_h_light_gray>ƒ</color><color_h_dark_gray>ƒ</color><color_h_light_red>ƒ</color><color_h_light_green>ƒ</color><color_h_yellow>ƒ</color><color_h_light_blue>ƒ</color><color_h_pink>ƒ</color><color_h_light_cyan>ƒ</color><color_h_white>ƒ",
      "</color><color_black_magenta>ƒ</color><color_red_magenta>ƒ</color><color_green_magenta>ƒ</color><color_brown_magenta>ƒ</color><color_blue_magenta>ƒ</color><color_magenta>ƒ</color><color_cyan_magenta>ƒ</color><color_light_gray_magenta>ƒ</color><color_dark_gray_magenta>ƒ</color><color_light_red_magenta>ƒ</color><color_light_green_magenta>ƒ</color><color_yellow_magenta>ƒ</color><color_light_blue_magenta>ƒ</color><color_pink_magenta>ƒ</color><color_light_cyan_magenta>ƒ</color><color_white_magenta>ƒ",
      "</color><color_black_cyan>ƒ</color><color_red_cyan>ƒ</color><color_green_cyan>ƒ</color><color_brown_cyan>ƒ</color><color_blue_cyan>ƒ</color><color_magenta_cyan>ƒ</color><color_cyan>ƒ</color><color_light_gray_cyan>ƒ</color><color_dark_gray_cyan>ƒ</color><color_light_red_cyan>ƒ</color><color_light_green_cyan>ƒ</color><color_yellow_cyan>ƒ</color><color_light_blue_cyan>ƒ</color><color_pink_cyan>ƒ</color><color_light_cyan_cyan>ƒ</color><color_white_cyan>ƒ",
      "</color><color_black_white>ƒ</color><color_red_white>ƒ</color><color_green_white>ƒ</color><color_brown_white>ƒ</color><color_blue_white>ƒ</color><color_magenta_white>ƒ</color><color_cyan_white>ƒ</color><color_light_gray>ƒ</color><color_dark_gray_white>ƒ</color><color_light_red_white>ƒ</color><color_light_green_white>ƒ</color><color_yellow_white>ƒ</color><color_light_blue_white>ƒ</color><color_pink_white>ƒ</color><color_light_cyan_white>ƒ</color><color_white_white>ƒ",
      "</color><color_i_dark_gray>ƒ</color>       <color_dark_gray>ƒ</color>       ",
      "</color><color_i_light_red>ƒ</color>        <color_light_red>ƒ</color>      ",
      "</color><color_i_light_green>ƒ</color>         <color_light_green>ƒ</color>     ",
      "</color><color_i_yellow></color>           <color_yellow>ƒ</color>    ",
      "</color><color_i_light_blue>ƒ</color>           <color_light_blue>ƒ</color>   ",
      "</color><color_i_pink>ƒ</color>            <color_pink>ƒ</color>  ",
      "</color><color_i_light_cyan>ƒ</color>             <color_light_cyan>ƒ</color> ",
  "</color><color_i_white>ƒ</color>              <color_white>ƒ</color>"]
  },

And here's what that looks like in-game



Here's a table of current color tags that need updating and their updated versions to their right:

currentupdatedcurrentupdatedcurrentupdated
black_brownblack_yellowmagenta_blueh_magentalight_red_light_graylight_red_white
red_brownred_yellowcyan_blueh_cyanlight_green_light_graylight_green_white
green_browngreen_yellowlight_gray_blueh_light_grayyellow_light_grayyellow_white
blue_brownblue_yellowdark_gray_blueh_dark_graylight_blue_light_graylight_blue_white
magenta_brownmagenta_yellowlight_red_blueh_light_redpink_light_graypink_white
cyan_browncyan_yellowlight_green_blueh_light_greenlight_cyan_light_graylight_cyan_white
light_gray_brownlight_gray_yellowyellow_blueh_yellowwhite_light_graywhite_white
dark_gray_browndark_gray_yellowlight_blue_blueh_light_blueblack_dark_grayi_dark_gray
light_red_brownlight_red_yellowpink_blueh_pinkblack_light_redi_light_red
light_green_brownlight_green_yellowlight_cyan_blueh_light_cyanblack_light_greeni_light_green
yellow_brownyellow_yellowwhite_blueh_whiteblack_yellowi_yellow
light_blue_brownlight_blue_yellowblack_light_grayblack_whiteblack_light_bluei_light_blue
pink_brownpink_yellowred_light_grayred_whiteblack_pinki_pink
light_cyan_brownlight_cyan_yellowgreen_light_graygreen_whiteblack_light_cyani_light_cyan
white_brownwhite_yellowbrown_light_graybrown_whiteblack_whitei_white
black_blueh_blueblue_light_grayblue_white
red_blueh_redmagenta_light_graymagenta_white
green_blueh_greencyan_light_graycyan_white
brown_blueh_browndark_gray_light_graydark_gray_white



I'm not sure when this changed. I'll have to do some more digging to find that out. As far as having a full color palette goes, that was a pipe dream. I learned that Cata has technical restrictions placed on its colors to conform with a particular ANSI standard, so the above "half" palette is all the colors that artists have available to work with.
Logged

Boondiggle

  • Unaware
  • *
  • Posts: 4
    • View Profile
Re: REXpaint color tags do not match CDDA color tags
« Reply #5 on: November 13, 2024, 11:43:27 PM »

To account for CDDA's limited selection of colors, I hacked together a new palette for REXPaint:

Code: [Select]
{  0,  0,  0} {255,  0,  0} {  0,110,  0} { 92, 51, 23} {  0,  0,200} {139, 58, 98} {  0,150,180} {150,150,150} { 99, 99, 99} {255,150,150} {  0,255,  0} {255,255,  0} {100,100,255} {254,  0,254} {  0,240,255} {255,255,255}
{255,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,110,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{ 92, 51, 23} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,  0,200} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{139, 58, 98} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,150,180} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{150,150,150} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}
{  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0} {  0,  0,  0}

It's pretty simple. Foreground colors right, background colors down. You just have to remember that light (bright) backgrounds only work with a black foreground. Attempting to use a light color background with any foreground color besides black will result in an error in-game.

« Last Edit: Today at 12:02:27 AM by Boondiggle »
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4474
    • View Profile
    • Cogmind
Re: REXpaint color tags do not match CDDA color tags
« Reply #6 on: Today at 01:21:40 AM »

Okay thanks for the details! I looked back at REXPaint's source to see the original reference material, and it was based on the work done in the original thread I linked earlier (supported by the initial user), and the official docs section here (which by the way includes an incorrect link that should be this instead). I don't see any color documentation other that what's in the source itself.

I'm quite curious why CDDA can't use like... a normal naming scheme. It was kinda bad before and it's even more terrible now xD. At least insofar as these particular tags are concerned.

On closer inspection, your table doesn't seem to align with the source code there, or at least not all possibilities are represented. Why would that be? I could just outright make a direct conversion based on your table for export purposes (which would also save time), though I would want to know that it's correct and complete in that case.
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon