rakaly / hoi4save Goto Github PK
View Code? Open in Web Editor NEWParse and melt HOI4 save files
License: MIT License
Parse and melt HOI4 save files
License: MIT License
When attempting to deserialize a section of code that contains repeated saved_event_target
fields in the given format, the deserialization fails with the error Hoi4Error(Deserialize(Error(Deserialize(DeserializeError { kind: Unsupported("not an object") })))).
saved_event_target
fields.saved_event_target={
country="CHI"
name="WTT_current_china_leader"
}
saved_event_target={
country="PRC"
name="WTT_communist_china"
}
saved_event_target={
country="YUG"
name="yugoslavia_wedding_partner"
}
saved_event_target={
state=800
name="TUR_kurdish_state_event_target"
}
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct SavedEventTarget {
pub country: Option<String>,
pub state: Option<i32>,
pub name: String,
}
// in struct
saved_event_target: Vec<SavedEventTarget>
When I implemented the model, I found some broken updates in save file.
For example, This definition for party was changed in the newest version.
Avalanche v1.12.10.91f2 (0f26)
parties={
democratic={
default=yes
popularity=13.333
country_leader={
{
ideology="conservatism"
character={
id=1178
type=73
}
}
}
}
communism={
default=yes
popularity=13.333
country_leader={
{
ideology="stalinism"
character={
id=1179
type=73
}
}
}
}
fascism={
default=yes
popularity=13.333
country_leader={
{
ideology="nazism"
character={
id=1177
type=73
}
}
}
}
neutrality={
default=yes
popularity=60.001
country_leader={
{
ideology="oligarchism"
character={
id=6758
type=73
}
}
}
}
}
1.10-normal-text
parties={
democratic={
name="Zentrum"
long_name="Zentrum"
popularity=20.000
country_leader={
id={ id=2 type=54 }
name="Konrad Adenauer"
desc="POLITICS_KONRAD_ADENAUER_DESC"
picture="Portrait_Germany_Konrad_Adenauer.dds"
ideology=conservatism
expire="1965.1.1.1"
female=no
}
}
communism={
name="KPD"
long_name="KPD"
popularity=20.000
country_leader={
id={ id=3 type=54 }
name="Wilhelm Pieck"
desc="POLITICS_WILHELM_PIECK_DESC"
picture="Portrait_Germany_Wilhelm_Pieck.dds"
ideology=stalinism
traits={ exiled }
expire="1965.1.1.1"
female=no
}
}
fascism={
name="NSDAP"
long_name="Nationalsozialistische Deutsche Arbeiterpartei"
popularity=60.000
country_leader={
id={ id=1 type=54 }
name="Adolf Hitler"
desc="POLITICS_ADOLF_HITLER_DESC"
picture="Portrait_Germany_Adolf_Hitler.dds"
ideology=nazism
traits={ dictator }
expire="1965.1.1.1"
female=no
}
}
neutrality={
name="Non-Aligned"
long_name="Non-Aligned"
popularity=0.000
country_leader={
id={ id=834 type=4713 }
name="Karl Wagner"
picture="gfx/leaders/Europe/portrait_europe_generic_6.dds"
ideology=moderatism
traits={ editor }
expire="1942.1.1.12"
female=no
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.