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.
-
@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.
-
@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.
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