Jump to content

Zombies and block damage


repta45

Recommended Posts

I've seen an older post somewhere about changing some block settings to when they get "downgraded" they upgrade instead. I was going through the same settings and downgrade isn't there anymore. Does anyone know how to achieve the same effect with version 20.6?

Link to comment
Share on other sites

51 minutes ago, repta45 said:

I've seen an older post somewhere about changing some block settings to when they get "downgraded" they upgrade instead. I was going through the same settings and downgrade isn't there anymore. Does anyone know how to achieve the same effect with version 20.6?

It is a server setting in the cofig xml.

Even if running a single player game you could run the server client and then connect to your own “server” on the same machine provided it is not a potato.

 

Link to comment
Share on other sites

Should be pretty simple, I'll use a garage door for an example.

 

blocks.xml(26276):

<block name="garageDoorMetal_v2">
	<property name="Extends" value="garageDoorMetal_v1" param1="Harvest,Destroy"/>
	<property name="CreativeMode" value="Dev"/>
	<property name="Model" value="Entities/Doors/garage_metal_v2Prefab"/>
	<property name="OnlySimpleRotations" value="true"/>
	<property class="UpgradeBlock">
		<property name="ToBlock" value="garageDoorMetal_v3"/>
		<property name="Item" value="resourceForgedIron"/>
		<property name="ItemCount" value="20"/>
		<property name="UpgradeHitCount" value="6"/>
	</property>
	<property name="DowngradeBlock" value="garageDoorMetal_v1"/>
	<drop event="Harvest" name="resourceScrapIron" count="20,90" tag="allHarvest"/>
	<drop event="Destroy" count="0"/>
	<property name="SortOrder2" value="0405"/>
</block>

 

See UpradeBlock and DowngradeBlock; they define the next blocks when you upgrade or break the block. You should be able to put any valid block name in as the value. (Although with doors, sizes might become interesting.)

 

You should also be able to simply add a DowngradeBlock to any block, and use the name of the same block as the value there; that should create a loop.

 

As in, replacing blocks.xml(26287) with:

	<property name="DowngradeBlock" value="garageDoorMetal_v2"/>

should then replace a broken garageDoorMetal_v2 with a garageDoorMetal_v2.

 

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