Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Python Database

    AI
    3
    7
    1174
    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.
    • Kindwind
      Kindwind last edited by

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

      RogerCooper 1 Reply Last reply Reply Quote 0
      • RogerCooper
        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.

        Kindwind 1 Reply Last reply Reply Quote 2
        • Kindwind
          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.

          TheDog RogerCooper 2 Replies Last reply Reply Quote 0
          • TheDog
            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.

            1 Reply Last reply Reply Quote 0
            • RogerCooper
              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.

              Kindwind 1 Reply Last reply Reply Quote 1
              • Kindwind
                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.

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