John Deere CP690 cotton harvester (and round baler of sorts) needs to be added to exclusion list for this extension, for same reason as fastBale.
Or, maybe, change exclusion to all balers with self.spec_baler.nonStopBaling == true.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!
John Deere CP690 cotton harvester (and round baler of sorts) needs to be added to exclusion list for this extension, for same reason as fastBale.
Or, maybe, change exclusion to all balers with self.spec_baler.nonStopBaling == true.
One small miss-behavior detected: for John Deere CP690 cotton harvester, flashlights are turned on on 90% of buffer storage, not main chamber, and this is useless.
Also, another your mod, "Roundbaler extension", require fixing for this harvester-baler.
Looks like I've found a good (but maybe resource-consuming) way to calculate "right moment to stop" for harvesters with loadingDelay>0.
On every update, amount of harvested crops is saved in element of spec_combine.loadingDelaySlots[i], which function like some kind of ring buffer: new element added to buffer storage, oldest valid element - delivered to tank.
So, total amount of undelivered crops = sum of spec_combine.loadingDelaySlots[i].fillLevelDelta for all valid slots.
Slot is valid if spec_combine.loadingDelaySlots[i].valid == true.
And if this sum is lager than free space in tank - it's time to stop harvesting.
This buffer have total of loadingDelay / 1000 * 60 + 1 elements (file Combine.lua from game sources, line 713).
My variant of simple (without configuration) implementation of this 2 features (unified diff for edits in StopFullCombine.lua):
@@ -78,83 +80,86 @@
local specDrivable = self.spec_drivable;
local isMotorStarted = self.getIsMotorStarted ~= nil and self:getIsMotorStarted();
local controlledTractor = nil;
+ local fillCoefficient = 1.0;
if self.getAttacherVehicle ~= nil then
controlledTractor = self:getAttacherVehicle();
@@ -88,93 +91,100 @@
isMotorStarted = controlledTractor.getIsMotorStarted ~= nil and controlledTractor:getIsMotorStarted();
end;
+ if specCombine.loadingDelay > 0 then
+ fillCoefficient = 0.96;
+ end;
+
if specDrivable ~= nil and specCombine ~= nil and isMotorStarted then
if specLights ~= nil and #specLights.beaconLights > 0 then
if self:getFillUnitFillLevelPercentage(specCombine.fillUnitIndex) >= 0.9 then
@@ -98,104 +105,111 @@
end;
if not specCombine.isBufferCombine then
- if self:getFillUnitFreeCapacity(specCombine.fillUnitIndex) == 0 then
+ if self:getFillUnitFillLevelPercentage(specCombine.fillUnitIndex) >= fillCoefficient then
if specCombine.stopTimer < specCombine.stopTimerMax then
self:lockCombine(self.spec_wheels, self.spec_pipe, specCombine, controlledTractor);
@@ -163,169 +170,176 @@
controlledTractor:setCruiseControlState(Drivable.CRUISECONTROL_STATE_OFF);
end;
- if specPipe ~= nil and specPipe.hasMovablePipe then
+ if specPipe ~= nil and specPipe.hasMovablePipe and (specPipe.aiFoldedPipeUsesTrailerSpace == nil or not specPipe.aiFoldedPipeUsesTrailerSpace ) then
if specPipe.targetState == 1 then
--## unfold pipe, when full
Alles anzeigen
Hello Ifko[nator]!
May i ask you to add some improvements to yours "Stop full combine" mod (for better experience with root crops harvesters)?
1. For vehicles with combine.buffer#loadingDelay>0 you need to stop earlier than fillunit 100% full. If it's hard to determine exact stop moment due to possible variable flow of crops - just hardcode some stop level like 95-96% full, or add option for user to configure this limit for such vehicles (ideally - saved on per-vehicle basis). Example vehicle - Grimme Ventor 4150.
2. For vehicles with pipe#aiFoldedPipeUsesTrailerSpace="true" - do not (un)fold pipe automatically, doing so currently causes collision of "pipe" with trailer to which you unload crops. Example vehicle - Grimme Rootster 604.
PS Maybe you'll find better marker than me for such problematic vehicles...