Robosturm / Commander_Wars

The aim of this project is to create an Advance Wars Clone with a lot of additions customizations and modding support. For Contact Inforamtion see the wiki page. Take a view on the game.
https://github.com/Robosturm/Commander_Wars/releases
GNU Lesser General Public License v3.0
213 stars 33 forks source link

Turn off terrain palettes #1802

Closed FranticFairy closed 3 months ago

FranticFairy commented 3 months ago

As discussed on discord. I would like to be able to completely turn off the 'terrain palette feature.

I have an older terrain sprite mod that I'd like to use, however it was made before terrain palettes were a thing, and so just has old sprites that don't take it into account. If I load them as-is, they break and do not display properly.

If I load them and set getDefaultPalette to 'null', then they work properly... but only on maps made from that point onwards. Maps that were made/saved with palletes are completely broken, see attached image (also posted on Discord).

2

However, if I make a map with getDefaultPalette set to 'null' and save it, the map becomes broken if I load it without the terrain mod (see second image).

3

Ideally, I'd like for a way to just... turn off these palettes, make it so that maps made with the palette work with terrain sets that don't use the palette, and maps made without the palette work without mods that don't use the palette.

Maybe something like an enablePalette function that, if set to false, stops the game from trying to apply the palette? This way, the palette can still be saved to ensure compatibility for use without the mod, while also not breaking mods that do not support the palette.