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

Block destruction experience

Ananais

New member
Hi Folks,

Does anyone know where the default value for experience gain on block destruction is located?

I worked around it for the task I was looking into so its not exactly urgent, I am just unsure whether I have missed it somewhere given how easy block upgrade and repair experience modifiers are to find, or if it is hardcoded?

Cheers,

A.

 
Experience is defined in materials.xml. There's an explanation at the top of the file explaining not to set values at less than 1 as they will round down to 0 (unless that's your thing). Maybe play around with that.

Code:
<material id="MbarbedFence">
	<property name="damage_category" value="wood"/>
	<property name="surface_category" value="wood"/>
	<property name="forge_category" value="iron"/>
	<property name="Hardness" type="float" value="1"/>
	<property name="stepsound" value="metal"/>
	<property name="stability_glue" value="20"/>
	<property name="Mass" type="int" value="5"/>
	<property name="MaxDamage" value="200"/>
	<property name="movement_factor" value="0.18"/>
	<property name="Experience" value="2"/>
</material>
 
Hey,

I had created a new material with experience set to 0, as I had thought this was where it took the base value from. Testing it out however, it seems the value in materials is only used for upgrading the block and not for destroying it.

I had only looked at the blocks I was adding though to be fair, when I have a bit of time I will test out a few vanilla blocks with the experience set to 0 to be sure.

Cheers,

A.

 
Back
Top