jimmychau Posted April 4, 2018 Posted April 4, 2018 Hi first of all great work dev guys. I am playing 0.1.2, would want to know if the "rollercoaster being considered indoor if enough portion is covered" feature has been implemented or not? According to this wikia post, it claimed that if 40% of your track is covered it shall be considered indoor and guest will ride during rain. However I have tried placing roofs and base blocks above the tracks but it did not seemed to work. Is there any caution I have to take while "covering" the track? must I use roof objects or something? must they be built 1 tile directly above track?
saxman1089 Posted April 4, 2018 Posted April 4, 2018 When they say "covered" I believe they mean underground. The wiki page says scenery counts, but I'm not sure that's correct.
imlegos Posted April 4, 2018 Posted April 4, 2018 In my experience, scenery does work. However, it has to be more then just a bunch of floating base blocks.
Broxzier Posted April 5, 2018 Posted April 5, 2018 What that wikia page says is wrong. I don't believe 40% of a track has to be covered, so I checked out the code to find out more. Rides have a value that keep track of how much of the track is covered. Directly taken from a comment in the source code: This is a very rough approximation of how much of the ride is undercover. It reaches the maximum value of 7 at about 50% undercover and doesn't increase beyond that. This value gets calculated alongside other measurements by following a vehicle. For each track element (straight piece, corner, drops, etc.) it does a few checks to see if the track element is covered: It's below the surface There's a large scenery item on top of it There's a footpath above it There's scenery above it that uses the full tile If any of those filters match, a track piece is considered covered. The distance doesn't matter, as long as it's later on the list of tile elements. It could even be lower than the track element when the order has been manipulated, and still be considered to be covering the track. When it is, the length of the track piece will be added to the total length of the track that is covered by something. When the measurements are made, guests can begin to complain about not wanting to go on a ride when it's raining. Before they complain, there's a check to see how much of the track is covered. This threshold is fairly low and only requires about 10-15% of the ride to be covered. Note that I don't have any experience with this part of the code, so my findings may not be 100% accurate.
Deurklink Posted April 6, 2018 Posted April 6, 2018 In my Space base park, where most rides are inside buildings, peeps will still complain that they won't ride most rides because it's raining. I guess it hasn't been implemented (properly) yet. 1
jimmychau Posted April 7, 2018 Author Posted April 7, 2018 (edited) Thank you for all the input guys. After digging some code, I found that it calculates the "sheltered length" of a ride at Vehicle.cpp ride->sheltered_length = add_clamp_sint32(ride->sheltered_length, distance); I think Broxzier is quite correct, so my next question is, what is "Large Scenery"? and what is full tile small scenery? must it be roof or something? Does it has to be "properly enclosed" not just floating blocks? because I think I did try that. static void vehicle_update_measurements(rct_vehicle * vehicle){ rct_tile_element * tile_element = map_get_surface_element_at({x, y}); if (tile_element->base_height * 8 <= vehicle->z) { bool cover_found = false; do { if (tile_element_get_type(tile_element) == TILE_ELEMENT_TYPE_LARGE_SCENERY) { cover_found = true; break; } if (tile_element_get_type(tile_element) == TILE_ELEMENT_TYPE_PATH) { cover_found = true; break; } if (tile_element_get_type(tile_element) != TILE_ELEMENT_TYPE_SMALL_SCENERY) continue; rct_scenery_entry * scenery = get_small_scenery_entry(tile_element->properties.scenery.type); if (scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_FULL_TILE)) { cover_found = true; break; } } while (!tile_element_is_last_for_tile(tile_element++)); if (cover_found == false) { ride->testing_flags &= ~RIDE_TESTING_SHELTERED; return; } } if (!(ride->testing_flags & RIDE_TESTING_SHELTERED)) { ride->testing_flags |= RIDE_TESTING_SHELTERED; uint8 num_sheltered_sections = ride->num_sheltered_sections & 0x1F; if (num_sheltered_sections != 0x1F) num_sheltered_sections++; ride->num_sheltered_sections &= ~0x1F; ride->num_sheltered_sections |= num_sheltered_sections; if (vehicle->vehicle_sprite_type != 0) { ride->num_sheltered_sections |= (1 << 5); } if (vehicle->bank_rotation != 0) { ride->num_sheltered_sections |= (1 << 6); } } sint32 distance = ((vehicle->velocity + vehicle->acceleration) >> 10) * 42; if (distance < 0) return; ride->sheltered_length = add_clamp_sint32(ride->sheltered_length, distance); Edited April 7, 2018 by jimmychau typo
X7123M3-256 Posted April 7, 2018 Posted April 7, 2018 21 hours ago, jimmychau said: and what is full tile small scenery? must it be roof or something? Does it has to be "properly enclosed" not just floating blocks? Small scenery objects have a number of flags that dictate which parts of the tile they occupy. An object can be full tile, quarter tile, half tile, 3/4 tile, or diagonal (which means it occupies two diagonally opposing quadrants of the tile). Any full tile object will be counted as cover - it does not have to be a roof (I don't think the game makes a distinction between roofs and other scenery), and there doesn't seem to be a requirement for any walls either. If there exists a full tile object above the ride track, that tile is considered to be covered. Large scenery objects don't have these flags and cannot occupy less than a full tile.
jimmychau Posted April 10, 2018 Author Posted April 10, 2018 So I have tried some more, with the simple king rapids, the one on the left with roofs directly above the track is considered sheltered, but the one on the right is considered not sheltered with or without the vertical walls makes no difference. There may be a limit to how close the tiles must be to the vehicle during testing, but I fail to see the logic in the code. I have also tested with the dejavu, but for this track I failed to have it considered sheltered even if all the tracks and queue path are covered with glass roof, still no one wants to go in. Strangely I remember in another saved game it worked, but now I cannot replicate it. rct_tile_element * tile_element = map_get_surface_element_at({x, y}); if (tile_element->base_height * 8 <= vehicle->z)
jensj12 Posted April 10, 2018 Posted April 10, 2018 The two lines of code you quoted determine whether the track is underground or not. Now I'm looking at it, does it check whether a scenery element is above the track? I can't find it in the code posted 3 replies above me.
Broxzier Posted April 10, 2018 Posted April 10, 2018 (edited) @jensj12 It does. In case the first check, to see if the vehicle is above the ground, passes, it loops over the tile elements above the first surface element. For large scenery and paths it sets cover_found to true, for small scenery it first checks if the SMALL_SCENERY_FLAG_FULL_TILE flag is set first. Edited April 10, 2018 by Broxzier
jensj12 Posted April 10, 2018 Posted April 10, 2018 Correct me if I'm wrong: the surface element is the ground (not the coaster), and it starts looping from there. If it finds a large piece of scenery before looping over the track element, it will select that as cover anyways, even though it's below the track.
Broxzier Posted April 10, 2018 Posted April 10, 2018 That does seem to be the case indeed. I'm still not sure how the covered flag is used exactly though.
jensj12 Posted April 10, 2018 Posted April 10, 2018 The cover_found flag? That's just a local variable, doing exactly what is says. Anyways, I think this piece of code could use some attention and deserves a GH issue. I will make one in a few days if nobody else has done it by then. Has anyone tried covering a ride by putting scenery below it?
jensj12 Posted April 11, 2018 Posted April 11, 2018 As expected, peeps will enter this 'covered' ride without knowing that they will leave soaked (they will anyways). 1
Broxzier Posted April 12, 2018 Posted April 12, 2018 On 10/04/2018 at 23:11, jensj12 said: The cover_found flag? That's just a local variable, doing exactly what is says. No, I meant the flag that gets set for measuring the track block. It's not being used anywhere outside this function, and it seems to increase a counter that the ride uses to calculate how much of the ride is covered.
j4712 Posted September 19, 2023 Posted September 19, 2023 does this value get recalculated if new objects are build? or do we need to close the ride and test it again?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now