Community Forum

custom animal pen

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created10.04.2021 01:17

Tommy Aleksandersen (WolfBoy) 10.04.2021 01:17
Hello. I have created my own custom animal pen for cows. it shows up in game, it looks nice but my problems with it is that I can`t get the
triggers to work, nor the gate that should open. I can`t get the animal shop to show up ether. an there is no collision on the pen, I can walk right trough it. I have set up the ridgid body on the pen in giants editor, but it soes not work in the game. This is a static pen that i have build in giants editor and set up in the map, and then added the triggers with a new xml file. I have also set up the trans group the right way and added the right numbers in the xml file. My log file shows no error but 2 warnings.

Warning (physics): Add trigger callback failed, object feedingTroughPlane is not a physics trigger.
Warning: Invalid exactFillRootNode collision mask for unloadTrigger. Bit 30 needs to be set!

I added the <item className="AnimalHusbandry" filename="$mapdir$/placeables/animalHusbandry/husbandryCow.xml" position="456.3380127 136.15699768 -643.99597168" rotation="0 11.40599918 0" defaultFarmProperty="false" farmId="1" />
to my item.xml file to get the pen to show up. but nothing more. I don`t understand why the triggers don`t work, or nor the collision.

I hope someone can help me out here. maby explain what to do.

Thank you.

Bilbo Beutlin (BBeutlin) 10.04.2021 11:05
It's not enough to enable 'Rigid Body' in the tab 'Transform'.
You must also setup the properties in tab 'Rigid Body'.
You need to enable 'Collision' checkbox, for a trigger additionally the 'Trigger' checkbox.
Then assign an appropriate 'Collision Mask' depending on kind of rigid body. For reference see default husbandries.

Tommy Aleksandersen (WolfBoy) 11.04.2021 14:56
Ok so I have gone trough all of my husbandrie pen attributes and set the correct values. I compared the default husbandrie pen with mine and it`s the same values, and it still don`t work. I also tried to paint down tipcol in the map and generated a ground collision and saved but still not working in the game.
When i open up the default husbandrie pen in the editor There is a cube called tipCol on couple of places and when i make it visible I can see there is a mask on the husbandrie pen. Now. I have tried to export that tipCol and importet that into my husbandrie pen, but that did not work. I guess it is not working that way. i need to make one of my own in the editor. But the question is how. To me it looks like a mesh of some kind but I`m not sure.
I have tried to look for that info on the net but nothing info on how to create that tipCol mesh. I think that is the problem with my pen. There is no tipCol on it. I would be happy if you can tell me how to do this or least point me in the direction on how to fix this issue.

A nother story is the triggers, they don`t work and i have trid almost everything. I have compared the default xml with mine and it`s the same. No errors in the log file. I have also added the storeItem in the modex file. The default xml is the same as mine only I have changed the adress so it`s pointing to cow.xml.

Bilbo Beutlin (BBeutlin) 11.04.2021 17:36
Should work also without tipCollision and groundCollision.
These are merely auxiliary regions to prevent tip-to-ground and external object placement.

I'm no clairvoyant, so I can't say what you're doing wrong in comparison to a default husbandry.

Just to go sure:
You know you must own the farmland below to get the triggers working?

Tommy Aleksandersen (WolfBoy) 11.04.2021 22:00
Ok, Well, if i could tell you i would. I don`t understand it my self. I done exactly as the default. I even use the default xml file to that animal pen. They are the same. The only difference is that on the default pen there is tipCol, i have manage to make a tipCol but as you explained, that has nothing to do with the collision on the building. So I`m at zero at this point.

Yes I know. i have bought the lands every single time but still not working. This is my xml line in the items.xml

<item mapBoundId="husbandryCow" className="AnimalHusbandry" filename="$moddir$my map/placeables/animalHusbandry/husbandryCow.xml" position="516.25402832 136.05099487 -657.42498779" rotation="-180 89.881 180" />

Bilbo Beutlin (BBeutlin) 11.04.2021 22:45
This filename is invalid, it must not contain spaces or special characters.
Besides the usage of "$moddir$path/file" is not recommanded. Use "$mapdir$/path/file" instead.

If you don't define in the defaultItems.xml 'defaultFarmProperty' and 'farmId' the object.xml should have the entry
To go sure, insert it in the basic 'placeable' as well as in 'placeable/storeData'.

Is your husbandry.xml ok? In opposite to items.xml 'AnimalHusbandry' it must be


Tommy Aleksandersen (WolfBoy) 12.04.2021 05:38
This was wherry good news Bilbo. I go it to work by what you told me. Wherry helpfull. I ended up with using "$mapdir$/path/file" and
'defaultFarmProperty' and 'farmId'. When I first went into the game I did not see the hotspot icon but when I bought the land it shows up and everything was working.

A nother thing was the collision problem I had, I found out that it was the NavMesh. I made a new NavMesh for my pen. By doing that my pen was not working on the collision. I tried a nother pen, first time I importet it, everytnhing was fine. But then i went on to make a new mesh for it and the same thing happend there. No collision on it. So I was thinking it has to do with the NavMesh. I don`t understand this becaouse I did exactly as the youtube video. I checked the files and attributes and it was the same as the working pen. There is no set for the Rigid body ether.

I don`t understand how the NavMesh can controll the collision on the pen.

Bilbo Beutlin (BBeutlin) 13.04.2021 10:55
The navigation mesh is only for controlling the animals' animations.
The usual guides here on GDN and elsewhere in web tell you how to build a proper navMesh.

Tommy Aleksandersen (WolfBoy) 16.04.2021 03:40
it`s strange wat is happen. I will follow your tip and read about NavMesh and collisions.

Thank you again for your help Bilbo.

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