OpenTPW

Umbrellas (opentpw.umbrellas)#

October 18, 2026. Status: phases U0 (the Theme Park Inc trace, below), U1 (our own art and data pipeline, Content), U2 (the simulation, below), U3 (the drawing, below), U4 (the rain mood rule, below) and U5 (the tuning, below) are done. The extension is registered, on by default, lists the four brolly shops in the Theme Park World catalogs and runs their rules: a guest buys an umbrella in the rain and carries it through the five states. Guests carrying an open umbrella are drawn (phase U3); the rain mood rule (opentpw.rain-mood, off by default) is its own extension. The winter extension (WINTER.md) follows the same pipeline for its kiosk, glühwein stall and warm items.

The idea: bring the brolly shop and guests carrying open umbrellas in the rain of Theme Park Inc to Theme Park World parks as an official extension (docs/MODS.md), with OpenTPW's own art, so a player needs no Theme Park Inc data. The behaviour comes from a static trace of the Theme Park Inc no-CD Game.exe (SHA-256 77ea0c41..., [BIN:TPI-EXE:0x...] below; nothing was run). Theme Park World's tp.exe has none of it: no umbrella strings, no WeatherModifier, PeepHappinessWeatherEffects or "Weather is effecting" keys; its only weather rules are the arrival factor 0.8/1.2 and the indoor-ride score x5 (PeepInfo.DecisionVariable3). No art, model, script or number table of Theme Park Inc is copied: the sprites and models are drawn in Blender from code, and the behavioural numbers below are rules, not data files.

Decisions (October 18, 2026)#

What Theme Park Inc does (static trace)#

Confidence: high for the state machine, the gates, the multipliers, the settings addresses and the data; medium for the per-day count (the clock scale +0x1C is not read) and for who counts as "inside" (+0x38, +0x3C); high for the track-cell test and the inside words (UMB-002 and UMB-003, both ported), low for the season index. Not found statically: the producer of the log line "I got a nice umbrella from the ride".

Settings. Theme Park Inc's settings are one block of words in key-table order (rows of 60 bytes from 0x996468; a struct adds no words, an array adds count x fields and then one count word; anchored on MinPeople 0xA02230 and checked on the guest constructor's reads of PeepTypes). The umbrella keys are UmbrellaModifier 0xA01B5C, WeatherModifierFrequency 0xA01B60, SlowestWeatherChangeResponse 0xA01B64, DiscardBalloonPctModifier 0xA01B68, three weather arrays of 3 ages x {Heatwave, Rain, Storm, Snow} floats at 0xA01B88 (happiness), 0xA01BBC (thirst) and 0xA01BF0 (hunger), GenericUmbrellaModifiers 0xA01E08..0xA01E14 and PersonSpriteUmbrellaModifiers[12] from 0xA01E18 (14 floats of 0x38 bytes each: X, Y, Z, Projection, HandPosDistance, HandPosAngle, FPX, FPY, FPZ, FPProjection, FPCentreOffsetX/Z, FPHandPosDistance, FPHandPosAngle). Object types: WeatherModifier.Snow/Rain/Storm/HeatWavePercentage at type +0xF0..+0xFC, GenerationModifier.*ScorePercentage +0x110..+0x118, UsageInfo.AppearanceEffect +0x21C (1 balloon, 2 costume, 3 umbrella). The weather thing's state +0x70 is 1 heat wave, 2 rain, 3 storm, 4 snow, other none. [BIN:TPI-EXE:0xa01b5c]

Guest fields (0x60D260 names them): mUmbrellaState +0x238, mUmbrellaType +0x244 (the colour), mUmbrellaScript +0x240 (the sprite object). +0x23C (the turn a pending change is due) is not saved. States: 0 none, 1 open and about to close, 2 owned and closed (not drawn), 3 closed and about to open, 4 open. [BIN:TPI-EXE:0x60d260]

Demand (0x6101E0, the attraction score, Theme Park Inc's twin of Theme Park World's AttractionScore). An umbrella shop scores 0 for a guest who already has an umbrella (any state) and in any weather but rain, storm or snow. Every object's score is multiplied by its WeatherModifier percentage of the current weather (when nonzero), then by the generation's GenerationModifier percentage. A guest holding a balloon scores an umbrella shop lower: factor = 100 - life x 100 / 255 (balloon life +0x298), scaled by DiscardBalloonPctModifier/100; a factor of exactly 0 (a full-life balloon) skips the cut, a quirk. A balloon shop scores 0 for a guest who already holds a balloon (+0x294 nonzero or life +0x298 above 0) and for a guest with an open or opening umbrella (states 3, 4). Theme Park Inc's DecisionVariable3 (indoor x5) is marked unused in its data. [BIN:TPI-EXE:0x6101e0]

Purchase (0x612740, the use outcome, AppearanceEffect 3): the colour is one world-generator draw, (draw >> 2) mod 3; the umbrella opens at once (state 4, sprite object created) whatever the weather; the sale's other effects are a shop's. The balloon is not touched by the purchase itself. [BIN:TPI-EXE:0x612740]

Weather rule (0x611050, called from the guest update 0x619B50 every fourth tick for every guest, wherever it is). It runs only while the guest's age in game days (ticks since its creation +0x1FC, through the clock 0x608A90) is a multiple of WeatherModifierFrequency (4): the whole first game day of a visit, then every fourth day. The stored day +0x2E8 is written but never read, so the designers' "once every X days" is in fact every update of those days. In rain, storm or snow the guest's happiness, hunger and thirst get the age row's deltas (clamped 0..100), and an open umbrella (state 4) adds UmbrellaModifier (1, as an integer) to a negative happiness delta. Shipped kid row: rain -1, storm -1, snow +1, heat wave +1 happiness; snow thirst -1, hunger +1; heat wave thirst +2, hunger -1. Parents and elderly are worse (elderly rain -2). The same call drives the umbrella: in bad weather a closed umbrella (2) gets an opening scheduled, a pending close (1) is cancelled (back to 4) and a pending open (3) is carried out when due; in clear weather or a heat wave an open one (4) gets a close scheduled, a pending open (3) is cancelled (2) and a pending close (1) is carried out. [BIN:TPI-EXE:0x611050], called by [BIN:TPI-EXE:0x619b50]

Scheduling (0x613EA0): only while the guest is not inside an attraction (+0x38, +0x3C zero) and not standing on a kart or water track cell (the two tests 0x67F890/0x685680 of UMB-002 below, applied to the guest's cell; ported in round 10, UmbrellaRules.OnTrackCell). Delay = CRT rand() mod SlowestWeatherChangeResponse guest updates, lengthened by the balloon's share of life x DiscardBalloonPctModifier/100. [BIN:TPI-EXE:0x613ea0] Opening (0x614010): a held balloon is let go (float-away effect), happiness drops by MediumHappinessChange (15) and the balloon life is cleared; then the sprite is created (state 4). That is the whole balloon-for-umbrella trade, together with 0x61A540 state 0x14: entering an umbrella shop with a balloon also releases it with the same -15. [BIN:TPI-EXE:0x614010]

Attractions (0x61A540): entering any attraction closes an umbrella (state 2, sprite destroyed); leaving does not reopen it (the weather rule does, on a qualifying day). An umbrella is never lost or discarded: 0 is written only by the constructor. Holders of an open or pending umbrella get no walking speed term (0x60B3F0, table 0/25/50) and play no post-visit cheer. [BIN:TPI-EXE:0x61a540], [BIN:TPI-EXE:0x60b3f0]

Drawing (0x60AE00, per frame). Default camera: the umbrella sprite's hotspot (the handle tip) goes to the guest's position at time t + Projection, raised by Y[type] (5.5 to 6.5 units: hand height) plus (camera height - 40) x YAdjustCamera, and pulled 10 % (X/ZAdjustCamera) of the way toward the camera, so it covers the guest. The guest's overhead bubble is raised from 2.5 to 6.0 units while the umbrella shows. The renderer scales sprite bank 0x13 by ScalingFactor 1.25 (0x690680). The FP* path (walk-around camera) adds per-direction hand offsets precomputed at guest creation (0x60C3F0): for the 8 headings, centre offset plus sin/cos x FPHandPosDistance of heading + FPHandPosAngle, but the angle is truncated to whole radians before sin/cos (a Theme Park Inc bug). Type index = generation x 4 + sprite variant. Its Spr_um.esp holds 3 slots of 1 frame and no directions (blue, rainbow, red/white; 36 x 34 pixels, hotspot bottom centre, 128 ppu; the walk-around bank 37 x 45). No closed-umbrella frame exists. [BIN:TPI-EXE:0x60ae00], [BIN:TPI-EXE:0x60c3f0]

Data. Three brolly.wad (water 2206, named "Balloon Shop" by mistake, arabian 3202, science 1201): price 30, cost 10 to 15, HappinessEffect 20, litter 10 to 20, capacity 5 or 10, ISIndoors 1, kid score 75 % (science 50 %), weather Rain/Storm 200 (science 250), Snow 150, HeatWave 5. Weather spells (0x642770) roll freak heat wave, rain, storm or snow from Seasons[] only in the third month of a quarter, after YearsBeforeFirstFreakWeather. [BIN:TPI-EXE:0x642770]

Behaviour in Theme Park World parks (design for U2 to U5)#

The simulation (phase U2)#

opentpw.umbrellas 1.0.0 (OfficialExtensions.Umbrellas, AffectsSimulation: true, on by default, PlayerSelectable; the version is the rule identity and every behaviour change bumps it) with the gate FeatureGates.Umbrellas (also off in a Theme Park Inc run). The code is World/Umbrellas (UmbrellaRules, the pure rules; UmbrellaContent, the catalog root; UmbrellaApproximations, the register) and GuestSimulation.Umbrellas.cs (the host side). [EXT:umbrellas-extension]

The rain mood rule (phase U4)#

opentpw.rain-mood (1.0.0, off by default, AffectsSimulation, not in a Theme Park Inc run) is the part of Theme Park Inc's weather rule (0x611050) that Theme Park World does not have: in rain, storm and snow a guest's happiness, thirst and hunger change by the guest generation's row, and an umbrella that is already open (state 4) when the rule starts adds UmbrellaModifier (1) to a negative happiness delta; an umbrella the same step opens (state 1 to 4, or a due 3) does not (the switch at 0x611334 reads the state once: case 4 is the modifier at 0x6111BE to 0x6111D3, case 1 sets 4 at 0x6111E3, case 3 calls 0x402d8d), so UpdateNeedsTurn records umbrellaWasOpen before UpdateUmbrella and passes it in. It lives in RainMoodRules (pure) and GuestSimulation.RainMood (the host step); the level sets that from FeatureGates.RainMood, and the weather comes from UmbrellaWeatherState (the same mapping as the umbrellas).

Phases#

PhaseWhatState
U0the trace in this page, [BIN:TPI-EXE] labelsdone
U1art and data pipeline: umbrella sprites, anchors from the rig, the four shop models, .sam, RSE, content/umbrellasdone (original-set anchors left to U3)
U2simulation behind opentpw.umbrellas: purchase, states, scoring gate, balloon trade, attraction close, saves, pins; also a catalog root for the extension in ModContentRoots.CatalogRoots and its id in the ObjectCatalog cache key (ObjectCatalog.cs, where only the pools' root was named), or a park would reuse a catalog built without the shopsdone
U3drawing: UmbrellaRenderer, anchors for the original sets, pull, bubble lift, browser delivery, capturesdone
U4opentpw.rain-mood with its pins and the measurement of what it costs a kiddone (below)
U5tuning from captures, the umbrella's frame cost, the kid score measurementdone (below); the first-person placement waits for a walk-around camera

Open questions: Theme Park Inc's kid score is decided: 75 %, as in Theme Park Inc (U5); the shop's ISIndoors 0 where Theme Park Inc's is 1 (it keeps the indoor-in-rain x5 off the weather percentages, which U2 now scores); the three U2 extensions are user-approved (see the decisions above). The smarter-guests seam (IGuestDecisions) was not touched: the umbrella gate and the weather percentages live in the host score, for the extension's own objects only.

Content ([EXT:umbrellas-content])#

content/umbrellas (copied next to the program with the rest of content/; embedded in the browser build as a whole, about 0.7 MB before compression, the sprite set being 29 KB) holds, all our own, generated from code and committed (CI has no Blender):

The content is our own (modelled and textured in Blender from the scripts in tools/), MIT-licensed like the rest of the repository; nothing in it comes from Theme Park Inc or Theme Park World.

UmbrellasContentTests load the committed files through the game's own pipelines (the object catalog with a content root made by the test, the sprite readers, the ride script VM) and check the ids and names, the .sam keys, the models, textures, footprint and wall gaps, the script, the sprite banks (slots, directions, 256 ppu, hotspots at the tip) and the anchor table (every set, slot and direction, mirrored symmetry, hands inside the shipped kid frames), and that nothing is wired into the game.

LabelWhat
[EXT:umbrellas-content]the extension's own shipped content (content/umbrellas) and the pipeline that builds it
[EXT:umbrellas-extension]the extension itself: its registration, its gate, the host rules (U2), the objects' weather and generation terms, and its screen texts in the eleven languages
[EXT:umbrellas-weather-map]the mapping of ParkWeather to Theme Park Inc's weather states (U2; user-approved 2026-10-18)
[EXT:umbrellas-save]the save rule: recorded only while the park has a brolly shop or an umbrella, the placed shops' asset keys, the optional guest fields (U2)
[EXT:umbrellas-save-due]the saved pending-change turn (U2; user-approved 2026-10-18)
[EXT:umbrellas-balloon-gate]a balloon shop's refusal of a balloon holder, applied only in a park that uses umbrellas (U2; user-approved 2026-10-18)
[EXT:rain-mood-once-per-day]the weather mood rule applied once per qualifying day, with the saved day of the last application (U4; user-approved 2026-10-18)
[EXT:rain-mood-extension]the extension itself: its registration, its gate (FeatureGates.RainMood), off by default, always recorded while on (U4; user-approved 2026-10-18)
[EXT:rain-mood-imported-age]an imported original guest without a known time in the park counts its rain mood age from the load, with the saved load turn (U4; user-approved 2026-10-18, "Tellen vanaf het laden")
[BIN:TPI-EXE:0x...]the Theme Park Inc Game.exe address a rule was traced to (this page)

Drawing (phase U3)#

UmbrellaRenderer (World/Umbrellas), created by Level beside BalloonRenderer while the extension is on and its content is there, draws one camera-facing quad of SPR_UM for every guest whose umbrella is open or open until a due close (states 4 and 1; a closed one, state 2, has no sprite: [BIN:TPI-EXE:0x60ae35], the placement routine 0x60AE00 compares the state with 4 and 1, re-read statically from the no-CD Game.exe). Presentation only: no random stream is read, nothing is saved, no pin moves. [EXT:umbrellas-draw]

LabelWhat
[EXT:umbrellas-draw]the drawing: the renderer, its placement from the tables, the five stored directions mirrored to eight (TPI has no directions), the hand anchors (TPI anchors straight above the guest), the steady hand; user-approved (see the decisions)
[EXT:debug-umbrellas](debug-only test hook) the Debug-build capture and crowd flags (--debug-umbrellas, --debug-umbrellas-follow, --debug-umbrellas-crowd) and the browser harness hook PerfUmbrellas (tools/web-perf/run.mjs --scenarios jungle,umbrellas, docs/BROWSER-PERFORMANCE.md)

Tuning (phase U5)#

October 18, 2026. Captures, headless measurements and frame times with the three phases running together (U2 simulation, U3 drawing, U4 rain mood). The canopy size and the pull cap are presentation and move no pin. The owner chose Theme Park Inc's kid score of 75 % (see below): the shipped KidScorePercentage is 75, and the synthetic brolly shop's default matches it. The shop pins were recomputed at that 75 and did not move (DETERMINISM.md).

Captures#

Native Debug runs of the four themes (Jungle, Fantasy, Hallow, Space) in rain (--debug-weather 30), storm (5) and snow (15, Hallow) and clear, the park camera at the zoom values 40 and 300 of the wide range and 70 and 130 of the original range (pitch 45 and 65 degrees, 84 above 188) at four yaws, with the pool guest art on and off, with the umbrellas extension off, and with a held balloon and a thought bubble: --debug-sim-minutes 3 --capture-frames 300 --debug-umbrellas --debug-weather 30 --debug-umbrellas-follow <zoom>,<yaw> --capture-world <png>. The captures hold original sprites and stay out of the repository.

The original's close in the draw routine: a track cell, not a roof (UMB-002, ported)#

A reviewer found that the placement routine closes the umbrella too: at 0x60AEDC to 0x60AF3E it forms the guest's cell index [+7] x 128 + [+5] + 1 and, when two cell tests both hold, calls 0x6142E0 (state 2, sprite destroyed) and does not draw. The guess was a covered cell such as the bus shelter. Re-read statically in the no-CD Game.exe ([BIN:TPI-EXE:0x60aedc umbrella cell close]; 0x40A344 and 0x405F01 are thunks to 0x67F890 and 0x685680), the tests are track cells, the same predicates tp.exe has for its second map layer:

How often it would apply here: in 12 simulated park minutes of Jungle (a guest sampled every 15 ticks) with no track ride, with the go-kart track (--debug-kart-track) and with the boat track (--debug-water-track), 19,030, 26,450 and 26,111 guest samples stood on cells of type 1 (path), 30 (fixed walkway) and 9 (an object's entrance, riders included) only; none stood on a type 11, 12, 16 or 17 cell, and none at the bus shelter (an object's cells are types 4, 9 and 10, not track types). OpenTPW's walking guests cannot step on a track record (WALK-005) and its riders are inside the ride (state Using, not drawn, umbrella already closed on entering). UMB-002 was first narrowed to "never occupied"; in round 10 (2026-10-30) the predicate was ported anyway (UmbrellaRules.OnTrackCell, tests over every record type and over a track layer) and the ID retired, since the rule costs one cell lookup and any later guest that does reach a track cell gets the original's behaviour. The occlusion problem of the Jungle bus shelter was the pull, not this rule (see Camera pull).

Simulation: a rainy week (headless, fixed seed)#

UmbrellasTuningMeasureTests (OPENTPW_UMBRELLAS_MEASURE=<file> writes the table below): the pinned synthetic cross park (a drinks shop, the brolly shop at (10, 1), paid through the economy), four clear days so guests arrive, seven days of rain, three clear days; mean over four seeds. The park is small (about 39 guests admitted in 14 days), so the counts are small and the point is the comparison. Every second arrival holds a balloon of life 120 (a fresh balloon cuts the shop's score to nothing: the original's factor 100 - life x 100 / 255 hits exactly 0 only at full life, which the zero quirk skips, but a life near full gives almost no score), the other columns have none.

ParkBuyersBuyers who held a balloonMean happiness over the rain week, rain mood offrain mood on
no brolly shop0-52.0250.95
brolly shop, kid score 75 % (Theme Park Inc)12.54.052.8651.81
brolly shop, kid score 100 %13.757.051.5050.47
no balloons: no shop0-51.8950.82
no balloons: shop, 75 % or 100 % (identical)13.0-52.5751.54

Frame cost#

No umbrellas400 umbrellasExtra
Home zoom: median / p95 / p99 frame (ms)3.6 / 7.6 / 13.14.7 / 7.7 / 9.0+1.1 ms
Zoom 3003.4 / 6.2 / 7.24.5 / 6.2 / 7.2+1.1 ms
Main thread busy (Home / 300)29.7 % / 24.9 %33.8 % / 32.7 %+4 / +8 points

All 400 umbrellas were drawn at both zooms (the renderer's DrawnUmbrellas: 400 and 399), the page stayed at 60 frames a second and every frame stayed far inside 16.7 ms. The default 30 s windows of the first run (.../2026-10-18-umbrellaCost.json, kept next to it) give the same Home result (3.2 / 6.6 / 8.9 against 4.7 / 8.5 / 10.8, +1.5 ms, busy 25.8 % against 36.0 %), but its zoom 300 pair is not a valid comparison: the umbrella window had 251 guests left and drew none of them (the park keeps simulating through the long windows; the cause was not investigated, and the 10 s windows do not show it). The earlier table (+1.4 to +1.7 ms, +8 to +9 points) was one unrecorded run of the same scenario and agrees with these within the spread. Before this phase's trim (UmbrellaAnchors computed the steady hand's mean over the steps for every umbrella every frame, and the renderer enumerated its guest renderers through an interface) the zoom 300 window cost +3.2 ms; the means are now made at load and the loop is indexed. The harness stages the crowd and the umbrellas through Program.PerfUmbrellaCrowd (UmbrellaPerf, loopback ?perf=1 only): node tools/web-perf/run.mjs --web <wwwroot> --game <folder> --scenarios jungle,umbrellaCost --window 10.

Bugs found and fixed here (cross-check against the owners' PRs)#

LabelWhat
[EXT:umbrellas-size](user-approved 2026-10-18) the canopy scaled 0.85 about the hotspot (a Theme Park World tuning from captures)
[EXT:umbrellas-pull-cap](user-approved 2026-10-18) the ground pull towards the camera limited to a margin of 1.5 units (the lift is not scaled) (TPI's 10 % of the distance drew umbrellas over roofs that hide their guests)
[EXT:umbrellas-tuning]the measurement aids: the headless harness (UmbrellasTuningMeasureTests) and the browser scenario (UmbrellaPerf)

Source: docs/UMBRELLAS.md in the project repository.