Author Topic: Palette questions and original grp art errors  (Read 7705 times)

Offline war2x

  • Peon
  • **
  • Posts: 4
    • View Profile
Palette questions and original grp art errors
« on: July 05, 2021, 10:36:09 PM »
First question, why didn't Blizzard put the player color palettes somewhere else instead of duplicating them in each tileset?

Secondly, I'm looking at the forest.ppl file and all the colors seem to be 1/4 the color they should be. If you look at LambChops' 256x256 example palette that he posted here, let's look at the second color (since the first is black) which is rgb(0,37,63) in the forest.ppl file but rgb(0,148,252) in LambChops' example file. Clearly those are the colors that were used so why did Blizzard store the values as 1/4 what they should be (and were, in game)?

Thirdly, I've noticed some errors in the grunt.grp file where the artist or the encoder seems to have made a mistake and left out some pixels in several of the frames. Using a shift instead of a pixel instruction. I looked at the human footman grp file and there are some similar issues and at least one frame with a stray pixel. I'm sure most grp files have such errors. Does anyone know how these errors happened? I haven't seen anyone mention them before but I was thinking of creating patched grp files with fixes. I'm no artist so I might need palette color suggestions.

For grunt frame 3 these are the memory locations you would need to edit assuming you want to use palette location 86 (0x56).

0x00000CFB 0x03
0x00000CFE 0x56

0x00000D34 0x03
0x00000D1A 0x56

0x00000D34 0x03
0x00000D37 0x56

0x00000D4A 0x04
0x00000D4E 0x56

0x00000D5F 0x04
0x00000D63 0x56

0x00000D73 0x04
0x00000D77 0x56

0x00000D88 0x03
0x00000D8B 0x56

I'll throw a final question in and ask if anyone knows what the forest.cv4, forest.vr4, forest.vx4, nf_rock.bin, nf_tree.bin, and nf_wall.bin files are for.

Thank you

Below forest_palette.png is LambChomps sample palette, palette_example.png is what the forest.ppl data looks like, and grunt_error.png is one example of missing pixels in the grp files
« Last Edit: July 05, 2021, 10:45:53 PM by war2x »

Offline Mistral

  • Administrator
  • Axe Thrower
  • *****
  • Posts: 401
    • View Profile
Re: Palette questions and original grp art errors
« Reply #1 on: July 06, 2021, 08:33:41 AM »
vr4 files are minitiles raw 8x8 graphics (just tables of 8x8 bytes - id of color from ppl palette)
vx4 files are megatiles - 32x32 squares created from 16 minitiles
cv4 files are megatiles converting to MTX map - in this way they are stored in PUDs
n(something)_rock.bin, n(something)_tree.bin and n(something)_wall.bin are files that store tables that shows how neighbours tiles converting on this tileset when tree chopped or rock demolished or wall breaked.


P.S. 1 year ago i tried to create tileset editor but then was too lazy to continue and it was too bad anyways. But i have old bugged and cursed version if you want to try.

Offline war2x

  • Peon
  • **
  • Posts: 4
    • View Profile
Re: Palette questions and original grp art errors
« Reply #2 on: July 06, 2021, 02:11:11 PM »
Thanks for the info. Do you know why blizzard’s palette values are 1/4 of their real values in game though?

Offline Available

  • Global Moderator
  • Grunt
  • *****
  • Posts: 180
  • We're smarter than you.
    • View Profile
Re: Palette questions and original grp art errors
« Reply #3 on: July 06, 2021, 02:24:28 PM »
why blizzard’s palette values are 1/4 of their real values
Because optimized for game engine.

why didn't Blizzard put the player color palettes somewhere else instead of duplicating them in each tileset?
Because player colors must be presented in any palette, obviously.
Moreover, they are not directly duplicated. There are some differences.

artist or the encoder seems to have made a mistake
frame 3(2 from 0) not that bad, see 16,26,39,...

I'm sure it was some kind of bugged batch converter, there are so many small bugs


Btw many similar bugs fixed, mostly realated to "blackfix" affected grps, unit portraits and so on,
Choose "palette options" while installing war2combat if interested.
« Last Edit: July 07, 2021, 02:23:35 AM by Available »

Offline war2x

  • Peon
  • **
  • Posts: 4
    • View Profile
Re: Palette questions and original grp art errors
« Reply #4 on: July 06, 2021, 11:25:48 PM »
OK how were storing the palette values at 1/4 their real values optimizing it for the game engine? Can you explain more?

Offline Available

  • Global Moderator
  • Grunt
  • *****
  • Posts: 180
  • We're smarter than you.
    • View Profile
Re: Palette questions and original grp art errors
« Reply #5 on: July 07, 2021, 05:32:35 AM »
Can you explain more?
Old standard VGA palette contains color info as 3x 6 bit.
I'm sure some low-level subroutine worked with this.
Maybe something else too, the programmer will always find how to use the restrictions for the good.
« Last Edit: July 07, 2021, 06:14:05 AM by Available »

Offline war2x

  • Peon
  • **
  • Posts: 4
    • View Profile
Re: Palette questions and original grp art errors
« Reply #6 on: July 07, 2021, 01:39:30 PM »
Ah thanks. Also what’s blackfix?

Offline Available

  • Global Moderator
  • Grunt
  • *****
  • Posts: 180
  • We're smarter than you.
    • View Profile
Re: Palette questions and original grp art errors
« Reply #7 on: July 07, 2021, 03:07:25 PM »
what’s blackfix

something like this




Offline Nox

  • Death Knight
  • *********
  • Posts: 4133
    • View Profile
Re: Palette questions and original grp art errors
« Reply #8 on: July 13, 2021, 08:55:49 AM »
omg what the hell is tha green color, so buetiful!!!!
Mr.120apm aka U8! Best player of the world losing 4v3 against Phillip5256.

Offline dannyldd

  • Grunt
  • ***
  • Posts: 212
    • View Profile
Re: Palette questions and original grp art errors
« Reply #9 on: August 15, 2021, 10:35:54 AM »
First question, why didn't Blizzard put the player color palettes somewhere else instead of duplicating them in each tileset?

Secondly, I'm looking at the forest.ppl file and all the colors seem to be 1/4 the color they should be. If you look at LambChops' 256x256 example palette that he posted here, let's look at the second color (since the first is black) which is rgb(0,37,63) in the forest.ppl file but rgb(0,148,252) in LambChops' example file. Clearly those are the colors that were used so why did Blizzard store the values as 1/4 what they should be (and were, in game)?

Thirdly, I've noticed some errors in the grunt.grp file where the artist or the encoder seems to have made a mistake and left out some pixels in several of the frames. Using a shift instead of a pixel instruction. I looked at the human footman grp file and there are some similar issues and at least one frame with a stray pixel. I'm sure most grp files have such errors. Does anyone know how these errors happened? I haven't seen anyone mention them before but I was thinking of creating patched grp files with fixes. I'm no artist so I might need palette color suggestions.

For grunt frame 3 these are the memory locations you would need to edit assuming you want to use palette location 86 (0x56).

0x00000CFB 0x03
0x00000CFE 0x56

0x00000D34 0x03
0x00000D1A 0x56

0x00000D34 0x03
0x00000D37 0x56

0x00000D4A 0x04
0x00000D4E 0x56

0x00000D5F 0x04
0x00000D63 0x56

0x00000D73 0x04
0x00000D77 0x56

0x00000D88 0x03
0x00000D8B 0x56

I'll throw a final question in and ask if anyone knows what the forest.cv4, forest.vr4, forest.vx4, nf_rock.bin, nf_tree.bin, and nf_wall.bin files are for.

Thank you

Below forest_palette.png is LambChomps sample palette, palette_example.png is what the forest.ppl data looks like, and grunt_error.png is one example of missing pixels in the grp files


With respect to the skipped pixels from grunt.grp,I can surely let you know that I saw this same situation with the archer.grp (spearman.grp) and I just corrected them with respect to the unit sprite. I didn't notice any further bug in game ... Those pixels are so small to notice that I didn't care before till looking up the file, maybe original graphics artist thought it would fit better with the environment the unit is playing on.
forest.cv4 = I haven't touched up this file but it's just another one required for the tiles on each tileset (forest,winterland,iceland)
forest.vr4 = another information file for the tiles on the map
forest.vx4 = this is a file I have modded along with the palette file, which is the most important for tiles to been shown off inside the game. Even if the tiles file has different colors than the palette, the colors will change still depending on the palette file. This file offers a good view from all the tiles that are used on the map: wood + water + coast + rocks + walls. Pretty good file to help out developing a new tileset.

** I'm looking up for anybody if could manage to make a whole new tileset for the game. I have set up 4 new tilesets in my warcraft 2 mod called as DAIFE Enhanced >> https://gamebanana.com/mods/288680
But thanks to a very recent plugin made by Edogorod, now it's possible to set up to 52 tilesets in-game for campaigns. I have currently 9(+4 base tilesets) custom ones available, but it's still to add up to 52.**


With respect to your final question about forest files, they serve for: