OpenTPW

Theme Park Inc: park awards and the shares game#

This trace uses the identified English no-CD TPI Game.exe (SHA-256 77ea0c41410aad7c94a5eda658e31cb4ac05f7253aaf6746ad5e8a90afbd967a) and the retail data. It was read statically (listings and Ghidra decompiles); the game was not launched. OpenTPW's port is ThemeParkIncParkAwards, ThemeParkIncSharesGame, the career's StoreAward and Shares, and the economy's award check (ParkEconomy.ThemeParkIncAwards.cs). "Park" is *0xADE6B0, "career" *0xBFC484.

1. When the awards are checked#

2. The check and the storage#

[BIN:TPI-EXE:0x606BE0 award check] The awards are tested in this order; every comparison is signed (jl), and the first award whose storage returns a nonzero result goes to the event 0x606EC0(i, result) and ends the scan. The thresholds are the Standard object's words 0xA028BC..0xA028E0 (ParkAward.*, levels/Standard.sam lines 1045 to 1054); MinCellsOwned and MinCellsCovered (0xA028E4, 0xA028E8) are not read.

iaward (UITEXT 453 + i)testvalue stored
0Highest Coaster0x5B7210 ≥ CoasterHeight (110)the measure
1Fastest Coaster0x5B7380 ≥ CoasterSpeed (100)the measure
2Cleanest Park100 − 0x5B80D0 ≥ Hygiene (90) and 0x5B8E70 ≥ HygieneMinParkSize (1000)100 − littered %
3Most Decoration0x5B5680 ≥ Decoration (15)the measure
4Best Security0x5B8A70(7, 0) + 0x5B8D10 ≥ Security (25)the sum
5Best Staff Training0x5B3460 ≥ Training (50) and 0x5B2F40 ≥ TrainingMinStaff (10)the trained %
6Fastest Go-kart Track0x5B6D20 ≥ GokartSpeed (5)the measure
7Longest Water Ride0x5B6FA0(.., 2) ≥ WaterLength (50)the measure

[BIN:TPI-EXE:0x74C760 award storage] Career byte +0x2A + i not 1: it becomes 1, the current zone record (career + 0x4C) takes the flag +0x20 + i = 1 and the value +0x28 + 4i, result 1 (won). Otherwise the current zone holding it returns 0. Otherwise the zone list (career + 0x40, the record at node +0x20) is walked: a zone holding it with a value below the new one (signed jg) is cleared and the current zone takes the flag and the value, result 2 (moved); none gives 0. The career byte is never cleared; the exit statistic 6 counts these bytes (0x74C860). A second entry 0x606E40(i, value) runs the same storage and event.

3. The measures#

All cell measures walk the 128 × 128 cell records (park + 0x460 + 0x48 × (word − 1), the word (y << 7) + x + 1) from 0x7F down to 0; the order does not matter. The cell type is the record's dword +8 (0x67F590 2, 0x67F5B0 1, 0x67F5D0 3 or 9, 0x67F600 9, 0x67F620 10, 0x67F660 7 or 0x1E, 0x67F690 never, 0x67F6B0 4, 0x67F7B0 0x15). Every percentage is m × 100 / n with cltd; idivl, and 0 when n is 0.

4. The event#

[BIN:TPI-EXE:0x606EC0 award event] Logs "Won a Global golden Award (type - result, num - i)", then the advice through 0x71A930 and a message object posted to 0xA09728. Won (jump table 0x607AB0): 0xBF, 0x13A, 0x13B, 0x13C, 0x13D, 0x13E, 0xC0, 0xC1. Moved (0x607A90): 0xC3, 0x142, 0x143, 0x144, 0x145, 0x146, 0xC4, 0xC5. Then the Park Awards panel's refresh 0x561E30. No money moves and nothing is drawn. The check then logs "You have %d total Park Awards".

5. The shares game#

[BIN:TPI-EXE:0x620870 shares constructor] 0xAA0128 holds an owner record (+0 mNumberOwned, +4 mPctCompanySharesOwned), 0xAA012C a company record (+0 mCurrentValue, +4 mCompanyName[31]), and +8..+0x10 three annual-report slots. There is no rival holder; CompanySharesIssued (0xA02168, 30000) is only a divisor.

6. What OpenTPW ports and what it gates#

Ported: the gate, the check in its order, the storage, the six measures above, the event's notice, the shares game's reset, start-up, gift, price effect, annual score and price step, its GMS section and the Science continuation save's copy, exit types 6 and 7, and "Win the game..." in the cheats extension.

Gated ([EXT:tpi-capability-gates]):

[EXT:tpi-text-hud]: the native share portfolio panel (0x581A90, refresh 0x582890) and the Park Awards panel (0x5625D0..) are not ported; the challenge panel shows their values in a line (UITEXT 24, 23, 25, 452 to 460), and an award decided becomes a note.

7. rand()#

None on the paths ported: the check, the measures, the storage, the event, the gift, the price effect, the score, the start-up and the save have no call of the CRT rand() (0x870D38) or the world generator. The shares panel's colour draws (0x5813A1, 0x5813B6, 0x581ABE, 0x581AD4) belong to the native panel, and the daily update of 0xAA0180 (0x622F80, rand() at 0x622F8E) is not part of the shares game; neither is ported.

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