Mod "FS22_IncreasedUnloadingTime" blocks pallet unloading

User avatar
Jason06
Posts: 261
Joined: Sun Sep 06, 2020 11:59 am
Location: Essen (D)

Mod "FS22_IncreasedUnloadingTime" blocks pallet unloading

Post by Jason06 »

- PC/Mac/PS4/XB1: Mac
- Game version number: 1.2.0.0
- Vehicle/Device/Model/Object: any
- Bug/Problem: Loaded pallets are ignored at the sale trigger for pallets, selling is no longer possible
- Single- or Multiplayer: Both
- Occurs when: Trailer loaded with pallets is driven to the sale trigger.
- Occurs also on standard maps without mods yes/no: Yes, reproducible e.g. on Elmcreek only with mod "FS22_IncreasedUnloadingTime" in game.

Apparently the overridden function for the unload process on palettes always ends with return value "false", it does not pass through the value of the original function (superfunc). A corresponding correction in the script fixes the error.
aka Glowin / Glowins Modschmiede
MacBook 16'' 2019 (2,4 GHz Intel i9), Nimbus+ Controller, Realismus-Fan und Hobby-Scripter
User avatar
Jason06
Posts: 261
Joined: Sun Sep 06, 2020 11:59 am
Location: Essen (D)

Re: Mod "FS22_IncreasedUnloadingTime" blocks pallet unloading

Post by Jason06 »

Unfortunately the modder coolfarmer can't be contacted, not even via PM in this forum, so I post the solution of the problem here:

The Lua script returns false every time a pallet/bigpack is detected when unloading pallets and bigpacks. But instead, the value returned by superfunc should be passed through, which would make the pallets usable again.

To correct this, the following (minor) changes are necessary in the IncreasedUnloadingTime.lua script:

Line 42:
Old:

Code: Select all

superFunc(self, xmlFile, key, entry)
New:

Code: Select all

local backup = superFunc(self, xmlFile, key, entry)
Line 62:
Old:

Code: Select all

return false
New:

Code: Select all

return backup
This fixes the behavior and palettes and BigPacks are unloaded as usual again.

Best regards
Martin
aka Glowin / Glowins Modschmiede
MacBook 16'' 2019 (2,4 GHz Intel i9), Nimbus+ Controller, Realismus-Fan und Hobby-Scripter
Post Reply