Openrct2: Checking 'Same price in whole park' for On-Ride photos will sometimes reset the price to 拢2 when building a new roller coaster

Created on 19 Mar 2015  路  7Comments  路  Source: OpenRCT2/OpenRCT2

This bug was also in RCT1 and vanilla RCT2, so I'm not sure it's solvable yet.

investigate original bug

All 7 comments

This is a bug I've been experiencing recently, quite frustrating.

I can still reproduce this issue (more explanation as I didn't understand this issue.):

  1. Change the rides on-ride photos price to something else then 2 dollar.
  2. Check the 'Same price in whole park' for On-Ride photos for this ride.
  3. Build a new rollercoaster with a on-ride photo option and look at the price:

'Same price in whole park' is checked for this new ride, but the price for an on-ride photo is 2 dollar again. And the original ride still has a different price then 2 dollars for the on-ride photo and also still the 'Same price in whole park' checked.

@mrtnptrs does it differ between building from scratch and saved track designs?

@Patrik356b Doesn't make a difference!

Likely because of the 4 different on-ride photos. The following additional groups exist:

SHOP_ITEM_PHOTO2

Suspended Swinging Coaster, Inverted Roller Coaster, Mini Suspended Coaster, Multi Dimension Roller Coaster, Flying Roller Coaster, Lay Down Roller Coaster, Compact Inverted Coaster, Inverted Hairpin Coaster, Inverted Impulse Coaster

SHOP_ITEM_PHOTO3

Wooden Wild Mouse, Wooden Roller Coaster, Side Friction Roller Coaster, Virginia Reel, Reverser Roller Coaster

SHOP_ITEM_PHOTO4

Dinghy Slide, Log Flume, River Rapids, Splash Boats, Water Coaster, River Rafts

Can confirm the bug as described. Was about to open a new issue about this when I found the thread.
Is there any chance of a solution now that OpenRCT is fully implemented and doesn't use any of the vanilla code?

I think I know the cause. The mechanism consists of both a check whether the 'same price' box is ticked, which contains code to accommodate the four different photos, and code to look up that code - which... doesn't:

        if (rideEntry->shop_item != SHOP_ITEM_NONE) {
            if (shop_item_has_common_price(rideEntry->shop_item)) {
                money32 price = shop_item_get_common_price(ride, rideEntry->shop_item);
                if (price != MONEY32_UNDEFINED) {
                    ride->price = (money16)price;
                }
            }
        }

This does a call to shop_item_get_common_price() with the shop item in question. It will set the default price if it can't find one.

shop_item_get_common_price() looks like this:

static money32 shop_item_get_common_price(rct_ride *forRide, int shopItem)
{
    rct_ride_entry *rideEntry;
    rct_ride *ride;
    int i;

    FOR_ALL_RIDES(i, ride) {
        if (ride != forRide) {
            rideEntry = get_ride_entry(ride->subtype);
            if (rideEntry == NULL) {
                continue;
            }
            if (rideEntry->shop_item == shopItem) {
                return ride->price;
            }
            if (rideEntry->shop_item_secondary == shopItem) {
                return ride->price_secondary;
            }
        }
    }

    return MONEY32_UNDEFINED;
}

And here is the bug: if you have a wooden roller coaster and a side friction rc and turned on 'same price', and you then proceed with building a dinghy slide, it will check if the 'same price' mechanism is on (which will return 'yes' due to code accommodating this scenario), but fail to find a price, since both wooden coasters use SHOP_ITEM_PHOTO3 and the dinghy slide uses SHOP_ITEM_PHOTO4.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ionaru picture Ionaru  路  3Comments

mrtnptrs picture mrtnptrs  路  3Comments

nuclearslurpee picture nuclearslurpee  路  3Comments

Ryder17z picture Ryder17z  路  3Comments

J0anJosep picture J0anJosep  路  3Comments