Save File: Difference between revisions

From Ages of Conflict
Content added Content deleted
No edit summary
(Updated for 3.1.1)
 
(2 intermediate revisions by one other user not shown)
Line 10: Line 10:
Save files are long strings of code-like text that encode everything about the game, from nations and their territory, map layout, wars and alliances to game time and the version the file was last saved in.
Save files are long strings of code-like text that encode everything about the game, from nations and their territory, map layout, wars and alliances to game time and the version the file was last saved in.


=== Game info ===
=== '''Game info''' ===
First in the file is basic information about the save/scenario: the version it was saved in, map dimensions, starting year and game time (each month equals 0.5 in game time) as shown in the example below:
First in the file is basic information about the save/scenario: the version it was saved in, map dimensions, starting year and game time (each month equals 0.5 in game time) as shown in the example below:


<code>"version":"3.0.5","width":950,"height":475,"startingYear":2023,"currentGameTime":24</code>
<code>"version":"3.0.5","width":950,"height":475,"startingYear":2023,"currentGameTime":24</code>


=== Nation Data ===
=== '''Nation Data''' ===
It's a long list enclosed in square brackets opening with <code>"nations":</code> each entry is enclosed in curly brackets and separated with commas.
It's a long list enclosed in square brackets opening with <code>"nations":</code> each entry is enclosed in curly brackets and separated with commas.


Line 29: Line 29:
* Who it seceded from
* Who it seceded from
* Who it annexed
* Who it annexed
* Who revolted from it
* Who it got annexed by
* Gold and combat efficiency
* Gold and combat efficiency
* Highest land area
* Highest land area
* Total wars
* Total wars
* Revolt chance
* Revolt chance
* Land value
* Income modifier
* Stress (hidden mechanic driving alliances)
* Stress (hidden mechanic driving alliances)
* Lives (information about previous iterations of the nation)
* Lives (information about previous iterations of the nation)
** Establishment and collapse time (in game time, "s" and "e" respectively)
** Who annexed it ("k") <!-- the meaning of "s", "e" and "o" is currently unknown -->
** Who it seceded from and who annexed it ("o" and "k" respectively)



example of what nation data looks like (in all following examples line breaks were added for reading convenience):<syntaxhighlight>
example of what nation data looks like (in all following examples line breaks were added for reading convenience):<syntaxhighlight lang="c#">
"nations":[
"nations":[
{"id":1,"name":"Iceland","destroyed":false,"color":{"r":0.48649999499320986,"g":0.5826490521430969,"b":0.699999988079071,"a":1.0},"pos":{"x":75,"y":561},"startYear":0.0,"endYear":0.0,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[],"gold":2485.8310546875,"combatEfficiency":11.0,"landValue":10259,"maxArea":2533,"revoltPercent":0.0,"aiDisabled":false,"stress":0,"totalWars":1,"lives":[],"incomeModifier":1.0},
{"id":1,"name":"Iceland","destroyed":false,"pos":{"x":75,"y":561},"gold":2825,"color":{"r":0.48649999499320986,"g":0.5826490521430969,"b":0.699999988079071,"a":1.0},"startYear":0.0,"endYear":0.0,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[],"combatEfficiency":0,"landValue":10259,"maxArea":2533,"revoltPercent":0.0,"aiDisabled":false,"stress":2,"totalWars":1,"lives":[]},


{"id":2,"name":"Ireland","destroyed":true,"color":{"r":0.15390002727508546,"g":0.5400000214576721,"b":0.25777456164360049,"a":1.0},"pos":{"x":138,"y":352},"startYear":0.0,"endYear":25.2001953125,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[],"gold":0.0,"combatEfficiency":8.0,"landValue":0,"maxArea":1637,"revoltPercent":0.0,"aiDisabled":false,"stress":0,"totalWars":1,"lives":[{"s":0,"e":25,"o":0,"k":3}],"incomeModifier":1.0},
{"id":9,"name":"Malta","destroyed":true,"pos":{"x":346,"y":14},"gold":0,"color":{"r":0.8100000023841858,"g":0.3968999981880188,"b":0.6548253297805786,"a":1.0},"startYear":0.0,"endYear":128.1110382080078,"killerId":8,"originId":0,"revoltIds":[],"killedIds":[],"combatEfficiency":11,"landValue":0,"maxArea":15,"revoltPercent":0.0,"aiDisabled":false,"stress":0,"totalWars":1,"lives":[{"s":0,"e":128,"o":0,"k":8}]},


{"id":3,"name":"United Kingdom","destroyed":false,"color":{"r":0.8550000190734863,"g":0.2992500364780426,"b":0.42619776725769045,"a":1.0},"pos":{"x":190,"y":306},"startYear":0.0,"endYear":0.0,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[2],"gold":3006.17529296875,"combatEfficiency":10.0,"landValue":57509,"maxArea":7358,"revoltPercent":13.135003089904786,"aiDisabled":false,"stress":0,"totalWars":3,"lives":[],"incomeModifier":1.0},
{"id":14,"name":"Norway","destroyed":false,"pos":{"x":317,"y":424},"gold":3925,"color":{"r":0.9350000023841858,"g":0.12622499465942384,"b":0.12622499465942384,"a":1.0},"startYear":0.0,"endYear":0.0,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[],"combatEfficiency":0,"landValue":34395,"maxArea":10878,"revoltPercent":0.0,"aiDisabled":false,"stress":1,"totalWars":3,"lives":[]},
]
]
</syntaxhighlight>
</syntaxhighlight>


=== Cities ===
=== '''Cities''' ===
This section contains a list of all non-capital cities, their location and who they rightfully belong to ("r") <!-- the meaning of "o" and "f" is currently unknown --><syntaxhighlight>
This section contains a list of all cities, their name, location and who they rightfully belong to ("r")<syntaxhighlight lang="c#">
"cities":[
"cities":[
{"x":22,"y":121,"o":0,"r":0,"f":0},
{"x":75,"y":561,"n":"Reykjavik","r":1},
{"x":440,"y":442,"o":0,"r":0,"f":0},
{"x":138,"y":352,"n":"Dublin","r":2},
{"x":439,"y":431,"o":0,"r":0,"f":0},
{"x":190,"y":306,"n":"London","r":3},
{"x":456,"y":350,"o":0,"r":0,"f":0},
{"x":210,"y":254,"n":"Paris","r":4},
{"x":255,"y":261,"o":0,"r":0,"f":0},
{"x":22,"y":121,"n":"Lisbon","r":5},
{"x":180,"y":148,"o":0,"r":0,"f":0},
{"x":26,"y":27,"n":"Rabat","r":6},
{"x":321,"y":157,"o":0,"r":0,"f":0},
{"x":182,"y":44,"n":"Algiers","r":7},
{"x":366,"y":190,"o":0,"r":0,"f":0},
{"x":285,"y":33,"n":"Tunis","r":8},
{"x":733,"y":200,"o":0,"r":61,"f":0},
{"x":321,"y":124,"n":"Rome","r":10}
{"x":138,"y":352,"o":0,"r":0,"f":0},
{"x":236,"y":284,"o":0,"r":0,"f":0},
{"x":668,"y":0,"o":0,"r":0,"f":0},
{"x":44,"y":160,"o":0,"r":0,"f":0},
{"x":60,"y":60,"o":0,"r":3,"f":0},
{"x":13,"y":26,"o":0,"r":6,"f":0},
{"x":52,"y":56,"o":0,"r":6,"f":0},
{"x":53,"y":21,"o":0,"r":6,"f":0},
{"x":127,"y":35,"o":0,"r":7,"f":0}
]
]
</syntaxhighlight>
</syntaxhighlight>


=== Alliances ===
=== '''Alliances''' ===
A list of all alliances, their members (their IDs), stress (likelihood of collapsing) and whether its auto-generated name was changed.<syntaxhighlight>
A list of all alliances, their members (their IDs), stress (likelihood of collapsing) and whether its auto-generated name was changed.<syntaxhighlight lang="c#">
"alliances":[
"alliances":[
{"name":"Operation Iran","ids":[56,53,54],"stress":0,"ne":false},
{"name":"Operation Iran","ids":[56,53,54],"stress":0,"ne":false},
Line 81: Line 76:
</syntaxhighlight>
</syntaxhighlight>


=== Wars ===
=== '''Wars''' ===
List of all ongoing wars, their participants, start and (for some reason) end date and targeted length.<syntaxhighlight>
List of all ongoing wars, their participants, start time and targeted length.<syntaxhighlight lang="c#">
"wars":[
"wars":[
{"attackers":[28],"attackersLeft":[28],"defenders":[23],"defendersLeft":[23],"targetLength":42.67084884643555,"startTime":175.15313720703126,"endTime":0.0},
{"attackers":[28],"attackersLeft":[28],"defenders":[23],"defendersLeft":[23],"targetLength":42.67084884643555,"startTime":175.15313720703126},
{"attackers":[13,33,36],"attackersLeft":[13,36],"defenders":[10],"defendersLeft":[10],"targetLength":34.056846618652347,"startTime":196.08883666992188,"endTime":0.0}
{"attackers":[13,33,36],"attackersLeft":[13,36],"defenders":[10],"defendersLeft":[10],"targetLength":34.056846618652347,"startTime":196.08883666992188}
]
]
</syntaxhighlight>
</syntaxhighlight>


=== Terrain ===
=== '''Terrain''' ===
A long string of numbers, separated by commas, that encodes terrain in horizontal stripes from left to right, bottom to top.
A long string of numbers, separated by commas, that encodes terrain in horizontal stripes from left to right, bottom to top.


Line 126: Line 121:
|}
|}


=== Owner ===
=== '''Owner''' ===
A list of numbers similar to terrain, where each number is the ID of the nation that owns a given pixel, if the number is 0, nobody owns that pixel.
A list of numbers similar to terrain, where each number is the ID of the nation that owns a given pixel, if the number is 0, nobody owns that pixel.


== Trivia ==
== Trivia ==


* Because save and scenario files are interchangeable, converting a save into a scenario is as easy as moving the save file into the scenario folder. Some map maker use this trick to include alliances and wars in their scenarios.
* Because save and scenario files are interchangeable, converting a save into a scenario is as easy as moving the save file into the scenario folder. Some map makers use this trick to include alliances and wars in their scenarios.
* Maximum file size that AoC will read is 1GB, anything above that doesn't load.
* Maximum file size that AoC will read is 1GB, anything above that doesn't load.
[[Category:Game Mechanics]]

Latest revision as of 20:09, 25 February 2024

Ages of Conflict uses .aoc files for its saves and scenarios, they can be opened and manipulated through any text editor and are interchangeable with each other.

They can be found in the user folder under:

  • Windows: \AppData\LocalLow\JoySparkGames\Ages of Conflict
  • Mac: /Library/Application Support/com.JoySparkGames.AgesOfConflict
  • Linux: /.config/unity3d/JoySparkGames/Ages of Conflict

Structure[edit | edit source]

Save files are long strings of code-like text that encode everything about the game, from nations and their territory, map layout, wars and alliances to game time and the version the file was last saved in.

Game info[edit | edit source]

First in the file is basic information about the save/scenario: the version it was saved in, map dimensions, starting year and game time (each month equals 0.5 in game time) as shown in the example below:

"version":"3.0.5","width":950,"height":475,"startingYear":2023,"currentGameTime":24

Nation Data[edit | edit source]

It's a long list enclosed in square brackets opening with "nations": each entry is enclosed in curly brackets and separated with commas.

Nation data contains:

  • Nation ID
  • Name
  • Color
  • Capital location
  • Whether or not it's dead
  • Whether or not it has AI disabled
  • Establishment and collapse year
  • Who it seceded from
  • Who it annexed
  • Who revolted from it
  • Who it got annexed by
  • Gold and combat efficiency
  • Highest land area
  • Total wars
  • Revolt chance
  • Land value
  • Stress (hidden mechanic driving alliances)
  • Lives (information about previous iterations of the nation)
    • Establishment and collapse time (in game time, "s" and "e" respectively)
    • Who it seceded from and who annexed it ("o" and "k" respectively)


example of what nation data looks like (in all following examples line breaks were added for reading convenience):

"nations":[
{"id":1,"name":"Iceland","destroyed":false,"pos":{"x":75,"y":561},"gold":2825,"color":{"r":0.48649999499320986,"g":0.5826490521430969,"b":0.699999988079071,"a":1.0},"startYear":0.0,"endYear":0.0,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[],"combatEfficiency":0,"landValue":10259,"maxArea":2533,"revoltPercent":0.0,"aiDisabled":false,"stress":2,"totalWars":1,"lives":[]},

{"id":9,"name":"Malta","destroyed":true,"pos":{"x":346,"y":14},"gold":0,"color":{"r":0.8100000023841858,"g":0.3968999981880188,"b":0.6548253297805786,"a":1.0},"startYear":0.0,"endYear":128.1110382080078,"killerId":8,"originId":0,"revoltIds":[],"killedIds":[],"combatEfficiency":11,"landValue":0,"maxArea":15,"revoltPercent":0.0,"aiDisabled":false,"stress":0,"totalWars":1,"lives":[{"s":0,"e":128,"o":0,"k":8}]},

{"id":14,"name":"Norway","destroyed":false,"pos":{"x":317,"y":424},"gold":3925,"color":{"r":0.9350000023841858,"g":0.12622499465942384,"b":0.12622499465942384,"a":1.0},"startYear":0.0,"endYear":0.0,"killerId":0,"originId":0,"revoltIds":[],"killedIds":[],"combatEfficiency":0,"landValue":34395,"maxArea":10878,"revoltPercent":0.0,"aiDisabled":false,"stress":1,"totalWars":3,"lives":[]},
]

Cities[edit | edit source]

This section contains a list of all cities, their name, location and who they rightfully belong to ("r")

"cities":[
{"x":75,"y":561,"n":"Reykjavik","r":1},
{"x":138,"y":352,"n":"Dublin","r":2},
{"x":190,"y":306,"n":"London","r":3},
{"x":210,"y":254,"n":"Paris","r":4},
{"x":22,"y":121,"n":"Lisbon","r":5},
{"x":26,"y":27,"n":"Rabat","r":6},
{"x":182,"y":44,"n":"Algiers","r":7},
{"x":285,"y":33,"n":"Tunis","r":8},
{"x":321,"y":124,"n":"Rome","r":10}
]

Alliances[edit | edit source]

A list of all alliances, their members (their IDs), stress (likelihood of collapsing) and whether its auto-generated name was changed.

"alliances":[
{"name":"Operation Iran","ids":[56,53,54],"stress":0,"ne":false},
{"name":"Baltic Commonwealth","ids":[23,20,21],"stress":1,"ne":true},
{"name":"Order of United Kingdom","ids":[3,1,4,22],"stress":0,"ne":false}
]

Wars[edit | edit source]

List of all ongoing wars, their participants, start time and targeted length.

"wars":[
{"attackers":[28],"attackersLeft":[28],"defenders":[23],"defendersLeft":[23],"targetLength":42.67084884643555,"startTime":175.15313720703126},
{"attackers":[13,33,36],"attackersLeft":[13,36],"defenders":[10],"defendersLeft":[10],"targetLength":34.056846618652347,"startTime":196.08883666992188}
]

Terrain[edit | edit source]

A long string of numbers, separated by commas, that encodes terrain in horizontal stripes from left to right, bottom to top.

Each number translates into terrain types as follows:

Number in

save file

Corresponding

terrain type

HEX code in

map image

0 water #FFFFFF
1 basic land #000000
2 crossing #CCCCCC
3 hills #333333
4 desert #666666
5 mountains #999999

Owner[edit | edit source]

A list of numbers similar to terrain, where each number is the ID of the nation that owns a given pixel, if the number is 0, nobody owns that pixel.

Trivia[edit | edit source]

  • Because save and scenario files are interchangeable, converting a save into a scenario is as easy as moving the save file into the scenario folder. Some map makers use this trick to include alliances and wars in their scenarios.
  • Maximum file size that AoC will read is 1GB, anything above that doesn't load.