TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    First map; error: Unable to load expected resource: polygons.txt

    Scheduled Pinned Locked Moved Map Making
    19 Posts 3 Posters 2.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • redrumR Offline
      redrum Admin @Hidde2k
      last edited by

      @Hidde2k Welcome to the world of map making! I downloaded your map and placed the unzipped folder into "downloadedMaps" directory. I see the below error which indicates that you have the polygon for Vliegenbos defined twice (line 21 and 63) which causes the map to fail to read the polygons file and then fail to load:

      Mar 23, 2020 11:19:50 AM games.strategy.triplea.ui.mapdata.MapData <init>
      SEVERE: Failed to initialize map data
      java.io.IOException: java.lang.IllegalArgumentException: name found twice:Vliegenbos
      	at games.strategy.util.PointFileReaderWriter.readStream(PointFileReaderWriter.java:265)
      	at games.strategy.util.PointFileReaderWriter.readOneToManyPolygons(PointFileReaderWriter.java:214)
      	at games.strategy.triplea.ui.mapdata.MapData.runWithInputStream(MapData.java:225)
      	at games.strategy.triplea.ui.mapdata.MapData.readPolygonsOneToMany(MapData.java:218)
      	at games.strategy.triplea.ui.mapdata.MapData.<init>(MapData.java:162)
      	at games.strategy.triplea.ui.HeadedUiContext.internalSetMapDir(HeadedUiContext.java:79)
      	at games.strategy.triplea.ui.AbstractUiContext.setDefaultMapDir(AbstractUiContext.java:107)
      	at games.strategy.triplea.ui.TripleAFrame.create(TripleAFrame.java:232)
      	at games.strategy.triplea.TripleA.startGame(TripleA.java:105)
      	at games.strategy.engine.framework.startup.launcher.LocalLauncher.loadGame(LocalLauncher.java:60)
      	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInNewThread(LocalLauncher.java:39)
      	at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$0(AbstractLauncher.java:51)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalArgumentException: name found twice:Vliegenbos
      	at games.strategy.util.PointFileReaderWriter.readMultiplePolygons(PointFileReaderWriter.java:221)
      	at games.strategy.util.PointFileReaderWriter.lambda$readOneToManyPolygons$7(PointFileReaderWriter.java:214)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
      	at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
      	at java.util.Iterator.forEachRemaining(Unknown Source)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
      	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
      	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
      	at java.util.stream.ReferencePipeline.forEachOrdered(Unknown Source)
      	at games.strategy.util.PointFileReaderWriter.readStream(PointFileReaderWriter.java:263)
      	... 12 more
      
      Mar 23, 2020 11:19:50 AM games.strategy.triplea.util.Stopwatch done
      INFO: Loading UI Context took 176 ms
      Mar 23, 2020 11:19:50 AM games.strategy.engine.framework.startup.launcher.LocalLauncher loadGame
      SEVERE: Failed to start game
      java.lang.IllegalStateException: No data of type centers for territory: 1
      No data of type centers for territory: 2
      No data of type centers for territory: 3
      No data of type centers for territory: 4
      No data of type centers for territory: 5
      No data of type centers for territory: 6
      No data of type centers for territory: 7
      No data of type centers for territory: 8
      No data of type centers for territory: 9
      No data of type centers for territory: 10
      No data of type centers for territory: 11
      No data of type centers for territory: 12
      No data of type centers for territory: 13
      No data of type centers for territory: 14
      No data of type centers for territory: 15
      No data of type centers for territory: 16
      No data of type centers for territory: 17
      No data of type centers for territory: 18
      No data of type centers for territory: 19
      No data of type centers for territory: 20
      No data of type centers for territory: 21
      No data of type centers for territory: 22
      No data of type centers for territory: 23
      No data of type centers for territory: 24
      No data of type centers for territory: 25
      No data of type centers for territory: 26
      No data of type centers for territory: 27
      No data of type centers for territory: 28
      No data of type centers for territory: 29
      No data of type centers for territory: Aalsmeer centrum
      No data of type centers for territory: Aalsmeer west
      No data of type centers for territory: Abcoude
      No data of type centers for territory: Abcoudermeer
      No data of type centers for territory: Adam-Rijn K.
      No data of type centers for territory: Adam-Rijn K. 2
      No data of type centers for territory: Adam-Rijn K. 3
      No data of type centers for territory: Adam-Rijn K. 4
      No data of type centers for territory: Adam-Rijn K. 5
      No data of type centers for territory: Afrikahaven
      No data of type centers for territory: Almere
      No data of type centers for territory: Amstel 1
      No data of type centers for territory: Amstel 2
      No data of type centers for territory: Amstel 3
      No data of type centers for territory: Amstel 4
      No data of type centers for territory: Amstel 5
      No data of type centers for territory: Amstel 6
      No data of type centers for territory: Amstel 7
      No data of type centers for territory: Amstelpark
      No data of type centers for territory: Amstelveen Oude Dorp
      No data of type centers for territory: Amstelveen Stadshart
      No data of type centers for territory: Amsterdamse Bos zuid
      No data of type centers for territory: Amsterdamse bos noord
      No data of type centers for territory: ArenA Park
      No data of type centers for territory: Baan 04
      No data of type centers for territory: Baan 27
      No data of type centers for territory: Baan 36 C
      No data of type centers for territory: Baan 36 en 06
      No data of type centers for territory: Badhoevedorp
      No data of type centers for territory: Badhoever Wei
      No data of type centers for territory: Bedrijventerrein Sloterdijk
      No data of type centers for territory: Bedrijventerrein de Omval
      No data of type centers for territory: Bellamybuurt
      No data of type centers for territory: Betondorp-Middenmeer
      No data of type centers for territory: Beukenhorst
      No data of type centers for territory: Bijlmer centrum
      No data of type centers for territory: Bijlmermeer
      No data of type centers for territory: Bloemenbuurt
      No data of type centers for territory: Boeslingheliede
      No data of type centers for territory: Bovendiep
      No data of type centers for territory: Bovenkerk
      No data of type centers for territory: Bovenste Blik
      No data of type centers for territory: Broek in Waterland
      No data of type centers for territory: Buiksloot
      No data of type centers for territory: Buikslotermeer
      No data of type centers for territory: Buitenveldert
      No data of type centers for territory: Bullewijk
      No data of type centers for territory: Centraal Station
      No data of type centers for territory: Dapper-Indische buurt
      No data of type centers for territory: De Horn
      No data of type centers for territory: Diemen
      No data of type centers for territory: Diemen noord
      No data of type centers for territory: Diemen zuid
      No data of type centers for territory: Diemerpark
      No data of type centers for territory: Duivendrecht
      No data of type centers for territory: Durgerdam
      No data of type centers for territory: Elzenhagen
      No data of type centers for territory: Flevoland
      No data of type centers for territory: Fredrik Hendrikbuurt
      No data of type centers for territory: Gaasperpark
      No data of type centers for territory: Gaasperplas
      No data of type centers for territory: Geiner Wei
      No data of type centers for territory: Gooimeer
      No data of type centers for territory: Gouwzee
      No data of type centers for territory: Grachten N
      No data of type centers for territory: Haarlem Zuid
      No data of type centers for territory: Haarlem centrum
      No data of type centers for territory: Haarlem noord
      No data of type centers for territory: Hakkelaarsbrug
      No data of type centers for territory: Han plas
      No data of type centers for territory: Haven Noord
      No data of type centers for territory: Haven noord noord
      No data of type centers for territory: Havenbuurt
      No data of type centers for territory: Havenwater 1
      No data of type centers for territory: Havenwater 2
      No data of type centers for territory: Helmersbuurt
      No data of type centers for territory: Holendrecht
      No data of type centers for territory: Holysloot
      No data of type centers for territory: Holysloter Die
      No data of type centers for territory: Hoofddorp
      No data of type centers for territory: Ijburg
      No data of type centers for territory: Ijburgbaai midden
      No data of type centers for territory: Ijburgbaai oost
      No data of type centers for territory: Ijburgbaai west
      No data of type centers for territory: Java-Oostelijk Havengebied
      No data of type centers for territory: Jeugdland
      No data of type centers for territory: Jordaan
      No data of type centers for territory: Kabel
      No data of type centers for territory: Keizer Karelpark
      No data of type centers for territory: Kerk AE
      No data of type centers for territory: Kinselmeer
      No data of type centers for territory: Kleine Poel
      No data of type centers for territory: Kleine meer
      No data of type centers for territory: Kostverloren-Bankras
      No data of type centers for territory: Landsmeer
      No data of type centers for territory: Landsmeerder Wei
      No data of type centers for territory: Leek
      No data of type centers for territory: Lustoord
      No data of type centers for territory: Lutkemeer
      No data of type centers for territory: Marken
      No data of type centers for territory: Meerwijkplas
      No data of type centers for territory: Middelpolder
      No data of type centers for territory: Middenhoven
      No data of type centers for territory: Mooie Nel
      No data of type centers for territory: Muiden
      No data of type centers for territory: Muiderberg
      No data of type centers for territory: Museumkwartier
      No data of type centers for territory: Naarden
      No data of type centers for territory: Naarder Wei
      No data of type centers for territory: Naardermeer
      No data of type centers for territory: Natuurreservaat Naardermeer
      No data of type centers for territory: Nes aan de Amstel
      No data of type centers for territory: Nieuwe Zijde
      No data of type centers for territory: Nieuwendammerham
      No data of type centers for territory: Nigtevecht
      No data of type centers for territory: Noorder IJplas
      No data of type centers for territory: Oosteinde
      No data of type centers for territory: Oostelijke Eilanden
      No data of type centers for territory: Oosterdok
      No data of type centers for territory: Oosterparkbuurt
      No data of type centers for territory: Oostzaan Zuidende
      No data of type centers for territory: Oostzaner Werf
      No data of type centers for territory: Oranjewijk
      No data of type centers for territory: Osdorp
      No data of type centers for territory: Oud Zuid
      No data of type centers for territory: Oudekerkerplas
      No data of type centers for territory: Ouderkerk
      No data of type centers for territory: Over Diemen
      No data of type centers for territory: Overhoeks
      No data of type centers for territory: Overtoomse Veld
      No data of type centers for territory: Papaverweg e.o.
      No data of type centers for territory: Petroleumhavens
      No data of type centers for territory: Plantage
      No data of type centers for territory: Polderbaan
      No data of type centers for territory: Ransdorper Die
      No data of type centers for territory: Rivierenbuurt
      No data of type centers for territory: Ronde Hoep oost
      No data of type centers for territory: Ronde Hoep west
      No data of type centers for territory: Schaakwei
      No data of type centers for territory: Scheepsbuurt
      No data of type centers for territory: Schellingwoude
      No data of type centers for territory: Schiphol Terminal
      No data of type centers for territory: Schiphol zuid
      No data of type centers for territory: Sloten
      No data of type centers for territory: Slotermeer
      No data of type centers for territory: Sloterplas
      No data of type centers for territory: Spaarndammerbuurt
      No data of type centers for territory: Spaarnwoude
      No data of type centers for territory: Spieringhorn
      No data of type centers for territory: Staatsliedenbuurt
      No data of type centers for territory: Stokkelaarsbrug
      No data of type centers for territory: Tellegenbuurt
      No data of type centers for territory: Tuindorp Nieuwendam
      No data of type centers for territory: Tuindorp Oostzaan
      No data of type centers for territory: Uitdam
      No data of type centers for territory: Uithoorn
      No data of type centers for territory: Vechtplas
      No data of type centers for territory: Vliegenbos
      No data of type centers for territory: Vijfhuizen
      No data of type centers for territory: Vogelbuurt
      No data of type centers for territory: Vondelpark
      No data of type centers for territory: Vrijschot
      No data of type centers for territory: Watergraafsmeer
      No data of type centers for territory: Waterland
      No data of type centers for territory: Waterlooplein
      No data of type centers for territory: Weesp
      No data of type centers for territory: Weesperbuurt
      No data of type centers for territory: Westhavens Zuid
      No data of type centers for territory: Westwijk
      No data of type centers for territory: Zeeburgereiland
      No data of type centers for territory: Zuid
      No data of type centers for territory: Zuidas
      No data of type centers for territory: Zuiderwolde
      No data of type centers for territory: Zunderdorp
      No data of type centers for territory: Zwanenburg
      No data of type centers for territory: Zwanenburger Wei
      No data of type centers for territory: de Baarsjes
      No data of type centers for territory: de Bongerd
      No data of type centers for territory: de Burgwallen
      No data of type centers for territory: de Grachtengordel
      No data of type centers for territory: de Hoge Dijk
      No data of type centers for territory: de Liede
      No data of type centers for territory: de Nieuwe Meer
      No data of type centers for territory: de Pijp
      No data of type centers for territory: de Poel
      No data of type centers for territory: de Sniep
      No data of type centers for territory: de Wallen
      No data of type centers for territory: het Schouw
      
      	at games.strategy.triplea.ui.mapdata.MapData.verifyKeys(MapData.java:584)
      	at games.strategy.triplea.ui.mapdata.MapData.verify(MapData.java:559)
      	at games.strategy.triplea.ui.TripleAFrame.create(TripleAFrame.java:233)
      	at games.strategy.triplea.TripleA.startGame(TripleA.java:105)
      	at games.strategy.engine.framework.startup.launcher.LocalLauncher.loadGame(LocalLauncher.java:60)
      	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInNewThread(LocalLauncher.java:39)
      	at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$0(AbstractLauncher.java:51)
      	at java.lang.Thread.run(Unknown Source)
      
      

      TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

      C 1 Reply Last reply Reply Quote 2
      • C Offline
        Cernel Moderators Lobby Moderators @redrum
        last edited by

        @redrum I guess that would be the next error into which he will stumble, but what he posted should mean he's still not even having the file itself being find at all, looks like.

        @Hidde2k To make things easier for yourself, maybe change your map as having only "Adam_met_de_bois" as main path.

        Meaning you have your general folder where all the maps are, then you have a folder called "Adam_met_de_bois", then, directly inside this folder, you have all the folders and files that you currently have in the "map" folder.

        This is the simplest kind of path, so at least we start reducing the chance you are collocating something wrong.

        For example, something like this:
        downloadedMaps/Adam_met_de_bois/games/Adam_met_de_bois.xml

        1 Reply Last reply Reply Quote 0
        • H Offline
          Hidde2k
          last edited by

          thank you very much for you quick responses,
          i changed both problems:
          i deleted one of the versions of Vliegenbos from the polygons file
          and put everything directly into the Adam_met_de_bois.
          the error stil pops up tho:
          mrt 23, 2020 5:47:38 PM games.strategy.engine.framework.startup.launcher.LocalLauncher loadGame
          SEVERE: Failed to start game
          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
          at games.strategy.triplea.ui.mapdata.MapData.<init>(MapData.java:152)
          at games.strategy.triplea.ui.HeadedUiContext.internalSetMapDir(HeadedUiContext.java:79)
          at games.strategy.triplea.ui.AbstractUiContext.setDefaultMapDir(AbstractUiContext.java:107)
          at games.strategy.triplea.ui.TripleAFrame.create(TripleAFrame.java:232)
          at games.strategy.triplea.TripleA.startGame(TripleA.java:105)
          at games.strategy.engine.framework.startup.launcher.LocalLauncher.loadGame(LocalLauncher.java:60)
          at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInNewThread(LocalLauncher.java:39)
          at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$0(AbstractLauncher.java:51)
          at java.lang.Thread.run(Unknown Source)

          https://drive.google.com/open?id=1T8P7v2Qjx8AaxfomgnbNAeW46AzHwI9U

          C 1 Reply Last reply Reply Quote 2
          • C Offline
            Cernel Moderators Lobby Moderators @Hidde2k
            last edited by

            @Hidde2k Be sure you don't have any other folders, zipped or unzipped, called with the same name (beside the "master" suffix).

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              Hidde2k @Cernel
              last edited by

              @Cernel as in anywhere or just the downloadedmaps?
              cuz there is just a Adam_met_de_bois-master
              and i copied other maps having a Adam_met_de_bois-master.zip PROPERTIES file
              so that is in there too
              in other places on the computer there are a bunch of folders called Adam_met_de_bois

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                Cernel Moderators Lobby Moderators @Hidde2k
                last edited by

                @Hidde2k Why are you calling it Adam_met_de_bois-master? Just call it "Adam_met_de_bois", as I said.

                downloadedMaps/Adam_met_de_bois/games/Adam_met_de_bois.xml

                and, of course:

                downloadedMaps/Adam_met_de_bois/polygons.txt

                H 1 Reply Last reply Reply Quote 0
                • H Offline
                  Hidde2k @Cernel
                  last edited by

                  @Cernel its now called Adam-met_de_bois
                  but i found an issue
                  because every map i downloaded was a zip file i zipped my map every time
                  but when you open a zip file it becomes
                  downloadedMaps/Adam_met_de_bois/Adam_met_de_bois/polygons.txt
                  so i tried it unzipped and the error didnt show up!! (now the flags are giving me issues)
                  but i have a question
                  why are all the downloaded maps zips and remain zips
                  wile my map should be unzipped?

                  C 1 Reply Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators Lobby Moderators @Hidde2k
                    last edited by Cernel

                    @Hidde2k The maps are zipped for a number of reasons that may be fully known to the developers (let them answer to this). The maps are supposed to work both zipped and unzipped and, at least for the simplest case I suggested you following, they do, as long as the path is the same (which, of course, it is not the case if you create an additional subfolder when unzipping).

                    Correct, you need having:
                    downloadedMaps/Adam_met_de_bois/polygons.txt

                    not:
                    downloadedMaps/Adam_met_de_bois/Adam_met_de_bois/polygons.txt

                    Glad you figured out, and, actually, you don't need to zip. The zip is created in the moment you download from GitHub, but, when you have the map ready, you would be creating a repository of the same name, then uploading your map named as just "map", instead of "Adam_met_de_bois", inside the thus named repository.

                    Also, you should change "Adam_met_de_bois" to "adam_met_de_bois" at that point, for general policy of using only lower case (also in the xml reference, of course).

                    1 Reply Last reply Reply Quote 2
                    • H Offline
                      Hidde2k
                      last edited by

                      thank you very much
                      i changed the capital A to a lower case a

                      1 Reply Last reply Reply Quote 2
                      • H Offline
                        Hidde2k
                        last edited by

                        thank you all for helping
                        i just got my map to work and i get no more errors
                        you made this map possible
                        I have one last question tho
                        how do you make the territories have the colour of the owner?
                        the background is quite ugly on its own, i expected the territories to be coloured.
                        but again, thank you very much

                        redrumR 1 Reply Last reply Reply Quote 0
                        • redrumR Offline
                          redrum Admin @Hidde2k
                          last edited by redrum

                          @Hidde2k You can set player territory ownership color in the map.properties file and an example is here: https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/map.properties#L3

                          EDIT: I just glanced at your relief tiles and some portions are very dark so the player color won't show up very well on those areas. You generally want light colored relief tiles unless you don't want the player colors to show.

                          TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                          C 1 Reply Last reply Reply Quote 2
                          • C Offline
                            Cernel Moderators Lobby Moderators @redrum
                            last edited by

                            @redrum Well, even if he didn't set any, he would receive some default colours assigned, so I guess the issue is another one.

                            @Hidde2k Assuming not all territories of your map are impassable (which prevails over ownership, as colourization), the colours are underneath the relief tiles, so, if you are not seeing them, I assuming you are using no transparency, there. If you want to see the colour you can set
                            map.hasRelief=false
                            in map.properties.

                            Or you can obtain transparency effects by using blends, for example adding this to map.properties.

                            map.mapBlends=true
                            map.mapBlendMode=NORMAL
                            map.mapBlendAlpha=0.3f
                            
                            redrumR 1 Reply Last reply Reply Quote 0
                            • redrumR Offline
                              redrum Admin @Cernel
                              last edited by

                              @Cernel Yeah, either reworking the relief tiles or adding some transparency to them is probably the solution.

                              TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                              1 Reply Last reply Reply Quote 0
                              • H Offline
                                Hidde2k
                                last edited by

                                ok
                                first i set the the blend to NORMAL, it was in overlay
                                blend was already on
                                but i still only saw the relief without any colour
                                then i put relief on false but i still got to see the relief, maybe i did something wrong elsewhere?
                                you can check it here
                                https://drive.google.com/open?id=10hNTHtrmpys6Nj16Rb_3Lw-gTIYMoG4q

                                H 1 Reply Last reply Reply Quote 0
                                • H Offline
                                  Hidde2k @Hidde2k
                                  last edited by

                                  @Hidde2k i even tried making the entire properties file again but to no avail

                                  C 1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    Cernel Moderators Lobby Moderators @Hidde2k
                                    last edited by

                                    @Hidde2k You need to have transparent base tiles underneath the coloured polygons, for that particular blend to work the way I assume you want to. Practically, it switches relief and base over, while adding an alpha to the colour ownerships.

                                    H 1 Reply Last reply Reply Quote 0
                                    • H Offline
                                      Hidde2k @Cernel
                                      last edited by

                                      @Cernel thx man, i had to make the reliefTiles map a bit transparent, cut it up with the imagetilebreaker and replaced the old reliefTiles with the new ones.
                                      The map is, apart from some balancing basicly ready thanks to you guy.
                                      you're legends
                                      Hidde2k

                                      1 Reply Last reply Reply Quote 2

                                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                      With your input, this post could be even better 💗

                                      Register Login
                                      • 1 / 1
                                      • First post
                                        Last post
                                      Powered by NodeBB Forums