首页所有页面

游戏存档兼容性

Save game compatibility is the ability to load a save file created with version N of vanilla and a mod with the version N+1 of vanilla or that mod, and continue playing without issues.

Keeping save compatibility

Generally entities cannot be removed or renamed (except if doing some save conversion):

  • Removing a culture would result in characters with that culture in the save file getting noculture culture upon loading the save.

In addition you need to be careful about:

  • Adding any traits, since they are not stored by their name in the saves, but the numeric index in which they were loaded at the time. So if a trait is added in vanilla at the last index, it will show up for characters that had the trait with first index in the mod - and all traits will be wrong by 1 index.
  • Adding a new title set to be inactive at game start through a history file (active = no), as it will remain active when loading from a save file.
  • Changing the potentials of buildings: building from the save will still be present in the holding when potential doesn't match, but would not appear on the building list.
  • Adding new laws: the "default" law will not get determined when loading from a save, so player may not be able to select any law in that group depending on how the conditions are written.

When new counties are added on the map, and loading a save with missing title holder, a random nearby ruler should get the title. However vanilla map extensions have been known to break save compatibility in the past.

Automatic save conversion

As of patch 2.7.1, a new folder common/save_conversion/ allows to apply automatic migration of some entity names when loading a save.

The syntax is:

<entity_type> = {
	<old_name> = <new_name>
}

The supported entities are:

  • Religions:
religions = {
	bektashi = hurufi
}
  • Societies:
societies = {
	secret_religious_society_buddhism = secret_religious_society_buddhist
	secret_religious_society_hinduism = secret_religious_society_hindu
}

Manual save conversion

For some changes, it is possible to create an on_startup event that does some conversion via scripting:

  • changing a modifier or flag into another one, or removing them.
  • removing traits, ...

Compared to the automatic save conversion, it requires old entity definitions to still be present in the mod (even if not used in the new version), in order to be usable via scripting.

相关页面 (55)

EU4转档器模组制作Patch 2.7.1Steam创意工坊事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作界面模组制作疾病模组制作目标模组制作盾徽模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色模组制作贸易路线模组制作音乐模组制作验证器