Jump to content

Probability of working workbenches


Recommended Posts

Is there an easy way to set the probability that a workbench we find in the world will be actually a working one?

 

If we could repair workbenches, that would be cool but we can't and most of the time they are broken so we actually have to build our own anyway, so what's the point of them being a part of some POIs besides scrapping them for couple of parts? I want a good chance to find a working workbench, so that I can use resources and craft on the go, or at least a way to fix them.

Link to comment
Share on other sites

There are ways to increase the probabilties in the placeholders.xml to get more chances of finding working workbenches

 

Although the probabilties seem odd on this xml code for workbenches, I found when working on the random safe states modlet that the probabilties should add up to 1 to achieve success.

 

<placeholder name="cntWorkbenchBustedRandomLootHelper">
	<block name="workbench" prob="1"/>
	<block name="cntCollapsedWorkbench" prob="10"/>
</placeholder>

 

 

The safes placeholder before I modified it was as shown below

 

<placeholder name="cntWallSafeRandomLootHelper">
	<block name="air" prob="0.75"/>
	<block name="cntWallSafe" prob="0.25"/>
</placeholder>

 

If you swapped the numbers (10 and 1 ) over on the work benches placeholder then theory is you will find more working than broken ... not tested as busy doing my boat stuff at the moment but should work.

 

Edit : Oh and if you change placeholder values , you will have to start a new save to see the effects...

 

Ragsy !!

Link to comment
Share on other sites

There are ways to increase the probabilties in the placeholders.xml to get more chances of finding working workbenches

 

Although the probabilties seem odd on this xml code for workbenches, I found when working on the random safe states modlet that the probabilties should add up to 1 to achieve success.

 

<placeholder name="cntWorkbenchBustedRandomLootHelper">
	<block name="workbench" prob="1"/>
	<block name="cntCollapsedWorkbench" prob="10"/>
</placeholder>

 

 

The safes placeholder before I modified it was as shown below

 

<placeholder name="cntWallSafeRandomLootHelper">
	<block name="air" prob="0.75"/>
	<block name="cntWallSafe" prob="0.25"/>
</placeholder>

 

If you swapped the numbers (10 and 1 ) over on the work benches placeholder then theory is you will find more working than broken ... not tested as busy doing my boat stuff at the moment but should work.

 

Edit : Oh and if you change placeholder values , you will have to start a new save to see the effects...

 

Ragsy !!

 

Thanks! It's kinda confusing. I guess we will have to test several different values to find out how it works, but the more I look at these snippets, the more it makes me feel like the individual block names actually represent possible items that might be spawned in place of that one particular block they represent and each block is governed by probability, so whichever block has higher probability, that block has a higher chance to spawn the item it represents.

 

For example, in your safe case, there is a 0.75 chance that there will be air instead of a wall safe and there is a 0.25 chance that there will be a wall safe, so it seems like by default, a chance that there will be a wall safe is smaller than a chance that there will be air / nothing.

 

I guess the scale goes all the way up to 10 similarly to the loot bags probability. The lower the probability, the lower the chance. I'm just not sure how exactly these numbers work here with multiple concurrent numbers that might be affecting each other.

 

I guess that the workbench case is quite an extreme by default, it makes me feel like it would be more balanced if I slightly increased probability of workbench and decreased probability of cntCollapsedWorkbench, so maybe workbench to 4 and cntCollapsedWorkbench to 6. What do you think?

Link to comment
Share on other sites

Personally I would like to upgrade the collapsed to working ones , don't know wether theres already a modlet to do that .. i think someone has somewhere in A17 .

 

But for probabilities of finding a working workbench it would be a case of try it and see with your settings my tastes are probably different to yours , a slight increase for me in percentage terms would be to about 20% working and 80% broken.

 

An yes you are correct in your analysis of the placeholders, its a percentage possibilty of the named block spawning on world start.

 

 

Ragsy !!

Link to comment
Share on other sites

Personally I would like to upgrade the collapsed to working ones , don't know wether theres already a modlet to do that .. i think someone has somewhere in A17 .

 

But for probabilities of finding a working workbench it would be a case of try it and see with your settings my tastes are probably different to yours , a slight increase for me in percentage terms would be to about 20% working and 80% broken.

 

An yes you are correct in your analysis of the placeholders, its a percentage possibilty of the named block spawning on world start.

 

 

Ragsy !!

 

Oh no, it's not "my taste", I'm just guessing what would be a good starting point here for testing. I still have to find a good balance, but I do admit that it would have been much better if we had the option to repair workbenches or even both. Slightly better chance to find a working workbench, but also a way to repair them.

Link to comment
Share on other sites

I use this xml command:

 

<append xpath="/blocks/block[@name=cntCollapsedWorkbench]">

<property class="UpgradeBlock">

<property name="ToBlock" value="workbench"/>

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

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

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

</property>

</append>

Link to comment
Share on other sites

I use this xml command:

 

<append xpath="/blocks/block[@name=cntCollapsedWorkbench]">

<property class="UpgradeBlock">

<property name="ToBlock" value="workbench"/>

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

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

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

</property>

</append>

 

I see you're using "workbenchUpgradeKit". That's not a vanilla item, right? Do you have a complete mod for this?

Link to comment
Share on other sites

I would use forged steel for the upgrade to make it more immersive for early game as steel is rare, so you find a collapsed workbench and its then a case of ok now where to get steel for the upgrade.

 

But you could make a recipe for your own upgrade kit with items you want ..... then use the code belfagor posted above for the upgrade kit.

 

Community and forum users to the rescue :) what a great place !

 

Ragsy !!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...