Riven external commands
Riven | |||
Mohawk | Overview | ||
BLST | CARD | FLST | HSPT |
MLST | NAME | PLST | RMAP |
SFXE | SLST | tBMP | tMOV |
tWAV | VARS | VERS | ZIPS |
Scripts | Variables | ||
External commands |
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.
a_Data
xastartupbtnhide()
Used in the main menu card. Hides the "setup" (or "play riven") button by filling the hotspot rectangle with black and disabling the hotspot.
xasetupcomplete()
Called when clicking the "continue" button in the "volume adjustment" card.
xaatrusopenbook()
Called after loading Atrus's journal card.
xaatrusbookback(), xaatrusbookprevpage(), xaatrusbooknextpage()
Called when clicking hotspots in Atrus's journal card.
xacathopenbook()
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.
b_Data
- xblabopenbook
- xblabbooknextpage
- xblabbookprevpage
- xsoundplug
- xbchangeboiler
xbupdateboiler()
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.
- xbsettrap
- xbcheckcatch
- xbait
- xbfreeytram
- xbaitplate
- xbisland190_opencard
- xbisland190_resetsliders
- xbisland190_slidermd
- xbisland190_slidermw
- xbscpbtn
- xbisland_domecheck
xvalvecontrol()
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.
- xbchipper
g_Data
xflies(u0, u1)
Start the "flies" realtime effect. u0 seems always 0, u1 is a small number (< 10).
- xgresetpins()
- xgrotatepins()
- xgpincontrols()
- xgisland25_opencard()
- xgisland25_resetsliders()
- xgisland25_slidermd()
- xgisland25_slidermw()
- xgscpbtn()
- xgisland1490_domecheck()
- xgplateau3160_dopools()
- xgwt200_scribetime()
- xgwt900_scribe()
- xgplaywhark()
- xgrviewer()
- xgwharksnd()
- xglview_prisonoff()
- xglview_villageoff()
- xglviewer()
- xglview_prisonon()
- xglview_villageon()
j_Data
xflies(u0, u1)
See g_Data.
- xjplaybeetle_600
- xjplaybeetle_950
- xjtunnel103_pictfix
- xreseticons
- xicon
- xcheckicons
- xtoggleicon
- xjtunnel105_pictfix
- xjtunnel106_pictfix
- xjtunnel104_pictfix
- xvga1300_carriage
- xjdome25_resetsliders
- xjdome25_slidermd
- xjdome25_slidermw
- xjscpbtn
- xjisland3500_domecheck
- xhandlecontroldown
- xhandlecontrolmid
- xhandlecontrolup
- xjplaybeetle_1450
- xjplaybeetle_1050
- xjplaybeetle_550
- xjlagoon700_alert
- xjlagoon800_alert
- xjlagoon1500_alert
- xschool280_playwhark
o_Data
- xorollcredittime()
- xooffice30_closebook()
- xbookclick(movie_sref, start_time, end_time, u0)
- xobedroom5_closedrawer()
- xogehnopenbook()
- xogehnbookprevpage()
- xogehnbooknextpage()
- xgwatch()
p_Data
- xpisland990_elevcombo(button)
- xpscpbtn()
- xpisland290_domecheck()
- xpisland25_opencard()
- xpisland25_resetsliders()
- xpisland25_slidermd()
- xpisland25_slidermw()
r_Data
- xrcredittime()
- xrhideinventory()
- xrshowinventory()
- xrwindowsetup()
t_Data
- xtexterior300_telescopedown()
- xtexterior300_telescopeup()
xtisland390_covercombo(button)
Called when clicking the telescope cover buttons. button is the button number (1...5).
- xtatrusgivesbooks()
- xtchotakesbook()
- xthideinventory()
- xt7500_checkmarbles()
- xt7600_setupmarbles()
- xt7800_setup()
- xdrawmarbles()
- xtakeit()
- xtscpbtn()
- xtisland4990_domecheck()
- xtisland5056_opencard()
- xtisland5056_resetsliders()
- xtisland5056_slidermd()
- xtisland5056_slidermw()