Gathering data from outside source

Something I would really like to do with a program is to have it collect data from games I play on Steam. I am not experienced enough with programming to know if this can be done and definitely not how to do it. To be more specific there is a game I play called Civilization. Its a turn based PVP game. What I hope to accomplish is to make a program that collects data over a certain amount of turns in the game and can put that data into graphs or tables that I can check later. Any help/answers that can be provided would be much appreciated. Thank you in advance.

There’s no general mechanism that would work from any Steam game, but Civ 6 has a relatively active modding scene, and I imagine you could make a mod that would gather these data for you (assuming you’re playing against the AI or custom matches, rather than online random). That’s not really a Python question, but here seems like a decent place to start. You would then output the into some format (CSV, etc) that you could ingest into Python, using e.g. Pandas and Matplotlib to plot it.

Best of luck!

Thank you for the information. I again don’t have much experience with python, but I know it’s one of the bigger languages. So, do you know of any good articles or websites for learning about CSV or other output formats?

How you would write to the CSV (or JSON, etc) would depend entirely on the Civ6 modding tools, which I have zero experience with. Relative to actually getting the data you need from Civ6, that would be trivial by comparison. You’d use pandas.read_csv() to read it in to Python (or a function appropriate to whatever format you exported it in), and then could follow e.g. this basic guide to visualizing it, and see the other sections in that tutorial for more on Pandas; it also assumes a basic familiarity with Python, for which you can consult the basic Python tutorial. If its just for a side project and you are completely new to programming, you could also consider using a tool like Excel, LibreOffice Calc or Google Sheets.

It is completely a side project. Is Excel more in line with what I’m trying to accomplish? I wanted to use Python solely for the experience and contribution I could have in my future work place. However, if Excel would be more effective/simple at accomplishing what I want, I will probably use that tool instead.

It probably would be simpler, but you’d definitely learn a lot more using Python, and maybe have more fun (though Excel, for better or for worse, is also a marketable skill). The big challenge, though, would be getting the data out of Civ6, and that’s the part you’d want to ask on a Civ 6 modding forum instead, and wouldn’t really involve Python. You might consider an open-source strategy/builder game like OpenTTD, FreeOrion or even something like Oolite, which would typically be much easier to get the data out of than a proprietary one, but that’s really up to you.