Wondering on how to get logs on a trailer?

I've got this trailer that @Forces helped me get in game, but i am not sure how I would get my logs on there. I've modeled the logs and they are coded completely (code below). In game (at a log station) it will not let me load any logs on the trailer. Does anyone know how to do this?

0_1539528471046_20181013213419_1.jpg 0_1539528480683_LogsCapture.PNG

TRAILER CODE

<Truck>
<Wheels
HardpointDefaultY="0.5"
HardpointDefaultZ="0.9"
>
<Wheel
HardpointX="-2.384"
Type="uaz_big"
SteeringAngle="0"
SuspensionMin="-0.3"
SuspensionStrength="0.05"
/>
<Wheel
HardpointX="-2.384"
RightSide="true"
Type="uaz_big"
SteeringAngle="0"
SuspensionMin="-0.3"
SuspensionStrength="0.05"
/>
<Wheel
HardpointX="-1.547"
Type="uaz_big"
SteeringAngle="0"
SuspensionMin="-0.3"
SuspensionStrength="0.05"
/>
<Wheel
HardpointX="-1.547"
RightSide="true"
Type="uaz_big"
SteeringAngle="0"
SuspensionMin="-0.3"
SuspensionStrength="0.05"
/>
</Wheels>
<TruckData FuelCapacity="300" RepairsCapacity="300">
<LimitedFluid
Center="(-4.400; 0.840; -0.999)"
SizeX="1.200"
SizeY="0.350"
SizeZ="0.310"
Type="Box"
/>
<Camera Center="(-6.0; 0; 0)" />
<Constraint
PlaneAxisLocal="(0; 0; 1.0)"
PlaneMin="-90"
PlaneMax="90"
TwistAxisLocal="(1.0; 0; 0)"
TwistMin="-30"
TwistMax="30"
Type="Ragdoll"
>
<TwistMotor Damping="60000" Spring="320000" Type="Spring" />
</Constraint>
<Axles>
<Axle Frame="Bone001" LeftWheel="0" RightWheel="1" />
<Axle Frame="Bone002" LeftWheel="2" RightWheel="3" />
</Axles>
</TruckData>
<PhysicsModel Mesh="trucks/trailer">
<Body
Mass="3000"
ImpactType="Truck"
CenterOfMassOffset="(0.014; -1; 0)"
>
<Body ModelFrame="bort1" Mass="200" Collisions="Internal">
<Constraint
Name="bort1"
Type1="Fixed"
Type="Hinge"
AxisLocal="(-1;0;0)"
MinLimit="0"
MaxLimit="180"
PivotOffset1="(-1.0; -0.3; 0.0)"
>
<Motor Type="Position" Force="9000" />
</Constraint>
</Body>
<Body ModelFrame="bort2" Mass="200" Collisions="Internal">
<Constraint
Name="bort2"
Type1="Fixed"
Type="Hinge"
AxisLocal="(-1;0;0)"
MinLimit="0"
MaxLimit="180"
PivotOffset1="(-1.0; -0.3; 0.0)"
>
<Motor Type="Position" Force="9000" />
</Constraint>
</Body>
<Body ModelFrame="bort3" Mass="200" Collisions="Internal">
<Constraint
Name="bort3"
Type1="Fixed"
Type="Hinge"
AxisLocal="(-1;0;0)"
MinLimit="-180"
MaxLimit="0"
PivotOffset1="(-1.0; -0.3; 0.0)"
>
<Motor Type="Position" Force="9000" />
</Constraint>
</Body>
<Body ModelFrame="bort4" Mass="200" Collisions="Internal">
<Constraint
Name="bort4"
Type1="Fixed"
Type="Hinge"
AxisLocal="(-1;0;0)"
MinLimit="-180"
MaxLimit="0"
PivotOffset1="(-1.0; -0.3; 0.0)"
>
<Motor Type="Position" Force="9000" />
</Constraint>
</Body>
<Body
ModelFrame="Foot"
Mass="100"
NoFoliageCollisions="true"
>
<Constraint
Name="Foot"
Type="Prismatic"
AxisLocal="(0;0;1)"
MinLimit="-0.6634"
MaxLimit="0"
>
<Motor Type="Position" Force="16000" />
</Constraint>
</Body>
</Body>
</PhysicsModel>
<ModelAttachments>
<StopSignals>
<Flare
Pos="(-3.79; 1.145; -0.724)"
AspectRatio="1.4"
Color="g(255; 0; 0) x 0.4"
ColorMultAtDay="0.6"
Dir="(-1.0; 0; 0)"
DirAngle="90"
Reflections="true"
Size="0.8"
/>
<Flare
Pos="(-3.772; 1.16; 0.749)"
AspectRatio="1.4"
Color="g(255; 0; 0) x 0.4"
ColorMultAtDay="0.6"
Dir="(-1.0; 0; 0)"
DirAngle="90"
Reflections="true"
Size="0.8"
/>
<Flare
Pos="(-3.772; 1.16; 0.13)"
AspectRatio="1.4"
Color="g(255; 0; 0) x 0.4"
ColorMultAtDay="0.6"
Dir="(-1.0; 0; 0)"
DirAngle="90"
Reflections="true"
Size="0.8"
/>
<Flare
Pos="(-3.772; 1.16; 0.012)"
AspectRatio="1.4"
Color="g(255; 0; 0) x 0.4"
ColorMultAtDay="0.6"
Dir="(-1.0; 0; 0)"
DirAngle="90"
Reflections="true"
Size="0.8"
/>
<Flare
Pos="(-3.772; 1.16; -0.104)"
AspectRatio="1.4"
Color="g(255; 0; 0) x 0.4"
ColorMultAtDay="0.6"
Dir="(-1.0; 0; 0)"
DirAngle="90"
Reflections="true"
Size="0.8"
/>
</StopSignals>
</ModelAttachments>
<GameData GaragePoints="4">
<LoadArea
Min="(-8.487; 1.4; -1.2)"
Max="(-6.677; 2.7; 1.2)"
TrailerLoad="true"
Type="LoadLogsTrailer"
/>
<WinchSocket Pos="(-7.64; 1.353; 0.723)" />
<WinchSocket Pos="(-7.64; 1.353; -0.723)" />
<WinchSocket Pos="(-9.94; 1.353; 0)" />
<InstallSocket Offset="(3.813; 1.071; 0.012)" Type="trailer" />
<AddonSockets>
<Socket Names="LoadLogsTrailer" Offset="(0.0; -0.0; -0.0)" />
</AddonSockets>
</GameData>
</Truck>

LOG CODE

<TruckAddon>
<PhysicsModel Mesh="trucks/LoadLogsTrailer">
<Body
Collisions="All"
Friction="0.1"
ImpactType="Foliage"
Mass="5000"

<Body
Collisions="All"
Friction="0.1"
ImpactType="Foliage"
Mass="3000"

<Body
Collisions="All"
Friction="0.1"
ImpactType="Foliage"
Mass="4000"

</Body>
</Body>
</PhysicsModel>
<LoadCheckPoint Pos="(-3.458; 2.151; 0)" ParentFrame="BoneBottom_cdt" />
<GameData LoadPoints="6" ManualLoads="2">
<SpawnLoadOrigin Position="(2.238; 2.48; 0)" />
<InstallSocket Type="logs" />
</GameData>
</TruckAddon>

Any help is greatly appreciated.

-Risky

you need an AddonSocket on the trailer

<AddonSockets>
<Socket Names="yoursocketname" Offset="(0; 0; 0)" />
</AddonSockets>

in LoadArea you have to define the areas in which you are able to pack the load (obviously) in which the green dots need to be

and define the type of logs the trailer is going to be able to pack (in this case i'll use long logs, so LongLogs, can be ShortLogs or MediumLogs too)

<LoadArea
Min="(0; 0; 0)"
Max="(0; 0; 0)"
TrailerLoad="true"
Type="LongLogs"
/>

and if you want to use a custom mesh for logs (which i really recommend, the stock log meshes have very weird shapes) this is what your XML in classes\trucks should look like

<TruckAddon _noinherit="true">
<PhysicsModel Mesh="trucks/yourlogsmesh">
<Body CenterOfMassOffset="(0; 0; 0)" Mass="0">
<Constraint Type="Fixed" />
</Body>
</PhysicsModel>
<GameData LoadPoints="0" ManualLoads="0">
<RequiredAddon Types="your trailer addon name" />
<RequiredAddon _inheritRemove="true" />
<InstallSocket Type="yoursocketname" />
</GameData>
</TruckAddon>
<_parent File="load_logs_long" />

LoadPoints defines how many points you get towards the lumber mill when you unload, ManualLoads defines how many logs you need to load manually onto the trailer to be able to pack the load

i recommend adding the trailer to RequiredAddon so you won't be able to load logs unless you have the trailer attached

InstallSocket Type is the same socket you defined on the trailer obviously

_parent File defines the parent file for your logs that will be used by the game for the other needed information, i recommend using the one that fits the size of your load the most. you can find the other names in the Media.zip.

also @Spun i heard nix say in the stream yesterday that he's trying to figure out custom log meshes for the log jammers, so maybe this is helpful to you too

last edited by hydrowasul

@hydrowasul Thanks man! I'll definetally try this out!

@hydrowasul now i have another issue. shown below are my logs that are on the trailer (from the log station) but it will not let me move at all.

0_1539538531399_20181014123428_1.jpg

(P.S My center of mass offset is 0 0 0)

not to sound like a ass but...
@Hydrowasul I dont know if that code works for you but you need a ImpactType="(Foliage or Truck)" and Collisions="(Internal or None)" (I use "None" in enclosed trailers like the one Riskywisky has), for the addon to move/work with the truck either way it will just glitch the game

@RiskyWisky The codes that I posted in the other topic are tested and they work flawlessly in all of my mods (those that carry logs inside and or in trailers) either way here it is again the code

once inside the editor press ctrl+shift+F to format the code to a more easy way to read it

This is only for trailer loads

<_parent File="load_logs_short_trailer" /> <!-- its a trailer so you need this exact one -->
<TruckAddon _noinherit="true">
<PhysicsModel Mesh="trucks/1998_Chevy_S10_TrailerLoad">
<Body
CenterOfMassOffset="(your needs)"
ImpactType="Truck"
Mass="1000"
>
<Constraint Type="Fixed" />

	</Body>
</PhysicsModel>
<GameData LoadPoints="3" ManualLoads="3">
	<SpawnLoadOrigin Position="(-6; 3.209; -0)" /> <!-- where the loogs show when you flip it-->
	<RequiredAddon Types="1998_Trailer_Car" />
	<InstallSocket Type="CarTrailerLoad" />
</GameData>

</TruckAddon>

last edited by Forces

@forces the ImpactType and other stuff is in the _parentFile of all the log loads

@Forces Thanks man! Got it to work again w/ the logs!

@hydrowasul you have ths wich send all of the parented code to the trash bin

<TruckAddon _noinherit="true">
this since is the main tagline will affect all other tags in the code...now if you had it on meshes or in a <Body/> tag it wouldnt matter but since its the main you are removing all data from the parented file in the new file

@RiskyWisky good that you got it working