Community Forum

Scripting conrtols for separate vehicles

Forum Overview >> Scripting

CategoryScripting
Created09.11.2014 20:46


Scuba M X (Scuba_MX) 09.11.2014 20:49
Does anyone know how to script separate controls for an individual vehicle. For example, I don't like how the Ponsse Scorpion's controls are mashed with the loader controls. What I am thinking is copying all off the Ponsse Scorpion's files into a mod and create individual controls for it that way. Does anyone know how I can accomplish this? I can kinda script, I am used to C# so this is different for me. Any help would be awesome.

Some Guy (Unknown) 10.11.2014 04:31
In the XML file of the vehicle, find the <movingparts> section and change the axis names (like "axis_frontloader_tool") to something else.

In Inputbindings.xml in the MyGames folder, duplicate the control assignment line for the axis names you have changed and then change the axis name to what you have changed.

Then in game, set the controls as normal.

This will break MP, but some people have already taken the stock vehicles and done basic mods to them, so if you search the mod sites you can download those and edit them instead. Just remember to buy the mod version in game.

Simon Dahlquist (SimDala) 03.12.2014 10:08
Are you done with these changeings?

I had the same idea as you cause if I configured the Ponsse machines to be playable (work with controllers as real machines) all other machines where messed up. I have configured my own Ponsse forwarder and harvester with the right bindings for the wehicle so that it works fine to use it with ie x360 controller and the sticks to work as real sticks in real machine.

I also updated the characteristics of the wehicle so that it can climb as real one and has grip on ground as real machine.

To do this you need to make mods. The easiest way to do this is to download a Ponsse mod so that you get all files in right place. Then extract the zip-file for the mod into a folder with the same name as the zip file. After that remember to remove the zip file (otherwise the changes will not take effect) When all these basic steps are done you just change as written before in ie PonsseBuffalo.xml file.

To get you started with this change, just replace the movingTools section in the PonsseBuffalo.xml file to this:

<movingTools>

<!-- main turn-->
<movingTool index="1>5|0" componentJointIndex="1" anchorActor="0" rotSpeed="40" rotAcceleration="60" rotMax="185" rotMin="-185" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL3" invertAxis="true" invertMouseAxis="true" speedFactor="2" />

<!-- arm 1 up/down -->
<movingTool index="1>5|0|0" componentJointIndex="1" anchorActor="0" rotSpeed="30" rotAcceleration="60" rotMax="95" rotMin="-2" axis="AXIS_FRONTLOADER_ARM" invertAxis="false" invertMouseAxis="false" speedFactor="2">
<dependentPart index="1>5|0|0|1" />
<dependentPart index="1>5|4|0|1|0|0" />
</movingTool>

<!-- arm 2 extend/contract-->
<movingTool index="1>5|0|0|0" componentJointIndex="1" anchorActor="0" rotSpeed="40" rotAcceleration="60" rotMax="155" rotMin="-20" axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" invertMouseAxis="true" speedFactor="2">
<dependentPart index="1>5|0|0|3" />
<dependentPart index="1>5|4|0|1|0|0|0" />
</movingTool>

<!-- arm 2 extend/contract extender 1-->
<movingTool index="1>5|0|0|0|0" componentJointIndex="1" anchorActor="0" transSpeed="1" transAcceleration="70" transMax="3.06581" transMin="0.79999" translationAxis="3" axis="AXIS_FRONTLOADER_ARM2" invertAxis="false" invertMouseAxis="true" speedFactor="2" >
<dependentPart index="1>5|4|0|1|0|0|0|0" />
</movingTool>

<!-- arm 2 extend/contract extender 2-->
<movingTool index="1>5|0|0|0|0|0" componentJointIndex="1" anchorActor="0" transSpeed="1" transAcceleration="70" transMax="2.34704" transMin="0.08122" translationAxis="3" axis="AXIS_FRONTLOADER_ARM2" invertAxis="false" invertMouseAxis="true" speedFactor="2" >
<dependentPart index="1>5|4|0|1|0|0|0|0" />
</movingTool>



<!-- claw x rotation -->
<movingTool index="2>0" componentJointIndex="1" anchorActor="1" rotSpeed="160" rotAcceleration="200" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="true" speedFactor="2"/>
<!--movingTool index="1>5|0|0|0|0|0|1|0|0|0" rotSpeed="80" rotAcceleration="160" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL3" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_TOOL3" invertMouseAxis="true" speedFactor="1"/-->

<!-- claw -->
<!--movingTool index="1>5|0|0|0|0|0|1|0|0|0|1" rotSpeed="80" rotAcceleration="160" rotMax="0" rotMin="-120" rotationAxis="3" axis="AXIS_FRONTLOADER_TOOL4" invertAxis="true" invertMouseAxis="true" speedFactor="0.7" >
<dependentPart index="1>5|0|0|0|0|0|1|0|0|0|0|0" />
<dependentPart index="1>5|0|0|0|0|0|1|0|0|0|0|1" />
<dependentPart index="1>5|0|0|0|0|0|1|0|0|0|0|2" />
</movingTool>
<movingTool index="1>5|0|0|0|0|0|1|0|0|0|0" rotSpeed="-80" rotAcceleration="160" rotMax="120" rotMin="0" rotationAxis="3" axis="AXIS_FRONTLOADER_TOOL4" invertAxis="true" invertMouseAxis="true" speedFactor="0.7" >
<dependentPart index="1>5|0|0|0|0|0|1|0|0|0|0|0" />
<dependentPart index="1>5|0|0|0|0|0|1|0|0|0|0|1" />
<dependentPart index="1>5|0|0|0|0|0|1|0|0|0|0|2" />
</movingTool-->
<!-- grapple -->
<movingTool index="2>1" componentJointIndex="2" anchorActor="0" rotSpeed="-150" rotAcceleration="360" rotMax="150" rotMin="-20" rotationAxis="3" axis="AXIS_FRONTLOADER_TOOL4" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_TOOL4" invertMouseAxis="true" speedFactor="2"/>
<movingTool index="2>2" componentJointIndex="3" anchorActor="0" rotSpeed="150" rotAcceleration="360" rotMax="20" rotMin="-150" rotationAxis="3" axis="AXIS_FRONTLOADER_TOOL4" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_TOOL4" invertMouseAxis="true" speedFactor="2"/>
<!-- cabin camera follow crane-->
<!--
<movingTool index="0>4|2" componentJointIndex="0" anchorActor="0" rotSpeed="20" rotAcceleration="80" rotMax="180" rotMin="-180" rotationAxis="2" axis="AXIS_FRONTLOADER_TOOL3" invertAxis="true" mouseAxis="AXIS_FRONTLOADER_TOOL3" invertMouseAxis="false" speedFactor="1"/>
-->
</movingTools>


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