(FS22 XML edit help) Converting mower mod into a mulcher

Your forum for all discussions around Modding.
PrinzSascha
Posts: 4
Joined: Thu Jan 02, 2025 10:27 pm

(FS22 XML edit help) Converting mower mod into a mulcher

Post by PrinzSascha »

Hello all, first time posting here. Also Happy New Year! I was hoping I could get some insight on how to change the function of a mower, example Kubota DMC63100T by Iconik, to make it operate as a mulcher? Basically trying to create a lawn mower on steroids and have it not leave cut grass behind. (I know the JD batwing mower/mulcher exists, but I want to go even bigger) I'm fairly confident with basic xml modding, was able to add a plow function to a cultivator and convert planters into multifruit seeders successfully. I tried comparing the xml files of a legitimate mulcher and the Kubota mower, but both seem very different and I'm not sure at all what to change in the Kubota's xml to make it mulch. Another post on this forum came close to being what I was looking for, but it was info mainly related to self propelled equipment issues, didn't really specify what to change in terms of actual function of the mower. Any help is greatly appreciated!
User avatar
LS-Lara
Posts: 655
Joined: Sun Aug 04, 2019 4:57 pm
Has thanked: 1 time
Been thanked: 9 times

Re: (FS22 XML edit help) Converting mower mod into a mulcher

Post by LS-Lara »

In the context of this thread which you probably already found, I made a "quick and dirty" conversion of the basegame F240 mower into a mulcher:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="mulcher" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>F 240 MOD</name>
        <specs>
            <neededPower>40</neededPower>
            <workingWidth>2.4</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_mulcher</function>
        </functions>
        <storePacks>
            <storePack>STARTER_GRASS</storePack>
        </storePacks>
        <image>$data/vehicles/seppKnusel/f240/store_f240.png</image>
        <price>12000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SEPPKNUSEL</brand>
        <category>mulchers</category>
        <shopFoldingState>1</shopFoldingState>
        <shopTranslationOffset>0 0 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>673792</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>114432</indexBufferMemoryUsage>
        <textureMemoryUsage>1245184</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mower</typeDesc>
        <filename>$data/vehicles/seppKnusel/f240/f240.i3d</filename>
        <size width="3.2" length="1.5" lengthOffset="0.1" />
        <speedLimit value="20" />
        <components>
            <component centerOfMass="0 0.2 0" solverIterationCount="10" mass="440" />
            <component centerOfMass="0 0 0.2" solverIterationCount="10" mass="200" />
            <joint component1="1" component2="2" node="componentJointAttacher" rotLimit="0 0 0" rotLimitSpring="0 0 4000" rotLimitDamping="0 0 2" maxRotDriveForce="0 0 2" rotDriveRotation="0 0 0" rotDriveSpring="0 0 2" rotDriveDamping="0 0 2" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <powerConsumer ptoRpm="470" neededMinPtoPower="10" neededMaxPtoPower="15"/>

    <groundReferenceNodes>
        <groundReferenceNode node="groundRefNode" threshold="0.2" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="mulcher" functionName="processMulcherArea" disableBackwards="false" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <!--<mower dropWindrow="true" dropAreaIndex="2" />-->
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <!--<workArea type="auxiliary" >
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight" />
        </workArea>-->
    </workAreas>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" rootNode="f240_attacher_component2" jointType="implement" topReferenceNode="topReferenceNode" upperRotationOffset="10" lowerRotLimitScale="0 0 0" lowerTransLimitScale="0 1 0">
                <distanceToGround lower="0.35" upper="1.0" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <lowerAnimation name="lowerAnimation"/>
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" />
    </powerTakeOffs>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="1" turnOnFoldMaxLimit="0.1" turnOnFoldMinLimit="0" >
                    <foldingPart animationName="folding" speedScale="1" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <cylindered>
        <movingTools>
            <movingTool node="flapLeft" playSound="false">
              <dependentPart node="flapLeftDamper" />
            </movingTool>
            <movingTool node="flapRight" playSound="false">
              <dependentPart node="flapRightDamper" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="flapLeftDamper" referencePoint="flapLeftDamperRef" referenceFrame="flapLeftDamperRef">
              <translatingPart node="flapLeftDamperPunch" />
            </movingPart>
            <movingPart node="flapRightDamper" referencePoint="flapRightDamperRef" referenceFrame="flapRightDamperRef">
              <translatingPart node="flapRightDamperPunch" />
            </movingPart>
            <movingPart node="attacherBlock" referencePoint="attacherBlockRef" referenceFrame="attacherBlockRefFrame" isActiveDirty="true" maxUpdateDistance="50" limitedAxis="1"/>
        </movingParts>

        <sounds>
            <hydraulic template="MOVING_PART_SOUND" linkNode="f240_main_component1"/>
        </sounds>
    </cylindered>

    <animations>
        <animation name="folding">
            <part node="flapLeft" startTime="0" endTime="1.2" startRot="0 0 0" endRot="0 0 138"/>
            <part node="flapLeftSupportJoint" startTime="0.0" endTime="1.2"  startTrans="0.0 -0.562 0.0" endTrans="-0.173 -0.221 0.0" startRot="0.0 0.0 0.0" endRot="0.0 0.0 -29.852" />
            <part node="flapRight" startTime="1.2" endTime="2.5" startRot="0 0 0" endRot="0 0 -138"/>
            <part node="flapRightSupportJoint" startTime="1.2" endTime="2.5"  startTrans="0.0 -0.562 0.0" endTrans="0.189 -0.221 0.0" startRot="0.0 0.0 0.0" endRot="0.0 0.0 30.698" />

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="1.24" volumeScale="1.3" pitchScale="1.5" />
            <sound template="defaultHydraulicSound" startTime="1.25" endTime="2.44" volumeScale="1.3" pitchScale="1.5" />
            <sound template="clackVar6"             startTime="0.01"                volumeScale="0.9" pitchScale="0.9" />
            <sound template="sheetImp02"            startTime="0.01"                volumeScale="1.2" pitchScale="1.3" />
            <sound template="clackVar6"             startTime="1.24"                volumeScale="0.9" pitchScale="0.9" />
            <sound template="sheetImp02"            startTime="1.24"                volumeScale="1.3" pitchScale="1.4" />
            <sound template="clackVar6"             startTime="2.44" direction="1"  volumeScale="1.3" pitchScale="1.2" />
            <sound template="sheetImp02"            startTime="2.44" direction="1"  volumeScale="1.5" pitchScale="1.2" />
        </animation>
        <animation name="moveSupport">
            <part componentJointIndex="1" requiredAnimation="lowerAnimation" requiredAnimationRange="0.99 1" startTime="0" endTime="0.5" startRotLimit="0 0 10" endRotLimit="0 0 0" />

            <sound template="clackVar5" startTime="0.09" direction="-1" volumeScale="0.7" pitchScale="1.9" linkNode="attacherJoint"/>
        </animation>
        <animation name="lowerAnimation">
            <part componentJointIndex="1" startTime="0.5" endTime="1" startRotLimit="0 0 0" endRotLimit="0 0 10" />
        </animation>
    </animations>

    <mulcher>
        <!--<animationNodes>
            <animationNode node="drum01" rotSpeed="2000"  rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum02" rotSpeed="-2000" rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum03" rotSpeed="2000"  rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum04" rotSpeed="-2000" rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
        </animationNodes>-->

        <effects>
            <effect workAreaIndex="1" >
                <effectNode effectClass="TypedMotionPathEffect" effectType="MULCHER" linkNode="mowerEffectNode">
                    <!--<motionPathEffect textureFilename="$data/vehicles/seppKnusel/f240/mowerEffectArray.dds" numRows="6" rowLength="11" minFade="0.15" shapeScale="1" maxShapeScale="1.3"/>-->
                    <motionPathEffect textureFilename="$data/vehicles/salek/mul1000/mulcherEffect01Array.dds" numRows="16" rowLength="18" minFade="0.15" shapeScale="0.3" maxShapeScale="1.2"/>
                </effectNode>
                <effectNode effectNode="smokeEmitter" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.25"/>
            </effect>
        </effects>
        <sounds>
            <!--<cut template="grassCut" linkNode="f240_main_component1" volumeScale="0.7"/>-->
            <work template="crushingStubbles" linkNode="mul1000_main_component1" />
        </sounds>
    </mulcher>

    <windBending>
        <windBendingNodes>
            <windBendingNode node="coversCenter"  maxBending="0.10" maxBendingSpeed="20"/>
            <windBendingNode node="coversSkinned" maxBending="0.10" maxBendingSpeed="20"/>
        </windBendingNodes>
    </windBending>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <animationNodes>
            <animationNode node="drum01" rotSpeed="2000"  rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum02" rotSpeed="-2000" rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum03" rotSpeed="2000"  rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum04" rotSpeed="-2000" rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
        </animationNodes>
        <sounds>
            <!--<start template="DEFAULT_MOWER_START_SHORT" linkNode="f240_main_component1" />
            <stop template="DEFAULT_MOWER_STOP"         linkNode="f240_main_component1" />
            <work template="DEFAULT_MOWER_WORK"         linkNode="f240_main_component1" />-->
            <start template="mulcherStart" />
            <work template="mulcherLoop" />
            <stop template="mulcherStop" />
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="2.9" height="1.2"/>
        <agentAttachment width="2.3" height="1.2" length="1.2" lengthOffset="0.15"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.4" maxX="1.4" minZ="-0.373" maxZ="0.7" yOffset="0.2"/>
    </foliageBending>

    <baseMaterial>
        <material name="f240_mat" baseNode="f240_vis">
            <shaderParameter name="colorMat0" value="SEPPKNUSEL_YELLOW1"/>
            <shaderParameter name="colorMat1" value="SEPPKNUSEL_RED1"/>
            <shaderParameter name="colorMat2" value="SEPPKNUSEL_GREY1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="f240_main_component1" node="0>" />
        <i3dMapping id="f240_vis" node="0>0" />
        <i3dMapping id="componentJointAttacher" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|0|1" />
        <i3dMapping id="drum01" node="0>0|1|0|0|0" />
        <i3dMapping id="drum02" node="0>0|1|0|1|0" />
        <i3dMapping id="drum03" node="0>0|1|0|2|0" />
        <i3dMapping id="drum04" node="0>0|1|0|3|0" />
        <i3dMapping id="flapLeft" node="0>0|1|1" />
        <i3dMapping id="flapLeftDamperRef" node="0>0|1|1|0" />
        <i3dMapping id="flapLeftSupportJoint" node="0>0|1|1|4" />
        <i3dMapping id="flapRight" node="0>0|1|2" />
        <i3dMapping id="flapRightDamperRef" node="0>0|1|2|0" />
        <i3dMapping id="flapRightSupportJoint" node="0>0|1|2|4" />
        <i3dMapping id="flapLeftDamper" node="0>0|1|3" />
        <i3dMapping id="flapLeftDamperPunch" node="0>0|1|3|0" />
        <i3dMapping id="flapRightDamper" node="0>0|1|4" />
        <i3dMapping id="flapRightDamperPunch" node="0>0|1|4|0" />
        <i3dMapping id="attacherBlockRefFrame" node="0>0|1|5" />
        <i3dMapping id="attacherBlock" node="0>0|1|5|0" />
        <i3dMapping id="workAreaStart" node="0>0|2|0" />
        <i3dMapping id="workAreaWidth" node="0>0|2|1" />
        <i3dMapping id="workAreaHeight" node="0>0|2|2" />
        <i3dMapping id="dropAreaStart" node="0>0|2|3" />
        <i3dMapping id="dropAreaWidth" node="0>0|2|4" />
        <i3dMapping id="dropAreaHeight" node="0>0|2|5" />
        <i3dMapping id="groundRefNode" node="0>0|2|6" />
        <i3dMapping id="mowerEffectNode" node="0>0|3|0" />
        <i3dMapping id="smokeEmitter" node="0>0|3|1" />
        <i3dMapping id="aiMarkerLeft" node="0>0|4|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|4|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|4|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|3" />
        <i3dMapping id="coversCenter" node="0>0|5|0" />
        <i3dMapping id="coversSkinned" node="0>1|0" />
        <i3dMapping id="f240_attacher_component2" node="1>" />
        <i3dMapping id="attacherJoint" node="1>0" />
        <i3dMapping id="topReferenceNode" node="1>1" />
        <i3dMapping id="attacherBlockRef" node="1>2" />
    </i3dMappings>
</vehicle>

If you compare to the original XML, maybe this will give you some inspiration how to mod the Kubota.
| PC only | FS19 - FS22 - FS25 | how to post your LOG | how to upload IMAGES | my MODDING space (WIP) |
PrinzSascha
Posts: 4
Joined: Thu Jan 02, 2025 10:27 pm

Re: (FS22 XML edit help) Converting mower mod into a mulcher

Post by PrinzSascha »

This worked perfectly! I ended up using the JD mowers from the Kuhn/JD mower pack as the Kubota mower has an extra function with a belt swath that I wasn't sure if would cause interference with the edit, but might give it a go later on. For now though I have exactly what I needed/wanted so I'm happy. Massive help, thank you!
Post Reply