边缘世界 RimWorld

边缘世界 RimWorld

Early Times
此主题已被锁定
sharkman 2021 年 7 月 23 日 上午 10:54
Research Patch fix
Instead of using only PatchOperationAdd please wrap it in PatchOperationConditional, e.g.:
in Patches\Vanilla.xml you have:
<li Class="PatchOperationAdd"> <xpath>/Defs/ResearchProjectDef[defName="Stonecutting"]</xpath> <value> <prerequisites> <li>FT_Stonecrushing</li> </prerequisites> </value> </li>
instead of that please replace it with:
<li Class="PatchOperationConditional"> <xpath>/Defs/ResearchProjectDef[defName="Stonecutting"]/prerequisites</xpath> <nomatch Class="PatchOperationAdd"> <xpath>/Defs/ResearchProjectDef[defName="Stonecutting"]</xpath> <value> <prerequisites> <li>FT_Stonecrushing</li> </prerequisites> </value> </nomatch> <match Class="PatchOperationAdd"> <xpath>/Defs/ResearchProjectDef[defName="Stonecutting"]/prerequisites</xpath> <value> <li>FT_Stonecrushing</li> </value> </match> </li>

this way it does not cause any duplicate xml tags exceptions on start.
< >
正在显示第 1 - 3 条,共 3 条留言
vovann012347  [开发者] 2021 年 8 月 10 日 上午 11:01 
I could not find FT_Stonecrushing, as for method - I already have that, this may be another mod doing thing you have mentioned since i cannot check for mods doing similar thing.
If you have errors with other research defs - i will sort them out.
If i use said checks everywhere then editing patches will be a pain, mod will load slower also it will delay me from adding useful stuff further (and hopefully not breakind existing stuff) - so i will sort out issues if you have any.
vovann012347  [开发者] 2021 年 8 月 10 日 下午 4:00 
That will be that way unless there will start to arise countless problems with compat so i will need to make more checks when patching which will probably be so.
sharkman 2021 年 8 月 10 日 下午 5:33 
Oh, sorry about that, I think this patch is for another mod called Fortifications - Medieval - Materials, my bad.

I think you already did a great job in 1.1-1.3\Patches\CorePatches\MedTimes_Research_2_patch.xml for the same Stonecutting research prerequisites list.
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50