triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.35k stars 399 forks source link

Unable to Play Big World Variations #1237

Closed RogerCooper closed 8 years ago

RogerCooper commented 8 years ago

When trying to run Nekhanet 1939 I get triplea.engine.version.bin:1.9 Loading map: big_world_variations, from: C:\Users\Judy\triplea\downloadedMaps\big_world_variations-master.zip Loading map: big_world_variations, from: C:\Users\Judy\triplea\downloadedMaps\big_world_variations-master.zip java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(Unknown Source) at java.awt.EventQueue.invokeAndWait(Unknown Source) at javax.swing.SwingUtilities.invokeAndWait(Unknown Source) at games.strategy.ui.SwingAction.invokeAndWait(SwingAction.java:63) at games.strategy.triplea.TripleA.startGame(TripleA.java:117) at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInNewThread(LocalLauncher.java:49) at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$99(AbstractLauncher.java:43) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalStateException: Error in resource loading. Unable to load expected resource: polygons.txt, the error is that either we did not find the correct path to load. Check the resource loader to make sure the map zip or dir was added. Failing that, the path in this error message should be available relative to the map folder, or relative to the root of the map zip

RoiEXLab commented 8 years ago

I believe this error is related to the Map itself, not to tripleA... I'd suggest creating an issue here @DanVanAtta Ideas on why this is happening?

ron-murhammer commented 8 years ago

@RogerCooper Does this map work on 1.8.0.9?

DanVanAtta commented 8 years ago

It would be quite the process gap if this did not work in 1.8.0.9.

Looks like this has more to do with the jenky way mods were coded up. I think removing "_variants" from the resource loading search path would be sufficient. I think what broke was before a magic naming convention was used to translate a variant map back to the original.

Longer term, fixing the way mods are done would be a much better fix. Adding the XML and .properties files to the original maps seems like a good way to go. Saves all the confusion of map dependencies and the whole mod category (not to mention the hacky code that makes this work)

DanVanAtta commented 8 years ago

Hacking up the resource loading path further is not very fruitful. The 'variants' supporting code is really crufty stuff to begin with. It would be a lot simpler if mods were bundled with maps. There are not very many mods, I think that would be a good course of action until we can solve any of the original problems that motivated mods in a different / better way.

Noting, in some cases we actually do bundle mods directly with the maps they modify. For example, World at War has this note <br>Includes World at War 1940 Mod by Ice

DanVanAtta commented 8 years ago

Raising idea of dropping mod support altogether here: https://github.com/triplea-game/triplea/issues/1244, in favor of merging the mod maps in with the base maps so it woudl be just one download. It would make the game code much easier, and make the user documentation much nicer too since we wouldn't have ot endlessly explain what mods are and how to play them.

ron-murhammer commented 8 years ago

@DanVanAtta Yeah, my thoughts are actually go the other direction and make every map fully standalone. 1 map per download period (one game XML). Makes things much simpler and makes it more clear what you are downloading. The only major drawback of this duplication of files when downloading multiple maps based on the same core tiles.

Edit: To clarify, mods wouldn't really exist as everything is standalone and no map zips are dependent.

Cernelius commented 8 years ago

@ron-murhammer Before going on with this conversation, can you confirm that you actually mean that, for example, you would create 5 "age_of_tribes" maps, one for each of these xml:

Age_of_Tribes_Classical Age_of_Tribes_Cold_War Age_of_Tribes_Modern Age_of_Tribes_Primeval Age_of_Tribes_Renaissance

Duplicating everything but the xml themselves in each one of the folders, obliging Frostion to update 5 different repositories every time he wants to make any skin-related changes?

As another example, would you want to split "world_war_ii_v3" into two different maps, one for the 41 and another one for the 42, plus making 1 stand alone map for each one of these xml:

WW2v3-1941.xml WW2v3-1942.xml WW2v3-1941-3Teams.xml WW2v3-1941-freetech.xml WW2v3-1941CB4P.xml WW2v3-1941FFA.xml WW2v3-1941_ChinaMod.xml WW2v3-1941_UKfactory.xml WW2v3-1942CB4P.xml WW2v3-1939-11N.xml WW2v3-1940-11N.xml WW2v3-1941-11N.xml WW2v3-1942-11N.xml

(yes, I believe they all deserve to be kept)

And do you also intend to multiply "world_war_ii_global" into 6 skin clones, one for each of these xml:

ww2global40_2nd_edition.xml ww2global40.xml ww2global40_alpha3.xml ww2global40_alpha3_veqryn_balanced.xml ww2global40_balanced2_0.xml ww2global40_veqryn_balanced.xml

(yeah, keep them all; I've never seen anyone playing or even asking to play or even selecting any of the Veqryn's mods in lobby, but I surely believe they deserve to be kept, as well)

Also, do you have some plans for the mapskins, that you would need to multiply by the total number of mods currently available (for example, 3x2=6 NWO mapskins and 6x1=6 Global mapskins)? Or do you have plans for allowing a same mapskin referring to multiple original maps?

To be absolutely sure, can you please confirm that this is indeed your current proposal? Or are you thinking to just delete a lot of mods (I hope not)?

Just for info, this matters for me, as I intend to propose for upload 6 mods soon, currently info named: 270BC 40% 270BC 40% Rev 270BC Rev Napoleonic Empires: 5 Alliance - 1794 WWIIv3 1941 Move-Buy-Move WWIIv3 1941 Tech Advance

(270BC 40% is the successor of 270BC Tertiered I proposed for upload almost 1 year and a half ago and no uploaders wanted to add it to 270BC)

DanVanAtta commented 8 years ago

Problem is covered by https://github.com/triplea-game/triplea/issues/1246 Conversation of reducing map dependencies is covered in:

1247

RogerCooper commented 8 years ago

I suggest withdrawing the mod from the repository until the issue is resolved.

I have a large number of mods on my own site, many of which never made it to the TripleA repository. I generally tried to make mods stand alone, as I could never be sure what mods people had (except for the ones that came with the download).

I am dubious about the idea of the master map system. Any change in the master can break the mod.

DanVanAtta commented 8 years ago

@RogerCooper Downloaded map Mods are a pretty major functionality to have broken, needs to be resolved one way or another. If the problem were isolated to say one or two rarely played maps, it would be more tempting to just exclude them. #1247 discusses the future of how we will support downloaded map mods