Python Database
-
Does anyone have a python data base of the game? (Territ., Units, Adjacencies etc)
-
@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.
-
@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.
-
@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. -
@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.