Sadret / openrct2-scenery-manager

An OpenRCT2 plug-in to copy & paste scenery with many more features.
GNU General Public License v3.0
44 stars 5 forks source link

Add warning for or fix copy/pasting track elements at invalid heights #15

Open Basssiiie opened 3 years ago

Basssiiie commented 3 years ago

If you try to copy and paste track elements which were placed at invalid heights, it will only work when the cheat "Allow building tracks at invalid height" is active. Current behaviour is that those tracks are just simply not placed down when the cheat is not active.

Would it be possible to trigger a warning when trying to place a copied selection which contains tracks at invalid heights if the cheat is not active? Another option would be to briefly enable the cheat for placing down and restore the original cheat setting afterwards.

Thanks!

Sadret commented 3 years ago

That's not so easy to do because I can't distinguish between an error caused by invalid heights and an error caused by e.g. invalid ride id.

Basssiiie commented 3 years ago

Invalid heights are always track element heights at an odd number. You could check if the track element is placed at an odd height (ex. 3, 17, 33 etc.) 😄

Sadret commented 3 years ago

image No, there are some elements that start at odd heights.

Basssiiie commented 3 years ago

Ahhh alright my mistake. Then maybe the enabling/restoring the invalid height cheat is an option when pasting is the best solution? Or making a table of all elements that actually have the HALF_HEIGHT flag? (I noticed you looked into that)

Either way the root of the problem is that if you can't copy/paste invalid height track elements if you're not aware that you need to enable the 'invalid heights' cheat. :)

Sadret commented 3 years ago

In my opinion the tool should only do what can be done by hand anyway. This means that if you want to copy elements at invalid heights, you need this cheat enabled. Same goes for disabled clearance checks (ZC) or any other mode that alters the way you can place scenery or tracks.

I don't think that it is necessary to add a warning for these cases. But maybe I can add a hint in some FAQ.

Basssiiie commented 3 years ago

The thing is that most people I talked to put track elements at invalid heights with the help of the Tile Inspector, NOT via the invalid track height cheat. They also said they thought it was a bug in the Scenery Manager when it didn't copy the invalid height tracks created by the TI. Because of this it's also different from the ZC cheat, because of how commonly ZC is used as opposed to the invalid height cheat. In my opinion it's bad user experience when users see an intended feature as a bug, but it's not my plugin so I'll accept your final decision and live with it. 😛