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

    Handling of AI players not meant to be played - Github request.

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    37 Posts 4 Posters 20.7k Views 4 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 @Cernel
      last edited by redrum

      @Cernel @Frostion I've made the latest changes to allow setting default player type in game XML: https://github.com/triplea-game/triplea/pull/2048. Once the next version is released then I will update Pact of Steel 2 XML.

      So there are 2 new player properties:

      • defaultType - optional, default is "Human"; options are "Human", "AI", "DoesNothing"; sets player to this type by default in the player selection window
      • isHidden - optional, default is "false"; options are "true", "false"; if true doesn't show player in player selection window

      Examples:
      <player name="Germans" optional="false" defaultType="AI" />
      <player name="Italians" optional="false" defaultType="DoesNothing" />
      <player name="Japanese" optional="false" defaultType="DoesNothing" isHidden="true" />

      @Cernel If you want to discuss "Does Nothing" purpose or changes then let's open a different thread so we can keep this focused on game XML settings for players.

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

      C FrostionF 3 Replies Last reply Reply Quote 1
      • C Offline
        Cernel Moderators @redrum
        last edited by

        @redrum Cool. I suggest also explicitly informing that when you set isHidden true you are also usually (but not necessarily) supposed to set the same player not to Human. Otherwise some might get confused and think that if something is hidden then it is not selected or even disabled.

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

          @redrum I want to add that I specifically like this for a map I'm making, where I have a bunch of neutral players that will be nice to be able to hide. Still, I'm thinking leaving them starting as "Neutral_" anyways.

          1 Reply Last reply Reply Quote 0
          • FrostionF Offline
            Frostion Admin @redrum
            last edited by Frostion

            @redrum
            When will the latest build release have this? I guess version .5470 does not have this option yet?
            PS: I will surly update my maps to use this feature when a new TripleA version is officially out.

            Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

              @Frostion The changes are in the latest pre-release now so feel free to test it out. Hopefully we will have a target release date for the next TripleA version soon. I believe you should be able to add the new parameters now and they won't have any impact on the current TripleA release version as it should just ignore them.

              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
              • C Offline
                Cernel Moderators @redrum
                last edited by Cernel

                @redrum said in Handling of AI players not meant to be played - Github request.:

                In general, using hacky prefixes or suffixes on strings is something we want to move away from. If there are others please open an issue so we can look to create proper attributes for them.

                The fact that islands are handled by looking if their sea zones have names ending exactly in "Sea Zone" might be a good candidate...
                https://github.com/triplea-game/triplea/issues/1331

                1 Reply Last reply Reply Quote 1
                • FrostionF Offline
                  Frostion Admin
                  last edited by

                  @redrum
                  I think there is something wrong with the feature you made. Things seem to work fine when I use a setup like this:

                      <player name="Slovakia" optional="false" defaultType="AI" isHidden="false"/>
                  

                  In the above case the game starts / has a default setup with the AI controlling Slovakia. I can see this both before gamestart and in the game after startup. The AI controls Slovakia.

                  But if I in the XML sets isHidden=true, then Slovakia is under human control when it is Slovakias turn. Is this not a flaw?

                  When looking at the "game history – Game loaded", it seems that all hidden players are automatically set to human, even though they are, in my XML, defaultType=AI.

                  Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                  redrumR 2 Replies Last reply Reply Quote 0
                  • redrumR Offline
                    redrum Admin @Frostion
                    last edited by

                    @Frostion Good catch. I broke this functionality when I added the "default" option to the set all player dropdown 🙂

                    It should now be fixed with https://github.com/triplea-game/triplea/pull/2149. Please test with the latest pre-release.

                    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
                    • redrumR Offline
                      redrum Admin @Frostion
                      last edited by

                      @Frostion Have you gotten a chance to test after I made the fix here?

                      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
                      • FrostionF Offline
                        Frostion Admin
                        last edited by

                        @redrum Yes. I am testing it out in Iron War Europe and it seems to work now. I at least have not seen any problems. I like this feature 🙂 And will do an XML update on all my maps when the engine supports it.

                        Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

                          @Frostion Cool. I still need to add it into the POS2 XML as well.

                          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
                          • redrumR Offline
                            redrum Admin
                            last edited by

                            Updates to the POS2 XML: https://github.com/triplea-maps/the_pact_of_steel/pull/2

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

                            FrostionF 1 Reply Last reply Reply Quote 0
                            • FrostionF Offline
                              Frostion Admin @redrum
                              last edited by Frostion

                              @redrum
                              What ETA would you give on the public release of a TripleA version that handles these features? I was thinking that I could work on updating my maps in advance and just not upload it yet.

                              Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

                                @Frostion Hoping to release in the next week. We are going through some testing and fixing a few bugs that were found. You should be able to make a PR in github or make the changes local and not upload them then wait til its released.

                                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

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