-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Introduce climate objects #23774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce climate objects #23774
Conversation
812b485
to
909cefa
Compare
2c19d13
to
8ea7d88
Compare
Okay, I think I've figured out how to make my translated distributions match the originals. Consider the following example of a 'vanilla' climate: static constexpr WeatherPattern kClimatePatternsCoolAndWet[] = {
{ 8, 18, { S, P, P, P, P, P, C, C, C, C, C, C, C, R, R, R, H, H, S, S, S, S, S } },
{ 10, 21, { P, P, P, P, P, C, C, C, C, C, C, C, C, C, R, R, R, H, H, H, T, S, S } },
{ 14, 17, { S, S, S, P, P, P, P, P, P, C, C, C, C, R, R, R, H, S, S, S, S, S, S } },
{ 17, 17, { S, S, S, S, P, P, P, P, P, P, P, C, C, C, C, R, R, S, S, S, S, S, S } },
{ 19, 23, { S, S, S, S, S, S, S, S, S, S, P, P, P, P, P, P, C, C, C, C, C, R, H } },
{ 20, 23, { S, S, S, S, S, S, P, P, P, P, P, P, P, P, C, C, C, C, R, H, H, H, T } },
{ 16, 19, { S, S, S, P, P, P, P, P, C, C, C, C, C, C, R, R, H, H, T, S, S, S, S } },
{ 13, 16, { S, S, P, P, P, P, C, C, C, C, C, C, R, R, H, T, S, S, S, S, S, S, S } },
}; If we expand the constants to look at the underlying values, it reveals: static constexpr WeatherPattern kClimatePatternsCoolAndWet[] = {
{ 8, 18, { 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 0, 0, 0, 0, 0 } },
{ 10, 21, { 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 0, 0 } },
{ 14, 17, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 0, 0, 0, 0, 0, 0 } },
{ 17, 17, { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 0, 0, 0, 0, 0, 0 } },
{ 19, 23, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4 } },
{ 20, 23, { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5 } },
{ 16, 19, { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 0, 0, 0, 0 } },
{ 13, 16, { 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0 } },
}; The new climate objects summarise these distributions by tallying up the frequencies for all weather types. Clearly, this isn't enough, because the values for 0 appear at the front and back of the distribution! Compared to a 'sorted' distribution, it is effectively rotated/offset. I propose we implement this by adding a |
22900a4
to
45cfb46
Compare
310d350
to
ae4362d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
ae4362d
to
82dabdd
Compare
ab6e534
to
a5f953f
Compare
You're right to think that I've used a script. I've posted a link to my Python script in OpenRCT2/objects#375. |
Ok, I was just checking, as the |
Right, that's ultimately a new property with a mapping that I'd manually created. Speaking of new properties, I haven't made a new 'beta' objects release to account for the 'item temperature thresholds' now being part of the climate objects. This is why CI currently fails. The up-to-date objects can be obtained from OpenRCT2/objects#375, however. |
This PR/issue depends on:
|
I tested it and found no further bugs. I have therefore merged the objects PR and pulled it in. Also asked @ZeeMaji to do a final test. If that succeeds, this can be merged as far as I’m concerned. |
Thanks for testing and creating a new objects bundle release. I'll still need to purge the old |
Looks like replays are serialised more cleverly than I gave them credit for. It seems an update won't be required, after all. |
One little issue we talked about a few days ago but i forgot to bring up here was the rounding on the previews for climate objects seem to be a little off as the numbers displayed don't add up to 100%. On a custom object i made the blizzard shows as 0% despite being enabled in october. |
While unfortunate, this has to do with integer rounding in the UI preview. I'm not sure there's a trivial way to go about solving this tbh. Can we let this one slide? |
That would be fine for now, to me at least. |
I let the game run for a few dozen years each with both a vanilla climate (warm) and a custom climate i made with snow enabled and didn't encounter any issues. I also checked and the proper climate object is imported in old scenarios/saves as expected. Does this seem sufficient or should i test more things? |
@ZeeMaji Thanks for testing. Sounds great! I'm glad. |
cd05a03
to
0f22bc8
Compare
- Feature: [#22646] New scenario files now contain a minimap image, shown in the scenario selection window. - Feature: [#23774] Climates can now be customised using objects. - Feature: [#23876] New park save files now contain a preview image, shown in the load/save window. - Improved: [#24078] Handrails on Wooden Roller Coaster station sprites with no platforms have been removed. - Improved: [objects#379] Add additional colour schemes to Mine Train. - Change: [#23932] The land rights window now checks “Land Owned” by default. - Change: [#23936] The ‘guests prefer less/more intense rides’ settings have been turned into a dropdown. - Change: [#24059] The ‘select other ride’ button is now available in the track designs manager. - Change: [#24067] [Plugin] Registered menu items are now listed alphabetically. - Change: [#24070] Footpath selection menus now show object names on hover using a tooltip. - Change: [#24101] Frozen peeps are no longer removed when using the 'remove all guests' cheat. - Fix: [#4225] Ride Construction window offers non-existent banked sloped to level curve (original bug). - Fix: [#5281] Missing supports on miniature railways built backwards. - Fix: [#7222] Transparent pixels in sloped path tunnels (original bug). - Fix: [#10379] Banners outside the park can be renamed and modified (original bug). - Fix: [#10582] Low clearance tunnels below water are drawn incorrectly (original bug). - Fix: [#17524, #23710] Station bases are drawn on many ride types when the “No entrance, no platform station” style is selected. - Fix: [#18169] CJK, Arabic and Vietnamese display all text as ‘???’ on Android. - Fix: [#18309] Flying and Multi Dimension trains glitch when changing between inverted and uninverted track when uncap fps is on. - Fix: [#19506] Queue paths can be placed on level crossings by replacing an existing regular path. - Fix: [#21803] The park fence is drawn differently in OpenGL compared to software rendering when zoomed out. - Fix: [#21824] Some sprites are drawn incorrectly when zoomed out in OpenGL rendering. - Fix: [#21908] Ride mode warnings when hovering track designs. - Fix: [#22820] OpenGL does not draw masked sprites correctly. - Fix: [#22961] Clicking on the construction preview places duplicate flat rides and stalls. - Fix: [#23359] Scripting: Add car.moveToTrack, an easier API than setting car.trackLocation directly. - Fix: [#23443] New GOG version of RCT2 is not extracted correctly. - Fix: [#23484] Stray coloured pixels on castle-themed stations and Roman-themed entrances/exits (original bug). - Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey. - Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list. - Fix: [#23844] Sound effects keep playing when loading another save. - Fix: [#23881] Compiling on Raspbian/arm-linux-gnueabihf fails. - Fix: [#23891] Inverted Hairpin Coaster track can draw over things above it (original bug). - Fix: [#23892] Gentle banked Wooden Roller Coaster track glitches as trains pass (original bug). - Fix: [#23897] Reverse Freefall Coaster slope up to vertical track piece does not draw a vertical tunnel. - Fix: [#23910] Heartline Twister Coaster track can draw over things above it (original bug). - Fix: [#23939] Incorrect assertion when trying to load heightmap. - Fix: [#23941] Underflow in “Repay loan and achieve a certain park value” objective when using Japanese. - Fix: [#23949] Walls draw over sloped rear water edges and those edge sprites are misaligned (original bug). - Fix: [#23960] Corner path fences can draw over adjacent sloped land (original bug). - Fix: [#23961] Lamps and queue line tvs draw incorrectly on paths with fences. - Fix: [#23983] Ordering files by size does not work and occasionally crashes the game. - Fix: [#24009] [Plugin] The object manager API does not identify recently introduced object types. - Fix: [#24028] Giga and LSM Launched Coaster booster sprites have pixels that draw over transparent pixels. - Fix: [#24077] Track Designer crashes when clicking the park fence.
This PR introduces a new climate object type, allowing players to create custom climates. The built-in climates are moved to a new set of objects. Existing scenarios and saves are automatically adjusted to include the relevant climate object type as well.
The distributions generated by the current object code don't exactly match the hardcoded ones. This may affect the chance of precipitation. I'll need to figure out if this means the biases need to be adjusted.The distributions now match.In addition to the renaming from #23755, there's a bit more renaming going on in this PR. Specifically, I aimed to make a clearer distinction between 'weather' and 'climate'. This proposal and discussion has been split off to #23786 and can be discussed in that PR.This has been settled.Depends on OpenRCT2/objects#375
To do
ClimateSetAction
(requires new replays, so just made it no-op for now)Update replays to compensate for deleted action