Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Bud8013

#1
Mods / Re: Patching recipe to use different resources
December 08, 2021, 02:20:38 AM
How would I do something like that? I tried by just replacing it directly by using the PatchOperationReplace command but it just brings up an error.

    <Operation Class="PatchOperationFindMod">
        <mods>
            <li>Vanilla Cooking Expanded</li>
        </mods>
        <match Class="PatchOperationSequence">
            <operations>
                <li Class="PatchOperationReplace">
                    <xpath>Defs/RecipeDef[defName="Make_SaltMeat"]</xpath>
                    <value>
<ingredients>
<li>
<filter>
<categories>
<li>MeatRaw</li>
<li>AnimalProductRaw</li>
</categories>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>MW_Salt</li>
<li>VCE_Salt</li>
</thingDefs>
</filter>
<count>0.25</count>
</li>
</ingredients>
                    </value>
                </li>
</operations>
</match>
</Operation>
#2
Mods / Patching recipe to use different resources
December 06, 2021, 09:58:30 PM
Hello, I require assistance on patching a recipeDef to be able to use a different material for another mod alongside my own.

I have a medieval mod that adds coal powered benches and preserved foods using a building. As a request by someone, they asked if my smoking recipes can use the Salt's from Vanilla Expanded Cooking. I have tried to add or even replace the salt from my mod with VEC's but it either doesn't work or brings up errors.

<Patch>
    <Operation Class="PatchOperationFindMod">
        <mods>
            <li>Vanilla Cooking Expanded</li>
        </mods>
        <match Class="PatchOperationSequence">
            <operations>
                <li Class="PatchOperationAdd">
                    <xpath>Defs/RecipeDef[defName="Make_SaltMeat"]/ingredients/li/filter/thingDefs</xpath>
                    <value>
<li>VCE_Salt</li>
                    </value>
                </li>
</operations>
</match>
</Operation>
</Patch>


This is just 1 of the 6 I need to patch but if I can just get help on just 1 of them that would be wonderful. I can't figure it out but any help would be wonderful.
#3
Mods / Re: Patching a New Smithy
November 19, 2021, 11:52:55 AM
I never realized it was <RecipeUser> not <RecipeUsers>, even when I was altering and changing the original patch. Sometimes XML can be a pain when you don't get it exact.

Thank you, it works exactly how I hoped.
#4
Mods / Re: Patching a New Smithy
November 18, 2021, 11:32:48 PM
Thank you for the help however I tried to insert it the best I could, however it brings up this error

Patch operation Verse.PatchOperationSequence
(count=2,lastFailedOperation=Verse.PatchOperationAdd
(/Defs/ThingDef[@Name="BaseMeleeWeapon"]/recipeMaker/recipeUser)) failed


It seems it just get stuck trying to figure out what it wants to do. I even modified the old patch I used a little to try to work it but even still it displays a error.
#5
Mods / Re: Patching a New Smithy
November 18, 2021, 04:40:12 PM
Thank you for the reply,

If you try to override the existing code through the Core.xml files directly ( Like a existing defThing like Apparel_PlateArmor ) rather then patch them, if any other mods using that same Defs file and item, it would bring up many errors due to conflicting files.

I am trying to figure out how to patch items that are smithable to work with my new workbench. Like I said, I used the same exact patching as stated above for getting the Simple Helmet to appear and it works, however, other items using a parentName don't due to the way that it is arranged.

I'm fine with patching each individual item to work with it for my mod but I don't know the "how" of it, like getting the Plate Armor or Knifes and Clubs to appear.
#6
Mods / Patching a New Smithy
November 17, 2021, 10:24:51 PM
Hello, first post on the forums.

Trying to create a new Smithy that runs on a different material however doesn't show the any recipes to smith. I tried both adding recipes through the Smithy <Recipes> like the Stoves <Recipes> and also patching items from their <RecipeMaker> <RecipeUser> section.

The only item that works is the Simple Helmet. All the rest of the armors and weapons use a ParentName such as <ArmorSmithableBase> and bring up the Patching Failed error.

Does anyone know how to patch Armors and Weapons that use base <RecipeMaker> like <ArmorSmithableBase> to add to the workbench.

Here is the patch I have for it:

<Operation Class="PatchOperationAdd">
   <order>Append</order>
   <xpath>Defs/ThingDef[defName = "ArmorSmithableBase"]/recipeMaker/recipeUsers</xpath>           
   <value>
      <li>MW_PoweredSmithy</li>
   </value>
</Operation>


I don't know why only the Simple Helmet works using this process. I can only guess it's due to it having a dedicated <RecipeMaker> section. Any help would be great.