Community Forum

characterTargetNodeModifier

Forum Overview >> Farming Simulator 22

CategoryFarming Simulator 22
Created19.04.2022 23:26


Afmodding (1DAFUL) 19.04.2022 23:26
Hello

I would like to ask you for your help.
There is a vehicIe on ModHub, I created SANTANA 88.

https://www.farming-simulator.com/mod.php?lang=en&country=us&mod_id=233087&title=fs2022

For players request I would like to upgrade this mod with Left Hand Drive - Right Hand Drive option.
It is working in <vehicleTypeConfigurations>, when you buy this vehicle you can choose this option.
When driving and shifting, the character releases the steering wheel one hand and grab the transmission.
The code is the same as left or right foot target:
<characterTargetNodeModifier node="player_leftHand" transitionTime="0.1" poseId="narrowFingers">
<state node="playerLeftHandTarget" referenceNode="leverGearsRot" poseId="narrowFingers"/>
</characterTargetNodeModifier>

It should be works like this:
LeftHandDrive: player keep steering left hand and grab gear-shift with right hand when changing gears.
RightHandDrive: player keep steering right hand and grab gear-shift with left hand when changing gears.

How I can activate/deactivate node="playerLeftHandTarget", node="playerRightHandTarget", please?

I tried this but don't work:
<objectChange node="playerLeftHandTarget" visibilityActive="false" visibilityInactive="true"/>
<objectChange node="playerLeftHandTarget" visibilityActive="true" visibilityInactive="false"/>

Bryan Boulding (SlashDoggy) 29.04.2022 11:02
The only thing I can think of is make it a configuration like this. Not sure if it will work

<enterableConfigurations >
<enterableConfiguration name="Right hand drive" isTabbable="true">
<exitPoint node="exitPoint"/>
<enterReferenceNode node="Santana88_main_component1"/>

<cameras count="2">
<camera node="outdoorCamera1" rotatable="true" rotateNode="outdoorCameraTarget" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="40" translation="0 0 5.5" rotation="-17.5 180 0">
<raycastNode node="cameraRaycastNode1"/>
<raycastNode node="cameraRaycastNode2"/>
</camera>
<camera node="indoorCamera1" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" positionSmoothingParameter="0" shadowFocusBox="shadowFocusBox"/>
</cameras>

<mirrors>
<mirror node="mirrorGlassInside" prio="1" />
<mirror node="mirrorGlassLeft" prio="1" />
<mirror node="mirrorGlassRight" prio="1" />
</mirrors>

<characterNode node="playerSkin" cameraMinDistance="1.5" spineRotation="-90 0 90" >
<target ikChain="rightFoot" targetNode="playerRightFootTarget" />
<target ikChain="leftFoot" targetNode="playerLeftFootTarget" />
<target ikChain="rightArm" targetNode="player_rightHand" poseId="narrowFingers"/>
<target ikChain="leftArm" targetNode="player_leftHand" poseId="narrowFingers"/>
</characterNode>

<characterTargetNodeModifier node="playerRightFootTarget" transitionTime="0.1" >
<state node="playerRightFootTargetGas" referenceNode="pedalGas_vis"/>
<state node="playerRightFootTargetBrake" referenceNode="pedalBrake_vis"/>
</characterTargetNodeModifier>

<characterTargetNodeModifier node="playerLeftFootTarget" transitionTime="0.1" >
<state node="playerLeftFootTargetClutch" referenceNode="pedalClutch_vis"/>
</characterTargetNodeModifier>

<characterTargetNodeModifier node="player_leftHand" transitionTime="0.1" poseId="narrowFingers">
<state node="playerLeftHandTarget" referenceNode="leverGears" poseId="narrowFingers"/>
</characterTargetNodeModifier>
</enterableConfiguration>

<enterableConfiguration name="Left hand drive" isTabbable="true">
<exitPoint node="exitPoint"/>
<enterReferenceNode node="Santana88_main_component1"/>

<cameras count="2">
<camera node="outdoorCamera1" rotatable="true" rotateNode="outdoorCameraTarget" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="4" transMax="40" translation="0 0 5.5" rotation="-17.5 180 0">
<raycastNode node="cameraRaycastNode1"/>
<raycastNode node="cameraRaycastNode2"/>
</camera>
<camera node="indoorCamera1" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" positionSmoothingParameter="0" shadowFocusBox="shadowFocusBox"/>
</cameras>

<mirrors>
<mirror node="mirrorGlassInside" prio="1" />
<mirror node="mirrorGlassLeft" prio="1" />
<mirror node="mirrorGlassRight" prio="1" />
</mirrors>

<characterNode node="playerSkin" cameraMinDistance="1.5" spineRotation="-90 0 90" >
<target ikChain="rightFoot" targetNode="playerRightFootTarget" />
<target ikChain="leftFoot" targetNode="playerLeftFootTarget" />
<target ikChain="rightArm" targetNode="player_rightHand" poseId="narrowFingers"/>
<target ikChain="leftArm" targetNode="player_leftHand" poseId="narrowFingers"/>
</characterNode>

<characterTargetNodeModifier node="playerRightFootTarget" transitionTime="0.1" >
<state node="playerRightFootTargetGas" referenceNode="pedalGas_vis"/>
<state node="playerRightFootTargetBrake" referenceNode="pedalBrake_vis"/>
</characterTargetNodeModifier>

<characterTargetNodeModifier node="playerLeftFootTarget" transitionTime="0.1" >
<state node="playerLeftFootTargetClutch" referenceNode="pedalClutch_vis"/>
</characterTargetNodeModifier>

<characterTargetNodeModifier node="player_leftHand" transitionTime="0.1" poseId="narrowFingers">
<state node="playerLeftHandTarget" referenceNode="leverGears" poseId="narrowFingers"/>
</characterTargetNodeModifier>
</enterableConfiguration>
</enterableConfigurations>

.You would need to change the addresses in the 2nd section to suit your player skin etc for the other side, and add another indoor camera. You will also need a reverse set of animations for the hands etc. You would just need to duplicate the line in the motorised.dashboards section with the opposite animations linked. It doesn't matter if both run at the same time because one will be invisible

Afmodding (1DAFUL) 14.05.2022 16:02
Thank you for your answer Bryan

Unfortunately it does not work, program does not see camera if it is inside in any configuration.

Bryan Boulding (SlashDoggy) 20.05.2022 07:57
Oooh, that thing. I have had the same problem when fitting autoload and hoses to a truck with 4 bed options. Just refused to work so I had to make it a separate section and transpose everything for each bed option.
Another silly idea might be to have 2 indoor cameras. If you set the cameraMinDistance to about 0.5, you will be able to "sit" in the passenger seat and see yourself drive (from either side). Might need to tweak the distance so legs and arms don't disappear when looking around


Note: Log in to post. Create a new account here.