usHallgrim
Refugee
Hi All,
TL;DR I can't figure out how to make a unity prefab "hittable" for 7DTD.
So I have created a tomato_sprout tomato_growing and tomato_harvest (harvestable for the player). I put a box collider around each plant. I double-checked in prefab mode and in the hierarchy panel that this was applied to the parent fbx/mesh. Appled a tag "T_Mesh_B" to all of the fbx/meshes (I saw somewhere that might be needed). Renamed and dragged them all from the hierarchy panel into a prefabs folder. Set them all to Asset Bundle zl_foodandcrops. Ran Build AssetBundles. Copied zl_foodandcrops over to {MyMod}/Resources.
The result: I am able to plant the tomatoes and watch them go to growing, then to harvest. The plant orientations are correct, I'm color vision impaired so I'm sure the colors are off but the textures/material looks to have mapped properly.
BUT I CANNOT HIT THE DARN THINGS!
I tried 2 different ways to get them to work.
(1) Just inherit everything but the model from seedPotato1 (vanilla). Of course this reverts back into a potato as it grows, and then I can hit the potato but not while it is in the sprout stage with my tomatosprout mesh.
(2) I also tried to define everything the best I could figure out. I can't hit the tomato plant at any stage of growth (none of the 3 meshes register hits as far as I can tell).
Here is my block definitions (but I don't think they are the problem I think it's something I'm doing wrong in Unity 2202.3.62f1).
Any help would be greatly appreciated I've been at this no hit problem for hours and hours.
TL;DR I can't figure out how to make a unity prefab "hittable" for 7DTD.
So I have created a tomato_sprout tomato_growing and tomato_harvest (harvestable for the player). I put a box collider around each plant. I double-checked in prefab mode and in the hierarchy panel that this was applied to the parent fbx/mesh. Appled a tag "T_Mesh_B" to all of the fbx/meshes (I saw somewhere that might be needed). Renamed and dragged them all from the hierarchy panel into a prefabs folder. Set them all to Asset Bundle zl_foodandcrops. Ran Build AssetBundles. Copied zl_foodandcrops over to {MyMod}/Resources.
The result: I am able to plant the tomatoes and watch them go to growing, then to harvest. The plant orientations are correct, I'm color vision impaired so I'm sure the colors are off but the textures/material looks to have mapped properly.
BUT I CANNOT HIT THE DARN THINGS!
I tried 2 different ways to get them to work.
(1) Just inherit everything but the model from seedPotato1 (vanilla). Of course this reverts back into a potato as it grows, and then I can hit the potato but not while it is in the sprout stage with my tomatosprout mesh.
(2) I also tried to define everything the best I could figure out. I can't hit the tomato plant at any stage of growth (none of the 3 meshes register hits as far as I can tell).
Here is my block definitions (but I don't think they are the problem I think it's something I'm doing wrong in Unity 2202.3.62f1).
Any help would be greatly appreciated I've been at this no hit problem for hours and hours.
<!-- Tomato Seed-->
<block name="testTomatoSprout">
<property name="Extends" value="plantedPotato1"/>
<property name="Model" value="#@modfolder:Resources/zl_foodandcrops?Assets/Crops/Tomato/Prefabs/tomatosprout.prefab"/>
<property name="CustomIcon" value="seedTomato"/>
<property name="CreativeMode" value="Player"/>
</block>
<block name="plantedTomato1">
<property name="Extends" value="cropsGrowingMaster"/>
<property name="CustomIcon" value="seedTomato"/>
<property name="CreativeMode" value="None"/>
<property name="PlantGrowing.Next" value="plantedTomato2"/>
<property name="UnlockedBy" value="craftingSeeds"/>
<property name="Shape" value="ModelEntity"/>
<property name="Model" value="#@modfolder:Resources/zl_foodandcrops?Assets/Crops/Tomato/Prefabs/tomatosprout.prefab"/>
<property name="ModelOffset" value="0,0,0"/>
<property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
<property name="PassThroughDamage" value="false"/>
<property name="IsTerrainDecoration" value="false"/>
<property name="Material" value="Mplants"/>
<property name="MaxDamage" value="10"/>
<property name="MultiBlockDim" value="1,1,1"/>
<!-- <property name="Model" value="#@modfolder:Resources/flagGUNSok.unity3d?flagGUNS" /> -->
<property name="PlaceAsRandomRotation" value="true"/>
<drop event="Destroy" name="plantedTomato1" count="1"/>
<property name="SortOrder1" value="B982"/>
<property name="SortOrder2" value="0000"/>
<property name="Tags" value="seedSkill"/>
<property name="SoundPickup" value="seeds_generic2_grab"/>
<property name="SoundPlace" value="seeds_generic2_place"/>
</block>