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

    Mixed Questions

    Scheduled Pinned Locked Moved Map Making
    130 Posts 12 Posters 68.7k Views 10 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.
    • C Offline
      Cernel Moderators @Schulz
      last edited by

      @Schulz No. However, you can hack such a behaviour by having those units suiciding at power 0 while also having an AA attack (defensive or offensive), and setting the relative AA properties so that AA casualties are randomized. However, the exact dynamic of this randomization is currently inconsistent, thus it may be liable to change in future, if any developers fix the problem. More information about this last issue here:
      https://forums.triplea-game.org/topic/989/open-aa-revised-bug-aa-fire-casualty-selection-issues

      1 Reply Last reply Reply Quote 0
      • SchulzS Offline
        Schulz
        last edited by

        Does anyone help me how to preperly create "Objectives file" and and objectives panel. Seems like there are hidden rules about that for example zip name is world_war_ii_v3 while objectives name is "World_War_II_v3_1941" XML one is "WW2v3-1941"

        1 Reply Last reply Reply Quote 0
        • B Online
          beelee
          last edited by

          The spelling needs to be the same as the map name at the top of the xml (not the bottom of xml )except you need to use underscores "_" instead of "spaces".

          So this "World War II v3 1941" is written like this in objectives.properties "World_War_II_v3_1941".

          StohrmS 1 Reply Last reply Reply Quote 1
          • SchulzS Offline
            Schulz
            last edited by

            Thanks, worked but seems still there is an issue

            pg.png

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

              @Schulz Can you post your objectives.properties?

              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
              • SchulzS Offline
                Schulz
                last edited by

                objectives.properties

                C 2 Replies Last reply Reply Quote 0
                • C Offline
                  Cernel Moderators @Schulz
                  last edited by

                  @Schulz The first item of all entries for any national objectives in the objectives.properties file must be the name of the game (as per the "info name" in the game file (xml)) and the objectives.properties file itself must be in the main map folder of the map that game is calling (as per the "mapName" in the game file (xml)). All game name spaces inside the mentioned properties file must be substituted with undescores.

                  @redrum @LaFayette @RoiEX @ssoloff I wonder what do the developers think about this method of using underscores instead of spaces (I know it comes from the handling of spaces by properties file)? I could have a game called "Pact_of_Steel_2", another game called "Pact of Steel 2", and another one called "Pact of_Steel 2" (and more!), and they would figure as different games, but they would all call the same objective, named "Pact_of_Steel_2". Does this make actual sense? To keep the system univoke, should underscores better be disallowed in the "info name" completely, maybe (also since the game title is really better not to have any underscores anyways, as it is a user displayed element)?

                  RoiEXR 1 Reply Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators @Schulz
                    last edited by

                    @Schulz said in Mixed Questions:

                    objectives.properties

                    I see everything in that file is on a single line (no line breaks). You probably lost all those for opening and saving the original with a limited text editor, that is not reading the line breaks of that file (typically this happens if you open with Windows Notepad a text file that has non-Windows line breaks). You need either remaking all line breaks where they are supposed to be or restarting from the original, this time opening it with an editor that sees those line breaks.

                    Not a developer and not much of a knowledge of properties file, so I'm not sure of what I'm saying (and I haven't tested it).

                    1 Reply Last reply Reply Quote 1
                    • RoiEXR Offline
                      RoiEX Admin @Cernel
                      last edited by

                      @Cernel Good Question.
                      If you ask me I wouldn't substitute anything at all. While it's true that properties files have their limitations, it's certainly possible to have a key with spaces if the spaces are escaped correctly. See https://en.wikipedia.org/wiki/.properties#Format
                      However because we probably want to stay compatible, this behaviour will probably stay for a while...

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

                        @RoiEX Can you try that? I tried to escape spaces (substituting underscores with spaces with a backslash beforehand) and the game didn't get it.

                        RoiEXR 1 Reply Last reply Reply Quote 0
                        • RoiEXR Offline
                          RoiEX Admin @Cernel
                          last edited by

                          @Cernel it could be the case that we're not implementing it correctly.
                          Please remind me tomorrow to have a look at this

                          C 1 Reply Last reply Reply Quote 0
                          • SchulzS Offline
                            Schulz
                            last edited by

                            objectives.properties

                            Adjusted now but still does not work.

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

                              @Schulz No line breaking after the equal sign. I really suggest opening the original file with a text editor that can see the line breaks (I'm assuming you opened it with Windows notepad), if that one was formatted correctly.

                              1 Reply Last reply Reply Quote 0
                              • SchulzS Offline
                                Schulz
                                last edited by

                                I've succesfully created the Objectives file. Thank you so much.

                                1 Reply Last reply Reply Quote 1
                                • C Offline
                                  Cernel Moderators @RoiEX
                                  last edited by

                                  @RoiEX said in Mixed Questions:

                                  @Cernel it could be the case that we're not implementing it correctly.
                                  Please remind me tomorrow to have a look at this

                                  In the_pact_of_steel/.../objectives.properties I've substituted all occurrences of "Pact_of_Steel_2" with "Pact\ of\ Steel\ 2". The Objectives tab is gone.

                                  In any case, if both underscores substitution and backslash escapade [sic] would work, I suppose you developers would have to decide the best practice, and make sure the_pact_of_steel follows it.

                                  Myself, I prefer underscores to all those backslashes, but the item that I really dislike is that a same character (the underscore in properties) is representing two different ones (the underscore and the space in info name). So, in that case, I think the info name should not be allowed to have spaces and underscores. Thinking again about it, I would actually disallow spaces in infoname, and automatically convert underscores to spaces when the name is shown to the user, but this would require mass converting most current xml (and obliging people to do the same, @RogerCooper comes to mind).

                                  I'm not even sure having this properties file referencing specific games inside a same map was a good idea, to start with. Maybe all this should have been part of the xml only. It is also inconsistent for pretty much any other properties, as, for example, if you customize tooltips you cannot customize them for each game in the map, even though I'm not seeing why having several same-map games with different unit characteristics should be less supported than having the same situation with different objectives, instead. Am I right?

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

                                    @Cernel How about keeping the properties working with underscores, representing both info name underscores and spaces, and deprecating (meaning keeping supporting indefinitely), spaces in info name, while updating the display as to always show underscores in info name as spaces, to the user?

                                    1 Reply Last reply Reply Quote 0
                                    • RoiEXR Offline
                                      RoiEX Admin
                                      last edited by

                                      @Cernel I agree that this kind of reference isn't really ideal, and there are a lot of other things that I'd consider weird or inconsistent.

                                      I think most of the weirdness comes from the possibility that you can define multiple xmls within a single zip.

                                      IIRC @LaFayette did some brainstorming on what a potential replacement could look like a while back.

                                      In any case I'm not a fan of doing automatic substitutions, because 1. it adds complexity and might be confusing to new map makers who would have to learn about it first and 2. In my experience this leads down a rabbit hole where more and more substitutions are demanded, where it would be simpler to just make a clear destinction between display names and actual unique keys to separate maps.

                                      LaFayetteL C 2 Replies Last reply Reply Quote 0
                                      • LaFayetteL Offline
                                        LaFayette Admin @RoiEX
                                        last edited by

                                        FWIW, the way maps are linked to folder, to source XML file, and then to the display name is very archaic and problem needs a better design. The duplication is painful and source of errors. Maps going to http-server and being stored in database instead of repositories will be an opportunity for us to re-think this.

                                        1 Reply Last reply Reply Quote 0
                                        • StohrmS Offline
                                          Stohrm @beelee
                                          last edited by

                                          @beelee said in Mixed Questions:

                                          The spelling needs to be the same as the map name at the top of the xml (not the bottom of xml )except you need to use underscores "_" instead of "spaces".

                                          So this "World War II v3 1941" is written like this in objectives.properties "World_War_II_v3_1941".

                                          @beelee I just wanted to say "thank you"; as this just helped me resolve an issue I didn't even realize that I had. Since the Objectives tab wasn't even showing up, I failed to notice that they were missing.
                                          So, besides the "objectives.properties" file, are there any other places where the map name(s) need to match? I gather the "README.md" file needs to match the map name at the bottom part of xml; or is it even necessary if the files are just local to my computer and not being uploaded to GitHub?

                                          SK

                                          B 1 Reply Last reply Reply Quote 2
                                          • B Online
                                            beelee @Stohrm
                                            last edited by beelee

                                            @Stohrm said in Mixed Questions:

                                            @beelee said in Mixed Questions:

                                            The spelling needs to be the same as the map name at the top of the xml (not the bottom of xml )except you need to use underscores "_" instead of "spaces".

                                            Since the Objectives tab wasn't even showing up, I failed to notice that they were missing.

                                            Heh heh. I did the same thing. Must've worked on a mod for weeks before realized there was no objectives. :grinning_face:
                                            yea idk, being local might be ok. When uploading to Git you gotta be on it. @Frostion has a nice guide for adding stuff to Git.
                                            Well sadly, I can't seem to find it right now. I thought it was under map making but w/e...:) I'll try and find it again when I have a few more brain cells functioning 🙂

                                            Here it is:

                                            https://docs.google.com/document/d/1FfF7N0srp9QG0_if5D-c1d1Aa1QTttdhxgm1GBh3pI4/edit

                                            Edit
                                            Yea you gotta make sure the name is right or it won't show up in "Select Map" when you have triplea fired up. Gotta use the bottom one for that. I think 🙂

                                            1 Reply Last reply Reply Quote 1

                                            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
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 1 / 7
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums