Milk trigger in animal pen

Your forum for all discussions around Modding.
Marc76
Posts: 10
Joined: Sat May 13, 2023 7:18 pm

Milk trigger in animal pen

Post by Marc76 »

Hi,

Not sure how active this forum is - but I've created a custom sheep pen producing manure and goatmilk. I can see goatmilk being produced and stored, but I'm unable to load it into a trailer. I've added a primivtive in the i3d and mapped as the loading trigger, but I'm not getting any trigger to fill when I'm in game. I've spent weeks trying to get this right, and assume it's probably something small, but I can't figure it out.

What enties in the xml do I need to create the fill trigger? Many thanks!
User avatar
LS-Lara
Posts: 396
Joined: Sun Aug 04, 2019 4:57 pm

Re: Milk trigger in animal pen

Post by LS-Lara »

Just some quick thoughts:
  • did you set the trigger bitmask correctly ?
  • goatmilk is defined as a general fillType ?
  • the trailer has this fillType assigned ?
In general it's a good idea to compare all of your structure and item properties with a basegame Giants pen.
You could also share your XML here.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
Marc76
Posts: 10
Joined: Sat May 13, 2023 7:18 pm

Re: Milk trigger in animal pen

Post by Marc76 »

Many thanks for the reply. I'm not sure what that first point means I'll be honest.
Goatmilk is set as a filltype, and the trailer has goatmilk assigned.

I've been comparing different mod and basegame pens to see where I might have gone wrong.
The original pen was a straightforward sheep pen, with auto water and food.

I've managed to edit it to create a straw plane and trigger which works, turn off the auto watering, and have it produce manure.

It's just the milk that I can't get to work




The xml is:

Code: Select all

<triggerMarkers>
        <triggerMarker node="markerFood" filename="$data/shared/assets/marker/markerIcons.xml" id="UNLOAD" />
        <triggerMarker node="markerWater" filename="$data/shared/assets/marker/markerIcons.xml" id="WATER" />
        <triggerMarker node="markerAnimals" filename="$data/shared/assets/marker/markerIcons.xml" id="ANIMALS" />
        <triggerMarker node="markerWoolDecal1" adjustToGround="true" />
        <triggerMarker node="markerWoolDecal2" adjustToGround="true" />
        <triggerMarker node="markerWoolDecal3" adjustToGround="true" />
        <triggerMarker node="markerWoolDecal4" adjustToGround="true" />
	<triggerMarker node="markerMilk" filename="$data/shared/assets/marker/markerIcons.xml" id="LOAD" />
	<triggerMarker node="markerStraw" filename="$data/shared/assets/marker/markerIcons.xml" id="UNLOAD" />
    </triggerMarkers>

    <tipOcclusionUpdateAreas>
        <tipOcclusionUpdateArea startNode="tipOcclusionUpdateArea1Start" endNode="tipOcclusionUpdateArea1End" />
    </tipOcclusionUpdateAreas>

    <ai>
        <updateAreas>
            <updateArea startNode="tipOcclusionUpdateArea1Start" endNode="tipOcclusionUpdateArea1End" />
        </updateAreas>
    </ai>

    <hotspots>
        <hotspot type="SHEEP" teleportNode="teleportNode" />
    </hotspots>

    <infoTrigger triggerNode="infoTrigger" />

    <husbandry saveId="Animals_SHEEP" hasStatistics="false">
        <storage node="storage" fillTypes="WATER STRAW MANURE GOATMILK" isExtension="false">
		    <capacity fillType="WATER" capacity="500000" />
			<capacity fillType="STRAW" capacity="500000" />
			<capacity fillType="MANURE" capacity="0" />
			<capacity fillType="GOATMILK" capacity="25000" />
		</storage>
		
		<unloadingStation supportsExtension="true" storageRadius="65" hideFromPricesMenu="true">
            <unloadTrigger exactFillRootNode="exactFillRootNodeStraw" fillTypes="STRAW" >
				<baleTrigger triggerNode="baleTriggerStraw" deleteLitersPerSecond="250"/>
			</unloadTrigger>
			<unloadTrigger fillTypes="MANURE GOATMILK" />
			<unloadTrigger exactFillRootNode="exactFillRootNodeWater" fillTypes="WATER" aiNode="waterAINode" />
		</unloadingStation>
		
		<loadingStation supportsExtension="true" storageRadius="100" fillTypes="WATER">
			<loadTrigger triggerNode="milkloadingTrigger" fillTypes="GOATMILK" fillLitersPerSecond="50" />
        </loadingStation>
		
        <animals type="SHEEP" maxNumAnimals="200" >
            <navigation rootNode="navigationRootNode" filename="navigationMesh.i3d" />
            <loadingTrigger node="loadingTrigger" />
        </animals>

        <food capacity="500000" >
            <foodPlaces>
                <foodPlace node="foodPlace1" />
                <foodPlace node="foodPlace2" />
                <foodPlace node="foodPlace3" />
		<foodPlace node="foodPlace4" />
            </foodPlaces>
            <foodPlane node="foodPlane" minY="0.171" maxY="0.34" changeVisibility="true" defaultFillType="DRYGRASS_WINDROW"/>
            <feedingTrough exactFillRootNode="exactFillRootNodeFood" aiNode="foodAINode">
                <baleTrigger triggerNode="baleTrigger"/>
            </feedingTrough>
        </food>

        <water automaticWaterSupply="false" >
            <waterPlane node="waterPlane" minY="0.03" maxY="0.175" changeVisibility="true" />
            <waterPlaces>
                <waterPlace node="waterPlace1" />
                <waterPlace node="waterPlace2" />
            </waterPlaces>
        </water>    

        <straw>
            <manure activ="true" factor="1.5" />
            <strawPlane node="strawPlane" minY="-0.141" maxY="-0.003" changeVisibility="true" />
        </straw>

        <pallets fillType="WOOL" maxNumPallets="8">
            <palletTrigger node="palletTrigger" />
            <spawnPlaces>
                <spawnPlace startNode="palletArea1Start" endNode="palletArea1End" />
                <spawnPlace startNode="palletArea2Start" endNode="palletArea2End" />
            </spawnPlaces>
			
        </pallets>

    </husbandry>

    <i3dMappings>
        <i3dMapping id="teleportNode" node="0>8|0" />
        <i3dMapping id="foodPlane" node="0>8|1|0" />
        <i3dMapping id="exactFillRootNodeFood" node="0>8|1|1" />
        <i3dMapping id="foodAINode" node="0>8|1|2" />
        <i3dMapping id="baleTrigger" node="0>8|1|3" />
        <i3dMapping id="foodPlace1" node="0>8|1|4|0" />
        <i3dMapping id="foodPlace2" node="0>8|1|4|1" />
        <i3dMapping id="foodPlace3" node="0>8|1|4|2" />
	<i3dMapping id="foodPlace4" node="0>8|1|4|3" />
        <i3dMapping id="storage" node="0>8|2" />
        <i3dMapping id="exactFillRootNodeWater" node="0>8|3|0" />
        <i3dMapping id="waterAINode" node="0>8|3|1" />
        <i3dMapping id="waterPlace1" node="0>8|3|2|0" />
        <i3dMapping id="waterPlace2" node="0>8|3|2|1" />
        <i3dMapping id="waterPlane" node="0>8|3|3" />
        <i3dMapping id="palletTrigger" node="0>8|4|0" />
        <i3dMapping id="palletArea1Start" node="0>8|4|1" />
        <i3dMapping id="palletArea1End" node="0>8|4|1|0" />
        <i3dMapping id="palletArea2Start" node="0>8|4|2" />
        <i3dMapping id="palletArea2End" node="0>8|4|2|0" />
		
        <i3dMapping id="navigationRootNode" node="0>8|5" />
        <i3dMapping id="markerWoolDecal1" node="0>8|6|0|0" />
        <i3dMapping id="markerWoolDecal2" node="0>8|6|0|1" />
        <i3dMapping id="markerWoolDecal3" node="0>8|6|0|2" />
        <i3dMapping id="markerWoolDecal4" node="0>8|6|0|3" />
        <i3dMapping id="markerAnimals" node="0>8|6|1" />
        <i3dMapping id="markerWater" node="0>8|6|2" />
        <i3dMapping id="markerFood" node="0>8|6|3" />
	<i3dMapping id="markerMilk" node="0>8|6|4" />
		
        <i3dMapping id="infoTrigger" node="0>8|7" />
        <i3dMapping id="loadingTrigger" node="0>8|8" />
	<i3dMapping id="milkloadingTrigger" node="0>8|16" />
		
        <i3dMapping id="clearArea1Start" node="0>8|9|0" />
        <i3dMapping id="clearArea1Width" node="0>8|9|0|0" />
        <i3dMapping id="clearArea1Height" node="0>8|9|0|1" />
		
        <i3dMapping id="levelArea1Start" node="0>8|10|0" />
        <i3dMapping id="levelArea1Width" node="0>8|10|0|0" />
        <i3dMapping id="levelArea1Height" node="0>8|10|0|1" />
		
        <i3dMapping id="testArea1Start" node="0>8|11|0" />
        <i3dMapping id="testArea1End" node="0>8|11|0|0" />
		
        <i3dMapping id="indoorArea1Start" node="0>8|12|0" />
        <i3dMapping id="indoorArea1Width" node="0>8|12|0|0" />
        <i3dMapping id="indoorArea1Height" node="0>8|12|0|1" />
		
        <i3dMapping id="tipOcclusionUpdateArea1Start" node="0>8|13|0" />
        <i3dMapping id="tipOcclusionUpdateArea1End" node="0>8|13|0|0" />
		
	<i3dMapping id="straw" node="0>8|15" />
        <i3dMapping id="strawPlane" node="0>8|15|0" />
        <i3dMapping id="exactFillRootNodeStraw" node="0>8|15|3" />
        <i3dMapping id="baleTriggerStraw" node="0>8|15|1" />
        <i3dMapping id="markerStraw" node="0>8|15|2" />
    </i3dMappings>
</placeable>
Last edited by Marc76 on Sat Mar 23, 2024 2:19 pm, edited 1 time in total.
User avatar
LS-Lara
Posts: 396
Joined: Sun Aug 04, 2019 4:57 pm

Re: Milk trigger in animal pen

Post by LS-Lara »

Marc76 wrote: Fri Mar 22, 2024 9:14 pm I'm not sure what that first point means I'll be honest.
Check the "primitive" that you defined as trigger (node 0>8|16) in GE: Rigid Body > Collision Mask(Hex). It should be "40000000" - in 3-dots popup only "30" ticked. If I remember correctly, triggers should also have a normalized size (1, 1, 1). So if you rescaled your item, you should "freeze transformations". I don't know what you used there and how it is parametrized in general. If in doubt about what's going on, simply import a trigger from an original cow pen.

As you have added manure and straw there as well, it might get difficult to identify the specific problem (could be some interaction between all the changes). Perhaps temporarily deactivate those and only make the additions for goatmilk according to the instructions given by Enhanced Animal System first. When that works flawlessly, then start adding the other parts step by step.

And BTW: it's better to embed the XML here in code-tags to improve readability in the forum.
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
Marc76
Posts: 10
Joined: Sat May 13, 2023 7:18 pm

Re: Milk trigger in animal pen

Post by Marc76 »

Thank you. As soon as I had pasted it I realised it wasn't very readable and I should have done it within code-tags. But I appreciate the help, and I'll certainly check those things
User avatar
LS-Lara
Posts: 396
Joined: Sun Aug 04, 2019 4:57 pm

Re: Milk trigger in animal pen

Post by LS-Lara »

You can still edit your post afterwards. :wink3:
Der Sinn des Lebens ist:
29.61%

Mein Traktor:
Base:
HP Pavilion 690-03xx
Core i7-8700 @ 3.2GHz
NVIDIA GeForce GTX 1060 6GB
2x Benq GL2450H
Windows 10 Home 64bit
Custom:
2 x 16GB Corsair Vengeance LPX DDR4 C16 XMP 2.0
Samsung NVMe M.2 970 EVO Plus 500GB
Samsung SSD 860 EVO 1TB
Logitech G203 Prodigy
Logitech Wireless F710
Marc76
Posts: 10
Joined: Sat May 13, 2023 7:18 pm

Re: Milk trigger in animal pen

Post by Marc76 »

You got me! :)
Post Reply