Jump to content

Edit History

Please note that revisions older than 365 days are pruned and will no longer show here
The_Great_Sephiroth

The_Great_Sephiroth


Showed an example

My "Blocks" mod does not show upgrades. It's a special, 100% custom block that "grows" stock, in-game blocks to save builders time. With that said, here's a simple example.

<property class="UpgradeBlock">
	<property name="ToBlock" value="concreteShapes"/>
	<property name="Item" value="resourceConcreteMix"/>
	<property name="ItemCount" value="10"/>
	<property name="UpgradeHitCount" value="4"/>
</property>

This is how a cobblestone block upgrades into a concrete block. You need a section like this in your core block (the one you can morph into the various shapes) and only in that block.

 

Update:

Here's a quick example. Assume you wanted to go from steel to the old stainless steel, assuming you added items or formula to allow it.

<append xpath="/blocks">
	<block name="steelShapes" shapes="All">
		<property name="DescriptionKey" value="steelBlockGroupDesc"/>
		<property name="DisplayType" value="blockHardened"/>
		<property name="Material" value="Msteel_shapes"/>
		<property name="Shape" value="New"/>
		<property name="Texture" value="356"/>
		<property name="UiBackgroundTexture" value="356"/>
		<property name="EconomicValue" value="160"/>
		<property class="RepairItems">
			<property name="resourceForgedSteel" value="8"/>
		</property>
		<drop event="Harvest" name="resourceScrapIron" count="15" tag="allHarvest"/>
		<drop event="Destroy" count="0"/>
		<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>

		<!-- This is the stuff I added for the example -->
		<property class="UpgradeBlock">
			<property name="ToBlock" value="stainlessSteelShapes"/>
			<property name="Item" value="resourceStainlessSteelPolish"/>
			<property name="ItemCount" value="10"/>
			<property name="UpgradeHitCount" value="4"/>
		</property>
		<!-- My additions end here -->

		<property name="UpgradeSound" value="place_block_metal"/>
		<property name="SortOrder1" value="S040"/>
		<!-- SortOrder2 is assigned in code to keep all of the shapes in the same order for each material -->
		<property name="Group" value="Building,advBuilding"/>
		<property name="FilterTags" value="MC_Shapes"/>
	</block>
</append>

I copied the stock "steelShapes" and simply added the section you need in your block(s) to do upgrades. I should have named it "mySteelShapes" or something though. I do not know what the game would do if you added a block with a name that already exists!

 

Update 2:

After reviewing your code a second time I see you have the upgrade section. I skipped over it somehow upon first reading. That or I wasn't paying enough attention. Have you done as suggested and added the upgrade materials to the tools?

The_Great_Sephiroth

The_Great_Sephiroth


Showed an example

My "Blocks" mod does not show upgrades. It's a special, 100% custom block that "grows" stock, in-game blocks to save builders time. With that said, here's a simple example.

<property class="UpgradeBlock">
	<property name="ToBlock" value="concreteShapes"/>
	<property name="Item" value="resourceConcreteMix"/>
	<property name="ItemCount" value="10"/>
	<property name="UpgradeHitCount" value="4"/>
</property>

This is how a cobblestone block upgrades into a concrete block. You need a section like this in your core block (the one you can morph into the various shapes) and only in that block.

 

Update:

Here's a quick example. Assume you wanted to go from steel to the old stainless steel, assuming you added items or formula to allow it.

<append xpath="/blocks">
	<block name="steelShapes" shapes="All">
		<property name="DescriptionKey" value="steelBlockGroupDesc"/>
		<property name="DisplayType" value="blockHardened"/>
		<property name="Material" value="Msteel_shapes"/>
		<property name="Shape" value="New"/>
		<property name="Texture" value="356"/>
		<property name="UiBackgroundTexture" value="356"/>
		<property name="EconomicValue" value="160"/>
		<property class="RepairItems">
			<property name="resourceForgedSteel" value="8"/>
		</property>
		<drop event="Harvest" name="resourceScrapIron" count="15" tag="allHarvest"/>
		<drop event="Destroy" count="0"/>
		<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>

		<!-- This is the stuff I added for the example -->
		<property class="UpgradeBlock">
			<property name="ToBlock" value="stainlessSteelShapes"/>
			<property name="Item" value="resourceStainlessSteelPolish"/>
			<property name="ItemCount" value="10"/>
			<property name="UpgradeHitCount" value="4"/>
		</property>
		<!-- My additions end here -->

		<property name="UpgradeSound" value="place_block_metal"/>
		<property name="SortOrder1" value="S040"/>
		<!-- SortOrder2 is assigned in code to keep all of the shapes in the same order for each material -->
		<property name="Group" value="Building,advBuilding"/>
		<property name="FilterTags" value="MC_Shapes"/>
	</block>
</append>

I copied the stock "steelShapes" and simply added the section you need in your block(s) to do upgrades. I should have named it "mySteelShapes" or something though. I do not know what the game would do if you added a block with a name that already exists!

The_Great_Sephiroth

The_Great_Sephiroth

My "Blocks" mod does not show upgrades. It's a special, 100% custom block that "grows" stock, in-game blocks to save builders time. With that said, here's a simple example.

<property class="UpgradeBlock">
	<property name="ToBlock" value="concreteShapes"/>
	<property name="Item" value="resourceConcreteMix"/>
	<property name="ItemCount" value="10"/>
	<property name="UpgradeHitCount" value="4"/>
</property>

This is how a cobblestone block upgrades into a concrete block. You need a section like this in your core block (the one you can morph into the various shapes) and only in that block.

×
×
  • Create New...