Jump to content

-wip mod- How to properly use UpgradeBlock?


Recommended Posts

I'm making a modlet to allow Lockpicking on doors, for this I created a few tiers of doors that follow a certain hierarchy but the jist of it is that in order for this to work, I had to create new blocks.


It's all functional and almost complete, except for a part that has me stumped.. the doors that require an Item instead of resources in order to upgrade (metalReinforcedDoorWooden to Iron and ironDoor1_v3 to Vault) aren't accepting my new doors.


I could replace it with resources.. worst case, but I wanted to keep it as close as I could to a Vanilla extension rather than a rework.



These doors have their respective Icons, Descriptions, Recipes etc and are craftable/usable with no errors.

Yet, when I try to upgrade.. say for example:


<block name="Iron Door V3">
<property name="Extends" value="Iron Door"/>
<property name="DescriptionKey" value="doorGroupDesc"/>
<property name="Model" value="Entities/Doors/steel_door_1_v3Prefab"/><property name="ModelOffset" value="0,0,0"/>
<property class="UpgradeBlock">
	<property name="ToBlock" value="[b][color="#00FF00"]Vault Door[/color][/b]"/>
	<property name="Item" value="[b][color="#00FF00"]Vault Door[/color][/b]"/>
	<property name="ItemCount" value="1"/>
	<property name="UpgradeHitCount" value="6"/>


Just shows me a "its missing this" and displays the custom icon for the door that I have crafted and I'm holding.


If I change the "item" part to the original vaultDoor01 it works, but then I have to feed it the wrong item to create the new one.



So yeah, I'm pretty damn new at this, if anyone knows what's happening here I'd love to know.

Link to comment
Share on other sites

You just can't use Blocks to upgrade. Only Items.

Hmm, in the original recipe it takes the block vaultDoor01 (not an item) to upgrade.


It doesn't exist in the Items xml so my thinking was Well then where does this come from?


I wanted to use the same pattern if possible, but thank you about the item tip.



I'll try that and see where it goes.




Alright I was able to find a solution, you can use blocks for upgrading, they have to be added to the property class 'Allowed_upgrade_items'

Link to comment
Share on other sites


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

  • Create New...