Openrct2: LIM Launched Roller Coaster refurbishment is free

Created on 24 Feb 2020  路  3Comments  路  Source: OpenRCT2/OpenRCT2

Windows 10, 64 Bit
v0.2.4
e36d8f0

I built a custom LIM Launched Roller Coaster in the Gravity Gardens campaign mission of the game. The refurbishment of the roller coaster is free. This is the only roller coaster in my game where refurbishment is free.

image

  • [?] Reproducible in RCT2 (vanilla)?
  • [No] Specific to multiplayer?

Save game:
Gravity Gardens.zip

bug

Most helpful comment

This error is happening when TrackRemoveAction tries to remove a piece of track with type TRACK_ELEM_90_DEG_DOWN, in order to calculate the refurbishment cost I'm presuming.

We actually get a message in terminal with a warning when clicking the refurbishment button:

WARNING[OpenRCT2\src\openrct2\actions\TrackRemoveAction.hpp:116
(TrackRemoveAction::Query)]: Track Element not found. x = 544, y = 992, z = 512, d = 2, seq = 1.

This happens because we can't find one of the TRACK_ELEM_90_DEG_DOWN coaster tracks in the map.

Oddly enough, that track is present on the map, under the same position and type, but the tileElement->AsTrack()->Sequence we are looking for is mismatched: we are looking for Sequence == 1, but the map has the track with Sequence == 0.

I was trying to find where in the map we create such track, and it seems to me like we create it with Sequence == 1, so I'm trying to figure out where, if anywhere, the Sequence is flipped to 0.

This happens on a brand new LIM coaster too, as long as it has a TRACK_ELEM_90_DEG_DOWN element.

All 3 comments

This error is happening when TrackRemoveAction tries to remove a piece of track with type TRACK_ELEM_90_DEG_DOWN, in order to calculate the refurbishment cost I'm presuming.

We actually get a message in terminal with a warning when clicking the refurbishment button:

WARNING[OpenRCT2\src\openrct2\actions\TrackRemoveAction.hpp:116
(TrackRemoveAction::Query)]: Track Element not found. x = 544, y = 992, z = 512, d = 2, seq = 1.

This happens because we can't find one of the TRACK_ELEM_90_DEG_DOWN coaster tracks in the map.

Oddly enough, that track is present on the map, under the same position and type, but the tileElement->AsTrack()->Sequence we are looking for is mismatched: we are looking for Sequence == 1, but the map has the track with Sequence == 0.

I was trying to find where in the map we create such track, and it seems to me like we create it with Sequence == 1, so I'm trying to figure out where, if anywhere, the Sequence is flipped to 0.

This happens on a brand new LIM coaster too, as long as it has a TRACK_ELEM_90_DEG_DOWN element.

This unfortunately still happens with the Compact Inverted Coaster too (as reported in #11655). It doesn't just happen with refurbishment, it even happens when you try to demolish the ride, although the difference here is that you still gain money from deleting the ride.

EDIT: It happens with every coaster type that can use vertical slopes if the last piece coming out from behind the station is a vertical drop piece.

The demolish and refurbish windows use the same code to calculate the price, which of course results in the exact same error. When actually demolishing the ride, each track piece is removed individually with a more robust algorithm, which always results in the correct refund price. This algorithm is however not (yet) suitable for calculating the refund price without removing the track pieces.
As the price calculation code is based on the save code, does the coaster save properly?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrtnptrs picture mrtnptrs  路  3Comments

Nubbie picture Nubbie  路  3Comments

Superjustinbros picture Superjustinbros  路  3Comments

Ryder17z picture Ryder17z  路  3Comments

Wirlie picture Wirlie  路  3Comments