rimworld吧 关注:236,941贴子:4,189,871
  • 38回复贴,共1

战斗拓展补丁制作求助

只看楼主收藏回复

我打算自行修改一下ce环境机械族的护甲,但是个人没有xml相关的制作经验,我依照别人的mod试着做了一下发现补丁完全没法生效


IP属地:广西1楼2024-12-18 09:01回复
    这是文件结构


    IP属地:广西2楼2024-12-18 09:04
    回复
      这是补丁内容:
      <?xml version="1.0" encoding="utf-8" ?>
      <Patch>
      <Operation Class="PatchOperationReplace">
      <xpath>Defs/ThingDef[defName="Mech_Diabolus"]/statBases/ArmorRating_Blunt</xpath>
      <value>
      <ArmorRating_Blunt>105.6</ArmorRating_Blunt>
      </value>
      </Operation>
      <Operation Class="PatchOperationReplace">
      <xpath>Defs/ThingDef[defName="Mech_Diabolus"]/statBases/ArmorRating_Sharp</xpath>
      <value>
      <ArmorRating_Sharp>70</ArmorRating_Sharp>
      </value>
      </Operation>
      </Patch>


      IP属地:广西3楼2024-12-18 09:04
      回复
        日志:Mod tex did not load any content. Following load folders were used: - D:\SteamLibrary\steamapps\common\RimWorld\Mods\texUnityEngine.StackTraceUtility:ExtractStackTrace ()(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)Verse.LoadedModManager/<>c:<LoadModContent>b__13_1 ()Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()Verse.LongEventHandler:LongEventsUpdate (bool&)Verse.Root:Update ()Verse.Root_Entry:Update ()


        IP属地:广西4楼2024-12-18 09:06
        回复
          要不参考一下ce给原版装甲做的补丁看看,是不是缺了什么东西


          IP属地:浙江来自Android客户端5楼2024-12-18 09:51
          回复
            这不一定是def的xml里写错了,检查一下about.xml的内容。


            IP属地:广东来自Android客户端6楼2024-12-18 10:12
            收起回复
              About:<?xml version="1.0" encoding="utf-8"?>
              <ModMetaData>
              <name>mech_up</name>
              <author>zh</author>
              <supportedVersions>
              <li>1.5</li>
              </supportedVersions>
              <packageId>zh.mechup</packageId>
              <description>测试</description>
              <modDependencies>
              <li>
              <packageId>CETeam.CombatExtended</packageId>
              <displayName>Combat Extended</displayName>
              <steamWorkshopUrl>https://steamcommunity.com/sharedfiles/filedetails/?id=2890901044</steamWorkshopUrl>
              <downloadUrl>https://github.com/CombatExtended-Continued/CombatExtended/releases/</downloadUrl>
              </li>
              <li>
              <packageId>Ludeon.RimWorld.Biotech</packageId>
              <displayName>Biotech</displayName>
              <downloadUrl>https://store.steampowered.com/app/1826140/RimWorld__Biotech/</downloadUrl>
              </li>
              </modDependencies>
              <loadAfter>
              <li>brrainz.harmony</li>
              <li>Ludeon.Rimworld.Biotech</li>
              <li>CETeam.CombatExtended</li>
              </loadAfter>
              </ModMetaData>


              IP属地:广西7楼2024-12-18 16:43
              回复
                最好的办法就是直接复制别人的补丁然后重新修改


                IP属地:广东来自Android客户端8楼2024-12-18 17:40
                收起回复
                  <!-- ========== Super Heavy Mechanoid ========== --> <Operation Class="PatchOperationReplace"> <xpath>Defs/ThingDef[@Name="SuperHeavyMechanoid"]/statBases/ArmorRating_Blunt</xpath> <value> <ArmorRating_Blunt>54</ArmorRating_Blunt> </value> </Operation> <Operation Class="PatchOperationReplace"> <xpath>Defs/ThingDef[@Name="SuperHeavyMechanoid"]/statBases/ArmorRating_Sharp</xpath> <value> <ArmorRating_Sharp>24</ArmorRating_Sharp> </value> </Operation>


                  IP属地:广西来自Android客户端9楼2024-12-18 21:34
                  收起回复
                    <Operation Class="PatchOperationAdd">
                    <xpath>Defs/ThingDef[defName="Mech_Diabolus"]/statBases</xpath>
                    <value>
                    <ArmorRating_Blunt>2.00</ArmorRating_Blunt>
                    </value>
                    </Operation>
                    这个是单独给魔王添加属性的方法,defName对应的就是魔王的命名,虽然没用过ce但看上面的代码应该没有问题


                    IP属地:广东10楼2024-12-18 22:24
                    收起回复
                      [tex] Patch operation Verse.PatchOperationReplace(Defs/ThingDef[defName="Mech_Diabolus"]/statBases/ArmorRating_Blunt) failed
                      file: D:\SteamLibrary\steamapps\common\RimWorld\Mods\tex\Patches\Patch_Races_Mechanoid.xml
                      UnityEngine.StackTraceUtility:ExtractStackTrace ()
                      Verse.Log:Error (string)
                      Verse.PatchOperation:Complete (string)
                      Verse.LoadedModManager:ClearCachedPatches ()
                      Verse.LoadedModManager:LoadAllActiveMods (bool)
                      Verse.PlayDataLoader:DoPlayLoad ()
                      Verse.PlayDataLoader:LoadAllPlayData (bool)
                      Verse.Root/<>c:<Start>b__6_1 ()
                      Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
                      Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__28_0 ()
                      System.Threading.ThreadHelper:ThreadStart_Context (object)
                      System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
                      System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
                      System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
                      System.Threading.ThreadHelper:ThreadStart ()


                      IP属地:广西11楼2024-12-27 20:57
                      收起回复
                        [tex] Patch operation Verse.PatchOperationAdd(Defs/ThingDef[defName="Mech_Diabolus"]/statBases/ArmorRating_Blunt) failed
                        file: D:\SteamLibrary\steamapps\common\RimWorld\Mods\tex\Patches\Patch_Races_Mechanoid.xml
                        UnityEngine.StackTraceUtility:ExtractStackTrace ()
                        Verse.Log:Error (string)
                        Verse.PatchOperation:Complete (string)
                        Verse.LoadedModManager:ClearCachedPatches ()
                        Verse.LoadedModManager:LoadAllActiveMods (bool)
                        Verse.PlayDataLoader:DoPlayLoad ()
                        Verse.PlayDataLoader:LoadAllPlayData (bool)
                        Verse.Root/<>c:<Start>b__6_1 ()
                        Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
                        Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__28_0 ()
                        System.Threading.ThreadHelper:ThreadStart_Context (object)
                        System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
                        System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
                        System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
                        System.Threading.ThreadHelper:ThreadStart ()


                        IP属地:广西12楼2024-12-27 22:20
                        收起回复