Difference between revisions of "Riven external commands"
|Line 23:||Line 23:|
Revision as of 05:02, 8 March 2008
Riven scripts make use of "external commands" to perform complex actions. External commands are code blocks living outside Mohawk files (hence "external"); probably they are part of the engine executable itself. Many complex devices in the game are implemented with external commands (for example the domes and the fire marbles puzzle); this is bad news because no reverse-engineering can be done on them easily. An alternative engine would have to implement custom code for those devices.
This is the first step in understanding the role of each external command. This list has been put together by looking into NAME 3 resources, which store external command names used within each stack. Arguments have been found or guessed by reading scripts.
Each command is reported in a way similar to C functions: command_name(argument1, argument2...). Names without trailing '()' have not yet been investigated.
- 1 a_Data
- 2 b_Data
- 3 g_Data
- 4 j_Data
- 5 o_Data
- 6 p_Data
- 7 r_Data
- 8 t_Data
Used in the main menu card. Hides the "setup" (or "play riven") button by filling the hotspot rectangle with black and disabling the hotspot.
Called when clicking the "continue" button in the "volume adjustment" card.
Called after loading Atrus's journal card.
xaatrusbookback(), xaatrusbookprevpage(), xaatrusbooknextpage()
Called when clicking hotspots in Atrus's journal card.
Called after loading Catherine's journal card.
xacathbookback(), xacathbookprevpage(), xacathbooknextpage()
Called when clicking hotspots in Catherine's journal card.
xtrapbookback(), xatrapbookclose(), xatrapbookopen()
Called when clicking hotspots in the trap book card.
Called by the display update handler of card 278 (Gehn's lab journal).
Used by hotspots in cards 282 and 284 when acting on the boiler controls. It can have one or two args, both taking small numbers (1 to 4).
Used by hotspots in card 284 when acting on the boiler controls. The command is invoked towards the end of the scripts. Among other things it probably reloads (or redraws) the card to reflect the updated controls, as the scripts don't.
Reacts to mouse movements to let the user control the steam valve at the center of the lake (card 415). It must set variable bvalve accordingly.
Called by the chipper lever hotspot (card 498) when the steam is correctly directed to the chipper. It must play the MLST record with code=2. Why an external?
Start the "flies" realtime effect. u0 seems always 0, u1 is a small number (< 10).
- xbookclick(movie_sref, start_time, end_time, u0)
Called when clicking the telescope cover buttons. button is the button number (1...5).