Unciv icon indicating copy to clipboard operation
Unciv copied to clipboard

`TileSetConfig` not set on first load.

Open will-ca opened this issue 3 years ago • 11 comments

With ./gradlew desktop:run.

Freshly downloaded 5Hex is looking way darker in-game than the images suggest it should?

image

Feels like all the RGBs are squared.

The game.png seems fine: game

After a restart it's fine:

image

Not sure how to reproduce… But I think it's happened before too, but with a JAR.

And Pix5, on Android:

image

How it's supposed to look:

image


Yeah. This is supposed to have the same colours as FantasyHex:

image

will-ca avatar Dec 21 '21 18:12 will-ca

If I'm not mistaken, this has been brought up before and the conclusion was that this was the result of the tileset trying to override the default fantasyHex tileset

xlenstra avatar Dec 22 '21 15:12 xlenstra

5Hex doesn't do that AFAICT thoiugh, and this is specifically after Pix5 was updated (https://github.com/AdityaMH/Pix5-Tileset/pull/2) to no longer do it, nor does the tile variants example.

will-ca avatar Dec 22 '21 17:12 will-ca

5Hex doesn't do that AFAICT thoiugh, and this is specifically after Pix5 was updated (AdityaMH/Pix5-Tileset#2) to no longer do it, nor does the tile variants example.

I'm just download strike from github website, place it on folder, start game, greeny occur, delete from mod manager, restart, fixed automatically.

Cons: Can't update from mod manager

AdityaMH avatar Dec 23 '21 09:12 AdityaMH

If I'm not mistaken, this has been brought up before and the conclusion was that this was the result of the tileset trying to override the default fantasyHex tileset

Yeah, but @will-ca suggest me to not override.

AdityaMH avatar Dec 23 '21 09:12 AdityaMH

Oh! You know what? It's probably not due to overriding FantasyHex; It's probably due to TileSetConfig().useColorAsBaseTerrain being left at true (which would also happen if a tileset tries to override not FantasyHex, but Default).

will-ca avatar Dec 28 '21 00:12 will-ca

Oh! You know what? It's probably not due to overriding FantasyHex; It's probably due to TileSetConfig().useColorAsBaseTerrain being left at true (which would also happen if a tileset tries to override not FantasyHex, but Default).

But i'm set it false

AdityaMH avatar Dec 28 '21 02:12 AdityaMH

@AdityaMH Not about Pix5. I mean the config probably isn't being properly loaded on first mod download.

will-ca avatar Dec 28 '21 04:12 will-ca

@will-ca Was this solved by your change?

yairm210 avatar Jan 23 '22 12:01 yairm210

@will-ca Was this solved by your change?

I don't think I touched anything that would affect this… Test on latest master shows it still happens:

image

I think calling TileSetConfig.updateConfig(), TileSetCache.assembleTileSetConfigs(), or anything else in that stack when enabling/downloading a mod would do it. But I don't know the existing call hierarchy, and the best place to do that.

will-ca avatar Jan 23 '22 18:01 will-ca

It's not just the colours, but the entire TileSetConfig that isn't being updated on first use of the mod. E.G. tileScale:

image

And somewhat relatedly (but a different issue), when you delete the active tileset, it doesn't automatically switch over to another one:

image

will-ca avatar Jan 23 '22 23:01 will-ca

IS this still relevant?

yairm210 avatar Jun 20 '22 20:06 yairm210

Guess not

yairm210 avatar Sep 07 '22 20:09 yairm210