From 9a5f95f873bc61b7f3e66f6d44e4cf2a82e6b0ba Mon Sep 17 00:00:00 2001 From: Mmtrx <86842734+Mmtrx@users.noreply.github.com> Date: Sun, 25 Aug 2024 11:42:18 +0200 Subject: [PATCH] v1.2.8.9 - adjustable field completion factor (#240) - compatibility with FS22_Through_The_Years (#238) --- betterContracts.lua | 17 +++- icon_BetterContracts.dds | Bin 0 -> 32896 bytes l10n/l10n_br.xml | 2 + l10n/l10n_cs.xml | 2 + l10n/l10n_cz.xml | 2 + l10n/l10n_da.xml | 2 + l10n/l10n_de.xml | 2 + l10n/l10n_en.xml | 2 + l10n/l10n_fr.xml | 2 + l10n/l10n_it.xml | 2 + l10n/l10n_jp.xml | 2 + l10n/l10n_pl.xml | 2 + l10n/l10n_ru.xml | 2 + missionVehicles/1950.txt | 163 +++++++++++++++++++++++++++++++++++ missionVehicles/1960.txt | 180 +++++++++++++++++++++++++++++++++++++++ modDesc.xml | 7 +- scripts/options.lua | 21 ++++- scripts/settings.lua | 7 ++ scripts/userint.lua | 2 +- 19 files changed, 411 insertions(+), 8 deletions(-) create mode 100644 icon_BetterContracts.dds create mode 100644 missionVehicles/1950.txt create mode 100644 missionVehicles/1960.txt diff --git a/betterContracts.lua b/betterContracts.lua index c9f2afa..f6bafb7 100644 --- a/betterContracts.lua +++ b/betterContracts.lua @@ -69,6 +69,7 @@ -- new setting "hardLimit": limit jobs per farm and month (#168) -- new setting "multRewardMow" for baling contracts (#199) -- v1.2.8.8 08.07.2024 compatibility with FS22_KommunalServices (#233) +-- v1.2.8.9 12.08.2024 AbstractMission.SUCCESS_FACTOR adjustable --======================================================================================================= SC = { FERTILIZER = 1, -- prices index @@ -225,6 +226,8 @@ function registerXML(self) self.xmlSchema:register(XMLValueType.FLOAT, self.baseXmlKey.."#rewardMow") self.xmlSchema:register(XMLValueType.FLOAT, self.baseXmlKey.."#lease") self.xmlSchema:register(XMLValueType.FLOAT, self.baseXmlKey.."#deliver") + self.xmlSchema:register(XMLValueType.FLOAT, self.baseXmlKey.."#deliverBale") + self.xmlSchema:register(XMLValueType.FLOAT, self.baseXmlKey.."#fieldCompletion") local key = self.baseXmlKey..".lazyNPC" self.xmlSchema:register(XMLValueType.BOOL, key.."#harvest") @@ -265,7 +268,8 @@ function readconfig(self) self.config.multRewardMow = xmlFile:getValue(key.."#rewardMow", 1.) self.config.multLease = xmlFile:getValue(key.."#lease", 1.) self.config.toDeliver = xmlFile:getValue(key.."#deliver", 0.94) - self.config.toDeliverBale = xmlFile:getValue(key.."#deliver", 0.90) + self.config.toDeliverBale = xmlFile:getValue(key.."#deliverBale", 0.90) + self.config.fieldCompletion = xmlFile:getValue(key.."#fieldCompletion", 0.95) self.config.refreshMP = xmlFile:getValue(key.."#refreshMP", 2) self.config.lazyNPC = xmlFile:getValue(key.."#lazyNPC", false) self.config.hardMode = xmlFile:getValue(key.."#hard", false) @@ -449,7 +453,8 @@ function BetterContracts:initialize() multRewardMow = 1., -- mow reward multiplier multLease = 1., -- general lease cost multiplier toDeliver = 0.94, -- HarvestMission.SUCCESS_FACTOR - toDeliverBale = 0.90, -- BaleMission.SUCCESS_FACTOR + toDeliverBale = 0.90, -- BaleMission.FILL_SUCCESS_FACTOR + fieldCompletion = 0.95, -- AbstractMission.SUCCESS_FACTOR generationInterval = 1, -- MissionManager.MISSION_GENERATION_INTERVAL missionGenPercentage = 0.2, -- percent of missions to be generated (default: 20%) refreshMP = SC.ADMIN, -- necessary permission to refresh contract list (MP) @@ -547,7 +552,10 @@ function BetterContracts:initialize() Utility.appendedFunction(Farm,"readStream",farmRead) Utility.overwrittenFunction(FarmlandManager, "saveToXMLFile", farmlandManagerSaveToXMLFile) - -- to adjust contracts reward / vehicle lease values: + -- to adjust contracts field compl / reward / vehicle lease values: + Utility.overwrittenFunction(AbstractFieldMission,"getCompletion",getCompletion) + Utility.overwrittenFunction(HarvestMission,"getCompletion",harvestCompletion) + Utility.overwrittenFunction(BaleMission,"getCompletion",baleCompletion) Utility.overwrittenFunction(AbstractFieldMission,"getReward",getReward) Utility.overwrittenFunction(AbstractFieldMission,"calculateVehicleUseCost",calcLeaseCost) @@ -650,7 +658,7 @@ function BetterContracts:onPostLoadMap(mapNode, mapFile) addConsoleCommand("gsMissionHarvestField", "Harvest a field and print the liters", "consoleHarvestField", g_missionManager) addConsoleCommand("gsMissionTestHarvests", "Run an expansive tests for harvest missions", "consoleHarvestTests", g_missionManager) end - -- init Harvest SUCCESS_FACTORs (std is harv = .93, bale = .9) + -- init Harvest SUCCESS_FACTORs (std is harv = .93, bale = .9, abstract = .95) HarvestMission.SUCCESS_FACTOR = self.config.toDeliver BaleMission.FILL_SUCCESS_FACTOR = self.config.toDeliverBale @@ -723,6 +731,7 @@ function BetterContracts:onPostSaveSavegame(saveDir, savegameIndex) xmlFile:setFloat( key.."#lease", conf.multLease) xmlFile:setFloat( key.."#deliver", conf.toDeliver) xmlFile:setFloat( key.."#deliverBale", conf.toDeliverBale) + xmlFile:setFloat( key.."#fieldCompletion",conf.fieldCompletion) xmlFile:setInt ( key.."#refreshMP", conf.refreshMP) xmlFile:setBool ( key.."#lazyNPC", conf.lazyNPC) xmlFile:setBool ( key.."#discount", conf.discountMode) diff --git a/icon_BetterContracts.dds b/icon_BetterContracts.dds new file mode 100644 index 0000000000000000000000000000000000000000..a24352a383dc4ac577670ea9734e0711811d4f63 GIT binary patch literal 32896 zcmdsgZE#!HncgM5Yz=7Ds9kdUYJG8|l|2(yag>SLP3Q!dfV8xTdM08= zZBtpUwv_xqMAnpySIH)+;904X3#VZKU6e*^2kwTBc-3^OfSy^otqi(DIi#jPA_<;` zJL52PK@+#n^PYR~MS`T`kGkcI{py^1?z!i@&--=WbMD1M4}I;fCk?~+>+5bej28TZ z|Hbhi{`k)?e(8_8Hb3;x*Z$alo764$zq@epcktgs(eTzK+pSw%I~eQ>x^Ah|7wp?; z<4@6&qGi|a+t{~}cQvPbHrhqpw-MB}i=;)j>>dQ&@4D_DP~QL1(R(oNU)g&$lDdk% z?NPU(jQL1AUEh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+Vda8AK#_L`QL-G|HttlPQ4^UvbNUQ+M_`~k(E$VdFHwB}_)($`P`D*!2&2?ob*gwa`ew)o}>3WYJh!en{ioZ~N!+ZT1 z#aE?A#8>m1IH0-uZZv+^OW|TWZ~m7d`Thydf4}g;GbctNue^`@Km5+_QGSo1&W>yQ z0r@e~Nxnyg*FW(7k9wbid}Z8u4ex#QBksX@s349pRH(cMhq9)}884x{m?B=1`rnq~ zeI9v^qR>l|DukDE`0pch`tFe_x7J|1OsxmA2mOZ zj&vG~2eA);ahzd1DC2v-bkMtRdAiTzdo!x}e-`iUwFj1ZPiezt+W+4>FZg$By{Fv# z0P^9)G98Qc*Ja+2;1v$|Ep5Il2KJ;(8f$#7gh{$>q zuuI$kBEJL4-}xf`Gq8)Kw2#>*RK5%6pMt(@!79Nnz@1xnPOn6N?zO`?8MNOt{n65S zp2x8VaNcLn#^ip>YQ*isF7r9&uw_vm40{;wGphN`PyJlxduD?5wx#K&X;ojPihr9t zJ~mQ$pHld?bUS@rkTSiz=r~;|05{tc%p_% zT!wN3mH370bN)_nL!86-hu7;Vn&J118-Kr8;_woG7Z}TZ`MqQA^B?5zK4L>j{~oCJ zzaKV!A9sIx9-JShDf7%APs{n^{T`vz!$o`oKhbPSzM{G2e@5|L)*l{Tf|IitKZU30 zH~J-IKh<_}AJ-u@zXQ!UT-Dc8es`yDV^QLC{=Tb=-*IikxxV~G%>P&TKnp2gE-C7k zG+#b$T>fu8PtR9VCGSr5Ab!`Kzl$z + + diff --git a/l10n/l10n_cs.xml b/l10n/l10n_cs.xml index cccbf28..ca18fb5 100644 --- a/l10n/l10n_cs.xml +++ b/l10n/l10n_cs.xml @@ -119,6 +119,8 @@ + + diff --git a/l10n/l10n_cz.xml b/l10n/l10n_cz.xml index a2aa70d..eac6ff2 100644 --- a/l10n/l10n_cz.xml +++ b/l10n/l10n_cz.xml @@ -121,6 +121,8 @@ + + diff --git a/l10n/l10n_da.xml b/l10n/l10n_da.xml index f020f92..c36b2e3 100644 --- a/l10n/l10n_da.xml +++ b/l10n/l10n_da.xml @@ -118,6 +118,8 @@ + + diff --git a/l10n/l10n_de.xml b/l10n/l10n_de.xml index 5107881..e6bca44 100644 --- a/l10n/l10n_de.xml +++ b/l10n/l10n_de.xml @@ -82,6 +82,8 @@ + + diff --git a/l10n/l10n_en.xml b/l10n/l10n_en.xml index acdec31..2c5726e 100644 --- a/l10n/l10n_en.xml +++ b/l10n/l10n_en.xml @@ -82,6 +82,8 @@ + + diff --git a/l10n/l10n_fr.xml b/l10n/l10n_fr.xml index 48538b1..c7e4ca4 100644 --- a/l10n/l10n_fr.xml +++ b/l10n/l10n_fr.xml @@ -118,6 +118,8 @@ + + diff --git a/l10n/l10n_it.xml b/l10n/l10n_it.xml index dac3222..7ad5f8d 100644 --- a/l10n/l10n_it.xml +++ b/l10n/l10n_it.xml @@ -118,6 +118,8 @@ + + diff --git a/l10n/l10n_jp.xml b/l10n/l10n_jp.xml index 9444e3f..b680815 100644 --- a/l10n/l10n_jp.xml +++ b/l10n/l10n_jp.xml @@ -118,6 +118,8 @@ + + diff --git a/l10n/l10n_pl.xml b/l10n/l10n_pl.xml index e0775f9..064cbde 100644 --- a/l10n/l10n_pl.xml +++ b/l10n/l10n_pl.xml @@ -120,6 +120,8 @@ + + diff --git a/l10n/l10n_ru.xml b/l10n/l10n_ru.xml index 1fccf6f..2f428b2 100644 --- a/l10n/l10n_ru.xml +++ b/l10n/l10n_ru.xml @@ -82,6 +82,8 @@ + + diff --git a/missionVehicles/1950.txt b/missionVehicles/1950.txt new file mode 100644 index 0000000..0313383 --- /dev/null +++ b/missionVehicles/1950.txt @@ -0,0 +1,163 @@ +---------------- 1950 - 1959 ------------------------------------- + +McCormick + + + +Rotselmash + + + +JohnDeere A + + + + +Farmall + + + + +MicroTractor + + + + + + + + + + +Wooden + + + + + + + + +Lemken D24 + + + + + + + +Sam 3m + +International + +Fortschritt + + + + + +Lzard TR500 + + +Micro + + + + + +Lizard + +Gülle + +Miststreuer + + + + + + + + + + + + +Betonwalze + + + + + + + + + + + + +Lizard + + + +Cotton + + + + +Lizard heck + +Fiore + + + + + +Schwader + +Ladewagen + + + + + + + +Wickler + +Lader + + + +Roder + +Rüben + +--> \ No newline at end of file diff --git a/missionVehicles/1960.txt b/missionVehicles/1960.txt new file mode 100644 index 0000000..4aee8ed --- /dev/null +++ b/missionVehicles/1960.txt @@ -0,0 +1,180 @@ +---------------- 1960 - 1969 ------------------------------------- + +MF + + + + + + +JohnDeere + + + + + + + + +MicroTractor + + + + + + + + + + + + +THK + + + + + +Skoda + + + + + + + + + + +Lemken D24 + + + + + + + +Sam 3m + +International + +Fortschritt + + + + + +Lzard TR500 + + +Micro + + + + + +Lizard + +Gülle + +Miststreuer + + + + + + + + + + + + +Betonwalze + + + + + + + + + + + + +Lizard + + + + + + +Fahr + + Header Grain + + Header Maize + +Cotton + + + + +Lizard heck + +Fiore + + + + + +Schwader + +Ladewagen + + + + + + + +Wickler + +Lader + + + +Roder + +Rüben + +--> \ No newline at end of file diff --git a/modDesc.xml b/modDesc.xml index c017e28..61e9635 100644 --- a/modDesc.xml +++ b/modDesc.xml @@ -1,7 +1,7 @@  Mmtrx - 1.2.8.8 + 1.2.8.9 <en>Better Contracts</en> @@ -24,6 +24,9 @@ Disclaimer: All values shown in details display are ESTIMATES. You should not ta The mod keeps track of the amount of contracts you completed for each of the NPC farmers (number of completed jobs is displayed below the farmers image, if "Details" on). If you enable the optional discount mode or hard mode options (on the mods settings page), the amount of completed jobs influence gameplay. +Changelog v1.2.8.9 +- adjustable field completion factor (#240) +- compatibility with FS22_Through_The_Years (#238) Changelog v1.2.8.8 - compatibility with FS22_KommunalServices (#233) - lazy NPCs should not work before noon of first day in month (#187) @@ -308,7 +311,7 @@ Registro de alterações v1.2.2.0: ]]>
- icon.dds + icon_BetterContracts.dds diff --git a/scripts/options.lua b/scripts/options.lua index 7084a9c..b8d4a3a 100644 --- a/scripts/options.lua +++ b/scripts/options.lua @@ -94,7 +94,26 @@ function NPCHarvest(self, superf, field, allowUpdates) superf(self, field, allowUpdates) end ---------------------- reward / lease cost --------------------------------------------------------------- +--------------------- completion / reward / lease cost -------------------------------------------------- +function getCompletion(self,superf) + -- overwrites AbstractFieldMission:getCompletion() + local fieldCompletion = self:getFieldCompletion() + return fieldCompletion / BetterContracts.config.fieldCompletion +end +function harvestCompletion(self,superf) + -- overwrites HarvestMission:getCompletion() + local sellCompletion = + math.min(self.depositedLiters / self.expectedLiters / HarvestMission.SUCCESS_FACTOR, 1) + local harvestCompletion = math.min(getCompletion(self), 1) + return math.min(1, 0.8 * harvestCompletion + 0.2 * sellCompletion) +end +function baleCompletion(self,superf) + -- overwrites BaleMission:getCompletion() + local sellCompletion = + math.min(self.depositedLiters / self.expectedLiters / BaleMission.FILL_SUCCESS_FACTOR, 1) + local harvestCompletion = math.min(getCompletion(self), 1) + return math.min(1, 0.2 * harvestCompletion + 0.8 * sellCompletion) +end function getReward(self,superf) -- overwrites AbstractFieldMission:getReward() if self.type.name == "mow_bale" then diff --git a/scripts/settings.lua b/scripts/settings.lua index 411e097..59d6ba8 100644 --- a/scripts/settings.lua +++ b/scripts/settings.lua @@ -63,6 +63,13 @@ BCSettingsBySubtitle = { default = 1, title = "bc_maxActive", tooltip = "bc_maxActive_tooltip", + noTranslate = true + }, + {name = "fieldCompletion", + min = .8, max = .951, increment = .03, unit = true, + default = 6, + title = "bc_fieldCompletion", + tooltip = "bc_fieldCompletion_tooltip", noTranslate = true }, {name = "toDeliver", diff --git a/scripts/userint.lua b/scripts/userint.lua index 97d457b..b4e070f 100644 --- a/scripts/userint.lua +++ b/scripts/userint.lua @@ -111,7 +111,7 @@ function BetterContracts:getFromVehicle(cat, m) local vec, con, vtype, wwidth, speed local spr = "n/a" -- sprayer name - if m.vehiclesToLoad == nil then + if m.vehiclesToLoad == nil or #m.vehiclesToLoad == 0 then self:warning(1, m.type.name, m.field.fieldId) return false end