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

Tourists cannot despawn at two lane road outside connection #273

Open
chronofanz opened this issue Apr 6, 2019 · 7 comments
Open

Tourists cannot despawn at two lane road outside connection #273

chronofanz opened this issue Apr 6, 2019 · 7 comments
Labels
BUG Defect detected confirmed Represents confirmed issue or bug low priority Issue with low priority of work

Comments

@chronofanz
Copy link

chronofanz commented Apr 6, 2019

Temporary Workaround

Install the latest Crazy Tourist Fix mod (thanks chronofanz!) which should resolve the issue


[Unfortunately, I no longer have a viable savegame to aid in repro, but I'll describe the issue plus a possible fix to the base game anyways. Not sure if this is an issue affecting TMPE.]

For custom maps with outside connections that are two-lane roads, tourists who go out through these connections cannot despawn, and they continue (forever) to travel along crazy U-turn routes back to the same connection. I suspect this will eventually cause a decrease in available tourists because the game will exhaust the limit for spawned people, but I'm not sure. The cause of this condition is the fact that, when people arrive at their destination, their position is adjusted by the exit location of their vehicle ...

To repro: Create any custom map with a two lane road or two lane highway as an outside connection. Run the game a while, and you will see tourists who go out of the outside connection being unable to despawn and continuing to do these crazy U-turn routes.

Rough outline of suggested fix attached. Essentially, an override of TouristAI.SetCurrentVehicle and also possibly ResidentAI.SetCurrentVehicle that prevents the citizen from adjusting their target position by leaving a vehicle if they are at an outside connection.

touristaimod.txt

@originalfoo
Copy link
Member

From paradox forum:

Another person has hit this same bug, steam thread here:

https://steamcommunity.com/app/255710/discussions/0/1812044473319307940/

Suggested fix is to override TouristAI.SetCurrentVehicle (and possibly ResidentAI.SetCurrentVehicle) to prevent the citizen from adjusting their target position by leaving a vehicle if they are at an outside connection. (Couple line fix, I believe.)

@originalfoo
Copy link
Member

@FireController1847 FireController1847 added BUG Defect detected done EXTERNAL Mod conflict or other external factor labels Apr 11, 2019
@FireController1847
Copy link
Collaborator

FireController1847 commented Apr 11, 2019

@aubergine10 Unsure if we want to re-open this at some point and implement a fix into TM:PE or if we're going to rely on this third-party mod?

EDIT: My apologies, I seem to have misunderstood this issue. We should implement a fix for this as it's definitily in the scope of TM:PE.

@FireController1847 FireController1847 added confirmed Represents confirmed issue or bug low priority Issue with low priority of work and removed EXTERNAL Mod conflict or other external factor done labels Apr 11, 2019
@chronofanz
Copy link
Author

Please, do not rely on this mod! It's only a proof of concept to confirm that it fixes the issue. I will remove the mod when you fix the issue, thanks.

@chronofanz
Copy link
Author

Note, however, that there is a separate but related issue with vehicles spawning at two-lane, two-way roads at outside connections. I've also observed that if the rate of spawning is less than the rate of vehicles trying to spawn, you get a huge queue of vehicles waiting to get spawned. As such, if you implement this fix, it will take a long long time before the crazy U-turn route actually disappears. In my own game, I "fixed" this by temporarily removing the bounding rectangle around each vehicle ... leading to a "tsunami" of vehicles emanating from the outside connection. (I can't remember, but it's the same code path that prevents vehicles from going through an intersection when the next road segment is already occupied.)

@originalfoo
Copy link
Member

Latest version of tourist fix mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1759269367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected confirmed Represents confirmed issue or bug low priority Issue with low priority of work
Projects
None yet
Development

No branches or pull requests

3 participants