Closed Hrin3 closed 1 year ago
I'm very sorry, but Leader Mission mod currently does not support the desktop version. I will focus on resolving this issue.
It looks like the atlas doesn't match the packed image...? So just need to delete both of them and run on Desktop to rebuild them
@Jiangeshi - not OP
District鈥擲tudenicaMonastery.png
- how very curious. Gughle translates those two symbols to "throw
- ???So - what happens is there's symbols outside iso-8859-* in image names, and the loadModAtlases function has an encoding mismatch when going to disk...
Aha. Now I'm stunned. Really. Packing atlas bypassing the raison-d'être of an atlas. The map just mapping every single image as its own texture, no packing at all - almost.
But - use of an external atlas tool proven.
... so it may be an OS thing, even just between desktop platforms.
The atlas loader (which is Gdx, not ours) is unable to autodetect an encoding for an atlas file, UTF-8 with BOM or any UCS-16 will simply crash with the exact same stacktrace. So - which encoding within an atlas file does it support? JavaDoc doesn't say, but it uses BufferedReader(InputStreamReader(packFile.read()).readLine() without explicitly specifying an encoding - and those are java.io. - a little search turns up nice things like "Java design bug", "The only safe and sane thing to do is to consider all other constructors deprecated, because they cannot be trusted to behave." - meaning not explicitly passing a CharsetDecoder argument to a stream constructor, which is what Gdx does -not.
TLDR: Unciv does not support atlas files it didn't build itself - or more specifically - Unciv does not support atlas files using UTF-8 codepoints outside the ASCII range. We could, by not using the TextureAtlasData(FileHandle) constructor, essentially rewriting a large part of Gdx.
delete both of them and run on Desktop to rebuild them
Yes, maybe, but in light of the above - good chances, but if that works then transporting the result to another platform will break again. Also, deleting .atlas is enough :laughing:
@Hrin3 - do you know what encoding your Java might default to? It's not UTF-8 or that mod should work. I'd like to test an approach, but can't trip the exception without setting mine to that same encoding.
On the other hand, if you can run the jar with additional manual command line parameters, try -Dfile.encoding=UTF-8
. If that solves works around the mod error, would be interesting to know.
Leader Mission failed at the start.
After a day of hard work, it has finally been resolved that LM mod can now play on the desktop version
It is caused by Java 1.8 using OS encoding. It may be fix in libgdx https://github.com/libgdx/libgdx/issues/7155
To fix it in Unciv, you can add -Dfile.encoding=UTF8
for Unciv-Windows64.zip release, but it migth break other mod that where providing OS specific file.
Else you can update Java version provided in Unciv-Windows64.zip to Java 18 (or more).
Anyway it won't fix it for people that launch from Unciv.jar.
We forgot to close this way back when, but it's my understanding that the problem was resolved on the mod's end If that is incorrect and there is still work to do on our end, please notify me
Platform: Desktop Version: 4.6.14-patch1 (Build 871) Rulesets: [Civ V - Gods & Kings, Leader Mission, Civ V - Vanilla, 5Hex Tileset] Last Screen:
com.unciv.ui.screens.newgamescreen.NewGameScreen
OS: Windows 10 Java: Oracle Corporation 25.232-b09 Max Memory: 910 MB
Message: