khzmusik Posted May 22, 2021 Share Posted May 22, 2021 Hey, all. I searched for an answer on the forums but couldn't find one. Are any of the random block helpers usable in the upgrade or downgrade paths of blocks? For example, let's say you have a custom block, and it doesn't have any variants (no ramp variations, etc). You specify this property: <property class="UpgradeBlock"> <property name="ToBlock" value="metalSheetRandomHelper"/> </property> If you upgrade this block, what do you get? Link to comment Share on other sites More sharing options...
Telric Posted May 22, 2021 Share Posted May 22, 2021 A placeholder will randomly choose between the blocks set in the blockplaceholders.xml... This one will be one of these: <placeholder name="metalSheetRandomHelper"> <block name="corrugatedMetalSheetBent1"/> <block name="corrugatedMetalSheetBent2"/> <block name="corrugatedMetalSheetBent3"/> <block name="corrugatedMetalSheetBent4"/> </placeholder> However for some reason i'm having slight memory of me trying this before and it wouldnt work, so I had to put a plant or an upgraderated block between the one the player upgrades and the blockplaceholder... I could be misremembering, but I'm fairly sure i remember I couldn't get it to be random or something like that, when it was upgraded with an item... A growing block would work though. I know that for a fact as I use them in my mods a lot. Edit: Also you're able to use a prob attribute, so you're able to do % chances of that block being chosen. Link to comment Share on other sites More sharing options...
khzmusik Posted May 22, 2021 Author Share Posted May 22, 2021 That's good news. To be honest, I was going to use this for downgrading rather than upgrading, but I figured they would work the same way. (For example, wood blocks would downgrade to one of the "burnt" wood blocks, rather than just a regular wood frame, chosen at random.) Time to do some experiments. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.