COMMUNITY FORUM

Animal Food Types

Forum Overview >> Farming Simulator 17

CategoryFarming Simulator 17
Created19.08.2018 02:54


Nathan Mcdavid (Unknown) 19.08.2018 02:54
Where can I find Animal Food Types or fill Types? I have modded myself into a mess and now pigs require steamed potato's and carrots. The other question I have is can I change the base percentages of the types for each animal group?

Bilbo Beutlin (BBeutlin) 19.08.2018 17:56
I've never fiddled around with it, but perhaps this gives you some inspiration:
- script docs -> Utils -> FillUtil contains functions for food/groups.
- script docs -> Specs -> MixerWagon for making food from components.

Nathan Mcdavid (Unknown) 21.08.2018 02:27
Found some inspiration it was under fill types.

also in moddesc.xml >-- useAsCowBasefeed="false" useAsCowGrass="false" useAsCowPower="false" useAsSheepGrass="false" useAsPigBasefeed="false" useAsPigGrain="false" useAsPigProtein="false" useAsPigEarthfruit="false" fillTypeConversion="false" conversionFactor="4" windrowConversionFactor="1" forageWagonConversion="wheat"


----------------------------------------------------------------- new fill types as well

if fillType.addToAnFoodGroup then
local animals = Utils.splitString(" ", fillType.animals);
local foodGroups = Utils.splitString(" ", fillType.foodGroups);

for _, animal in pairs(animals) do

for _, foodGroup in pairs(foodGroups) do
local foodGroupIndex;
local animalIndex;
local stop = false;

if animal == "sheep" then
animalIndex = AnimalUtil.ANIMAL_SHEEP;

if foodGroup == "grass" then
foodGroupIndex = 1;
else
stop = true;
end;
elseif animal == "cow" then
animalIndex = AnimalUtil.ANIMAL_COW;

if foodGroup == "grass" then
foodGroupIndex = 1;
elseif foodGroup == "base" then
foodGroupIndex = 2;
elseif foodGroup == "power" then
foodGroupIndex = 3;
else
stop = true;
end;
elseif animal == "pig" then
animalIndex = AnimalUtil.ANIMAL_PIG;

if foodGroup == "grass" then
foodGroupIndex = 1;
elseif foodGroup == "grain" then
foodGroupIndex = 2;
elseif foodGroup == "protein" then
foodGroupIndex = 3;
elseif foodGroup == "earth" then
foodGroupIndex = 4;
else
stop = true;
end;
else
stop = true;
end;

if not stop then
FillUtil.registerFillTypeInFoodGroup(
animalIndex,
foodGroupIndex,
FillUtil[newFillType]
);

print("\\______ Add fillType: '" .. localFillTypeName .. "' to food group: '" .. foodGroup .. "' [foodGroupIndex '" .. foodGroupIndex .. "'] from animal '" .. animal .. "' [animalIndex: '" .. animalIndex .. "']");
end;

Nathan Mcdavid (Unknown) 21.08.2018 02:28
thanks M8


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