adding winch points?

Yo!

so i want to make a rock thats dynamic and can also be used as a winch point. i had no problem setting it to dynamic but adding a winch point is proving to be another story

i was using the pine trees files to try and make something work,
the line of code for a pine tree goes as follow

<GameData>
	<WinchSocket Pos="(0;1.016; -0.193)" ParentFrame="BoneRoot_cdt" />
</GameData>

i am unsure as to how i position the winch point' is the editor capable of this?

also where would i find the cdt file name for the rock?

according to Fuzball's map making guide on steam
the default position of a winch point is just 0.00 across the board
nothing came of it and didnt even show a floating winch point.

the line of code i added to my rock file went as follows

<GameData>
	<WinchSocket Pos="(0;0.00; -0.00)" ParentFrame="cdt_mesh" />
</GameData> 

Update: I just saw on Fuzballs guide that only models in plants category can have winch points.

i am currently trying to turn the rock into a plant model now but am unsure as to how i would set up a plants file for a addon to a map.

would it go something like this?

classes - billboards / plants
meshes - models
textures - models


any help would be much appreciated!

the full file for the pine tree

<_templates Include="plants" />
<PlantBrand _template="Pine" PlantingMinSpacing="2.4">
<PhysicsModel>
<Body _template="PineRoot" ModelFrame="BoneRoot_cdt">
<Constraint _template="PineRoot" />
<Body _template="PineTrunk1" ModelFrame="Bone1_cdt">
<Constraint _template="PineTrunk1" />
</Body>
</Body>
</PhysicsModel>
<Occlusion Intensity="0.4" Size="(14.0; 14.0)" />
<GameData>
<WinchSocket Pos="(0;1.016; -0.193)" ParentFrame="BoneRoot_cdt" />
</GameData>
</PlantBrand>

the full file for my rock

<ModelBrand ClipCamera="false" DynamicModel="true">
<PhysicsModel>
<Body
Mass="18000.0"
NoSoftContacts="true"
Collisions="Dynamic"
LinearDamping="1.0"
AngularDamping="1.0"
/>
</PhysicsModel>
<GameData>
<WinchSocket Pos="(0;0.00; -0.00)" ParentFrame="cdt_mesh" />
</GameData>
</ModelBrand>

last edited by Compro

Yeah, Fuzball's guide is a good source, and yes, only plants can have winch points.

Custom plants are described starting with the section "Custom Plant". A custom plant uses the following files:
{mod directory}/meshes/plants/{name}.x contains the 3-D model.
{mod directory}/meshes/plants/{name}.xml specifies the appearance of the model (mesh XML).
{mod directory}/textures/plants/ contains the textures for the model.
{mod directory}/classes/plants/{name}.xml specifies the physics of the model (class XML).

The ParentFrame is not a filename, but the name of the CDT body in your mesh. You might want to use the model viewer to review your .X file, as described in the "Model Viewer" section. For the example ball in that section, the ParentFrame would just be "cdt" (which is the container for cdt_mesh).

I'm not sure what your question about positioning the winch point is. Neither the Blender editor nor the MudRunner map editor can adjust the winch point position. It is hard coded relative to the rock using coordinates as described in the guide.

That sounds . . like something Fuzball would say.
lol
I really appreciate that you took the time to make that guide Thank you! Amazing explanations' I have no idea how to code and it opened my eyes to more over what its about.

as for the mod directory question I understand it now. the cdt body mesh question i still dont understand, i checked the model viewer almost all models were named cdt_mesh (mopp), cdt_mesh (box), or cdt_mesh (convex)
the Winch xyz positioning question derived from you're guide under the section. Winch socket / winch socket properties. You mentioned the xyz position' but I see now thats if your object doesn't reside on the default xyz 0,0,0 then you adjust for it' but The rock I want to use in my experiment would have its xyz 0,0,0 right in the middle of the rock.
only thing im wondering now is. Do custom distribution brushes work in multiplayer? or is it something only the player will see if they have there files modded correctly since master files are being edited?

and lastly Thank you again for your hard work on the guide!

last edited by Compro

The CDT "ModelFrame" is the frame with the CDT mesh in it, i.e. the parent level of hierarchy for the CDT mesh.

The distribution brushes are only used for editing the map. Once you've painted on the plants (or rocks, in this case), they're on the map that gets distributed, and the brushes don't matter to the players.