Hearts of Iron IV

Hearts of Iron IV

View Stats:
HASHEM Sep 6, 2021 @ 4:58pm
How to change game rules mid-game
How do I edit game rules on a save game.

I'm playing a mod that heavily restricts wargoals to focuses and events. Very boring.

Can someone explain to me how to go into the save file and edit it?
< >
Showing 1-13 of 13 comments
HASHEM Sep 6, 2021 @ 5:58pm 
halp
Shortpower Sep 6, 2021 @ 7:21pm 
allow diplo
console command or load with another mod that gives you whatever war rules you like. I don't think game rules can change past start.
HASHEM Sep 7, 2021 @ 11:54am 
Originally posted by Shortpower:
allow diplo
console command or load with another mod that gives you whatever war rules you like. I don't think game rules can change past start.

yeah but I want the AI to be able to start wars
Imhotep Sep 7, 2021 @ 12:09pm 
I presume you know how to edit a save file.

You could look at the code in the mod to see if it makes it easier to find the relevant bits of code in the save file.
Shortpower Sep 7, 2021 @ 12:11pm 
Originally posted by 76561198148129948:
Originally posted by Shortpower:
allow diplo
console command or load with another mod that gives you whatever war rules you like. I don't think game rules can change past start.

yeah but I want the AI to be able to start wars
AI usually don't justify barring specific AI with claims (USSR for example)
Demand It could work for what you want though, usually what I use when I want some extreme alt history stuff from minors.
Not a perfect science though, I've seen the USSR cede land to Latvia a few times.
Last edited by Shortpower; Sep 7, 2021 @ 12:12pm
HASHEM Sep 7, 2021 @ 4:27pm 
Originally posted by Imhotep:
I presume you know how to edit a save file.

You could look at the code in the mod to see if it makes it easier to find the relevant bits of code in the save file.

you presume wrong ;(

I tried opening the save file with Notepad++ and it's just a bunch of NULL and random characters.
Imhotep Sep 7, 2021 @ 6:28pm 
In settings.txt in the Paradox folder in Documents, you need to change 'save as binary=yes' to 'save as binary=no'. This will make the gamesaves save in uncompressed format. They're bigger in size, but can be edited. You'll then need to save the game again so it's saved in uncompressed format before editing.
HASHEM Sep 7, 2021 @ 8:00pm 
Originally posted by Imhotep:
In settings.txt in the Paradox folder in Documents, you need to change 'save as binary=yes' to 'save as binary=no'. This will make the gamesaves save in uncompressed format. They're bigger in size, but can be edited. You'll then need to save the game again so it's saved in uncompressed format before editing.

I'll give it a shot :D
hdcoltri Jun 18, 2023 @ 2:26pm 
Originally posted by Imhotep:
In settings.txt in the Paradox folder in Documents, you need to change 'save as binary=yes' to 'save as binary=no'. This will make the gamesaves save in uncompressed format. They're bigger in size, but can be edited. You'll then need to save the game again so it's saved in uncompressed format before editing.
Doesn't quite work
Aluvard Jun 18, 2023 @ 2:40pm 
Originally posted by hdcoltri:
Originally posted by Imhotep:
In settings.txt in the Paradox folder in Documents, you need to change 'save as binary=yes' to 'save as binary=no'. This will make the gamesaves save in uncompressed format. They're bigger in size, but can be edited. You'll then need to save the game again so it's saved in uncompressed format before editing.
Doesn't quite work
Works.
hdcoltri Jun 18, 2023 @ 3:54pm 
Originally posted by Aluvard:
Originally posted by hdcoltri:
Doesn't quite work
Works.
Well, i did everything he said and it didn't quite work. Does it only work with new saves, or does it only work in older saves?
Aluvard Jun 18, 2023 @ 4:02pm 
If you want edit current gameplay:
- save and exit game,
- open settings.txt, find 'save as binary=yes' and change parameter to "no". Save changes,
- open game, load save file, wait several in-game days and save file. Close game,
- open fresh save with notepad.

You can't edit save files that were created before changes in settings.txt
STRATOFEL Jun 21, 2023 @ 9:09am 
- save and exit game,
- open settings.txt, find 'save as binary=yes' and change parameter to "no". Save changes,
- open game, load save file, wait several in-game days and save file. Close game,
- open fresh save with notepad.



use notepad find function to find this string "game_rules={" and paste to this array allow_wargoals="ALWAYS_FREE"
Last edited by STRATOFEL; Jun 21, 2023 @ 9:09am
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Sep 6, 2021 @ 4:58pm
Posts: 13