OpenTPW

Theme Park Inc: the mission controller and the obstacles#

November 21, 2026. Static reading of Theme Park Inc's no-CD Game.exe (SHA-256 77ea0c41…967a) with the annotated listings and REA; the original game was not run. This page says what OpenTPW ports of the mission controller (ThemeParkIncMissionController, ParkEconomy.ThemeParkIncMissions.cs, Level.ThemeParkIncMissions.cs) and of the obstacles (ThemeParkIncObstacleTypes), and what is still open. The research notes behind it are OpenTPW-notes/research/tpi-campaign/r3-mission-thing.md, r4-mission-ui.md and research/tpi-staff/missions-system.md. The career object and the mission file are in TPI-CAREER.md, the land in TPI-BOUNDARY.md. No game data is reproduced here.

1. The controller thing#

The park thing factory builds the controller (class 21, stream tag OBJH) after the challenge system (0x648633) and keeps its id at park+0x1EAB6C. OpenTPW builds it with the career in the Theme Park Inc economy (ParkEconomy.TpiMissions) and updates it in the world pass before the challenge system, because the newer thing is visited first.

FieldMeaningSaved
+0x14state: 0 idle, 1 researched obstacle shown, 2 obstacle removed, 3 ObstacleOpened shown, 4 CutsceneObject shownmCutsceneState
+0x18the thing the camera shows and message 0x29 acts onmCutsceneObject
+0x1Aregister the obstacle research project on the next updateno; the constructor and the load set it
+0x1Bthe obstacle's research is complete (message 0x23)no; the load clears it

2. Exit statistics#

Start (0x5EEF60). Every status whose zone is the viewed zone (0xA06558 +0x14) or 4, and that has not started, takes its baseline and today's date (0x74C620): types 1 and 2 the bank balance, 5 the guests in the park, 3, 6, 7 and 8 zero; other types are not started. Then message 0x27, and the mission's tech level: for TechLevel.Theme 0 to 2 the zone record's +0 rises to NewMaxGroup.

Daily test (0x5EF520). Only on world ticks whose low two bits are 0 (park+0x1EAB40 & 3). For each running status of the viewed zone (or zone 4): days = (now − start) / 0xC92A69C000, the value is measured, and only when days differs from the stored days are both stored (0x74C5B0). Then, when days >= TargetTime, a reached target sets state 2; otherwise a nonzero TargetTime sets state 3. Every store broadcasts 0x27.

Values (0x5EFF00) and targets (0x74C670).

TypeValueTarget
1cash − loans > 0value >= TargetValue
2cash − loans (bank +0x14 less 0x5C1300, 32 bits)same
3challenges won in zones 0 to 2 (+0xF0 of each record)same
4last month's takings: admission, shops, sideshows, rides, facilities (0x5B9880)value >= (TargetValue + 100) × baseline / 100
5guests in the park (0x5B2060(4))same as 4
6park awards held (0x74C860)value >= TargetValue
7shares owned, percentsame
8guests in the parksame

0x5B2060(4) counts the guests on a cell of type 0, 1, 3, 9 or 10, Theme Park World's census. 0x5C1300 sums (term − repaid) × instalment over the bought loan records. OpenTPW measures types 1, 2, 3, 5, 6, 7 and 8 from its park. Type 4 sums the newest closed month of five analyser rings (+0x20148 to +0x20A88, stride 0x250): the admission, shop, sideshow, ride and facility takings, so last month's revenue, not its profit (research/tpi-campaign/r8-research-training-awards-shares.md §5). The first three are Theme Park World's gate, shop and sideshow rows moved by +0x268, which OpenTPW's ledger keeps; but the ledger books ride and facility takings among the other income, without rows of their own, and a ring with no closed month adds 0x10(%esp), the pushed ecx, which is the analyser's own address. Type 4 is never stored or decided ([EXT:tpi-capability-gates]), and a type-4 status is not started; no shipped mission uses it. Type 6 counts the career's award bytes, which the park awards' checker writes, and type 7 the shares owned × 100 / CompanySharesIssued (0x5EFF9F: 0 shares give 0), from the shares game; both are ported (TPI-AWARDS-SHARES.md), so miss17's statistics (six awards and 51 % of the shares) are measured. Its 51 % needs all thirteen share-prize challenges won; OpenTPW offers none of them yet: their types (17, 46, 48, 50 to 53, 55 to 58) are not among the measured challenge types (2, 25 and 41, ThemeParkIncChallenges.IsPorted), so until those types are ported, 51 % is reachable only through the cheats extension's "Win the game...". No shipped mission sets a TargetTime, so no shipped mission can fail.

3. Requirements and completion#

4. Messages#

The controller's handler 0x5F0F50 ends every message with the 0x27 broadcast.

MessageSenderThe controller
0x23 obstacle researchedthe research lab's kind-5 project+0x1B = 1; the next update discovers the obstacle staff's abilities, sets state 1 and flies the camera to the current obstacle (anim 1)
0x24 remove obstaclethe mission window's or the remove buttonstate 2, the message's thing, camera (anim 2), career +0x13E5 = 1; the staff HQ, an older thing, hears it first and rebuilds its slots (0x634D20)
0x25 promotiona challenge win with PromoGiven, Get Promoted0x74C450(rank)
0x26 challenge wonthe challenge winno case: only the broadcast
0x29 camera finishedthe end of every camera flight (0x5D0996, the only sender)state 2 or 3: the thing opens (0x466050, 0x5E8BD0) and the tick runs; state 4: the thing is destroyed and the tick runs; then state and thing 0

OpenTPW routes the challenge system's promotion and win, and the Get Promoted cheat, through the controller. The research lab's project (0x61CBF0) is registered at the controller's registration and every message 0x27 (ThemeParkIncResearch.RegisterObstacle), and its completion sends message 0x23 (TPI-STAFF.md §12.3).

5. The camera flight#

There is no camera spline. A flight (0x5D0400, update 0x5D02F0, end 0x5D0840; the cutscene thing, class 22, CUTS, ThemeParkIncCutscene) is the ride view on the target thing's camera seat 1 while the thing's own script plays its animation:

OpenTPW ports all of this: ParkEconomy.TpiCutscene plays the controller's camera requests and posts 0x29 at the real end, the level gives it its things' scripts and the ride view (RideCameraMode with its one-frame blend and pointer look), the Theme Park Inc HUD is hidden under the input window and turns Escape and the right button's release into the skip, the game flow runs the level at the flight's rate, and the continuation save keeps the thing (ParkSaveFile.Data.TpiCutscene). The mission window's complete button is ParkEconomy.PressThemeParkIncMissionComplete (0x55BD79: message 0x24 with the current obstacle for an obstacle mission, to the staff HQ and then the controller, else OnMissionComplete), which the mission window's Proceed calls; the HUD opens the mission window (§7) on each of ThemeParkIncCutscene.MissionWindowRequests. Not ported: the fog range and the camera words of the start (0x6F22F0, 0xBE2104; drawing), the HUD control 0x40's saved state, the panels other than the request list (PanelRequests), the advice classes admitted during a flight (0x71BDC0), and the 1750 zone switch, which ZoneSwitchRequests records for the zone package.

6. Obstacles#

An obstacle is an attraction (class 3) whose type comes from Data\levels\<zone>\obstacles\*.wad, a normal ride archive with a .sam, models, animations and a script. ThemeParkIncObstacleTypes reads each zone's types with the words the obstacle code uses (key table 0x9A2D00): Info.Shape, the map offsets, IsObstacle, IsSupportingObstacle, IsOutsideFeature, GateTo, IsSpecial, IsCameraPath and the Obstacle.* keys. Science holds 1700 (the gates, OpenedAutomaticly), 1701 (fallen trees, deleted after use), 1702 (bridge, map offset 1, 1), 1703 (the lake, replaced by 1704 at (7, 19)), 1704 (the drained lake, IsSupportingObstacle), 1750 (the gate to the Polar Zone, GateTo 2) and 1798 (the camera path). The research note said no shipped obstacle has a map offset; the bridge has (1, 1).

Map grids (0x41AD90). Info.Shape and Obstacle.AfterShape are parsed with the table 0x98DF88 (24 rows): . 0, * 4, Q 3, @ 1, + 11, # 16, H 8, X 5, , 30, = 32, % 33 (leave untouched), the entrances and exits as in Theme Park World, D/>/< 23, O and I 27. A space takes no column, a row ends at the widest row's width with zeros, 40 rows or 40 cells per row is the limit, and the rows are stored bottom first.

Things of the world. The prebuilt Science park's obstacle records are fixed items at the sentinel cell, and the lake 1703 is the one attraction thing without a scene record; the catalogue now reads each zone's obstacles folder (ObjectCategory.Obstacle, a fixed item: Info.DontApplyOffset 1), so the level builds 1702, 1701, 1700, 1750 and 1798 from their records and 1703 from its thing, each with its model, its script and its saved thing id (27 to 32; a loaded park keeps its things' ids, and the World variable CurrentObstacle names thing 29, the 1700 gate). They are drawn from the sentinel anchor like every Theme Park Inc fixed scene record ([APPROX:RIDES-040]).

Cells (0x647BF0, 0x5E8BD0). A map square's dword +0x24 is the obstacle cell flag: the placement sets it with the type and the owner word, the opening clears it, and only the pick 0x666BE0 and the cursor help at 0x504A0C read it (the cell types do the blocking: H is type 8, a terrain hole; X type 5, blocked land). A Theme Park Inc map cell is saved with 56 bytes, Theme Park World's 52 and this dword; in the prebuilt it is 1 on exactly the obstacle footprints' non-zero cells. OpenTPW's cell map keeps it as ParkCellMap.ObstacleFlagAt (never set on a Theme Park World map) and a layout snapshot as TpiObstacles. The level takes the prebuilt's obstacle cells (type, owner word, flag) as saved; ThemeParkIncObstacles.Place ports the placement rule: every Info.Shape cell other than % at (ShapeOffsetX + column, ShapeOffsetY + row) is set to type 0, then its value, and a non-zero one gets the flag and the owner word of the anchor (MapOffsetY + ShapeOffsetY) × 128 + 1 + MapOffsetX + ShapeOffsetX; over the Science level map it writes the prebuilt's saved obstacle cells exactly. The square writer 0x67CB70 changes only the type word (Theme Park World's clears the owner word, the links and the placement counter with type 0) and counts a placement when the same non-zero type is written again. The opening (ThemeParkIncObstacles.Open) is the order of 0x5E8BD0 above; the 1703 lake's ReplaceWithID places 1704 without cells of its own and destroys the lake, DeleteAfterUse destroys, and an obstacle with neither stays. Before the opening the park camera's target goes to the obstacle (0x466050: the anchor cell plus half the shape's width on both axes).

Not ported yet:

7. The mission window#

The "Current Objective" window (ThemeParkIncMissionWindow; builder 0x55A7F0, procedure 0x55BA70, layout table 0x9BE808 with 34 controls, generated by tpi_exe_layouts.py with the Challenges tab's own table 0x9B54CC) is letter-like: the title UITEXT 461, the Objectives and Challenges tabs (463, 464; the current tab is disabled), the mission title OPERATION[counter], the objectim picture frame 0x9BECCC[counter] − 1, From/To/Subject (Mr Maybury, the player, the mission title; labels yellow (0xEA, 0xEF, 0x66)), Mr Maybury's mugshot, the body frame, the page toggle (988 "Go to Details" / 989 "Go to Briefing") and Proceed (82).

The "Objective Complete!" letter (0x5CEAE0). Subject TAG_SYSTEM 168, from Mr Maybury to the player, body OBJECTIVE_COMPLETE[completed] and the signature, dated by the tag system like the bank's letter (ThemeParkIncObjectiveLetter). Its go-to (0x5CEC30, table 0x5CED9C) is, by completed mission: 0 the thing of type 0x6A7, 1 the mission window, 2/3/4 kind 0x12 with 2/1/0, 5 type 0xE75, 6 the challenges window, 7 kind 0x12 with 1, 8 type 0x6A6, 9 challenges, 10 kind 0x12 with 2, 11 type 0xA8F, 12 type 0xA8E, 13 challenges, 14 kind 0x12 with 0, 15 type 0xE77, 16 challenges. The letter window's go-to (0x526AA5 → 0x5511B0) opens the mission window or the challenge panel; a thing's camera move (0x5033C0) and kind 0x12 (0xA59CC0 → 0x521C90, not read) are not ported, and the obstacle things, which are in OpenTPW's world now (§6), get no camera move. The tag system opens a letter's window at once only for kinds 6 to 8 (0x5CD060); this letter (kind 4) becomes a row of the tag tube, whose window shows it and runs its go-to (TPI-TAG-TUBE.md).

Source: docs/reverse/TPI-MISSIONS.md in the project repository.