Ludeon Forums

Ludeon Forums

  • November 25, 2020, 07:49:31 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Patching sequence for core def. Some work, some don't, no errors.  (Read 372 times)

imtav

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Patching sequence for core def. Some work, some don't, no errors.
« on: September 22, 2019, 04:35:00 PM »

I'm trying a patching sequence on a core def.  Some of the patches are working, others do not.  No errors raised.  In the below example, the first patch does not work, the second patch does, and the last one does not.

Code: [Select]
<li Class="PatchOperationAdd">
    <xpath>Defs/ThingDef[defname = "SmokeleafJoint"]/ingestible</xpath>
    <value>
    <tasteThought>IngestSmokeleafExample</tasteThought>
    </value>
</li>

<li Class="PatchOperationReplace">
    <xpath>Defs/ThingDef[defName = "SmokeleafJoint"]/ingestible/outcomeDoers/li[1]</xpath>
    <value>
<li Class="IngestionOutcomeDoer_GiveHediff">
        <hediffDef>Example_SmokeleafHigh</hediffDef>
        <severity>0.39</severity>
        <toleranceChemical>Example_Smokeleaf</toleranceChemical>
</li>
    </value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName = "SmokeleafJoint"]/statBases/MarketValue</xpath>
<value>
<MarketValue>7.62</MarketValue>
</value>
</li>


As a test, I tried adding:
Code: [Select]
<tasteThought>IngestSmokeleafExample</tasteThought> directly into the core file, and that works.  What's going on with my patching?  Thanks for any help!
Logged

Red192

  • Drifter
  • **
  • Posts: 26
  • Refugee
    • View Profile
Re: Patching sequence for core def. Some work, some don't, no errors.
« Reply #1 on: September 23, 2019, 06:32:00 AM »

In the first patch you mispelled the def name durign the declaration:

[defname = "SmokeleafJoint"]

instead of

[defName = "SmokeleafJoint"]

Logged

imtav

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: Patching sequence for core def. Some work, some don't, no errors.
« Reply #2 on: September 23, 2019, 01:03:47 PM »

Wow!  I can't believe I didn't catch that.  Was staring at that code for hours yesterday trying to find the problem.  Thank you.
Logged

Red192

  • Drifter
  • **
  • Posts: 26
  • Refugee
    • View Profile
Re: Patching sequence for core def. Some work, some don't, no errors.
« Reply #3 on: September 24, 2019, 05:48:37 AM »

just for the first one thou... in the third one i can't see any problem
Logged