yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.32k stars 1.56k forks source link

Weird Bug I encountered #4392

Closed NoviceCoder2000 closed 3 years ago

NoviceCoder2000 commented 3 years ago

For some weird reason, whenever I launch a mod that I made, the game won't launch (PC Version). But works perfectly fine on the mobile app, it's only a specific mod, other mods works perfectly fine in desktop. Because of it, I can't develop a new atlas and game.png files for my mod.

To Reproduce Steps to reproduce the behavior:

Expected behavior The game won't simply launch

Additional context I'm using a windows 7 os.

NoviceCoder2000 commented 3 years ago

Repository of the mod that I'm currently working on.

https://github.com/NoviceCoder2000/Wars-Mod

SomeTroglodyte commented 3 years ago

Strange. Browser opens that link, Unciv says 404 Not found... Alternate query to see what a normal listing with 'the topic' would return (third one): https://api.github.com/search/repositories?q=Unciv%20Wars%20World Default branch is not 'master' but 'main' which the "direct url input" button can't handle. We could maybe test for a given URL including the '.zip' extension and if so take it as is and not guess the branch.

So that's a marginal issue with downloading that from Unciv directly, now understood. Next test...

SomeTroglodyte commented 3 years ago

Next marginal issue now understood: Exceptions from checkModLinks in ModCheckBoxTable are 'flattened' to that "The mod you selected is incompatible" toast, even if it contains useful information.

In your mod's case that is "Building (Black Cannon) must either have an explicit cost or reference an existing tech"

However, at that point I have already a valid atlas generated. Those LeaderIcons - too large for that much unsharpness ;)

Still open: Why does Options-Check Mods not show that error?

SomeTroglodyte commented 3 years ago

Conclusion: I can not reproduce "The game won't simply launch" with the current codebase, but thank you por pointing us to those other details concerning mod download and error display.

I'll assume your jar is way outdated. If you're sure it's up-to-date please provide console output. Launch the jar directly from a cmd window using java -jar Unciv.jar.

NoviceCoder2000 commented 3 years ago

Yes, I think the jar is outdated considering I can't update my java.

considering inputting the command in the prompt only results to "unable to access jarfile"

NoviceCoder2000 commented 3 years ago

Thanks for the help @SomeTroglodyte but after adding an atlas and game.png file the game worked for me once again. I'm still unsure over how and why that happened, but I think this issue is resolved now.