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

    Python Database

    Scheduled Pinned Locked Moved AI
    7 Posts 3 Posters 2.0k 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.
    • KindwindK Offline
      Kindwind
      last edited by

      Does anyone have a python data base of the game? (Territ., Units, Adjacencies etc)

      RogerCooperR 1 Reply Last reply Reply Quote 0
      • RogerCooperR Offline
        RogerCooper @Kindwind
        last edited by

        @kindwind TripleA uses XML and some TXT files to define the mod. The data is different for each mod.

        If you are interested in technical details, download the mod https://triplea-game.org/map/the-pact-of-steel/ and find the file pact_of_steel_2.xml. This mod has explanations of the game code in its comments.

        KindwindK 1 Reply Last reply Reply Quote 2
        • KindwindK Offline
          Kindwind @RogerCooper
          last edited by

          @rogercooper Thank you, do you know how I can access the game.dat file for revised. It doesn't seem to be held on my computer and I want to see if I can get an LLM to look at data for it.

          TheDogT RogerCooperR 2 Replies Last reply Reply Quote 0
          • TheDogT Offline
            TheDog @Kindwind
            last edited by

            @kindwind
            Do want to look at the source code for the AI ?
            If so go here
            https://github.com/triplea-game/triplea/releases
            and download one of the source files.

            https://forums.triplea-game.org/tags/thedog
            https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

            1 Reply Last reply Reply Quote 0
            • RogerCooperR Offline
              RogerCooper @Kindwind
              last edited by

              @kindwind I assume you mean the game.dtd file, which defines the XML code. Check out this article https://axisandallies.fandom.com/wiki/Game.dtd.

              Using an LLM is likely to be a frustrating exercise. You can just read the code or even use Excel to extract data. Here an example of a some of the code for territories and adjacencies.

               <!-- Territory Definitions -->
                  <territory name="red capitol"/>
                  <territory name="red north 1"/>
                  <territory name="red north 2"/>
                  <territory name="red middle 1"/>
                  <territory name="red middle 2"/>
                  <territory name="red south 1"/>
                  <territory name="red south 2"/>
                  <territory name="blue capitol"/>
                  <territory name="blue north 1"/>
                  <territory name="blue north 2"/>
                  <territory name="blue middle 1"/>
                  <territory name="blue middle 2"/>
                  <territory name="blue south 1"/>
                  <territory name="blue south 2"/>
                  <territory name="neutral territory 1"/>
                  <territory name="neutral territory 2"/>
                  <territory name="sea zone 1" water="true"/>
                  <territory name="sea zone 2" water="true"/>
                  <territory name="sea zone 3" water="true"/>
                  <territory name="sea zone 4" water="true"/>
                  <!-- Territory Connections -->
                  <connection t1="red capitol" t2="red north 1"/>
                  <connection t1="red capitol" t2="red middle 1"/>
                  <connection t1="red capitol" t2="red south 1"/>
                  <connection t1="red north 1" t2="red north 2"/>
                  <connection t1="red north 1" t2="sea zone 1"/>
                  <connection t1="red north 1" t2="red middle 1"/>
                  <connection t1="red north 2" t2="sea zone 1"/>
                  <connection t1="red north 2" t2="blue north 2"/>
                  <connection t1="blue north 2" t2="blue north 1"/>
                  <connection t1="blue north 2" t2="sea zone 2"/>
                  <connection t1="blue north 1" t2="sea zone 2"/>
                  <connection t1="blue north 1" t2="blue capitol"/>
                  <connection t1="red middle 1" t2="red middle 2"/>
                  <connection t1="red middle 1" t2="red south 1"/>
                  <connection t1="red middle 1" t2="sea zone 1"/>
                  <connection t1="red middle 1" t2="sea zone 3"/>
                  <connection t1="red middle 2" t2="sea zone 1"/>
                  <connection t1="red middle 2" t2="sea zone 3"/>
                  <connection t1="red middle 2" t2="blue middle 2"/>
                  <connection t1="blue middle 2" t2="blue middle 1"/>
                  <connection t1="blue middle 2" t2="sea zone 2"/>
                  <connection t1="blue middle 2" t2="sea zone 4"/>
                  <connection t1="blue middle 1" t2="sea zone 2"/>
                  <connection t1="blue middle 1" t2="sea zone 4"/>
                  <connection t1="blue middle 1" t2="blue north 1"/>
                  <connection t1="blue middle 1" t2="blue south 1"/>
                  <connection t1="blue middle 1" t2="blue capitol"/>
                  <connection t1="red south 1" t2="red south 2"/>
                  <connection t1="red south 1" t2="sea zone 3"/>
                  <connection t1="red south 2" t2="blue south 2"/>
                  <connection t1="red south 2" t2="sea zone 3"/>
                  <connection t1="blue south 2" t2="blue south 1"/>
                  <connection t1="blue south 2" t2="sea zone 4"/>
                  <connection t1="blue south 1" t2="blue capitol"/>
                  <connection t1="blue south 1" t2="sea zone 4"/>
                  <connection t1="sea zone 1" t2="sea zone 2"/>
                  <connection t1="sea zone 3" t2="sea zone 4"/>
                  <connection t1="neutral territory 1" t2="red capitol"/>
                  <connection t1="neutral territory 1" t2="red north 1"/>
                  <connection t1="neutral territory 1" t2="red north 2"/>
                  <connection t1="neutral territory 1" t2="red south 1"/>
                  <connection t1="neutral territory 1" t2="red south 2"/>
                  <connection t1="neutral territory 2" t2="blue capitol"/>
                  <connection t1="neutral territory 2" t2="blue north 1"/>
                  <connection t1="neutral territory 2" t2="blue north 2"/>
                  <connection t1="neutral territory 2" t2="blue south 1"/>
                  <connection t1="neutral territory 2" t2="blue south 2"/>
              

              There is no substitute for knowing the data.

              KindwindK 1 Reply Last reply Reply Quote 1
              • KindwindK Offline
                Kindwind @RogerCooper
                last edited by

                @rogercooper so, i found the game.dtd but I can't seem to figure how out how to extract the data to my spread sheet or data base.

                RogerCooperR 1 Reply Last reply Reply Quote 0
                • RogerCooperR Offline
                  RogerCooper @Kindwind
                  last edited by

                  @kindwind You will need to parse the data yourself, by using functions like instr() in Excel or find/replace in Notepad.

                  I have used Microsoft Access to import everything, but even then the results were not easy to use.

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