Code_Ovrld Posted September 6, 2022 Share Posted September 6, 2022 Could Extends with Params be explained in more depth? Code For Reference from blocks.xml: <block name="terrDestroyedStone"> <property name="Material" value="Mrubble"/> <property name="NoScrapping" value="true"/> <property name="Shape" value="Terrain"/> <property name="Mesh" value="terrain"/> <property name="Texture" value="438"/> <property name="ImposterExclude" value="true"/> <property name="Weight" value="90"/> <property name="Map.Color" value="152,149,63"/> <property class="RepairItems"> <property name="resourceCobblestones" value="6"/> </property> <drop event="Harvest" name="resourceCrushedSand" count="4" tag="oreWoodHarvest"/> <drop event="Harvest" name="resourceRockSmall" count="12" tag="oreWoodHarvest"/> <drop event="Destroy" count="0"/> <property name="CanMobsSpawnOn" value="true"/> <property name="EconomicValue" value="5"/> <property name="EconomicBundleSize" value="1"/> <property name="SellableToTrader" value="false"/> <property name="FilterTags" value="MC_outdoor,SC_terrain,MC_building,SC_destruction"/> <property name="SortOrder1" value="d0k0"/> <property name="SortOrder2" value="0050"/> <property name="DisplayType" value="blockTerrainFertile"/> </block> <block name="terrDestroyedWoodDebris"> <property name="Extends" value="terrDestroyedStone" param1="Harvest"/> <property name="Texture" value="438"/> <property name="CustomIcon" value="terrDestroyedStone"/> <property name="CustomIconTint" value="C68C53"/> <property name="Material" value="Mwood_regular"/> <property name="MaxDamage" value="30"/> <property name="FuelValue" value="150"/> <property name="ImposterExclude" value="true"/> <drop event="Harvest" name="resourceCrushedSand" count="0" tag="oreWoodHarvest"/> <drop event="Harvest" name="resourceRockSmall" count="0" tag="oreWoodHarvest"/> <drop event="Harvest" name="resourceWood" count="1,2" tag="oreWoodHarvest"/> <property name="Map.Color" value="110,95,49"/> <property name="CanMobsSpawnOn" value="true"/> <property name="FilterTags" value="MC_outdoor,SC_terrain,MC_building,SC_destruction"/> <property name="DisplayType" value="blockTerrain"/> <property name="DescriptionKey" value="terrainBlockGroupDesc"/> </block> Why does param1="Harvest" need to specified and how is it interpreted? <property name="Extends" value="terrDestroyedStone" param1="Harvest"/> I.E. does the values from the Harvest values in terraDestroyedStone over-write the values in terrDestroyedWoodDebris, or is it vice-versa? <!-- Values from terrDestroyedStone --> <drop event="Harvest" name="resourceCrushedSand" count="4" tag="oreWoodHarvest"/> <drop event="Harvest" name="resourceRockSmall" count="12" tag="oreWoodHarvest"/> <!-- Values from terrDestroyedWoodDebris --> <drop event="Harvest" name="resourceCrushedSand" count="0" tag="oreWoodHarvest"/> <drop event="Harvest" name="resourceRockSmall" count="0" tag="oreWoodHarvest"/> <drop event="Harvest" name="resourceWood" count="1,2" tag="oreWoodHarvest"/> Link to comment Share on other sites More sharing options...
bdubyah Posted September 6, 2022 Share Posted September 6, 2022 It can vary a bit depending on how it is used, and I'm no expert, but in this case it's telling terrDestroyedWoodDebris to not inherit terrDestroyedStone's Harvest events. As harvesting stone and sand from a wood block would be weird. Link to comment Share on other sites More sharing options...
Cranberry Monster Posted September 6, 2022 Share Posted September 6, 2022 As bdubyah said, it tells terrDestroyedWoodDebris to inherit everything BUT Harvest from terrDestroyedStone. Many things can be overwritten in xml and thus don't need to be specifically excluded--CustomIcon, etc--but in the case of Harvest events, it doesn't overwrite them in extended blocks, it ADDS them to the existing Harvest events. Without that exception, you'd get both the wood harvest from the new block and the stone and sand from the original block. Link to comment Share on other sites More sharing options...
Code_Ovrld Posted September 7, 2022 Author Share Posted September 7, 2022 Thank you for the reply, this answers half of a question I have. I think I answered the other part today, just need to finish the coding and see if it works. Thank you again, bdubyah and Cranberry Monster Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.