本指南介绍了从原版中调整改动的步骤 patch, for a mod that modifies some vanilla files.
最好避免在模组内复制和修改原版文件(由 loading from folders), but sometimes this is unavoidable.
如果有,每个原版补丁都需要额外工作,将改动与自己的合并,并使模组兼容新补丁:
'Base' file (vanilla version N) ----------------> 'Destination' file (vanilla version N+1)
| New patch |
| Copied and modified | Propagating vanilla changes
| |
v v
'Source' file (mod version N) ----------------> 'Result' file (mod version N+1)
Keeping mod changes
Ideally you should use a 3-way merge tool, with 3-way folder merging capability:
Some 3-way merge tools:
Note that WinMerge doesn't support 3-way merge, only 2-way diff.
3-way merge is composed of 4 windows:
为了简化起见,常见的是源码和结果文件能用在同一个文件上,但一定要确保旧版本的模组备份,以防需要重启合并。
| 这是一篇小作品。你可以通过编辑或修订扩充其内容。 如果可以请尽你所能的去协助完善这篇文章。 |
For instance if removing religious CB00_cb_types,保留以下内容会帮助未来的合并:
# Regular Holy War CB
#religious = {
#
# can_use_gui = {
#
# }
#
# can_use = {
#
# }
#
# can_use_title = {
#
# }
#
# is_valid = {
#
# }
#
# is_valid_title = {
#
# }
#
# on_add = {
#
# }
#
# on_success_title = {
#
# }
#
# on_fail = {
#
# }
#
# on_reverse_demand = {
#
# }
#
# attacker_ai_victory_worth = {
#
# }
#
# attacker_ai_defeat_worth = {
#
# }
#
# defender_ai_victory_worth = {
#
# }
#
# defender_ai_defeat_worth = {
#
# }
#}