{"action":"created","issue":{"url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/2031","labels_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/2031/labels{/name}","comments_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/2031/comments","events_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/2031/events","html_url":"https://github.com/OpenRCT2/OpenRCT2/issues/2031","id":109715176,"number":2031,"title":"Low heartline twister coaster excitement ratings","user":{"login":"e-foley","id":6338134,"avatar_url":"https://avatars.githubusercontent.com/u/6338134?v=3","gravatar_id":"","url":"https://api.github.com/users/e-foley","html_url":"https://github.com/e-foley","followers_url":"https://api.github.com/users/e-foley/followers","following_url":"https://api.github.com/users/e-foley/following{/other_user}","gists_url":"https://api.github.com/users/e-foley/gists{/gist_id}","starred_url":"https://api.github.com/users/e-foley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-foley/subscriptions","organizations_url":"https://api.github.com/users/e-foley/orgs","repos_url":"https://api.github.com/users/e-foley/repos","events_url":"https://api.github.com/users/e-foley/events{/privacy}","received_events_url":"https://api.github.com/users/e-foley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/labels/0.1%20backlog","name":"0.1 backlog","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-05T00:29:28Z","updated_at":"2015-10-05T12:32:11Z","closed_at":null,"body":"I suspect this is a bug in the original game.  It's extremely difficult to create a heartline twister coaster with reasonable excitement ratings.  This is due to a number of reasons.  Some of them clearly aren't bugs:\r\n\r\n1. The excitement base rating of 1.40 is the lowest of all coasters.\r\n2. With only one car per train, the coasters can't get a train length bonus.\r\n3. With no turns, the coasters can't get any lateral-g benefits.\r\n\r\nBut the single biggest heartline twister killer is suspiciously buglike:  assuming that `RIDE_ENTRY_FLAG_11` is set for the heartline twister, then `ride_ratings_apply_adjustments()` in ride_ratings.c (see [here](https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/ride/ride_ratings.c#L776)) not only removes the airtime bonus, but goes so far as to apply an airtime *penalty*.  The questionable code is below:\r\n\r\n```\r\nif (rideEntry->flags & RIDE_ENTRY_FLAG_11) {\r\n    if (totalAirTime >= 96) {\r\n        totalAirTime -= 96;\r\n        ratings->excitement -= totalAirTime / 8;\r\n        ratings->nausea += totalAirTime / 16;\r\n    }\r\n} else {\r\n    ratings->excitement += totalAirTime / 8;\r\n    ratings->nausea += totalAirTime / 16;\r\n}\r\n```\r\n\r\nThe reason this is suspicious is that it's the only place in the entire ride_ratings.c file where a quantity is expressly subtracted from the excitement rating.  This makes it possible for the heartline twister coaster to end up with a negative excitement rating, as [this reddit topic](https://www.reddit.com/r/rct/comments/3n9jyv/2_this_heartline_is_so_bad_it_has_negative/) shows.\r\n\r\nHaving a penalty sort of makes sense because it discourages players from making very slow heartline twists and reaping the benefits.  That said, I suspect the penalty was meant to stack with the bonus, not replace it entirely.  This would make the code more like the following.\r\n\r\n```\r\nratings->nausea += totalAirTime / 16;\r\nif (rideEntry->flags & RIDE_ENTRY_FLAG_11) {\r\n    totalAirTime = min(totalAirTime, 96);\r\n}\r\nratings->excitement += totalAirTime / 8;\r\n```\r\n\r\nThat way, the airtime bonus still exists, but it caps after a certain amount of time.  (It may not be the most efficient way to write it, but it gets the point across.)\r\n\r\nThis is one of those cases where the correct behavior is a little ambiguous, but this change makes a lot of intuitive sense.  Note that other rides with a lot of airtime also have low excitement base scores, like the reverse freefall coaster at 2.00, but these rides apparently aren't subject to the some airtime penalty.\r\n\r\nWhat do you all think?\r\n\r\nThanks for reading."},"comment":{"url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/comments/145513324","html_url":"https://github.com/OpenRCT2/OpenRCT2/issues/2031#issuecomment-145513324","issue_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/2031","id":145513324,"user":{"login":"HaasJona","id":4310707,"avatar_url":"https://avatars.githubusercontent.com/u/4310707?v=3","gravatar_id":"","url":"https://api.github.com/users/HaasJona","html_url":"https://github.com/HaasJona","followers_url":"https://api.github.com/users/HaasJona/followers","following_url":"https://api.github.com/users/HaasJona/following{/other_user}","gists_url":"https://api.github.com/users/HaasJona/gists{/gist_id}","starred_url":"https://api.github.com/users/HaasJona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaasJona/subscriptions","organizations_url":"https://api.github.com/users/HaasJona/orgs","repos_url":"https://api.github.com/users/HaasJona/repos","events_url":"https://api.github.com/users/HaasJona/events{/privacy}","received_events_url":"https://api.github.com/users/HaasJona/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T12:32:11Z","updated_at":"2015-10-05T12:32:11Z","body":"This is a screenshot from the original rct2. Not sure if openrct2 still underflows. But it shouldn't get negative either."}}