Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long Planks not loading correctly #184

Open
FrigidWalrus opened this issue Dec 23, 2024 · 10 comments
Open

Long Planks not loading correctly #184

FrigidWalrus opened this issue Dec 23, 2024 · 10 comments

Comments

@FrigidWalrus
Copy link

I've noticed an issue where long planks specifically aren't loading onto trailers correctly on some play sessions. They seem to bunch up in the front left corner of the trailer. The issue presents in either stack or layer mode, and doesn't seem to change the place where they bunch up or the orientation. The pallets normally will stack perpendicular to the long edge of the trailer, and half hang off the side.

I saw it at first on one of the modded Ponge trailers, but I've tested with both the base game Krone box trailer and PWO 24 and got the same results. Quitting to the main menu and reloading the save fixes it, but I've seen this a few times in my last couple play sessions. Once it starts happening, the only thing that seems to resolve it is reloading the save/client.

Editing the load area size doesn't fix, so it doesn't seem to be an issue with clipping anything on the trailer. I shrunk the loading box down so none of the edges of the box would be close to any part of the trailer like side walls or foldable edges, but they kept bunching up and not loading right.

It seems like longer play sessions have a higher chance of the issue happening, but I'm not certain. I didn't document it at first because I thought it might just be a 'still in dev' thing, but when it happened a second time I decided to start playing around with it to gather info on it. If it comes back again I'll grab a picture of it, but I hope this helps.

@loki79uk
Copy link
Owner

I've noticed an issue where long planks specifically aren't loading onto trailers correctly on some play sessions. They seem to bunch up in the front left corner of the trailer. The issue presents in either stack or layer mode, and doesn't seem to change the place where they bunch up or the orientation. The pallets normally will stack perpendicular to the long edge of the trailer, and half hang off the side.

I saw it at first on one of the modded Ponge trailers, but I've tested with both the base game Krone box trailer and PWO 24 and got the same results. Quitting to the main menu and reloading the save fixes it, but I've seen this a few times in my last couple play sessions. Once it starts happening, the only thing that seems to resolve it is reloading the save/client.

Editing the load area size doesn't fix, so it doesn't seem to be an issue with clipping anything on the trailer. I shrunk the loading box down so none of the edges of the box would be close to any part of the trailer like side walls or foldable edges, but they kept bunching up and not loading right.

It seems like longer play sessions have a higher chance of the issue happening, but I'm not certain. I didn't document it at first because I thought it might just be a 'still in dev' thing, but when it happened a second time I decided to start playing around with it to gather info on it. If it comes back again I'll grab a picture of it, but I hope this helps.

It sounds like they are not being measured correctly at the start of the game? All the new pallet types are found and cached once. Maybe I need to do some validation, but I don't know why it would not work sometimes. Might not be that, but can you check your log for the size when it is working vs when it is not. Should be like:

2024-12-23 18:31 *** UNIVERSAL AUTOLOAD - FOUND NEW OBJECT TYPE: data/objects/pallets/boardsStackPallet/boardsStackPallet.i3d ***
2024-12-23 18:31 Pallet
2024-12-23 18:31   width: 1.2999999523162842
2024-12-23 18:31   height: 0.699999988079071
2024-12-23 18:31   length: 0.8999999761581421
2024-12-23 18:31   size X: 1.217864990234375
2024-12-23 18:31   size Y: 0.6576805114746094
2024-12-23 18:31   size Z: 0.8151397705078125
2024-12-23 18:31   offset X: -0.0001220703125
2024-12-23 18:31   offset Y: 0.3251972198486328
2024-12-23 18:31   offset Z: -0.0001220703125
2024-12-23 18:31   >> data/objects/pallets/boardsStackPallet/boardsStackPallet.i3d [1.218, 0.658, 0.815] - EURO_PALLET

@FrigidWalrus
Copy link
Author

Yeah, I'll check the log the next time it happens. I'm kinda upset I restarted to make sure that fixes it , otherwise I'd be able to grab it for you.

You may be on the right track, though. I seem to remember it happening at the end of one session and at the start or another, while restarting it this time fixed it. Not 100% on that, as I wasn't documenting it at that point. So if its happening when the pallet sizes are cached, it could be intermittently getting the wrong measurement. I'm gonna restart the save a few times and see if it happens again.

@loki79uk
Copy link
Owner

Assuming it is something like this, then I could just store all the known base game sizes in an XML, but if we can reliably measure them then it is better. Maybe I could take the average of 5 measurements, and wait for a small std deviation. I also just realised that some pallets change size as they empty (e.g. bags of seeds), so I probably need to check if they are full or not too.

@FrigidWalrus
Copy link
Author

Hmm. 5 restarts later and the problem isn't coming back. If you don't mind keeping this open for a day or two, I'll keep playing as usual and see if it comes back so I can see what does it.

@loki79uk
Copy link
Owner

No problem, keep open as long as needed. I'll assume it is a problem anyway and think of some solutions for validation.

@kgf1980
Copy link

kgf1980 commented Dec 24, 2024

I've got a similar issue (but with planks rather than long planks) in my currently running game.

For the planks, the "area" it's detecting is much smaller than the actual pallet (screenshot attached)

Below is the only bit in my log for boards and UAL I can see (UAL is working absolutely fine for long planks and wooden beams)

2024-12-24 08:46 *** UNIVERSAL AUTOLOAD - FOUND NEW OBJECT TYPE: data/objects/pallets/boardsStackPallet/boardsStackPallet.i3d ***
2024-12-24 08:46 Pallet
2024-12-24 08:46   width: 1.2999999523162842
2024-12-24 08:46   height: 0.699999988079071
2024-12-24 08:46   length: 0.8999999761581421
2024-12-24 08:46   size X: 0.5635528564453125
2024-12-24 08:46   size Y: 0.5795745849609375
2024-12-24 08:46   size Z: 0.83074951171875
2024-12-24 08:46   offset X: -0.28174591064453125
2024-12-24 08:46   offset Y: 0.3630332946777344
2024-12-24 08:46   offset Z: -0.415435791015625
2024-12-24 08:46   >> data/objects/pallets/boardsStackPallet/boardsStackPallet.i3d [0.564, 0.580, 0.831] - EURO_PALLET

2300320_20241224154816_1

@loki79uk
Copy link
Owner

I've got a similar issue (but with planks rather than long planks) in my currently running game.

For the planks, the "area" it's detecting is much smaller than the actual pallet (screenshot attached)

This makes it really clear what is happening, but I don't know why. Is there any chance that one of those pallets could be moving somehow at the start of a savegame? I will definitly try some kind of multiple measurement/average approach.

In the output the first values are sizes defined in the xml:

width: 1.2999999523162842
height: 0.699999988079071
length: 0.8999999761581421

and the second are measured:

size X: 0.5635528564453125
size Y: 0.5795745849609375
size Z: 0.83074951171875

Most of the time the measured values give better results, since the xml values are usually quite generous and rounded up. which causes stacking issues, especially with the height. But clearly sometimes the measurement is going wrong, so I need a more robust validation.

@kgf1980
Copy link

kgf1980 commented Dec 31, 2024

This makes it really clear what is happening, but I don't know why. Is there any chance that one of those pallets could be moving somehow at the start of a savegame? I will definitly try some kind of multiple measurement/average approach.

I've not had the issue with loading since, about the only thing I can think of is that there was (quite likely) a part used short planks pallet sitting in a production loading point when the game was loaded - I'll see if I can reproduce that again at some point

@FrigidWalrus
Copy link
Author

One thing that may be happening is the orientation or velocity of the pallet. I saw the issue when I had a jumble of long planks, at all different angles and rotations, and I believe one or more of them moved while I was loading. I have no idea if this helps, but it may be something about the orientation or velocity of the object skewing the measurements when it tries to load it.

@loki79uk
Copy link
Owner

One thing that may be happening is the orientation or velocity of the pallet. I saw the issue when I had a jumble of long planks, at all different angles and rotations, and I believe one or more of them moved while I was loading. I have no idea if this helps, but it may be something about the orientation or velocity of the object skewing the measurements when it tries to load it.

I definitley need to add some conditions that before measuring the pallets are 100% full and not moving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants