• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Special Block that can only be crafted once

Hello all,

I want to create a very special block that brings certain properties of a workbench or forge.
It is also already finished and works as it should.

However, to prevent this block from being mass-produced, I would like to make this block uncraftable once it has been crafted.
Means since it would be nice if you had an idea how I could prevent a further crafting or just the number of allowable blocks of this type to 1 or another amount can be set.

Thx in advance 😇

 
No. Not really.

The block can be created with some smallEnginges and a bunch of electricParts.

My hope was that there is a way to activate a buff that restricts the crafting of a new block or something like that, but I don't have any clue how to do that.😅

 
A block that can be crafted straight out of the box without a schematic... then set the recipe tag to locked once item is crafted? Just my initial thoughts - might try this out tomorrow

Just a quick mock-up, not even sure this will work as I can't get on to test it

<recipe name="onetimeblock" count="1">
<ingredient name="resourceYuccaFibers" count="10"/>
<effect_group>
<passive_effect name="onetimeblock" action="ModifyCVar" cvar="onetimeblock" operation="set" value="0"/>
</effect_group>
</recipe>



You get the general idea

 
The quick and dirty way that occurred to me when I heard "one time only" is to use a quest flagged to be non-repeatable, like the ones at the beginning of the game. I don't know if it's possible to have a recipe create "nothing," but if not, I'd have a non-repeatable quest that asked to collect the necessary components and craft something from them (make it like 1 scrap iron or an empty can if you can't make it nothing), then completion of the quest grants you that rare item into your inventory. The quest can't be repeated, so combining the ingredients again in the future will only give you the scrap iron, not the rare item reward. Just a thought.

 
@poly and  @Cranberry Monster

both ideas very good, but there is still a missing thing there.

What happens when the block is going to be destroyed, i.e. by a zombie attack or friendly fire?

So the only thing that might be work is that you can only 'place' one of these blocks and after placement the recipe is locked ... i would guess with:

<passive_effect name="RecipeTagUnlocked" operation="base_set" level="0" value="0" tags="onetimeplacementblock"/>




So the question is how to make this possible? I don't know how to activate an effect on a block placement / destroy ... have any ideas?

 
If you don't want the block to accidentally be destroyed, make it the same material as bedrock and it will be invulnerable. Since it's a one-time-only craft, you don't have to worry about players building bunkers out of them. If it's a workstation, you'll still be able to pick it up if you have an active Land Claim Block.

Otherwise, I would suggest looking at how the Land Claim Block works, with only one being active at a time and the placement of a new one negating the previous one. There might be a hint there.

 
Back
Top