It is replace of charting.
Feature consists of two parts: dumper and reader.
- dumper
- dump progress to folder with unique game name (name stored in AIState)
- dump information about turns tree to files. Loading game create new branch in turns tree, so no information will be lost. Turn information splited by sections, each section is file. Each line of file contains json string with turn info. Here is example from 2_95186f69_Realm\fleets:
Code: Select all
[{"turn": 8, "parent_uid": "95187e57", "turn_uid": "95188010", "headers": ["id", "fid", "name", "sid", "owner", "visibility", "ships", "target"]}, [{"name": "Scout Fleet", "ships": [358], "visibility": "full", "fid": 357, "sid": 86, "owner": 2, "id": 357, "target": ["explore", 59, "system", ""]}, {"name": "Battle Fleet", "ships": [362], "visibility": "full", "fid": 361, "sid": -1, "owner": 2, "id": 361, "target": ["military", 86, "system", "Wiily \u03b2"]}, {"name": "Fleet 407", "ships": [406], "visibility": "none", "fid": 407, "sid": 33, "owner": -1, "id": 407}, {"name": "Fleet 412", "ships": [410], "visibility": "full", "fid": 412, "sid": 32, "owner": 2, "id": 412, "target": ["explore", 132, "system", ""]}, {"name": "Fleet 413", "ships": [411], "visibility": "full", "fid": 413, "sid": 212, "owner": 2, "id": 413, "target": ["explore", 212, "system", "Troy"]}, {"name": "Fleet 416", "ships": [415], "visibility": "full", "fid": 416, "sid": 6, "owner": 2, "id": 416, "target": ["explore", 6, "system", "Hera \u03b3"]}, {"name": "Fleet 418", "ships": [417], "visibility": "full", "fid": 418, "sid": 45, "owner": 2, "id": 418, "target": ["orbitalDefense", 45, "system", "Wiily \u03b4"]}, {"name": "Fleet 420", "ships": [419], "visibility": "full", "fid": 420, "sid": 45, "owner": 2, "id": 420}]]
- viewer
I use local Django server to view result in browser. You can see attached image example: https://github.com/Cjkjvfnby/freeorion/pull/11
Making GUI via web is most easiest way. I chose Django because it is awesome and I have a lot experience with it.