• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

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

Trying to get random helper or just any object in general to re spawn loot over time when placed on a server map, but i have no idea where to start, and could not find any tutorials online. Any help would be greatly appreciated!

 
Last edited by a moderator:
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.

 
Back
Top