Extreme Sheep farming

User avatar
RubberPIX
Posts: 372
Joined: Sun Nov 21, 2010 11:42 pm
Location: Michigan, United States
Contact:

Re: Extreme Sheep farming

Post by RubberPIX »

I just found out that you will continue to have wool being made even without grass in the trough which is nice. It may be at a reduced rate, but this means that my 3000 sheep aren't just doing nothing. I also changed my trailer so that it's just like JoshK said. I don't want to have 2 copies of the same trailer when I can just have 1.

Andy
Vincitore
Posts: 85
Joined: Mon Jan 10, 2011 4:57 pm

Re: Extreme Sheep farming

Post by Vincitore »

After all the potatoes and sugar beets, I decided to take my chances in the wool business.

I read almost all the threads in this topic, and I learned a lot already! But I was wondering, is there a decent mod to haule the wool pallets?
User avatar
RubberPIX
Posts: 372
Joined: Sun Nov 21, 2010 11:42 pm
Location: Michigan, United States
Contact:

Re: Extreme Sheep farming

Post by RubberPIX »

If you read the last few pages, you'll find that a few of us were able to edit a mod listed in this topic to haul 89 pallets at once. You just need to download the mod and add the appropriate changes.

Andy
Vincitore
Posts: 85
Joined: Mon Jan 10, 2011 4:57 pm

Re: Extreme Sheep farming

Post by Vincitore »

Thanks RubberPIX, I think I may have read over that line :(
Wrongway
Posts: 62
Joined: Fri Nov 09, 2012 11:17 am

Re: Extreme Sheep farming

Post by Wrongway »

Does the amount of grass needed in the fill trough vary with the amount of sheep you have. I seem to think I read somewhere that the amount of grass feed you need is the same no matter how many sheep you have. If that is the case it doesn't make sense.
User avatar
markothevrba
Posts: 170
Joined: Fri Nov 02, 2012 1:33 am

Re: Extreme Sheep farming

Post by markothevrba »

The amount of grass you can deposit at the sheep pen rises as you buy more sheep. Not sure about numbers though
Wrongway
Posts: 62
Joined: Fri Nov 09, 2012 11:17 am

Re: Extreme Sheep farming

Post by Wrongway »

I think I read it holds a max of 6 days worth so if that 6 days amount gets bigger proportional to the number of sheep then it does increase and makes more sense.
User avatar
CornetPlayer
Posts: 506
Joined: Sun Oct 28, 2012 1:29 pm

Re: Extreme Sheep farming

Post by CornetPlayer »

Vincitore wrote:I read almost all the threads in this topic, and I learned a lot already! But I was wondering, is there a decent mod to haule the wool pallets?
I don't like to use "cheat" mods, like the one the holds 89 pallets; besides, it takes too long to fill up. I use a trailer that was designed for round bales, but works great for wool pallets. You can easily load 10 pallets; there's plenty of space...much more than the blue trailer. It also has a low rail (designed to keep the round bales from falling off), that actually strips the wool pallet from the forks as you back away.
Vincitore
Posts: 85
Joined: Mon Jan 10, 2011 4:57 pm

Re: Extreme Sheep farming

Post by Vincitore »

Do you guys focus on only the sheep farming or do you guys also harvest potatoes or any other type?

I don;t like the trailer that can hold 89 pallets. I think that a maximum of 10-12 pallets is enough for me right now.
Besides, which trailer is that? Is it a mod or an ingame trailer?
User avatar
CornetPlayer
Posts: 506
Joined: Sun Oct 28, 2012 1:29 pm

Re: Extreme Sheep farming

Post by CornetPlayer »

my 1200 sheep are a side business. I have 12 fields, including a beet farm(14,15/16) with biga$$ harvester and a corn farm (#13). I also have some bees and 15 solar panels. In the village, I own the Gasthaus. Please, you Americans, do not sit at the Stammtisch, unless invited. Even with all that, I still have down time.
Top Soil
Posts: 279
Joined: Wed Nov 21, 2012 11:22 pm

Re: Extreme Sheep farming

Post by Top Soil »

If you run at RealTime, this sheep farming would have to get extreme indeed to be full time.

I like to get crops in the ground, my cow feed sorted and grass baled up, and then accelerate time so the crops grow -- with 1000 sheep at 120x speed, I have trouble keeping up with the pallets, basically during this ten minutes all I'm doing is driving my frontloader around schlepping wool onto the trailers. When the first field goes green, I go back to realtime, drive the trailer to the wool depot and then go back to 'real' farming :P
darkless2012
Posts: 1
Joined: Sun Dec 02, 2012 11:43 am

Re: Extreme Sheep farming

Post by darkless2012 »

RubberPIX wrote:If you read the last few pages, you'll find that a few of us were able to edit a mod listed in this topic to haul 89 pallets at once. You just need to download the mod and add the appropriate changes.

Andy
Hi, you mention you were able to edit the mod to accept wool pallet. seen the screenshot it really nice, and it is I'm looking for. can you plz upload and share them? I really wanna get my hands on that mod. ty
Vincitore
Posts: 85
Joined: Mon Jan 10, 2011 4:57 pm

Re: Extreme Sheep farming

Post by Vincitore »

CornetPlayer wrote:my 1200 sheep are a side business. I have 12 fields, including a beet farm(14,15/16) with biga$$ harvester and a corn farm (#13). I also have some bees and 15 solar panels. In the village, I own the Gasthaus. Please, you Americans, do not sit at the Stammtisch, unless invited. Even with all that, I still have down time.
Nice work CornetPlayer! I suggest you have the help of a few dedicated helpers?

I just need some help to load the blue trailer with pallets. When I load the wool pallets onto the blue trailer, the trailer always going to tip to one side and falls over to one side.
How do you guys load a trailer, maybe a video?
User avatar
Yoda75
Posts: 44
Joined: Fri May 25, 2012 1:05 pm
Location: Norway

Re: Extreme Sheep farming

Post by Yoda75 »

How about lifting TWO pallets at the time..? :p
User avatar
RubberPIX
Posts: 372
Joined: Sun Nov 21, 2010 11:42 pm
Location: Michigan, United States
Contact:

Re: Extreme Sheep farming

Post by RubberPIX »

darkless2012 wrote:
RubberPIX wrote:If you read the last few pages, you'll find that a few of us were able to edit a mod listed in this topic to haul 89 pallets at once. You just need to download the mod and add the appropriate changes.

Andy
Hi, you mention you were able to edit the mod to accept wool pallet. seen the screenshot it really nice, and it is I'm looking for. can you plz upload and share them? I really wanna get my hands on that mod. ty
I'm sorry, but uploading the mod with the changes without the consent of the mod's creator is a no-go in my book. Doing so would be extremely rude, in my opinion. The details you need on downloading the mod and then editing them are contained in just a few posts.

I'll have to end it there, not sure if it helped or made sense, but it's been a long few days for me. Not enough sleep and having to assemble a new table really took it out of me. Sure, part B SHOULD fit into part C, but I don't see that happening without a friggin hammer!?! :confusednew:

Andy

*Edit* Of course nothing says I can't uploaded the file that was modded for you to download. Just copy and paste the following file in the ubt.lua file and make sure to erase all the text in that file before pasting. Also, make a backup of the mod before making the changes in case you want the original again for multiplayer. I'm also sorry that I originally posted that it was the moddesc.xml file that needed changing.
-- Original script: d47 strawmod
-- universal bale ready, fixed unloading, autoload, safe/load trailer state: Bassaddict






ubt = {};

function ubt.prerequisitesPresent(specializations)
return SpecializationUtil.hasSpecialization(Trailer, specializations);
end;

function ubt:load(xmlFile)

self.unloadLeft = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.unloadLeft#index"));
self.unloadRight = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.unloadRight#index"));
self.unloadBack = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.unloadBack#index"));

self.trailerIsEmpty = true;
self.autoLoad = false;
self.autoLoadText = {g_i18n:getText("AUTOLOAD_MANUAL"),g_i18n:getText("AUTOLOAD_AUTOMATIC")};
self.loadingIsActive = false;
self.wasToFast = false;
self.wasToFast = false;
self.displayHUD = true;

self.smallBaleMass = 0.13093;

self.updateCounter = 1;

self.typeOnTrailer = 1;
self.ulMode = 1;
self.ulRef = {{g_i18n:getText("UNLOAD_LEFT"),false,self.unloadLeft},{g_i18n:getText("UNLOAD_BACK"),false,self.unloadBack},{g_i18n:getText("UNLOAD_RIGHT"),false,self.unloadRight},{g_i18n:getText("UNLOAD_TRAILER"),false,0}};


self.numAttacherParts = Utils.getNoNil(getXMLInt(xmlFile,"vehicle.attacherParts#count"), 0);
self.numAttachers = {};
self.attacher = {};
self.attacherLevel = {};
self.baleType = {};

for i=1,self.numAttacherParts do
self.numAttachers = Utils.getNoNil(getXMLInt(xmlFile, string.format("vehicle.Attachers".."%d".."#count",i)), 0);
self.baleType = {g_i18n:getText(Utils.getNoNil(getXMLString(xmlFile, string.format("vehicle.Attachers".."%d".."#type",i))), "nil"),i};
self.attacher = {};
self.attacherLevel = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, string.format("vehicle.Attachers".."%d".."#index",i)));
for j=1,self.numAttachers do
self.attacher[j] = {};
local partnamej = string.format("vehicle.Attachers".."%d"..".objectAttacher".."%d",i,j);
self.attacher[j].object = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, partnamej .. "#index"));
setRigidBodyType(self.attacher[j].coll,"NoRigidBody");
self.attacher[j].attachedObject = nil;
self.attacher[j].objectInRange = nil;
end;
end;

self.fillLevel = 0;
self.fillLevelMax = self.numAttachers[self.typeOnTrailer];
end;

function ubt:loadFromAttributesAndNodes(xmlFile, key, resetVehicles)
if not resetVehicles then
local tmpTypeonTrailer = getXMLInt(xmlFile, key.."#typeOnTrailer");
local tmpUlMode = getXMLInt(xmlFile, key.."#ulMode");
local tmpAutoLoad = getXMLBool(xmlFile, key.."#autoLoad");
local tmpDisplayHUD = getXMLBool(xmlFile, key.."#displayHUD");

if tmpTypeonTrailer ~= nil then
self.typeOnTrailer = tmpTypeonTrailer;
self.fillLevelMax = self.numAttachers[self.typeOnTrailer];
end;
if tmpUlMode ~= nil then
self.ulMode = tmpUlMode;
end;
if tmpAutoLoad ~= nil then
self.autoLoad = tmpAutoLoad;
end;
if tmpDisplayHUD ~= nil then
self.displayHUD = tmpDisplayHUD;
end;
end;

return BaseMission.VEHICLE_LOAD_OK;
end;

function ubt:getSaveAttributesAndNodes(nodeIdent)
local tmpAutoLoad;
local tmpDisplayHUD;
if self.autoLoad then
tmpAutoLoad = "true";
else
tmpAutoLoad = "false";
end;
if self.displayHUD then
tmpDisplayHUD = "true";
else
tmpDisplayHUD = "false";
end;

local attributes = string.format('typeOnTrailer="%d" ulMode="%d" autoLoad="%s" displayHUD="%s"',self.typeOnTrailer,self.ulMode,tmpAutoLoad,tmpDisplayHUD);
return attributes, nil;
end;


function ubt:delete()
if (not self.trailerIsEmpty) then
for i=1, self.numAttachers[self.typeOnTrailer] do
if self.attacher[self.typeOnTrailer][i].attachedObject ~= nil then
unlink(self.attacher[self.typeOnTrailer][i].attachedObject);
end;
end;
if self.fillLevel == 0 then
self.trailerIsEmpty = true;
end;
end;
end;

function ubt:mouseEvent(posX, posY, isDown, isUp, button)
end;

function ubt:keyEvent(unicode, sym, modifier, isDown)
end;

function ubt:update(dt)

if self:getIsActiveForInput() then
-- bale loading
if InputBinding.hasEvent(InputBinding.ubtATTACH) and (not self.autoLoad) then
for i=1, self.numAttachers[self.typeOnTrailer] do
if self.attacher[self.typeOnTrailer][i].attachedObject == nil then
local nearest = ObjectInRangeUbt(self,i);
if nearest ~= nil then
self.attacher[self.typeOnTrailer][i].objectInRange = nearest;
ObjectAttachUbt(self,i);
else
break;
end;
end;
end;
elseif InputBinding.hasEvent(InputBinding.ubtATTACH) and self.autoLoad then
if self.loadingIsActive then
self.loadingIsActive = false;
else
self.loadingIsActive = true;
end;
end;

-- bale unloading
if InputBinding.hasEvent(InputBinding.ubtDETACH) and not self.loadingIsActive then
for i=1, self.numAttachers[self.typeOnTrailer] do
if self.attacher[self.typeOnTrailer][i].attachedObject ~= nil then
ObjectDetachUbt(self,i);
end;
end;
if self.fillLevel == 0 then
self.trailerIsEmpty = true;
end;
end;

-- toggle unloading side (left, back, right, trailer)
if InputBinding.hasEvent(InputBinding.ubtTOGGLEUNLOAD) then
if self.ulMode == 4 then
self.ulMode = 0;
end;
self.ulMode = self.ulMode + 1;
end;

-- toggle bale type (big, round, normal, small)
if InputBinding.hasEvent(InputBinding.ubtTOGGLEBALETYPE) then
if self.trailerIsEmpty then
if self.typeOnTrailer == 4 then
self.typeOnTrailer = 0;
end;
self.typeOnTrailer = self.typeOnTrailer + 1;
self.fillLevelMax = self.numAttachers[self.typeOnTrailer];
end;
end;

-- toggle loading type (automatic, manual)
if InputBinding.hasEvent(InputBinding.ubtTOGGLELOADINGTYPE) then
if self.autoLoad and (not self.loadingIsActive) then
self.autoLoad = false;
else
self.autoLoad = true;
end;
end;

--toggle displaying HUD
if InputBinding.hasEvent(InputBinding.ubtTOGGLEHUD) then
if self.displayHUD then
self.displayHUD = false;
else
self.displayHUD = true;
end;
end;
end;

end;

function ubt:updateTick(dt)

if self.fillLevel == 0 then
self.trailerIsEmpty = true;
else
self.trailerIsEmpty = false;
end;

self.wasToFast = false;
if self:getIsActive() then

--stop autoload if trailer is full
if self.fillLevel == self.fillLevelMax then
self.loadingIsActive = false;
end;

-- autoload
local toFast = self:doCheckSpeedLimit() and self.attacherVehicle.lastSpeed*3600 > 29;
if self.autoLoad and self.loadingIsActive then
if not toFast then
local i = self.fillLevel+1;
if self.attacher[self.typeOnTrailer][i].attachedObject == nil then
local nearest = ObjectInRangeUbt(self,i);
if nearest ~= nil then
self.attacher[self.typeOnTrailer][i].objectInRange = nearest;
ObjectAttachUbt(self,i);
end;
end;
end;
self.wasToFast = toFast;
end;
end;

end;

function ubt:draw()

if self.wasToFast then
g_currentMission:addWarning(g_i18n:getText("Dont_drive_to_fast") .. "\n" .. string.format(g_i18n:getText("Cruise_control_levelN"), "2", InputBinding.getKeyNamesOfDigitalAction(InputBinding.SPEED_LEVEL2)), 0.07+0.022, 0.019+0.029);
end;

setTextAlignment(RenderText.ALIGN_RIGHT);
local tmpALText;
if self.autoLoad then
tmpALText = self.autoLoadText[2];
else
tmpALText = self.autoLoadText[1];
end;
renderText(0.73,0.03,0.02,string.format("(%d / %d), %s, %s, %s",self.fillLevel,self.fillLevelMax,self.baleType[self.typeOnTrailer][1],self.ulRef[self.ulMode][1],tmpALText));

setTextAlignment(RenderText.ALIGN_LEFT);
local xPos = 0.75;
local yPos = 0.25;
if self.displayHUD then
if self.autoLoad then
if self.loadingIsActive then
renderText(xPos,yPos+0.1,0.02,string.format("%s: "..g_i18n:getText("UBT_STOP_AUTOLOAD"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtATTACH)));
else
renderText(xPos,yPos+0.1,0.02,string.format("%s: "..g_i18n:getText("UBT_START_AUTOLOAD"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtATTACH)));
end;
else
renderText(xPos,yPos+0.1,0.02,string.format("%s: "..g_i18n:getText("UBT_LOAD"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtATTACH)));
end;
renderText(xPos,yPos+0.08,0.02,string.format("%s: "..g_i18n:getText("UBT_UNLOAD"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtDETACH)));
renderText(xPos,yPos+0.06,0.02,string.format("%s: "..g_i18n:getText("UBT_TOGGLE_BALE_TYPE"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtTOGGLEBALETYPE)));
renderText(xPos,yPos+0.04,0.02,string.format("%s: "..g_i18n:getText("UBT_TOGGLE_UNLOAD_SIDE"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtTOGGLEUNLOAD)));
renderText(xPos,yPos+0.02,0.02,string.format("%s: "..g_i18n:getText("UBT_TOGGLE_LOADING_TYPE"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtTOGGLELOADINGTYPE)));
renderText(xPos,yPos,0.02,string.format("%s: "..g_i18n:getText("UBT_HUD_HIDE"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtTOGGLEHUD)));
else
renderText(xPos,yPos,0.02,string.format("%s: "..g_i18n:getText("UBT_HUD_SHOW"),InputBinding.getKeyNamesOfDigitalAction(InputBinding.ubtTOGGLEHUD)));
end;

end;

function ObjectInRangeUbt(self,k)
local nearestObject;
local itemNode;
local index;
local nearestDistance = 15;
local objectCopy = self.attacher[self.typeOnTrailer][k].object;
local px, py, pz = getWorldTranslation(objectCopy);
for index, item in pairs(g_currentMission.itemsToSave) do
itemNode = item.item.nodeId;
if getParent(item.item.nodeId) == getRootNode() then
local vx, vy, vz = getWorldTranslation(itemNode);
local distance = Utils.vector3Length(px-vx, py-vy, pz-vz);
if distance < nearestDistance then
local tmpItemMass = getMass(itemNode);
tmpItemMass = round(tmpItemMass,5);
if self.baleType[self.typeOnTrailer][1] == g_i18n:getText("BALETYP_BIG") then
if (getUserAttribute(itemNode, "isStrawbale") or getUserAttribute(itemNode, "isHaybale")) and not (item.item.i3dFilename == "data/maps/models/objects/strawbale/haybaleBaler.i3d" or item.item.i3dFilename == "data/maps/models/objects/strawbale/strawbaleBaler.i3d") and not (tmpItemMass == self.smallBaleMass) then
index = index;
nearestObject = itemNode;
nearestDistance = distance;
end;
elseif self.baleType[self.typeOnTrailer][1] == g_i18n:getText("BALETYP_SMALL") then
if tmpItemMass == self.smallBaleMass then
index = index;
nearestObject = itemNode;
nearestDistance = distance;
end;
elseif self.baleType[self.typeOnTrailer][1] == g_i18n:getText("BALETYP_NORMAL") then
if item.item.i3dFilename == "data/maps/models/objects/strawbale/haybaleBaler.i3d" or item.item.i3dFilename == "data/maps/models/objects/strawbale/strawbaleBaler.i3d" or item.item.i3dFilename == "data/maps/models/objects/pallets/woolPallet.i3d" then
index = index;
nearestObject = itemNode;
nearestDistance = distance;
end;
elseif self.baleType[self.typeOnTrailer][1] == g_i18n:getText("BALETYP_ROUND") then
if getUserAttribute(itemNode, "isRoundbale") then
index = index;
nearestObject = itemNode;
nearestDistance = distance;
end;
end;
end;
end;
end;

return nearestObject;
end;

function round(what, precision)
local tempRes;
tempRes = math.floor((what*math.pow(10,precision))+0.5) / math.pow(10,precision);
return tempRes;
end;

function ObjectAttachUbt(self,k)

setRigidBodyType(self.attacher[self.typeOnTrailer][k].objectInRange,"NoRigidBody");
local x,y,z = getWorldRotation(self.attacher[self.typeOnTrailer][k].objectInRange);
setTranslation(self.attacher[self.typeOnTrailer][k].objectInRange, 0,0,0);
setRotation(self.attacher[self.typeOnTrailer][k].objectInRange, 0,0,0);
link(self.attacher[self.typeOnTrailer][k].object,self.attacher[self.typeOnTrailer][k].objectInRange);
self.attacher[self.typeOnTrailer][k].attachedObject = self.attacher[self.typeOnTrailer][k].objectInRange;
self.attacher[self.typeOnTrailer][k].objectInRange = nil;
self.fillLevel = self.fillLevel + 1;

end;

function ObjectDetachUbt(self,k)
if self.ulRef[self.ulMode][1] == g_i18n:getText("UNLOAD_TRAILER") then
local x,y,z = getWorldTranslation(self.attacher[self.typeOnTrailer][k].attachedObject);
local rx,ry,rz = getWorldRotation(self.attacher[self.typeOnTrailer][k].attachedObject);
local root = getRootNode();
setRigidBodyType(self.attacher[self.typeOnTrailer][k].attachedObject,"Dynamic");
setTranslation(self.attacher[self.typeOnTrailer][k].attachedObject,x,y,z);
setRotation(self.attacher[self.typeOnTrailer][k].attachedObject,rx,ry,rz);
link(root,self.attacher[self.typeOnTrailer][k].attachedObject);
self.attacher[self.typeOnTrailer][k].attachedObject = nil;
self.fillLevel = self.fillLevel - 1;
else
local x,y,z = getWorldTranslation(self.attacher[self.typeOnTrailer][k].attachedObject);
local rx,ry,rz = getWorldRotation(self.attacher[self.typeOnTrailer][k].attachedObject);
local nx,ny,nz = getWorldTranslation(self.attacherLevel[self.typeOnTrailer]);
local tx,ty,tz = getWorldTranslation(self.ulRef[self.ulMode][3]);
local x = x + (tx - nx);
local y = y + (ty - ny);
local z = z + (tz - nz);
local tH = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x, 0, z);
local relHeight = ny - tH;
local root = getRootNode();
setRigidBodyType(self.attacher[self.typeOnTrailer][k].attachedObject,"Dynamic");
setTranslation(self.attacher[self.typeOnTrailer][k].attachedObject,x,(y - relHeight),z);
setRotation(self.attacher[self.typeOnTrailer][k].attachedObject,rx,ry,rz);
link(root,self.attacher[self.typeOnTrailer][k].attachedObject);
self.attacher[self.typeOnTrailer][k].attachedObject = nil;
self.fillLevel = self.fillLevel - 1;
end;
end;

function ubt:onDetach()
self.loadingIsActive = false;
end;

function ubt:onLeave()
self.loadingIsActive = false;
end;

function ubt:readStream(streamId, connection)
end;

function ubt:writeStream(streamId, connection)
end;
Post Reply