PC Empty a Jar?

Guns also scrap to their parts. So it's not true that you can only can scrap into "lower" ressource types like wood and stone.
Sorry, I should have been more clear. Scrapping appears to require a resource from the Materials list in materials.xml. Gun parts are one material type. So is wood, glass, stone, and many others. Jars are not a material type.

Where is the problem? They already did it back than...

Murky water scraps into only empty jars
Hey, if you know how to solve it by all means please tell us! Here's the XML which seems to control what murky water scraps into. Please show us how to make this accept empty jars, you'd be a hero.

Code:
<item name="drinkJarRiverWater">
  ....
  <property name="Material" value="Mglass"/>
 
Sorry, I should have been more clear. Scrapping appears to require a resource from the Materials list in materials.xml. Gun parts are one material type. So is wood, glass, stone, and many others. Jars are not a material type.
Weird.... you'd think all you need to do is add a materials type but that doesn't work.

I tried:

<material id="MJar">
<property name="damage_category" value="glass"/>
<property name="surface_category" value="glass"/>
<property name="forge_category" value="drinkJarEmpty"/>
<property name="Experience" value="6"/>
</material>


But when I assigned that material to murky water, I no longer had the option to scrap.   Not sure what I'm missing.

 
Ok, got it.

add to materials.xml

<material id="MJar">
<property name="damage_category" value="glass"/>
<property name="surface_category" value="glass"/>
<property name="forge_category" value="drinkJarEmpty"/>
<property name="Experience" value="6"/>
</material>


add to recipes.xml

<recipe name="drinkJarEmpty" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe>


in items.xml change material type on drinkJarEmpty and drinkJarRiverWater to MJar

<item name="drinkJarEmpty">
<property name="HoldType" value="3"/>
<property name="Meshfile" value="#Other/Items?Food/emptyJarPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="MJar"/>


<item name="drinkJarRiverWater">
<property name="HoldType" value="3"/>
<property name="DisplayType" value="waterDysentery"/>
<property name="Meshfile" value="#Other/Items?Food/bottled_waterPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="MJar"/>


So murky water will now scrap to empty jars.   However, you will no longer be able to scrap empty jars to glass.

But... you probably don't want to do it this way.   When you scrap, you don't get full value back.   So, when I tried to scrap 5 murky water, I was only getting 3 jars back.   I don't know if there is a way to override that.

 
Last edited by a moderator:
What if you leave the material for drinkJarEmpty as MGlass? Could you then scrap them into glass?

I'm thinking now the game requires a) a material that actually is part of the recipe of the item being scrapped and b) looks up the recipe and returns X% of the recipe quantity of that material back to you. I wonder what would happen if you scrap a single murky water? If the "recipe" says it takes 1 MJar, how would it return a partial?

 
Last edited by a moderator:
What if you leave the material for drinkJarEmpty as MGlass? Could you then scrap them into glass?
Nope, tried that.   My guess is that you can only scrap to basic items and basic items themselves can't be scrapped.   Doing what I did turns empty jars into a basic item.

Let me clarify, doing that did allow me to scrap empty jars to glass... but I could no longer scrap murky water.  

 
Last edited by a moderator:
Hey, if you know how to solve it by all means please tell us! Here's the XML which seems to control what murky water scraps into. Please show us how to make this accept empty jars, you'd be a hero.
I did not say that i know how it works, i just said it was already done in a modlet... a year or more ago, when the exactly same question came up here.

I guess Kalen already pointed out how this can be done in the meanwhile.

 
I did not say that i know how it works, i just said it was already done in a modlet... a year or more ago, when the exactly same question came up here.

I guess Kalen already pointed out how this can be done in the meanwhile.
Yup, but like I said you definitely don't want to do it.   Much better to use the recipe method posted earlier.

 
you need to make an xml modlet to "pour" stuff down toilets etc

this is what i use in my modlets

<insertBefore xpath="/items/item[starts-with(@name, 'drinkJar') and not(contains(@name, 'drinkJarEmpty'))]/property[@name='Group']">
    <property class="Action1"> <!-- UseAction -->
            <property name="Class" value="ExchangeItem"/>
            <property name="Delay" value="1.0"/>
            <property name="Change_item_to" value="drinkJarEmpty"/>
            <property name="Do_block_action" value="deplete1"/>
            <property name="Sound_start" value="bucketfill_water"/>
            <property name="Focused_blockname_1" value="cntToilet01"/>
            <property name="Focused_blockname_2" value="cntToilet02"/>
            <property name="Focused_blockname_3" value="cntToilet03"/>
            <property name="Focused_blockname_4" value="cntGraniteSink"/>
            <property name="Focused_blockname_5" value="cntCabinetOldSink"/>
            <property name="Focused_blockname_6" value="utilitySink"/>
            <property name="Focused_blockname_7" value="wallHungSink"/>
    </property>
</insertBefore>
<insertBefore xpath="/items/item[starts-with(@name, 'drinkYucca') and not(contains(@name, 'drinkJarEmpty'))]/property[@name='Group']">
    <property class="Action1"> <!-- UseAction -->
            <property name="Class" value="ExchangeItem"/>
            <property name="Delay" value="1.0"/>
            <property name="Change_item_to" value="drinkJarEmpty"/>
            <property name="Do_block_action" value="deplete1"/>
            <property name="Sound_start" value="bucketfill_water"/>
            <property name="Focused_blockname_1" value="cntToilet01"/>
            <property name="Focused_blockname_2" value="cntToilet02"/>
            <property name="Focused_blockname_3" value="cntToilet03"/>
            <property name="Focused_blockname_4" value="cntGraniteSink"/>
            <property name="Focused_blockname_5" value="cntCabinetOldSink"/>
            <property name="Focused_blockname_6" value="utilitySink"/>
            <property name="Focused_blockname_7" value="wallHungSink"/>
    </property>
</insertBefore>

 
Last edited by a moderator:
then add this

<append xpath="/items/item[@name='drinkJarEmpty']/property[@class='Action1']">
    <property name="Focused_blockname_6" value="cntToilet01"/>
    <property name="Focused_blockname_7" value="cntToilet02"/>
    <property name="Focused_blockname_8" value="cntToilet03"/>
</append>

so basically, your pouring out any jar and then gaining, murky water, so you can convert/cook it to boiled water or use in other ingredients

 
so basically, your pouring out any jar and then gaining, murky water, so you can convert/cook it to boiled water or use in other ingredients
I think we used to be able to fill jars from toilets. Or I could be hallucinating. Maybe they decided that that water was too murky to actually be used? 😉

 
might of done in previous alphas cant remember,

current xml is

        <property name="Focused_blockname_1" value="water"/>
        <property name="Focused_blockname_2" value="waterMoving"/>
        <property name="Focused_blockname_3" value="waterStaticBucket"/>
        <property name="Focused_blockname_4" value="waterMovingBucket"/>
        <property name="Focused_blockname_5" value="terrWaterPOI"/>

so i just added the toilets

some of the other additions i made was to get a "bone" when eating charred or grilled meat, if you think of it, when you eat those, what would you be left with?

<append xpath="/items/item[@name='foodGrilledMeat']/property[@class='Action0']">
<property name="Create_item" value="resourceBone"/>
</append>

<append xpath="/items/item[@name='foodCharredMeat']/property[@class='Action0']">
<property name="Create_item" value="resourceBone"/>
</append>

which i also added, to my charred/grilled rabbit/chicken/pork food changes

 
Last edited by a moderator:
Back
Top