Jump to content

Trying to add harvestable trees in Alpha 21…


Recommended Posts

Been knocking heads since Alpha 21 dropped for converting some harvestables. I'll use a tree as an example. I just did a comparison of a simple tree, a vanilla tree and what it is using and it's parameters that are set in the xml.

I've duplicated everything and I'm inclined to think that it is a Unity tag and/or layer issue. that's the only thing that it can be. I'm working with a single tree and I'm duplicating all of the XML properties exactly. It's got to be something in unity.

I'll use this vanilla asset as an example. I won't post the tree master because it's entry is quite long. But:

 

Spoiler

<block name="treeDeadTree01">
    <property name="Extends" value="treeMaster"/>
    <property name="Model" value="@:Entities/Trees/White_Oak22Prefab.prefab"/>
    <property name="ModelOffset" value="0,-0.3,0"/>
    <property name="MultiBlockDim" value="1,4,1"/>
    <property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
    <property name="BigDecorationRadius" value="4"/>
    <property name="ParticleOnDeath" value="treeGib_dead_01"/>
    <drop event="Harvest" name="resourceWood" count="30" tag="oreWoodHarvest"/>
    <property name="SortOrder1" value="B901"/>
    <property name="SortOrder2" value="0000"/>
</block>

 

The only thing different of course is the model property points to my Unity file, and the sort orders didn't need to be there in my test.

Asset ripped one of the vanilla trees, and duplicated the same with my new one, except as you can see in the image on the collider it's referencing a script that wasn't able to be ripped. 

I'm under the impression that of course we can't attach scripts to our models, so what is going to be the solution then for allowing us to use our own models for harvestable trees and shrubs in our mods? A different tag set up on the model in unity? XML changes or edits for these models? Spent weeks on this with varying combinations of using B_mesh, etc to no avail. 

 

spacer.png

 

I need a solution for this and it would be great if somebody at the Fun Pimps  or somebody who is able to figure this out would chime in on this. Thanks.
 

Link to comment
Share on other sites

I have never looked at items which have LOD or scripts, but FWIW the only way I have been able to get any of my models to be interactive within the game is to set the T_Mesh_B tag for each item in the hierarchy, none of the other tags seem to do anything when I have tried them.

Link to comment
Share on other sites

Yeah, from a quick glance, it looks like your tree is tagged as an electrical block. Here's how the first 3 tags should be set up in Unity:

 

0 New Tag

1 T_Block (for electrical system)

2 T_Mesh_B (for stuff you can pick up/hit)

 

They have to be in that order, or they won't work properly. Or, save yourself headaches by using one of xyth's projects with the tags preconfigured.

As I recall, having the tag and collider on the first level of the hierarchy inside the gameobject seems to work. Haven't done this for anything in A21 yet, though.

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