Cant get motionPathEffect to work or show up at all ingame

Your forum for all discussions around Modding.
XPModder
Posts: 80
Joined: Thu Oct 30, 2014 2:45 pm

Cant get motionPathEffect to work or show up at all ingame

Post by XPModder »

Hi!
Im working on both a single row harvester and a 4 row header for forage harvesters to harvest lavender on a map Im making.
I have both the single row harvester and the 4 row header working and animated, but I cant get the motionPathEffect of the cutter to work.
I have tried lots of different things, including forcing the effect to use a different fruit and fill type (I tried maize) and using basegame array textures.
In the xml of the header I currently have this:

Code: Select all

<cutter fruitTypes="lavender" fruitTypeConverter="forageHarvester">

        <effect>
            <effectNode effectClass="CutterMotionPathEffect" effectType="CUTTER" linkNode="motionPathLinkNode">
                <motionPathEffect textureFilename="$data/vehicles/capello/helianthus5700/plantArray.dds" textureRealWidth="9" numRows="12" rowLength="8" minFade="0.06" speedScale="0.18"/>
            </effectNode>
        </effect>
        ....
In my i3d I have an empty transform group at a suitable location and the index path in the i3dMappings section of the xml is correct and points to that transform group as it should.
As I couldnt get it to work with my custom array texture file (which I got via the exporter tool from blender), I copied the <motionPathEffect ... /> tag from a helianthus header from the base game. (I know that the effect would not line up properly with my header, but it should still work...)
When I harvest some lavender with the header however, the effect never shows up, as if it werent even there.
I tried moving and rotating the transform group in case the effect just was in a weird location or something, but still cant get anything.
When I had made a typo in the effect earlier, the log would get error messages whenever I tried harvesting some lavender, so clearly the effect is being create/started, but if the effect is there, it is completely invisible.
I fixed the typo that I had earlier and now the log is completely clean, but the effect still does not work.
The cutter itself does however work correctly and I can harvest the lavender without any problems, just the motion path effect is effectively inexistent in the game...

For reference here is the relevant part of my cutterEffects xml:

Code: Select all

<motionPathEffect effectClass="CutterMotionPathEffect" effectType="CUTTER" filename="map/effects/cutter/lavender/lavender_harvestReady.i3d">
        <effectGeneration rootNode="0|0|1" minRot="0 0 0" maxRot="0 360 0" minScale="1 0.9 1" maxScale="1 1.1 1" useFoliage="lavender" useFoliageStage="5" useFoliageLOD="0"/>
        <typeDefinition fruitTypes="LAVENDER" growthStates="5 6" speedScale="0.6"/>

        <effectMeshes>
            <effectMesh node="0|0|5" numRows="1"  rowLength="5" skipPositions="1" boundingBox="1 4 4"/>
            <effectMesh node="0|0|1" numRows="6"  rowLength="5" skipPositions="0" boundingBox="6 4 4"/>
            <effectMesh node="0|0|2" numRows="6"  rowLength="8" skipPositions="0" boundingBox="10 7.5 7.5"/>
            <effectMesh node="0|0|3" numRows="12" rowLength="8" skipPositions="0" boundingBox="16 7.5 7.5"/>
            <effectMesh node="0|0|4" numRows="20" rowLength="8" skipPositions="0" boundingBox="24 7.5 7.5"/>
        </effectMeshes>

        <customShaderDefaults>
             <customShaderMap name="shapeArray" filename="$data/effects/cutter/arrays/maizeheader/cutterArray12x26.dds"/>
            <customShaderVariation name="scaleByTexture_verticalOffsetCut_alphaMap_keepNormals"/>
        </customShaderDefaults>
    </motionPathEffect>
The effect i3d is fine and looks as it should and is also loaded by the game when loading the map.
As I am not getting any errors about it, Im also pretty certain that this cutterEffects xml is fine, especially since the effects work fine for harvesting other crops.

The problem seems to be with my header, as even if I use the forcedFruitType and forcedFillType attributes in the effectNode to force the effect to use maize as fruit and fill types it still does not show up at all, while just using a basegame header and harvesting maize with that works fine.

Does the transform group used as the effect link node require any special attributes or what am I missing?

Any help is much appreciated! :)
Das Universum ist unvorstellbar groß und wir sind im Vergleich dazu winzig.

Daher kann mir jemand der unter uns Winzlingen Unterschiede in Hautfarbe oder Herkunft sucht, nur Leid tun, weil seine Sichtweise so begrenzt ist!

Fremdenfeindlichkeit ist Menschenfeindlichkeit!