loki79uk / FS22_UniversalAutoload

Mod for FS22. Please download latest release below.
123 stars 35 forks source link

How to make the loading area of the flatbed trailer move with specific parts at the same time? #156

Closed HatsuneKid closed 1 year ago

HatsuneKid commented 1 year ago

Just like this trailer Goldhofer STZ-VP 3 Sometimes I need to control the movement of specific parts of the flatbed trailer, and need to move its loading area from front to back instead of extending its loading area, how could I implement this function? `

    <vehicleConfiguration configFileName="FS22_Goldhofer_StzVp3/goldhoferStzVp3Back.xml">
        <loadingArea offset="0 0.5 1.70" width="2.52" height="3.20" length="6.10" baleHeight="3.76"/>
        <options enableRearLoading="true" enableSideLoading="true"/>
    </vehicleConfiguration>

`

loki79uk commented 1 year ago

Good question - I have not added that feature yet as it had not come up before. I will add it to my TODO list, but I won't have time to do anything FS related for at least the next two weeks due to IRL getting in the way again!

HatsuneKid commented 1 year ago

Good question - I have not added that feature yet as it had not come up before. I will add it to my TODO list, but I won't have time to do anything FS related for at least the next two weeks due to IRL getting in the way again!

Thanks for solving doubts. I have the patience to wait for the next brilliant update!

loki79uk commented 1 year ago

This should work now with the latest version. I have added a new property offsetRoot which should refer to the i3dMapping "id" - e.g. backPart from <i3dMapping id="backPart" node="0>0|2" /> in the vehicle xml file.

Try with the following settings:

        <vehicleConfiguration configFileName="FS22_Goldhofer_StzVp3/goldhoferStzVp3Front.xml">  
            <loadingArea offset="0.000 1.82 0.15" width="2.40" height="2.00" length="2.75"/>
        </vehicleConfiguration>

        <vehicleConfiguration configFileName="FS22_Goldhofer_StzVp3/goldhoferStzVp3Back.xml">
            <loadingArea offset="0 0.5 1.70" width="2.52" height="3.20" length="6.10" baleHeight="3.76"/>
            <options offsetRoot="backPart" enableRearLoading="true" enableSideLoading="true"/>
        </vehicleConfiguration>

It should look like this and move with the rear part:

image

loki79uk commented 1 year ago

Closing as tested working for me. Please reopen if needed.

HatsuneKid commented 1 year ago

bug report. Loading area can move with the rear part now. But once a pallet or bale appears in that loading area, game crashes. UniversalAutoload v1.3.1.6 It seems that all my mod trailers with UniversalAutoload function have the same error now. `

2023-03-07 11:04 UniversalAutoload - supported vehicle: Goldhofer STZ-VP 3 Front - ALL CONFIGURATIONS (ALL) 2023-03-07 11:04 UniversalAutoload - supported vehicle: Goldhofer STZ-VP 3 Back - ALL CONFIGURATIONS (ALL) 2023-03-07 11:04 Goldhofer STZ-VP 3 Front - RefreshActionEvents 1 2023-03-07 11:04 Goldhofer STZ-VP 3 Back - RefreshActionEvents 1 2023-03-07 11:04 Goldhofer STZ-VP 3 Front - RefreshActionEvents 2 2023-03-07 11:04 Goldhofer STZ-VP 3 Back 2023-03-07 11:04 Goldhofer STZ-VP 3 Front 2023-03-07 11:04 Goldhofer STZ-VP 3 Back - RefreshActionEvents 2 2023-03-07 11:04 data/objects/buyableBales/buyableBale.i3d (0.34 ms) 2023-03-07 11:04 data/objects/bigBagPallet/bigBagPallet.i3d (730.65 ms) 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil 2023-03-07 11:05 Error: Running LUA method 'update'. G:/Documents/Documents/My Games/FarmingSimulator2022/mods/FS22_UniversalAutoload/UniversalAutoload.lua:2724: attempt to compare number with nil`

loki79uk commented 1 year ago

bug report. Loading area can move with the rear part now. But once a pallet or bale appears in that loading area, game crashes. UniversalAutoload v1.3.1.6 It seems that all my mod trailers with UniversalAutoload function have the same error now. `

Sorry about that - it seems to be something to do with the new minimum log loading limit? However, I can't reproduce it here. Can you please try with v1.3.1.7 and report back.

image

HatsuneKid commented 1 year ago

Done, it work fine now. That error is because my mod trailers is still using its own old script UniversalAutoloadModhubAddonInstaller.lua It seems necessary to add an option to prohibit my flatbed trailer from loading logs.

loki79uk commented 1 year ago

Done, it work fine now. That error is because my mod trailers is still using its own old script UniversalAutoloadModhubAddonInstaller.lua

Glad it is working now!

It seems necessary to add an option to prohibit my flatbed trailer from loading logs.

Do you mean that you would like that option? You can use the loading filters (filltype or pallet type) if there are logs in range when you are loading.

HatsuneKid commented 1 year ago

Do you mean that you would like that option? You can use the loading filters (filltype or pallet type) if there are logs in range when you are loading.

Personally, it would be better if a flat trailer did not need to use the loading filters while loading pallets and bales. Just for convenient :)

loki79uk commented 1 year ago

There are cases though when many people would want to load logs, such as small logs into a pickup or just loading logs to sell because that is your only trailer. I think it is quite uncommon to have pallets and logs in the same place. Instead of filters you can also just avoid using autoload near a pile of logs, but if there is no choice then filters are available.

HatsuneKid commented 1 year ago

Yeah, that's true.