Jump to content

Block destruction experience


Recommended Posts

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.

 

 

Link to comment
Share on other sites

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.

 

<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>

 

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...