Hediffs - Freefolk-Rimworld-Modding/FF-Simple-Ammunition-Remastered-2.0 GitHub Wiki

Manual Patching with Reloading


MVCF wiki page

Hediffs can't have a verb node in vanilla, so in order to use Reloading we need to add a verb with a MVCF comp.

Functional Example of a verb on a hediff using the MVCF, from Combat Bionics

Note:This is NOT an official wiki for the Reloading code form VEF, when one is written a link will be provided and this information will be rewritten to reference official documentation.

Aside from a few differences the Reloading code here is very similar to how it's used in other places, the nodes work the same as with Ranged Weapons. First the comp classes need to be changed to the hediff versions, also the GenerateAmmo, NewVerbClass, and GenerateBackupWeapon nodes may not work here as they're not really needed so I haven't tested them.

  <Operation Class="PatchOperationAdd">
    <xpath>Defs/HediffDef[defName="FF_MinigunArm"]/comps</xpath>
    <value>
      <li Class="Reloading.HediffCompProperties_Reloadable">
        <compClass>Reloading.HediffComp_Reloadable</compClass>
        <MaxShots>60</MaxShots>
        <AmmoFilter>
          <thingDefs>
            <li>FF_Ammunition_Industrial</li>
          </thingDefs>
        </AmmoFilter>
        <ItemsPerShot>1</ItemsPerShot>
        <ReloadTimePerShot>0.05</ReloadTimePerShot>
        <ReloadSound>Interact_Rifle</ReloadSound>
      </li>
    </value>
  </Operation>
⚠️ **GitHub.com Fallback** ⚠️