How to add silage to sheep barn food option

Your forum for all discussions around Modding.
Maikerus
Posts: 100
Joined: Fri Apr 10, 2015 11:07 pm
Location: Poland

How to add silage to sheep barn food option

Post by Maikerus »

Default sheep food are hay and grass. I would like to create mod for my own use and modify sheep barn by adding silage to existing options.
I found thsi line in sheep barn xml file

<food capacity="11500" >
<foodPlane node="foodPlane" minY="0.19" maxY="0.373" changeVisibility="true" defaultFillType="DRYGRASS_WINDROW" />
<feedingTrough exactFillRootNode="exactFillRootNodeFood">
<baleTrigger triggerNode="baleTrigger"/>
</feedingTrough>
</food>

I tried changing DRYGRASS_WINDROW" for SILAGE but it doesn't change anything and I feel like its totally wrong way of thinking

Thanks in advance for any helpful thought
User avatar
Dogface
Posts: 1062
Joined: Mon Nov 28, 2016 3:02 pm
Location: PC ⛽ USA

Re: How to add silage to sheep barn food option

Post by Dogface »

Is feed type a function of the placeable or of the animal? My guess would be the animal.
Maikerus
Posts: 100
Joined: Fri Apr 10, 2015 11:07 pm
Location: Poland

Re: How to add silage to sheep barn food option

Post by Maikerus »

So if it's animal function - is there any way to mod it?
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: How to add silage to sheep barn food option

Post by olahaldor »

Have a look at my map Rennebu. I've done this exact thing. :)
It's a custom xml file based on info I found on the forums. You could literally have the animals eat wood chips for that matter.
Maikerus
Posts: 100
Joined: Fri Apr 10, 2015 11:07 pm
Location: Poland

Re: How to add silage to sheep barn food option

Post by Maikerus »

olahaldor wrote: Sun Mar 05, 2023 9:53 am Have a look at my map Rennebu. I've done this exact thing. :)
It's a custom xml file based on info I found on the forums. You could literally have the animals eat wood chips for that matter.
Thank You very much for Your response :hi: With trial and error method I managed to create the mod I wanted *thumbsup*

Just a quick note for everyone who is also thinking about modding animal food the way I wanted:
In Your file player need to supply both types of food to maintain 100% of health/production. It looks like this:

<foodGroup title="$l10n_fillTypeGroup_grass" productionWeight="0.50" fillTypes="GRASS_WINDROW DRYGRASS_WINDROW" />
<foodGroup title="$l10n_fillTypeGroup_silage" productionWeight="0.50" fillTypes="SILAGE"/>

My goal was to add 3rd interchangeable food type to already existing grass and hay, so I modified lines to:

<foodGroup title="$l10n_fillTypeGroup_grass" productionWeight="1" fillTypes="GRASS_WINDROW DRYGRASS_WINDROW SILAGE" />


Now everything works perfectly :coolnew:
Post Reply