Jump to content

How to make random helper or any other object re-spawn loot?


Recommended Posts

You'll need a minimum of two blocks to do this. One as a plant that grows into the 2nd block. Here is an example from my mod. In this case, I'm using blocks for the player to loot to speak with an npc. I place the block in the world, player loots it, it downgrades into the talktoair block, which is a plant that will grow back into the normal talkto block.

 

<block name="NPCLyraTalkToAir">
	<property name="Material" value="Mair"/>
	<property name="Shape" value="Invisible"/>
	<property name="Texture" value="250"/>
	<property name="FilterTags" value="fterrain"/>
	<property name="SortOrder1" value="d0j0"/>
	<property name="SortOrder2" value="0050"/>
	<property name="Class" value="PlantGrowing"/>
	<property name="PlantGrowing.FertileLevel" value="0"/>
	<property name="PlantGrowing.Next" value="NPCLyraTalkTo"/>
	<property name="PlantGrowing.GrowthRate" value=".5"/>
	<property name="PlantGrowing.IsRandom" value="false"/>
	<property name="PlantGrowing.LightLevelStay" value="0"/>
	<property name="PlantGrowing.LightLevelGrow" value="0"/>
	<property name="PlantGrowing.IsGrowOnTopEnabled" value="false"/>
</block>
<block name="NPCLyraTalkTo">
	<property name="AllowAllRotations" value="true"/>
        <property name="CustomIcon" value="PirateChestIcon" /> 
        <property name="Material" value="Mcloth"/>
        <property name="IsTerrainDecoration" value="true"/>
        <property name="Shape" value="ModelEntity"/>
        <property name="Model" value="#@modfolder:Resources/TelricsQuestWorld.unity3d?DecorationTalkToNPCPrefab"/>
        <property name="Collide" value="melee"/>
        <property name="CreativeMode" value="Player"/>
        <property name="Stacknumber" value="500"/>
        <property name="Group" value="Building,Building2"/>
        <property name="EconomicValue" value="300"/>
        <property name="FilterTags" value="fdecor"/>
        <property name="SortOrder2" value="0050"/>
        <property name="MaxDamage" value="50"/>
	<property name="Class" value="Loot"/>
	<property name="LootList" value="812"/>
		<property name="Place" value="TowardsPlacer"/>
	<property name="DowngradeBlock" value="NPCLyraTalkToAir"/>
	<drop event="Destroy" count="0"/>
	<drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/>
</block>


Feel free to copy that and change to what you need.



Oh and another thing... You'll need to set the loot ID to use the destroy_on_close parameter. That way the block will downgrade once looted.

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