Loading Unzipped Map From In-Game Download


  • Moderators

    Previously there was the folder Maps where you could have unzipped maps that could be loaded in the game.
    Now we have downloadedMaps which doesn't seem to allow loading of unzipped maps.
    -Is this correct?
    -Is there an other way to load an unzipped map?

    Zipping is just an extra step in mapmaking proces that wasn't necessary before.


    PR: https://github.com/triplea-game/triplea/pull/3339

    Map name is always found from the XML property

        <property name="mapName" value="total_world_war" editable="false">
          <string/>
        </property>
    

    Unzipped Map Directory Examples (in downloadedMaps)

    1. total_world_war
    2. total_world_war/map
    3. total_world_war-master
    4. total_world_war-master/map

    Zipped Map Examples

    1. total_world_war.zip
    2. total_world_war-master.zip

    ** If for some reason the XML mapName isn't in the format of using underscores, then the checks that use "-master" will convert it to have underscores while the other checks will use the mapName as is. So for example if the mapName was TotalWorldWar the following are valid:

    1. TotalWorldWar
    2. TotalWorldWar/map
    3. total_world_war-master
    4. total_world_war-master/map
    5. TotalWorldWar.zip
    6. total_world_war.zip
    7. total_world_war-master.zip

  • Donators Moderators Admin

    @zjelcop Yes I have had to zip everything before being able to test it.


  • Moderators

    @zjelcop As long as I've not missed something in the very last week or so, nothing needs to be zipped; just the folder structure needs to be either like the old way or the new way, you download from the repository.
    Maybe tell the folder structure of the unzipped map you seem unable to load, as I can tell unzipped maps load for me (I have many).


  • Moderators

    @hepps I don't have to.


  • Moderators Admin

    @zjelcop In order to run maps unzipped you need to remove the extension "-master" from the unzipped map folder.
    For example "world_war_ii_v4-master.zip " unzips to "world_war_ii_v4-master" now remove the "-master" to leave only "world_war_ii_v4" as folder name. That should work then.


  • Donators Moderators Admin

    @panther Ah that explains a lot. 🙂


  • Donators Moderators Admin

    @panther Ya we should post that somewhere. It's old news to some of us sadly.


  • Moderators

    @panther EDIT: I never noticed before, and it's really weird, but, yes, now I confirm that for the new way you need to remove "-master". For the old way, instead, it works the same zipped or unzipped.

    So, when unzipping a map downloaded from the repository, having the following folder path:
    elemental_forces-master/map/games...

    you can go these 2 ways:

    1. Keep the folder as per zipped, but removing the "-master":

    for example:
    elemental_forces/map/games...

    1. Turn it unzipped going the old way. What I normally do is to cut-paste out the "map" folder (that is inside the "master" folder); then rename the "map" folder with the name of the map (the part of the main folder name before "-master"); then, delete the, now empty, original "master" folder (not necessary).

    for example:
    elemental_forces/games...

    The second one is the old way, that works and always worked either zipped or unzipped, with the same names.

    When you upload a map in GitHub, on the other hand, it has to be just:
    map/games...

    since the main "master" folder is created by GitHub itself, with the name you choose for your repository (that is the map name).

    I think this should be the full info.


  • Moderators Admin

    @cernel

    Edit: Ignore this, I didn't notice your above posting (edit) while working.

    Interesting. When I unzip the "world_war_ii_v4-master.zip" to "world_war_ii_v4-master" the map structure is not changed and is as you described. However the game can't be started, as after selecting the players and hitting "Start" the attached image appears-
    0_1522593195298_v4zip.PNG

    Only when removing "-master" the game starts as expected.

    So what are you doing with the unzipped "world_war_ii_v4-master" directory to get it running?


  • Moderators

    @panther Yes, I've edited my previous post and now I confirm it. I always used to turn the folder just the old way, when unzipping, so I never noticed this weirdness before.
    My guess is that it might have something to do with the fact that the "-" sign also uses to identify mapskins, but I'm not sure this may be the reason for this strange behaviour. Just a guess I'm making now, as it really makes no sense that it requires different paths zipped and unzipped.


  • Donators Moderators Admin

    @panther perhaps add a how to guide for manual installs to the help section? using @Frostion 's Iron war with fuel from the forum and a new engine install from releases. With a manual install of a map from the map repo as well?


  • Moderators

    @panther I wonder if a developer can confirm this is intended (needing the "-master", at end name, when zipped and needing not having it unzipped, instead) or not? My guess is that this might be an unintended issue due to the fact that, upon seeing the "-" symbol, the engine might think it's looking at a mapskin; but I'm just guessing (only a developer can know what is the case here).


  • Moderators

    @prastle As long as the zip was made per norm, to manual install it one just needs to past it inside the downloadedMaps folder (no need to zip it); nothing else.

    This would be more like a guide about how to unzip and run unzipped maps you downloaded from the repository, in case somebody want to modify them.

    I think my post should fully cover it:

    If you want to unzip, and run unzipped, a map downloaded from the repository, having the following folder path:
    elemental_forces-master/map/games...

    you can go these 2 ways:

    1. Keep the folder as per zipped, but removing the "-master":

    for example:
    elemental_forces/map/games...

    1. Turn it unzipped going the old way. What I normally do is to cut-paste out the "map" folder (that is inside the "master" folder); then rename the "map" folder with the name of the map (the part of the main folder name before "-master"); then, delete the, now empty, original "master" folder (not necessary).

    for example:
    elemental_forces/games...

    The second one is the old way, that works and always worked either zipped or unzipped, with the same path names.

    When you upload a map in GitHub, on the other hand, it has to be just:
    map/games...

    since the main "master" folder is created by GitHub itself, with the name you choose for your repository (that is the map name).

    Change "elemental_forces" with whatever map name.


  • Moderators Admin

    @Cernel I weakly remember that the "-master" addition is needed for the automated procedures at GitHub. However the issue we are discussing here is a side effect and yes, it would be a good idea to hear a developer's comment. After we know more about the background, I will be happy to add a 'how to guide' as you suggested, @prastle .


  • Donators Moderators Admin

    @cernel cor but you have left out two things they also need to know. For example Iron war with fuel download from the forum here and Installing a new pre-release engine. In order to run the new maps that use the new features that will not run on current stable they also need to install a pre-release. this should all be covered in one stickied topic in help was my thought to benefit the entire community.


  • Moderators

    @panther Correct, that is just the name of the repository in GitHub, with "-master" added at the end. This is just what GitHub does when you choose to download an entire repository; so the new way was taylored around it.


  • Donators Moderators Admin

    @prastle yes the downloader pulls from the master thus why it is needed. As do the bots when updating.


  • Moderators

    @prastle I see those 2 as different matters / topics.

    A topic for:

    "Where and how to download and install the latest prerelease"
    (to test it or play maps using unreleased features)

    and another one for:

    "How to unzip, and run unzipped, a map downloaded from the official TripleA repository"
    (to possibly modify or anyways work on it unzipped)

    I actually suggest having the first one in "Help & Questions" and the second one in "Mapmaking".


  • Donators Moderators Admin

    @cernel good point but one spot probably best up to you guys. Either way this would allow all to acess easily for example @RogerCooper 's site as well.


  • Moderators

    @prastle I'd just wait what a developer have to say, as I can't believe this thing of needing different paths zipped vs unzipped may be intended; at most accepted (the fact that you need not having the "-master" in the name when unzipped).
    Probably here we need @LaFayette , if he will read this post, since the new "master" thing was his creation.