OpenTPW

Theme Park Inc: the tag tube#

The tag tube is Theme Park Inc's mail list: the tag system thing files every letter the message centre carries as a row, and the "Message Centre" window lists the rows. Static research only, on the no-CD Game.exe (SHA-256 77ea0c41…); the original was not run. OpenTPW's port is ThemeParkIncTagTube (the model), ThemeParkIncTagLetter (the rows the letters file), ThemeParkIncTagTubeWindow (the window) and ThemeParkIncHud.TagTube (the openers).

1. The model#

2. The letters (play and debug senders)#

Only message type 0x19 (the letter wrapper 0x435DC0, vtable 0x93A388) reaches the tag system (0x637970 case 0xC). The posts in normal play are:

SenderLetterRow
Mission controller update 0x5EF8F0 (post 0x5EF991)"Objective Complete!", 0x5CEAE0(counter - 1), kind 4tag 0x8A, go-to by mission (0x5CEC30), category 0, unread
Arrival flyover's end 0x5F1760 (post at 0x5F18DA)briefing, tag letter 0x5CD6E0(0x5C, 5, 1)tag 0x5C, the tag record's texts, category 0, unread
Bank 0x5C0969red-month notification 0x5CEE50(8)tag 0x5E, category 2, read; the letter window opens
Challenge system 0x5C48DDfiring notification 0x5CEE50(7)tag 0x5F, category 2, read; the letter window opens
Staff day routine 0x628CA0wage demand 0x5CEFB0(0xA/0xB, member, shortfall)tag 0x90, go-to 0xE (the wage demand window) with the demand, key the member's thing, category 2, unread (TPI-WAGES.md)
Staff training0x5CEFB0(0xC/0xD, member, ability) from 0x62AC4D and 0x62E8D6not ported yet (tag 0x8E/0x8F, go-to 5: the staff window 0x58C6C0, not built)
Challenge wonpromotion letter 0x5CF4D0 (id 0xE)not ported (OpenTPW composes no promotion letter)

The other posts are debug pages. 0x538030 is the window procedure of a page that 0x5379C0 builds; 0x5379C0 is reached only from the debug menu's procedure 0x532240 (built by 0x531BC0, table 0x9B61EC), which opens from the native HUD's control 0x4F and the key table's F12 "debugpanel" row (0x9A89D8). Its first button logs "Hire a handyman you fool!". Its letter buttons post kind 13 (0x538135), kind 10 with rand()%200 (0x538325, a test wage demand: 0x5CEFB0(10, member, rand()%200)), kind 6 tag 93 (0x53841B), the briefing (0x538595) and an objective letter with its own serial 0xA5E108 (0x538648). 0x535380 (page 0x5351C0) and 0x535E56 (page 0x535BF0) belong to the same menu. The cheats page 0x532A40 (Skip Mission, Get Promoted) is a sibling; OpenTPW's cheats extension offers only those two buttons, so no debug letter is ported, and the rand() at 0x5382A2 is not on a play path.

OpenTPW files the objective letter, the briefing and the two notification letters (ParkEconomy.FileThemeParkIncLetter, PostThemeParkIncMail). A row keeps the letter it came from (ThemeParkIncTagTubeRow.Source and Argument) and the record's numbers; its texts are composed from the same tables when the window shows it, so they follow the selected language where the original keeps the language of the moment it filed the row.

3. The window#

Window 3000, table 0x9BBC84 (ThemeParkIncLayoutTables.TagTube), builder 0x551CF0, procedure 0x5517B0, the window object 0xA60188 (constructor 0x551C60).

4. The save#

The park save's thing chunk SGAT (save 0x64B107, serializer 0x6355D0 at 0x64B12D; load case 12 at 0x64CF1D, the SGAT test at 0x64CF40, the serializer at 0x64CF7C) holds numtags and one MailMessage per unflagged row: the 0xE28 record bytes, the flag byte and three bytes of padding. The load resets the tube and the counter and appends every row through the insert, so the expiry restarts from the load's clock and the unread rows count silently. The Science continuation save keeps the unflagged rows (ParkSaveFile.Data.TpiTagTube); a Science save from before the tube is refused before its assets are checked, because the arrival's briefing and every objective letter would have been unread rows whose count drives the unread advice.

5. Not ported#

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