Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't parse/honor Palette=lib in art.ini for RA2 #1

Closed
ATHSE opened this issue Apr 21, 2023 · 8 comments
Closed

Doesn't parse/honor Palette=lib in art.ini for RA2 #1

ATHSE opened this issue Apr 21, 2023 · 8 comments

Comments

@ATHSE
Copy link

ATHSE commented Apr 21, 2023

As title states, buildings with Palette=lib are still rendered using' unit*.pal

@ATHSE
Copy link
Author

ATHSE commented Apr 23, 2023

Addendum:

Normally all buildings are drawn using their theater specific version of unitxxx.pal, Palette=lib in their art.ini code instructs the game to load the theater specific variant of the libxxx.pal, ie. instead of unitsno.pal it loads libsno.pal, instead of uniturb.pal it loads liburb.pal.

Similar palette switching code exists in RA2's art.ini for other classes of objects:

  • Units (.shp only) can have TerrainPalette=yes, which substitutes unitxxx.pal with isoxxx.pal
  • Projectiles can have AnimPalette=yes, which substitutes unitxxx.pal with anim.pal
  • Animations can have AltPalette=yes, which substitutes anim.pal with unitxxx.pal

PS. as much as it would seem logical, Palette=iso or Palette=unit does not work, it seems to be a specific exception made for the Statue of Liberty, not as a regular function. So Palette=lib should be treated as unitary, not as a command with a parameter.

@Rampastring
Copy link
Owner

@ATHSE This should be implemented now, can you confirm it works?

@ATHSE
Copy link
Author

ATHSE commented Jun 17, 2023

Crashes, the error suggests it might be choosing the name wrong, but hard to be certain. My mod includes a cache.mix with all the palettes including lib* and the rest seem to load fine.
image

@ATHSE
Copy link
Author

ATHSE commented Jun 17, 2023

It doesn't seem to matter which map I try to load now, it seems the presence of Palette=lib art in the mod, even without any buildings on the map, is enough to attempt to load the lib.x.pal ?

@Rampastring
Copy link
Owner

Rampastring commented Jun 17, 2023

The extra dot in the filename should now be gone with aadf024

@MortonPL
Copy link
Contributor

MortonPL commented Jul 3, 2023

PS. as much as it would seem logical, Palette=iso or Palette=unit does not work, it seems to be a specific exception made for the Statue of Liberty, not as a regular function. So Palette=lib should be treated as unitary, not as a command with a parameter.

This was fixed in Ares 0.1, so it should be treated as a configurable option.

It doesn't seem to matter which map I try to load now, it seems the presence of Palette=lib art in the mod, even without any buildings on the map, is enough to attempt to load the lib.x.pal ?

This is correct, palettes are loaded on parsing BuildingType art rules.

It looks like this override functions correctly, I haven't had any BuildingType palette issues while loading vanilla Yuri's Revenge or mod maps.

@ATHSE
Copy link
Author

ATHSE commented Jul 3, 2023

The automatic loading of the palette (and thus crashing) was only an issue when the naming bug was introduced in the first attempt.

I wasn't aware Ares fixed the iso/unit values, but since it supports actual custom palettes, I figured Ares support would have to be a further PR.

@Rampastring
Copy link
Owner

Sounds like it's fixed then.

Multfinite added a commit to Multfinite/WAE that referenced this issue Sep 22, 2023
ZivDero pushed a commit to ZivDero/WorldAlteringEditor that referenced this issue Jan 7, 2024
ZivDero pushed a commit to ZivDero/WorldAlteringEditor that referenced this issue Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants