The International Simutrans Forum

Development => Bug Reports => Topic started by: Andarix on August 01, 2026, 07:28:08 PM

Title: r11216 - moving objects
Post by: Andarix on August 01, 2026, 07:28:08 PM
The flock of sheep apparently does not want to get its feet muddy and walks along the road.

Screenshot 2026-08-01 212444.png
Title: Re: r11216 - moving objects
Post by: Yona-TYT on August 01, 2026, 07:51:01 PM
Quote from: Andarix on August 01, 2026, 07:28:08 PMThe flock of sheep apparently does not want to get its feet muddy and walks along the road.

Screenshot 2026-08-01 212444.png
Just like the old days, so nostalgic... although I must admit it does add a touch of realism to the game ;D
Title: Re: r11216 - moving objects
Post by: Isaac Eiland-Hall on August 01, 2026, 07:57:21 PM
Someone needs to implement road rage :)
Title: Re: r11216 - moving objects
Post by: Yona-TYT on August 01, 2026, 08:09:00 PM
It would be interesting to maintain this mechanism, although of course, we should prevent the sheep from obstructing traffic for extended periods, perhaps by assigning a maximum time limit for way obstruction in dat file. 😉
Title: Re: r11216 - moving objects
Post by: victor_18993 on August 02, 2026, 12:09:02 AM
I had a look at the code, and the sheep are innocent of any recent regression.  ;D

The title points to r11216, but that revision is unrelated. This behaviour is old: sheep have been allowed onto country roads since 2011, and moving objects blocking road traffic goes back to 2008.

The funny part is that they are not actually "following" the road on purpose. They simply keep their current direction for a few steps, and on a diagonal-looking road that happens to mean walking along it.

The less funny part is that the engine then treats them almost like a road vehicle: they block cars and convoys, cannot be overtaken, are considered stuck, stop traffic completely, and do not even trigger a warning. So the sheep are not just sightseeing — they are effectively holding an unannounced rural protest.

I have not reproduced it in-game yet; this is source reading against r12116. I am also not proposing a patch yet, because the intended behaviour is a design choice: keep them off roads, let them cross but not follow them, or keep the behaviour with a maximum blocking time.

I can test any of those options if useful.
Title: Re: r11216 - moving objects
Post by: Isaac Eiland-Hall on August 02, 2026, 12:49:43 AM
Well, in some countries, definitely in rural and not high-speed highways, of course farmers will drive their sheep on the road from place to place, although I'm sure that wold be from field to field and so not far.

I've always wished Simutrans was full of rural farms and occasional houses and such. It would be awesome to have sheep being driven from field to field occasionally, but I suppose such a thing is a couple of orders of magnitutde too much. lol.

But I suppose the real question is how often something like this happens.

I do like having the slight chaos of having vehicles have to deal with occasional animals in the way. I suppose it would be nice to have a limit on how long they could do so, if it seems worth the effort and CPU to track that. :)
Title: Re: r11216 - moving objects
Post by: Andarix on August 02, 2026, 06:34:08 AM
Well, I know there have been occasional problems with sheep on the roads. And to my knowledge, attempts have been made to minimize that.

But these sheep are behaving like day trippers just wandering around on the road.

As far as I know, sheep aren't supposed to be roaming around in cities.

[edit]
The issue with the cities is that the city streets were built over by the (AI) player. That's another point. I think city streets should always remain city streets, even if they're built over by the player.
[/edit]

Savegame
Simutrans 12116
pak64 124.4
Title: Re: r11216 - moving objects
Post by: prissi on August 02, 2026, 08:32:20 PM
Sheeps do not like to go into woods, so they have to follow a road through the woods.
Title: Re: r11216 - moving objects
Post by: Andarix on August 08, 2026, 10:10:33 PM
When is a forest a forest?

These sheep are trapped between four trees and only move within the red circle.

Screenshot 2026-08-08 235123.png
Title: Re: r11216 - moving objects
Post by: Isaac Eiland-Hall on August 08, 2026, 10:13:45 PM
OR maybe it's invisible border collies
Title: Re: r11216 - moving objects
Post by: Nazalassa on August 11, 2026, 02:02:48 PM
No way; it sometimes happens with birds too. (on Archipelago server there was a small river mouth where dozens and dozens of them got stuck...also for some reason, a crossing in the middle of a city)

Once they reach 256 on a tile, who knows what problems arise?
Title: Re: r11216 - moving objects
Post by: Isaac Eiland-Hall on August 11, 2026, 03:59:32 PM
Quote from: Nazalassa on August 11, 2026, 02:02:48 PMOnce they reach 256 on a tile, who knows what problems arise?

Birdpocalypse, clearly
Title: Re: r11216 - moving objects
Post by: Yona-TYT on August 11, 2026, 05:48:12 PM
Quote from: Isaac Eiland-Hall on August 11, 2026, 03:59:32 PMBirdpocalypse, clearly
Hehehe hehehe hehehe 😅
Title: Re: r11216 - moving objects
Post by: Nazalassa on August 14, 2026, 10:02:29 AM
Incidentally, the server stopped crashing once we removed them. Maybe there needs a limit on the amount of wildlife on a given tile (like pedestrians).
Title: Re: r11216 - moving objects
Post by: prissi on August 15, 2026, 07:50:53 PM
Exceeding 250 on the next tile, they refuse to move to the next tile, so it should not crash.
Title: Re: r11216 - moving objects
Post by: Andarix on August 22, 2026, 09:35:42 PM
r12169

(https://files.simutrans-germany.com/upload/Screenshot_2026-08-22_232959.png)