74oshua / RoombaMines

A mod for Lethal Company that makes mines move like Roombas. Must be installed on client and server!
1 stars 1 forks source link

Some roombas on specific floor tiles, never path. #5

Open Roobotics opened 8 months ago

Roobotics commented 8 months ago

I think this has been around for a while, but I never figured out a common denominator until now, because I'd never see more than one or two doing this.

Some interior roombas are spinning indefinitely, possibly only on certain floor types! Passing thoughts are: 'I had too many roombas turned on, breaking some limit' or 'These tiles are sitting at a slightly higher z-plane in some weird way' Maybe the initial placement to floor, is putting them too low to path on these tiles. But just guessing. The moon was Vow.

Note the roomba in the back on the catwalk, moving as expected, while the others spin. 20240212002610_1 20240212002616_1 20240212002622_1

All 4 spinning on same tile types. 20240212003852_1 20240212003855_1

Let me know if you have any issues recreating this, and I can test further if needed.

74oshua commented 8 months ago

My first impression is that the mines are embedded in the floor somehow, possibly because the code I wrote to place floating mines on the floor is putting them too low. I'll take a look.

Roobotics commented 8 months ago

That very well might be it, if the Roomba 'set down' check, is ticking off on a per-room basis, it might also explain why they are often found stuck as groups in same-tile type areas. Maybe the 'set down' is stepping them down an additional time before actually checking where they are somehow, or if a tile is part of a multi-tile assembly, it's happening multiple times and stepping before checking? (Visually it's probably impossible for me to tell, as it would be but pixels between success and failure, I'm ignorant of the actual check and spawn mechanics here otherwise. But I have encountered a stuck Roomba in the main entry now as well as on the catwalks, but both were near a wall and could have been clipped, so inherently trapped by that rather instead.

I wonder if a possible fix for this, is on a final check, lift all roombas up that are detected as not in contact, and redo the 'set down' on those that failed it? I would say lift them the distance the 'set down' can accommodate for, and if they still aren't settled, either keep, despawn, or possibly respawn them, but I can already guess if a respawn failed repeatedly, maybe due to how a seed is. That might be a hang condition if it never resolves fully.

I'm actually unsure if or how this idea will influence ones that end up on the tiny copper pipes or not, I've never seen them drive side to side along them.. But they are likely wall-clipped while on valid terrain, if I had to guess.

On Sat, Feb 17, 2024, 8:54 PM 74oshua @.***> wrote:

My first impression is that the mines are embedded in the floor somehow, possibly because the code I wrote to place floating mines on the floor is putting them too low. I'll take a look.

— Reply to this email directly, view it on GitHub https://github.com/74oshua/RoombaMines/issues/5#issuecomment-1950847593, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPWCEHEAPJOS2PQ4TTY7R3YUFUPFAVCNFSM6AAAAABDEL25NKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQHA2DONJZGM . You are receiving this because you authored the thread.Message ID: @.***>

74oshua commented 6 months ago

Sorry about the wait, I've been busy IRL. The issue seems to be that the CheckBox used to check whether something is in front of the Roomba was too high, causing it to register the floor as an obstacle. That's been fixed in 1.1.5. I also added a check to prevent Roombas from spawning clipped in walls, let me know if these changes fixed the issue for you.