OpenRCT2 / OpenRCT2

An open source re-implementation of RollerCoaster Tycoon 2 🎢
https://openrct2.io
GNU General Public License v3.0
13.45k stars 1.54k forks source link

Ride exit next to park boundary Exploit #17562

Open ageekhere opened 2 years ago

ageekhere commented 2 years ago

Operating System

Windows 11

OpenRCT2 build

0.4.1-27

Describe the issue

By placing a ride exit next to the park boundary you can trap guess outside of the park but they are still counted as guess inside the park. Also because the guess are not inside the park their happiness does not drop.

Area(s) with issue?

The bug also exists in RCT2 (vanilla)

Steps to reproduce

  1. Create a new ride
  2. Place exit on park boundary facing towards outside the park
  3. Open ride, now it traps guess outside the park

Attachments

bug

James103 commented 2 years ago

Exploited, with video on how to reproduce, in https://www.youtube.com/watch?v=hL8xp2sKF2M

Based on the date the video was published, this bug started existing in versions released before 7 November 2019.

Kuhnovic commented 2 years ago

I had a quick look at this, and I tried out two solutions:

  1. There's currently a check that makes these peeps return to the center of their tile. I changed it to allow peeps to only walk into the park, but not back out. Now the peeps will basically behave as if you've dropped them on an empty piece of land: they just walk around aimlessly.
  2. Prevent building ride exits facing the map edge to prevent this exploit from happening in the first place. For consistency it's probably good to apply the same restriction to ride entrances. This doesn't fix any misplaces exits in saved parks but it will prevent it from happening in the future.

Things I didn't try;

  1. Make a pathfinding routine that finds a path to the closest tile that's within the park boundaries. Seems a bit excessive for an edge case like this. It would also look strange to have peeps finding their way back into the park in an intelligent way, only to have them walk around aimlessly again (assuming they don't bump into a path tile right away).

What do you guys think would be the right solution?

ageekhere commented 2 years ago

Option 2 sound like the way to go

ocalhoun6 commented 2 years ago

A problem with solution 1 is that the exploit is still very possible ... you just have to dump the peeps into impassible terrain, such as off a cliff. Then they'll never find their way back into the park, no matter how long they wander around.

(By the way, how does this behave if you drop them into water outside the park? I assume they still drown, but does it affect the park rating, since it happened outside the park?)


Another possible solution (4) would be to have the peeps immediately walk back to the exit they just came out of. Then let them wander randomly, walking through objects (as they will if dropped from a deleted path above) until they find either a path tile or an unoccupied tile -- then they either follow the path or start the normal lost peep wandering where they avoid other objects.

This would be about the same behavior as if you had a path tile full of peeps above the exit building, then deleted that path tile and let the peeps fall down onto the exit building. So it's pretty consistent with existing behavior.

They'd all be lost, and the ones that haven't found their way to an unoccupied tile yet might be difficult to see ... but at least they'd be inside the park. And there would be no advantage to doing this for the player, so there would no longer be any exploit possible.


One more possible solution (5) could be that any peep outside the park gets instantly and magically teleported back to the park entrance, as if they'd just entered the park. (And without paying the entrance fee again, of course.)

That's a bit weird, but at least it's quite simple.

Could still be a bit exploitable though, if the player really wants to move peeps to the park entrance area.

Kuhnovic commented 2 years ago

I went for solution 2. Here's the PR https://github.com/OpenRCT2/OpenRCT2/pull/17693

harvito commented 4 months ago

just tested, the guests still get lost and detract from park value when stuck outside image