Save File Notes - RyanBabij/WorldSim GitHub Wiki
Okay this probably doesn't belong here but I'm too lazy to go and update my website so I'll put it here for now.
I want to create awesome human-readable savefiles. This is good because then people can modify them and come up with interesting scenarios. Here's an example of an awesome save file from Hearts of Iron:
navalunit = {
id = { type = 14800 id = 26 }
name = "1st Fleet"
location = 158
prevprov = 95
home = 158
task = 0
taskprov = 158
date = {
year = 1936
month = january
day = 0
hour = 0
}
development = no
morale = 0.001
division = {
id = { type = 14800 id = 27 }
name = "USS Lexington"
type = carrier
model = 2
extra = none
strength = 100.000
organisation = 32.500
defaultorganisation = 65.000
maxspeed = 24.000
supplyconsumption = 0.700
fuelconsumption = 1.000
surfacedetectioncapability = 8.000
airdetectioncapability = 9.000
subdetectioncapability = 1.000
visibility = 100.000
seadefence = 18.000
airdefence = 8.000
seaattack = 1.000
subattack = 0.000
shorebombardment = 0.000
airattack = 2.500
transportcapability = 0.000
aircraftcapacity = 2.000
range = 9000.000
travelled = 0.000
}
Wow amazing, I can easily see that the USS Lexington is in the 1st Fleet. If I want to I can change things around just for fun.
Here's a crap save file:
ós¯cá’{Eá[E#‚§A world1 Josip_Idromeno € Z #*ÿ!(ÿ&ÿ 'ÿ!)ÿ")ÿ")ÿ")ÿ 'ÿ")ÿ")ÿ!(ÿ#*ÿ$+ÿ%-ÿ$+ÿ#*ÿ#+ÿ%-ÿ$+ÿ#+ÿ%,ÿ%-ÿ'.ÿ'/ÿ'.ÿ&-ÿ&-ÿ&-ÿ'-ÿ'.ÿ(0ÿ(/ÿ)0ÿ(0ÿ)1ÿ*1ÿ*1ÿ'.ÿ(/ÿ)1ÿ*1ÿ!+3ÿ *2ÿ",4ÿ#.6ÿ$/7ÿ$/7ÿ%08ÿ&19ÿ(4=ÿ*5>ÿ+6?ÿ-9Bÿ0<Eÿ2>Gÿ3@Iÿ3?Iÿ4@Jÿ5AJÿ3@Iÿ3@Iÿ.;Fÿ.;Fÿ.<Fÿ/<Gÿ)6Cÿ*7Dÿ*7Eÿ*7Dÿ*7Dÿ*7Eÿ*7Eÿ*7Dÿ*7Cÿ*7Dÿ*7Dÿ*7Cÿ*7Cÿ*7Dÿ+7Dÿ)6Cÿ)6Bÿ*6Bÿ*6Cÿ)6Bÿ)6Bÿ)5Aÿ)5Bÿ)5Bÿ)5Bÿ(4Aÿ(4Aÿ(4Aÿ'3?ÿ'2?ÿ&2>ÿ%0<ÿ$/:ÿ#.9ÿ"-8ÿ!,7ÿ!,6ÿ)3ÿ'1ÿ)3ÿ(/ÿ )/ÿ&19ÿ*5>ÿ *2ÿ(.ÿ"(ÿ"(ÿ"(ÿÿÿ"ÿ ÿ ÿ!ÿ ÿ ÿ ÿÿ ÿ ÿ ÿ"*ÿ!(ÿ&ÿ 'ÿ 'ÿ!(ÿ!(ÿ")ÿ!(ÿ!(ÿ!(ÿ!(ÿ!)ÿ"*ÿ$+ÿ#*ÿ"*ÿ$+ÿ$+ÿ#+ÿ#*ÿ$+ÿ$,ÿ&-ÿ'/ÿ&.ÿ&.ÿ&.ÿ&.ÿ'.ÿ'/ÿ(0ÿ'/ÿ'0ÿ'0ÿ*2ÿ *4ÿ!+5ÿ!+4ÿ#.6ÿ#-6ÿ$/8ÿ$/8ÿ$/8ÿ%09ÿ&1;ÿ)5>ÿ)4?ÿ,7Aÿ,8Bÿ.:Dÿ1>Gÿ1>Hÿ2?Hÿ3?Iÿ3?Iÿ-:Eÿ-9Eÿ,9Eÿ(6Cÿ(6Cÿ(5Cÿ)6Dÿ)6Dÿ)6Dÿ)6Dÿ)5Bÿ)6Dÿ*7Eÿ*7Dÿ*7Dÿ*7Dÿ)6Cÿ)6Bÿ)6Bÿ)6Cÿ)5Aÿ(5Aÿ(4Aÿ(4@ÿ(4?ÿ'3?ÿ'3>ÿ(4@ÿ)5Bÿ)5Aÿ)5Aÿ(5Aÿ(4Aÿ(4@ÿ(4@ÿ(4@ÿ'3?ÿ(4@ÿ'3?ÿ%1=ÿ;ÿ#.9ÿ"-7ÿ!+6ÿ)3ÿ(2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