Jump to content

Working Ovens and Sinks


Valmar

Recommended Posts

I made some ovens and sinks you can craft that actually function. You can cook in the stove or fill your jar with clean water from the sink. Getting water from the sink uses the left mouse click.

 

My mod modified the glassjar so you'll have to replace yours with mine or just add the change to your own. The rest can just be copy/pasted at the end of the corresponding file.

 

Items:

 

<item id="1368" name="emptyJar">
<property name="Meshfile" value="Items/Food/emptyJarPrefab" />
<property name="Material" value="glass" />
<property name="HoldType" value="3" />
<property name="Stacknumber" value="15" /> <!-- STK resource -->
<property name="Weight" value="10" />
<property name="CraftingIngredientTime" value="9" />
	<property class="Action0">
		<!-- UseAction -->
		<property name="Class" value="ExchangeItem" />
		<property name="Delay" value="1.0" />
		<property name="Change_item_to" value="bottledWater" />
		<property name="Focused_blockname_1" value="workingCabinetSink" />
		<property name="Focused_blockname_2" value="workingGranitSink" />
		<property name="Sound_start" value="bucketfill_water" />
	</property>
<property class="Action1"> <!-- UseAction -->
	<property name="Class" value="ExchangeItem" />
	<property name="Delay" value="1.0" />
	<property name="Change_item_to" value="bottledRiverWater" />
	<property name="Do_block_action" value="deplete1" />
	<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="waterSource8" />
	<property name="Sound_start" value="bucketfill_water" />
</property>
<property name="Group" value="Resources" />
</item>

 

 

Blocks:

 

	   
<!-- Working Oven and Sink Mod -->
<block id="1748" name="workstationOven">
	<property name="DescriptionKey" value="workstationOvenDesc"/>
	<property name="Class" value="Campfire" />
	<property name="CustomIcon" value="cntWallOven" />
	<property name="Place" value="TowardsPlacerInverted" />
	<property name="Stacknumber" value="1" />
	<property name="Material" value="wood_weak" />
	<property name="Texture" value="346,345,341,345,262,345" />
	<property name="LootList" value="130" />
	<drop event="Destroy" name="workstationOven" count="1" />
	<drop event="Fall" name="woodDebris" count="1" prob="1.0"  stick_chance=".75" />
	<property name="HeatMapStrength" value="1"/>
	<property name="HeatMapTime" value="1200"/>
	<property name="HeatMapFrequency" value="25"/>
	<property name="Group" value="Food/Cooking,Decor" />
	<property name="ActiveRadiusEffects" value="+heatSource(3)"/>
	<property class="Workstation">
		<property name="Modules" value="tools,output,input"/>
		<property name="CraftingAreaRecipes" value="campfire" />
	</property>
</block>
<block id="1749" name="workingGranitSink">
	<property name="DescriptionKey" value="WorkingSinkDesc"/>
	<property name="Extends" value="cntGraniteSink" />
	<property name="CustomIcon" value="cntGraniteSink" />
	<property name="Class" value="SecureLoot" />
	<property name="LootList" value="130" />
</block>
<block id="1750" name="workingCabinetSink">
	<property name="DescriptionKey" value="WorkingSinkDesc"/>
	<property name="Extends" value="cntCabinetOldSink" />
	<property name="CustomIcon" value="cntCabinetOldSink" />
	<property name="Class" value="SecureLoot" />
	<property name="LootList" value="130" />
</block>

 

 

 

Loot:

 

		    <!--Working Oven and Sink -->
   <lootcontainer id="130" size="10,9" sound_open="UseActions/open_cupboard" sound_close="UseActions/close_cupboard" >
</lootcontainer>	

 

 

xui.xml (be sure to keep </ruleset> AND </xui> at the bottom of the file)

 

	<window_group name="workstation_workstationOven" controller="XUiC_WorkstationWindowGroup">
		<window name="windowCraftingList"/>
		<window name="craftingInfoPanel"/>
		<window name="windowCraftingQueue"/>
		<window name="windowToolsCampfire" />
		<window name="windowOutput" />
		<window name="windowNonPagingHeader" />
	</window_group>

 

 

 

recipes.xml

 

       <!--Working Ovens and Sinks Mod -->
   <recipe name="workstationOven" count="1" scrapable="False" >
       <ingredient name="forgedIron" count="20" />
       <ingredient name="cookingGrill" count="2" />
   </recipe>
   <recipe name="workingCabinetSink" count="1" scrapable="False" >
       <ingredient name="wood" count="15" />
       <ingredient name="forgedIron" count="10"/>
       <ingredient name="shortMetalPipe" count="5"/>
   </recipe>
   <recipe name="workingGranitSink" count="1" scrapable="False" >
       <ingredient name="wood" count="15" />
       <ingredient name="cobblestones" count="5" />
       <ingredient name="forgedIron" count="10"/>
       <ingredient name="shortMetalPipe" count="5"/>
   </recipe>

 

 

Optional:

Add this to the Localization file located in the config folder

 

 

workstationOven,blocks,Block Building,,Working Oven,,

workstationOvenDesc,blocks,Block Building,,This working oven can be used to cook many different recipes without using a fuel source.,,

WorkingSinkDesc,blocks,Block Building,,This working can be used as a source of clean water. Fill your jars with water by left-clicking with them.,,

workingGranitSink,blocks,Block Building,,Granite Sink,,

workingCabinetSink,blocks,Block Building,,Cabinet Sink,,

 

 

Link to comment
Share on other sites

Curious, why didn't you just modify the existing item 1076 wallOven?

 

I've been using the mod from this thread for forever.

<block id="1076" name="wallOven">    <property name="Class" value="Campfire" />
   <property name="Material" value="wood" />
   <property name="Texture" value="346,345,341,345,262,345" />
   <property name="IsTerrainDecoration" value="true" />
   <property name="ParticleName" value="campfire" />
   <property name="ParticleOffset" value="0.5,0,0.5" />
<property name="HeatMapStrength" value="2"/>
<property name="HeatMapTime" value="1200"/>
<property name="HeatMapFrequency" value="25"/>
   <drop event="Destroy" name="wallOven" count="1" />
   <property name="Group" value="Food/Cooking" />
 </block>

Link to comment
Share on other sites

Ok, tried this out. Noticed that the granite sink is a duplicate also.

Also, the sink works as storage, but you cannot get water from it.

 

 

It's because your ExchangeItem action is being over-written by the default when it's reading the file. Not sure how you can work around that to get fresh water out of the sink, but for now, should likely just get the murky water using this code.

 

 

 

 

<item id="227" name="emptyJar">

<property name="Meshfile" value="Items/Food/mason_jarPrefab" />

<property name="Material" value="glass" />

<property name="HoldType" value="3" />

<property name="Stacknumber" value="64" />

<property name="Weight" value="12" />

<property class="Action1">

<!-- UseAction -->

<property name="Class" value="ExchangeItem" />

<property name="Delay" value="1.0" />

<property name="Change_item_to" value="bottledRiverWater" />

<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="toilet01" />

<property name="Focused_blockname_6" value="toilet02" />

<property name="Focused_blockname_7" value="toilet03" />

<property name="Focused_blockname_8" value="Cabinet Sink" />

<property name="Focused_blockname_9" value="Granite Sink" />

<property name="Sound_start" value="UseActions/bucketfill_water" />

</property>

<property name="Group" value="Resources" />

<property class="Preview">

<property name="Zoom" value="28" />

<property name="Pos" value="0,-0.05" />

<property name="Rot" value="90,45,0" />

</property>

</item>

 

 

Link to comment
Share on other sites

1. I added a new oven and sinks because I wanted this to only effect ones the user crafts and places. Not the ones found in the world. They're duplicates for that specific reason.

 

2. I'm not sure what you're on about. It works fine for me. You have to left click to get clean water in my code, not right click, and it only works on sinks the user has crafted - not ones in the world.

 

Edit: Tried it again. Still works fine. Even on a server. Other players could use it aswell. I'm not sure what your problem is, maybe you're entering it wrong? I can look at your XML if you'd like, see if I can detect a problem.

Link to comment
Share on other sites

Are you sure you've put them in correctly? How did you look for them, the creative menu or crafting table?

 

At anyrate if you need help you can share your xmls and I'll fix it. All it takes is one misplaced line and the whole thing can break.

Link to comment
Share on other sites

Did you search for them or scroll through the whole page? There are more blocks in the creative menu than just the 9 tabs show you. Have you tried manually searching for "sink" to see if it comes up? If it doesn't then you've done something wrong. In which case just send me your blocks.xml file and I'll see if I can't fix it.

Link to comment
Share on other sites

I just loaded this mod, and both the oven and the sink seem to work as intended. Only potential issue I've noticed is it might be confusing if pulling them off the creative menu, because the names are the same as the non-working versions; I ID'd the correct ones via the item numbers.

 

I also noticed you boosted the stack size on empty jars to 64. Good idea, actually -- I've gone ahead and increased the stack size on filled jars as well as goldenrod tea jars in my configs to match.

 

Anyway, thanks Valmar -- your mods have been an absolute joy to enhance the game. I love the idea of being able to set up a place with a proper working kitchen.

Link to comment
Share on other sites

Ah actually I forgot about the stack size. The server I play on has increased the stack size of a lot of items to make storage less like tetris. I guess I had that left-over when i shared. I'll change that back for those who prefer vanilla values but I'm glad you enjoyed it nevertheless.

Link to comment
Share on other sites

Stack size is mostly irrelevant atm with the "default" being 500 in vanilla now. I wouldn't worry about it much.

 

Modified the sinks so that you can repair the damaged versions.

 

 

 

 

<block id="1553" name="Granite Sink Damaged">

<property name="CustomIcon" value="graniteSink" />

<property name="Stacknumber" value="1" />

<property name="Class" value="Loot" />

<property name="Material" value="wood" />

<property name="Place" value="TowardsPlacerInverted" />

<property name="Texture" value="373,228,262,228,228,228" />

<property name="LootList" value="130" />

<property class="UpgradeBlock">

<property name="ToBlock" value="Granite Sink" />

<property name="Item" value="woodPlank" />

<property name="ItemCount" value="4" />

<property name="UpgradeHitCount" value="4" />

</property>

<drop event="Destroy" name="Granite Sink Damaged" count="1" />

<drop event="Fall" name="woodDebris" count="1" prob="1.0" stick_chance=".75" />

</block>

 

 

<block id="1555" name="Cabinet Sink Damaged">

<property name="Class" value="Loot" />

<property name="Stacknumber" value="1" />

<property name="CustomIcon" value="cabinetOldSink" />

<property name="Place" value="TowardsPlacerInverted" />

<property name="Material" value="wood" />

<property name="Texture" value="374,84,79,80,80,80" />

<property name="LootList" value="130" />

<drop event="Destroy" name="Cabinet Sink Damaged" count="1" />

<drop event="Fall" name="woodDebris" count="1" prob="1.0" stick_chance=".75" />

<property class="UpgradeBlock">

<property name="ToBlock" value="Cabinet Sink" />

<property name="Item" value="woodPlank" />

<property name="ItemCount" value="4" />

<property name="UpgradeHitCount" value="4" />

</property>

</block>

 

 

 

Link to comment
Share on other sites

My repair method was to just break it so it drops then craft the broken one back into a working one. Like I said, your method is cleaner and more elegant.

 

In all honesty, I don't know how I did it the way I did. I assume out of laziness. The mysteries of my my mind.

Link to comment
Share on other sites

First off, great work Valmar, I really like your 'mini' mods that can be simply cut / paste into a larger project. I have been picking / choosing / modding several of your contributions to my personal mod pack with great result. It saves me a lot of work doing it myself as most were on my list of things to add. (And many were thing s I added in previous versions that have since been deleted)

 

One thing I noticed with the stoves is it doesnt have a heat map set to it or a light particle.

I added the following to mine (copied fomr the base campfire) - I have not tested in game (at work) but it should work.

 

<property name="ParticleName" value="campfire" />

<property name="ParticleOffset" value="0.5,0,0.5" />

<property name="HeatMapStrength" value="2"/>

<property name="HeatMapTime" value="1200"/>

<property name="HeatMapFrequency" value="25"/>

 

Keep up the great work man!

Link to comment
Share on other sites

Glad they could be of service. I'm partial to the more sectional approach as well - not that I don't respect what the large mod packs offer. I just know that I hate it when I find a mod that does one thing I really like but I have no interest in like 90% of the rest of it. So I try to keep my mods separate from each other to allow the kind of picking and choosing you mention.

 

I'm aware the stoves don't have a heat map or light. This was intentional. To offset the lack of heat I made the recipe a bit more costly. Though I wouldn't be against having a heatmap. The truth of the matter is I don't know what the values represents. 1200, what is that, minutes, hours, days. What is strength? Frequency? Granted I have a vague idea of what it all means but I didn't feel like testing it to get everything "just right" so I just avoided it. I could had just borrowed the campfire's heatmap but I felt an oven shouldn't be putting out as much "smell" as a open campfire. It is an oven, afterall.

 

The light I wasn't terribly happy with the way it looked with the oven. It doesn't look like its coming from the oven it just looks like the oven has those led lights that you see on the bottom of some flashier cars. What really killed it for me though was the sound. The campfire sound seems to be tied to the particle so you dont only get the light you also get the noise. I like the quiet.

 

I do thank you for sharing the relevant code to get those things, however. Those should indeed be all one would need to add to get the desired result.

Link to comment
Share on other sites

While I'm not sure the specifics for those values, here is what I think (anyone please correct me if I'm wrong here)

 

<property name="HeatMapStrength" value="2"/> How much heat this puts off in xx amount of time

<property name="HeatMapTime" value="1200"/> How long before the heat decays (I imagine imagine time.. so 12 hours)

<property name="HeatMapFrequency" value="25"/> How often the Heat is applied

 

 

As mentioned I did just copy the campfire values, but I do agree that it should put off less in general so I will have to tweak the values some and see what happens. I imagine increasing the frequency should produce less heat overall.

Link to comment
Share on other sites

  • 1 month later...
Curious, why didn't you just modify the existing item 1076 wallOven?

 

I've been using the mod from this thread for forever.

 

yeah I had to create different blocks because if I made the in-game ovens work as campfires it would cause errors with them also. Same with fridgetop (or was it bottom).

 

Sinks you don't need duplicates of b/c you modify the jars and cans not the block so it works.

 

 

Vote h0tr0d 2016 -- we've got big blocks and I cannot lie.

Link to comment
Share on other sites

@Garr

 

And thank you for the thanks. Its nice to be appreciated. Glad you enjoy the mod.

 

@Hotrod

 

Just to point this out but I had a specific reason for making them their own blocks. I didn't want vanilla blocks to be effected by this. I wanted it to be player-crafted blocks ONLY.

Link to comment
Share on other sites

@Valmar. What about adding a recipie book for them? It would make sense as in the post-apoc scenario where you would have to figure out how to rig a working sink. If you don't feel like doing that maybe you could give me an idea on how to make that happen? I was also thinking about how to make the oven require gas as its only source of fuel.

Link to comment
Share on other sites

Locking it behind a recipe book should be simple enough. I'll lay out the framework and let you take it from there.

 

First thing to be aware of! Items or blocks that have spaces in their names cannot be used in recipe books. It breaks it. So to work around this we're going to replace the spaces in the names with _. Make sure you edit your blocks.xml and recipes.xml to reflect this change.

 

 

<item id="1107" name="Sinks and Ovens">

<property name="CustomIcon" value="book" />

<property name="CustomIconTint" value="707070" />

<property name="Meshfile" value="Items/Misc/Book" />

<property name="Material" value="paper" />

<property name="HoldType" value="21" />

<property name="Stacknumber" value="50" />

<property class="Action1">

<!-- UseAction -->

<property name="Class" value="LearnRecipe" />

<property name="Title" value="Sinks and Ovens" />

<property name="Description" value="Teaches you how to build wood and various household appliances and accessories." />

<property name="Recipes_to_learn" value="Stove_Oven,Wall_Oven,Granite_Sink,Cabinet_Sink" />

<property name="Delay" value="0" />

<property name="Sound_start" value="Misc/recipe_unlocked" />

</property>

<property name="FuelValue" value="20" />

<property name="Weight" value="20" />

<property name="Group" value="Special Items" />

<property class="Preview">

<property name="Zoom" value="10" />

<property name="Pos" value="0,-0.2" />

<property name="Rot" value="90,45,0" />

</property>

</item>

 

Then add the book to your loot.xml in whatever section you want. commonBooks or rareBooks would be probably be best but its up to you.

 

<item name="Sinks and Ovens"/>

 

 

I don't think there is any way to make the oven require gas as the only fuel source. Not without also changing campfires.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...