loki79uk / FS22_UniversalAutoload

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

Cant Unload bales into sale trigger #86

Closed Gariot closed 2 years ago

Gariot commented 2 years ago

Hey!

I am playing on the No mans Land map and using the FS22_Bailey_Bale_Pallet_Trailer together with the Universal Autoload Modhub Addon and so far its working as intended. I loaded some bales and wanted to unload them right into the trigger. But for some reason i cant unload them there. I attached two pictures. I can unload on the right side, but not on the left side. Is there anything i can do to fix this? I am using the latest Modhub version.

20220821022107_1

20220821022112_1

loki79uk commented 2 years ago

Hi, this looks like there are the wrong collision flags set on the sell point trigger. If you press F5 to toggle through the game visual debug options, I think that there will be an invisible object over the sell point.

Gariot commented 2 years ago

You might be right. Now i have to find out how to fix this on my own :D

20220821141710_1

loki79uk commented 2 years ago

If you can open the map in GE and find the sell point, then look at which collisions are set, you should untick any of: CollisionFlag.STATIC_WORLD = 1 CollisionFlag.DYNAMIC_OBJECT = 12 CollisionFlag.VEHICLE = 13 CollisionFlag.PLAYER = 14

Gariot commented 2 years ago

Thanks for the tip.

Looks like i cant fix it sadly. I turned off the collisions where it made sense but it didnt help (or i did it wrong, who knows). Not the end of the world. But i have to say i dont really understand why theres even a collision check when unloading. I mean if i am too stupid to realize theres no place then its my fault when i unload it xD

loki79uk commented 2 years ago

I'll try to test it out next time I'm at my pc. It has to detect the ground and buildings etc during unloading, otherwise pallets will spawn underground, inside buildings, or can trap players, etc.

Gariot commented 2 years ago

Hm, you could just let them spawn relativ to the trailer positions height plus a little extra in the air. This saves checks and is pretty much safe i believe. If they spawn in a player or a buildings... well, thats user error :D But i am sure i can "reload" everything, even when its in a building and not too far away.

loki79uk commented 2 years ago

It isn't really that simple, since the "ground" level can include pavements or hard standings that are part of buildings, or perhaps you want to unload onto another trailer or vehicle, etc. The collision check will also prevent pallets from occupying the same position when unloading twice (e.g. unloading one fill type or pallet type followed by another).

If you want to try, you can edit the code yourself to unload anywhere - just edit the function testUnloadLocationIsEmpty on line 3046 to always return true. You could also report the issue to the map creator, they just need to set the correct collision flags. Usually it is a copy and paste error where they have used e.g. 13 = VEHICLE instead of 21 = TRIGGER_VEHICLE, or 14 = PLAYER instead of 20 = TRIGGER_PLAYER.

loki79uk commented 2 years ago

I found it - it is the bale trigger in the sellingStationFarmShop where the collision mask has bit 12 set: image

Gariot commented 2 years ago

Thank you very much. I must have overlooked that one, im sorry. It is working now.

I am closing this now, Sorry for the inconvenience.