https://insidethelink.ortiche.net/wiki/api.php?action=feedcontributions&user=TitoDalCanton&feedformat=atom
A look inside The Link @ wiki - User contributions [en]
2024-03-28T22:02:21Z
User contributions
MediaWiki 1.23.15
https://insidethelink.ortiche.net/wiki/index.php/Other_Games
Other Games
2011-11-19T20:51:23Z
<p>TitoDalCanton: Protected "Other Games" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))</p>
<hr />
<div>Myst and Riven aren't the only games to use the [[Mohawk archive format|Mohawk format]]. In fact, many Broderbund based games use it. Here is a (partial) list of games known to use it:<br />
<br />
* In the 1st Degree<br />
* James Discovers Math<br />
* James Explores Math<br />
* Logical Journey of the Zoombinis (aka Zoombinis Logical Journey)<br />
* Maggie's Barnyard Adventure<br />
* The Treehouse<br />
* Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)<br />
* Where in the USA is Carmen Sandiego?<br />
* Where in the World is Carmen Sandiego? (Windows/Mac version)<br />
<br />
In addition, various Living Books titles use the format or the [[Old Mohawk archive format|"old" Mohawk format]].<br />
<br />
= Video =<br />
All the videos of the original games are QuickTime movies. The later Zoombinis release has Bink videos instead.<br />
<br />
The audio codec is raw, signed, 16-bit data in Big Endian format. The video codec, however, is not standard. It has the FourCC 'QkBk' and has description "CDToons". Neither QuickTime nor mplayer/ffmpeg can play this codec and its format is unknown. Some videos still use Cinepak (like "The Chief" videos in Carmen Sandiego).<br />
<br />
= Game Specific Information =<br />
<br />
== James Discovers/Explores Math ==<br />
<br />
=== Resources ===<br />
==== tANM ====<br />
Animation?<br />
<br />
==== tMFO ====<br />
<br />
<br />
== Logical Journey of the Zoombinis ==<br />
<br />
=== Resources ===<br />
==== \0SND ====<br />
These are [[Mohawk Sounds]]. Note that they begin with a NULL character.<br />
<br />
==== CURS ====<br />
Cursor?<br />
<br />
==== SCRB ====<br />
==== SCRS ====<br />
==== NODE ====<br />
==== PATH ====<br />
==== SHPL ====<br />
<br />
<br />
== Maggie's Barnyard Adventure ==<br />
<br />
=== Resources ===<br />
==== tCUR ====<br />
Cursor?<br />
<br />
== In the 1st Degree ==<br />
=== Resources ===<br />
==== ASET ====<br />
Unknown. Stands for asset (they are found in ASSETLI1.MHK and ASSETLI2.MHK).<br />
<br />
==== ANSW ====<br />
Answer?<br />
<br />
==== CLIP ====<br />
Video clip?<br />
<br />
==== GADG ====<br />
Gadget?<br />
<br />
==== MBAR ====<br />
Menu bar?<br />
<br />
==== MENU ====<br />
Menu?<br />
<br />
==== MITM ====<br />
==== QSET ====<br />
This is a question set. This links questions together into sort of like a dialogue tree.<br />
<br />
(Big Endian Order)<br />
<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|unsigned short||values[count]<br />
|}<br />
<br />
* ''count'' is the amount of values the follow.<br />
* ''values'' is an array which is probably a list of QUES/ANSW (need to check).<br />
<br />
==== QUES ====<br />
This is a question. It appears to hold data for the text as well as the sound clip associated with it.<br />
<br />
(Big Endian Order)<br />
<br />
{| class="structure"<br />
|unsigned short||u0<br />
|-<br />
|unsigned short||sound<br />
|-<br />
|unsigned short||u1<br />
|-<br />
|unsigned short||u2<br />
|-<br />
|unsigned short||u3<br />
|-<br />
|unsigned short||u4<br />
|-<br />
|unsigned short||u5<br />
|-<br />
|unsigned short||u6<br />
|-<br />
|unsigned short||u7<br />
|-<br />
|unsigned short||u8<br />
|-<br />
|unsigned short||u8<br />
|-<br />
|char *||string<br />
|}<br />
<br />
* ''u0'' appears to always be 1. Possibly question count?<br />
* ''sound'' is the sound clip associated with this question.<br />
* ''u1'' is unknown. Always 0?<br />
* ''u2'' is unknown. Possibly the answer to this question?<br />
* ''u3'' is unknown. It's usually 2.<br />
* ''u4'' is unknown. It's usually 100.<br />
* ''u5'' is unknown. It's usually 100.<br />
* ''u6'' is unknown. It's usually 100.<br />
* ''u7'' is unknown. Always 0?<br />
* ''u8'' is unknown. Always 0?<br />
* ''u9'' is unknown. Possibly the answer to this question?<br />
* ''string'' is the null-terminated string representing text for this question.<br />
<br />
==== TAPE ====<br />
==== THST ====<br />
==== THTR ====<br />
==== WITN ====<br />
Witness?<br />
<br />
== Common Resources ==<br />
<br />
==== tBMP ====<br />
All tBMP resources contain a [[Mohawk Bitmaps|Mohawk Bitmap]].<br />
<br />
==== tWAV ====<br />
This is a [[Mohawk Sounds]] resource. (Found in all but ''Logical Journey of the Zoombinis'')<br />
<br />
==== tPAL ====<br />
This is a palette. It is used outside of tBMP resources as a way to share palette information.<br />
<br />
(Big Endian Order)<br />
<br />
{| class="structure"<br />
|unsigned short||color_start<br />
|-<br />
|unsigned short||color_count<br />
|}<br />
<br />
Following that is ''color_count'' RGBA quads. ''color_start'' is the index at which the RGBA quads start.<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'', ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)'', ''Green Eggs and Ham'', ''In the 1st Degree'', and ''The Treehouse''.<br />
<br />
==== tCNT ====<br />
Unknown. The data size is always 4 and follows this format:<br />
<br />
(Big Endian Order)<br />
<br />
{| class="structure"<br />
|unsigned short||resource_id<br />
|-<br />
|unsigned short||u0<br />
|}<br />
<br />
''resource_id'' appears to always equal the tCNT that this belongs to.<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'', ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)'', ''James Discovers Math'', ''Green Eggs and Ham'', ''In the 1st Degree'', and ''James Explores Math''.<br />
<br />
==== tSCR ====<br />
Unknown.<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'', ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)'', ''Green Eggs and Ham'', and ''The Treehouse''.<br />
<br />
==== STRL ====<br />
This is a string list.<br />
<br />
{| class="structure"<br />
|byte||string_count<br />
|}<br />
<br />
Following that is ''string_count'' NULL-terminated strings. This seems reminiscent of Riven's [[Riven_NAME_resources|NAME resources]].<br />
<br />
This is found in ''Logical Journey of the Zoombinis'', ''Where in the World is Carmen Sandiego?'', and ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)''.<br />
<br />
==== tBMH ====<br />
These appear to also contain a [[Mohawk Bitmaps|Mohawk Bitmap]].<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'', ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)'', ''Green Eggs and Ham'', and ''The Treehouse''.<br />
<br />
==== tMID ====<br />
This is a [[Mohawk MIDI]] resource.<br />
<br />
This is found in ''Logical Journey of the Zoombinis'', ''James Discovers Math'', ''James Explores Math'', ''In the 1st Degree'', and ''The Treehouse''.<br />
<br />
==== REGS ====<br />
Unknown.<br />
<br />
This is found in ''Logical Journey of the Zoombinis'', ''Green Eggs and Ham'', and ''The Treehouse''.<br />
<br />
==== BYTS ====<br />
This appears to be able to hold multiple things. In DATABASE.MHK, it holds database entries (one large null-terminated string), but elsewhere it appears to be something else.<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'' and ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)''.<br />
<br />
==== INTS ====<br />
Unknown.<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'' and ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)''.<br />
<br />
==== BBOX ====<br />
Some sort of boxes? It follows this format:<br />
<br />
(Big Endian Order)<br />
<br />
{| class="structure"<br />
|byte||rect_count<br />
|}<br />
<br />
And then, it has ''rect_count'' rects:<br />
<br />
{| class="structure"<br />
|unsigned short||left<br />
|-<br />
|unsigned short||top<br />
|-<br />
|unsigned short||right<br />
|-<br />
|unsigned short||bottom<br />
|}<br />
<br />
This is found in ''Where in the World is Carmen Sandiego?'' and ''Where in America is Carmen Sandiego? (The Great Amtrak Train Adventure)''.<br />
<br />
<br />
==== ANI ====<br />
Animation? (Note: Ends in a space character)<br />
<br />
This is found in ''Maggie's Barnyard Adventure'' and ''Green Eggs and Ham''.<br />
<br />
==== BITL ====<br />
This is found in ''Maggie's Barnyard Adventure'' and ''Green Eggs and Ham''.<br />
<br />
==== SCRP ====<br />
This is found in ''Maggie's Barnyard Adventure'' and ''Green Eggs and Ham''.<br />
<br />
==== SPR# ====<br />
Sprites?<br />
This is found in ''Maggie's Barnyard Adventure'' and ''Green Eggs and Ham''.<br />
<br />
==== VRSN ====<br />
Version?<br />
<br />
In Green Eggs and Ham, it contains these two bytes:<br />
<div align="center" style="color:#008; font-family:monospace; margin:1em">00 02</div><br />
<br />
This is found in ''Maggie's Barnyard Adventure'' and ''Green Eggs and Ham''.<br />
<br />
==== SHP# ====<br />
This is found in ''Maggie's Barnyard Adventure'' and ''Green Eggs and Ham''.<br />
<br />
==== SYSX ====<br />
This appears to be a list of MIDI Sysex's. There are only two resources in Zoombini (which are found in MIDIMAP.DAT) and are 1 or 0xFFFF. They are identical. In the 1st Degree has several more in MIDIMAP.DAT.<br />
<br />
==== BMAP ====<br />
All BMAP resources contain a [[Mohawk Bitmaps|Mohawk Bitmap]].<br />
<br />
==== WAV ====<br />
(Note that the FourCC ends with a space)<br />
<br />
There are two variants of the format, one in little endian and one in big endian. You can tell the difference just by looking at the header tag.<br />
<br />
{| class="structure"<br />
|2 bytes||tag<br />
|-<br />
|unsigned short||sample_rate<br />
|-<br />
|10 bytes||u0<br />
|-<br />
|unsigned long||sample_size<br />
|}<br />
<br />
* ''tag'' is '''Wv''' ('''vW''' if little endian).<br />
* ''sample_rate'' is the sample rate, usually 11127.<br />
* ''u0'' has only been observed as all zeroes, but this is likely analogous to the loop part of the [[Mohawk Sounds|Mohawk sound resource]].<br />
* ''sample_size'' is the size of the sample, usually the rest of the resource<br />
<br />
Following this is ''sample_size'' bytes of raw, unsigned, 8-bit PCM data.<br />
<br />
==== CTBL ====<br />
Unknown, possibly color table?</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Riven_engine_overview
Riven engine overview
2011-11-19T20:50:43Z
<p>TitoDalCanton: Protected "Riven engine overview" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))</p>
<hr />
<div>{{Riven}}<br />
<br />
A Riven scenario is made of virtual objects called ''stacks'' and each stack is a list of virtual objects called ''cards''. This may remember HyperCard: it's the same approach. Each card has an associated ''script'', a sequence of commands to be executed in response of events happening to the card (for example, card creation). The player interacts with the game by means of invisible buttons, placed within cards and called ''hotspots''. Hotspots have associated scripts too, responding to events different than cards (for example, mouse clicks). Within cards can also be placed bitmaps and movies. Finally, sounds can be played.<br />
<br />
Riven stacks are named<br />
*aspit (main menu, books, setup screens)<br />
**a_Data.mhk<br />
**a_Sounds.mhk<br />
*ospit (Gehn's office)<br />
**o_Data.mhk<br />
**o_Sounds.mhk<br />
*pspit (prison island)<br />
**p_Data.mhk<br />
**p_Sounds.mhk<br />
*gspit (garden island)<br />
**g_Data.mhk<br />
**g_Sounds.mhk<br />
*rspit (rebel age)<br />
**r_Data.mhk<br />
**r_Sounds.mhk<br />
*tspit (temple island).<br />
**t_Data.mhk (Riven 5CD/Demo)<br />
**t_Data1.mhk, t_Data2.mhk (Riven DVD)<br />
**t_Sounds.mhk<br />
*jspit (jungle island)<br />
**j_Data.mhk (Riven Demo)<br />
**j_Data1.mhk, j_Data2.mhk (Riven 5CD/DVD)<br />
**j_Sounds.mhk<br />
*bspit (boiler island)<br />
**b_Data.mhk<br />
**b_Sounds.mhk<br />
<br />
Physically, a stack is described by a set of data blocks called ''resources''. Resources are identified by a 4-char ''type'' and an integer ''ID''. Optionally they can also have a name, but it seems completely ignored by the engine. The resource type tells what kind of data is stored in the resource; see the [[Riven_resources|resource type list]] for types used in Riven.<br />
<br />
Resources belonging to a certain stack are archived inside an arbitrary number of [[Mohawk_archive_format|Mohawk files]] (listed above under their respective stacks). The file "riven.cfg" tells which files compose each stack by associating stack and file names.<br />
<br />
Saved games are Mohawk archives too, and they contain additional resource types as described in the [[Riven_resources|resource type list]].<br />
<br />
The Riven engine has a secret, interesting [[Riven_debug_shell|debug shell]].<br />
<br />
==Notes on stack switching==<br />
The current stack can be changed from scripts using [[Riven scripts#Command 27: go to stack|script command 27]]. For example, when the player activates a MagLev, first the car movie is played, and then command 27 is called to change the current stack to the new island. This command is also used in the "Play Riven" button. However, most linking books actually change stack simply by moving to another card which has no buttons and no scripts. Apparently, there is some hardcoded mechanism inside the engine which triggers the stack change when one of these "special" cards is entered. These cards are listed here.<br />
<br />
=== CD Version ===<br />
{| border=1 cellpadding=4 cellspacing=0 style="border:1px #000 solid;border-collapse:collapse;"<br />
|- style="background:#CCC"<br />
! Stack !! Card ID !! Target stack !! Target card<br />
|-<br />
|bspit||447||ospit||1<br />
|-<br />
|gspit||178||ospit||1<br />
|-<br />
|jspit||228||rspit||3<br />
|-<br />
|jspit||344||ospit||1<br />
|-<br />
|ospit||58||pspit||43<br />
|-<br />
|ospit||62||jspit||341<br />
|-<br />
|ospit||67||gspit||175<br />
|-<br />
|ospit||72||bspit||444<br />
|-<br />
|ospit||76||tspit||387<br />
|-<br />
|pspit||46||ospit||1<br />
|-<br />
|rspit||13||jspit||215<br />
|-<br />
|tspit||392||ospit||1<br />
|}<br />
<br />
=== DVD Version ===<br />
{| border=1 cellpadding=4 cellspacing=0 style="border:1px #000 solid;border-collapse:collapse;"<br />
|- style="background:#CCC"<br />
! Stack !! Card ID !! Target stack !! Target card<br />
|-<br />
|aspit||8||ospit||9<br />
|-<br />
|bspit||447||ospit||1<br />
|-<br />
|gspit||178||ospit||1<br />
|-<br />
|jspit||228||rspit||3<br />
|-<br />
|jspit||343||ospit||1<br />
|-<br />
|ospit||58||pspit||43<br />
|-<br />
|ospit||62||jspit||340<br />
|-<br />
|ospit||67||gspit||175<br />
|-<br />
|ospit||72||bspit||444<br />
|-<br />
|ospit||76||tspit||393<br />
|-<br />
|pspit||46||ospit||1<br />
|-<br />
|rspit||13||jspit||215<br />
|-<br />
|tspit||398||ospit||1<br />
|}<br />
<br />
== Stack ID's in Saved Games ==<br />
In saved games, the "[[Riven variables#currentstackid|currentstackid]]" variable holds what the current stack is by a number. This table shows what stack each number represents:<br />
<br />
{| border=1 cellpadding=4 cellspacing=0 style="border:1px #000 solid;border-collapse:collapse;"<br />
|- style="background:#CCC"<br />
! ID !! Stack<br />
|-<br />
|1||ospit<br />
|-<br />
|2||pspit<br />
|-<br />
|3||rspit<br />
|-<br />
|4||tspit<br />
|-<br />
|5||bspit<br />
|-<br />
|6||gspit<br />
|-<br />
|7||jspit<br />
|-<br />
|8||aspit<br />
|}<br />
<br />
Such association seems to be defined in the Riven.ini file, in particular from its "StackNumber" section.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Talk:Riven_tBMP_resources
Talk:Riven tBMP resources
2009-02-24T20:18:51Z
<p>TitoDalCanton: details for my decoder</p>
<hr />
<div>Aaron, I'm not entirely clear on your recent additions to the tBMP decode algorithms. Are you aware of specific images that exhibit the behaviors you describe to use a test cases, or a decoder implementation which respects those details?<br />
<br />
'''[ [[User:TitoDalCanton|TitoDalCanton]] 21:18, 24 February 2009 (CET) ]''' I think I've seen Aaron's effects in some compressed tBMPs. In particular, I recall being surprised by observing duplets repeating themselves, though I don't remember which tBMPs I was inspecting at the time.<br />
<br />
'''[ [[User:Aaron|Aaron]] 06:55, 23 February 2009 (CET) ]''' I mean to go back and check specifically for this, but I'm almost completely certain that this is true. Initially, in my algorithm, I used an unsigned integer to represent the number of pixels to look back from where I started, and decremented it each time I copied a pixel. This crippled all my images, and caused weird segfaults when it rolled over after 0. This was fixed when I used a signed integer type (ie let the command copy into newly-written pixels). This is basically an implementation detail, most people would do it a different way where this doesn't matter, or use a signed integer to begin with. [also, I think that pixel-based lookbacks ignore the extra space off the edge, while duplet-based ones do not, but I'm not certain on that. I'll verify that too, but it's too late now.] I didn't realize this was new information, I just thought it was left out.<br />
<br />
'''[ [[User:Aaron|Aaron]] 04:21, 24 February 2009 (CET) ]''' OK, I found specific examples. First of all, pixel lookbacks either never happen close enough to new rows to look back into the last row, or they take into account the extra info not in the final image (the bytes per row thing I mentioned in the article), so I'm glad I tried to confirm it before adding it. As for the others, all of these examples are from my original 5-cd riven set, and they're all from b_Data.MHK. tBMPs 99, 101, and 106 (and others) have a higher bytes per row than image width, and only appear correctly when rendered as if they were (bytes per row) wide, then cropped. tBMP 0 (and almost every other compressed image) has many repeat subcommands that ask for more data than there is available at the time. Specifically, byte 165 of the command stream of tBMP 0 is 0xEC followed by 0x08, meaning n = 6 and m = 8, so it needs 12 pixels copied from 8 pixels ago. These images only render correctly when they are allowed to read into themselves. This also happens with repeat command 0xFC. I hope this clarifies things.<br />
<br />
'''[ [[User:TitoDalCanton|TitoDalCanton]] 21:18, 24 February 2009 (CET) ]''' I checked my decoder implementation and I can confirm that your interpretation of row bytes is correct. In fact, I decode to a larger buffer (''rowbytes'' pixels wide) and then crop it to ''width'' pixels to get the final image.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Talk:Riven_tBMP_resources
Talk:Riven tBMP resources
2009-02-20T10:21:22Z
<p>TitoDalCanton: that's me</p>
<hr />
<div>Aaron, I'm not entirely clear on your recent additions to the tBMP decode algorithms. Are you aware of specific images that exhibit the behaviors you describe to use a test cases, or a decoder implementation which respects those details?<br />
<br />
[Tito] I think I've seen Aaron's effects in some compressed tBMPs. In particular, I recall being surprised by observing duplets repeating themselves, though I don't remember which tBMPs I was inspecting at the time.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Talk:Riven_tBMP_resources
Talk:Riven tBMP resources
2009-02-20T10:20:32Z
<p>TitoDalCanton: </p>
<hr />
<div>Aaron, I'm not entirely clear on your recent additions to the tBMP decode algorithms. Are you aware of specific images that exhibit the behaviors you describe to use a test cases, or a decoder implementation which respects those details?<br />
<br />
I think I've seen Aaron's effects in some compressed tBMPs. In particular, I recall being surprised by observing duplets repeating themselves, though I don't remember which tBMPs I was inspecting at the time.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Main_Page
Main Page
2009-02-19T13:00:04Z
<p>TitoDalCanton: wiki account and mailing list info</p>
<hr />
<div>Welcome. This wiki is the evolution of [http://web.archive.org/web/20070715170601rn_1/www.dalcanton.it/tito/esperimenti/riven/ A look inside Riven], a research project aimed at understanding how the Riven game engine works. This effort is now being extended to the Myst engine as well as other Broderbund games which use Mohawk, and we hope this wiki will be its central organization hub. Would you like to contribute? Contact [[User:TitoDalCanton|Tito]], your help is welcome. Wiki accounts are given on demand. You might be interested in joining the [https://liste.indivia.net/listinfo/insidethelink mailing list] as well.<br />
<br />
Riven is Copyright © 1997 Cyan Worlds, Inc. All rights reserved. Riven, MYST, and Cyan are trademarks of Cyan Worlds, Inc.<br />
<br />
== Common things ==<br />
*[[Mohawk_archive_format|Mohawk archive format]]<br />
*[[Mohawk Sounds|Mohawk Sounds]]<br />
*[[Mohawk MIDI|Mohawk MIDI]]<br />
<br />
== Riven engine ==<br />
*[[Riven_engine_overview|Overview]]<br />
*[[Riven_resources|List of resource types]]<br />
*[[Riven_scripts|Scripts]]<br />
*[[Riven_variables|List of variables]]<br />
*[[Riven_external_commands|List of external commands]]<br />
<br />
== Myst engine ==<br />
*[[Myst engine overview|Overview]]<br />
*[[Myst_resources|List of resources]]<br />
<br />
== Other Games ==<br />
*[[Other Games]]<br />
<br />
== Reimplementations ==<br />
Here are links to projects aimed at reimplementing the original Riven/Myst engines on modern platforms.<br />
*[http://www.launchpad.net/rivenx Riven X] - Native MacOS X port<br />
*[http://pointandclick.sourceforge.net Point and Click] - Java port<br />
*[http://mhkplayer.sourceforge.net MHK Player] - [http://www.wxwidgets.org wxWidgets] port targeting Linux and Windows<br />
*[http://riven-wahrk.sourceforge.net Riven Wahrk] - Linux port<br />
*[http://clone2727.blogspot.com Myst and Riven for ScummVM] - [http://www.scummvm.org ScummVM] port (which supports a wide variety of platforms)</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-11-04T22:58:34Z
<p>TitoDalCanton: /* Command 117 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
A histogram of command usage in Myst original RLST resources can be found [http://altivec.indivia.net/alitl/myst_rlst_cmd_hist.svg here].<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
In some cases it seems to toggle the associated variable between logical "0" and "1" (e.g. see the marker switches on MYST island). However, it's probably more complicated than this: for example, in Mechanical card 6267 it seems to ''increment'' the associated variable.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound, non-blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Start sound with ID ''sound_id''. Script execution resumes immediately and the sound plays in the background.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''card'' ''u1''<br />
<br />
Seems to go to card ''card''. ''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
In Channelwood, card 3012, this command is invoked by the buttons in Achenar's video device and ''u0'' is the button number.<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like card IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like card IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_VIEW_resources
Myst VIEW resources
2008-11-03T13:10:54Z
<p>TitoDalCanton: forgot that</p>
<hr />
<div>{{Myst}}<br />
<br />
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.<br />
<br />
Original hints by Petroff Heroj.<br />
<br />
=Basic Format=<br />
The data is split into five sections with variable size and different meanings:<br />
*card flags<br />
*pictures<br />
*sounds<br />
*element list<br />
*other resources<br />
<br />
==Card flags==<br />
This is just<br />
{| class="structure"<br />
|unsigned short||card_flags<br />
|}<br />
''card_flags'' seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.<br />
<br />
==Picture section==<br />
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with<br />
{| class="structure"<br />
|unsigned short||count<br />
|}<br />
If ''count'' = 0 then there is a single, static background picture and the whole section reduces to<br />
{| class="structure"<br />
|unsigned short||count = 0<br />
|-<br />
|unsigned short||picture_id<br />
|}<br />
where ''picture_id'' is the WDIB (or PICT) resource ID.<br />
<br />
Otherwise, if ''count'' > 0, the section contains ''count'' conditional blocks:<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||conditional blocks<br />
|}<br />
Each conditional block associates a variable with an array of picture IDs:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|short||picture_ids[id_count]<br />
|}<br />
The card will use the value of the specified variable to index the ID array and display that picture.<br />
<br />
==Sound section==<br />
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.<br />
<br />
{| class="structure"<br />
|short||sound<br />
|}<br />
<br />
If ''sound'' is -1 or -3, the section stops here.<br />
*-1 seems to continue with the current sound.<br />
*-3 seems to stop the current sound at all (mute).<br />
<br />
If ''sound'' is not negative or -2, the section includes a second field:<br />
{| class="structure"<br />
|short||sound<br />
|-<br />
|unsigned short||volume<br />
|}<br />
A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''volume''.<br />
<br />
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section:<br />
{| class="structure"<br />
|short||sound = -4<br />
|-<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||count<br />
|-<br />
|variable||sound specifications<br />
|}<br />
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/volume combination based on the given variable.<br />
<br />
==Element list==<br />
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||element specifications<br />
|}<br />
Each specification begins with an unsigned short ''type'' describing what the element is.<br />
*Type 1 is a picture (WDIB or PICT). Resource ID follows.<br />
*Type 2 is a sound (MSND). Resource ID follows.<br />
*Type 3 is a conditional block associating a variable with an ID array. This structure follows:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|unsigned short||u0<br />
|-<br />
|short||ids[id_count]<br />
|}<br />
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.<br />
*Type 4 seems to refer to pictures, since a WDIB ID follows.<br />
*Type 5 seems to refer to sounds, since a MSND ID follows.<br />
<br />
==Other resources==<br />
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:<br />
{| class="structure"<br />
|unsigned short||rlst_id<br />
|-<br />
|unsigned short||hint_id<br />
|-<br />
|unsigned short||init_id<br />
|-<br />
|unsigned short||exit_id<br />
|}<br />
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_VIEW_resources
Myst VIEW resources
2008-11-03T13:09:50Z
<p>TitoDalCanton: flags is more likely volume</p>
<hr />
<div>{{Myst}}<br />
<br />
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.<br />
<br />
Original hints by Petroff Heroj.<br />
<br />
=Basic Format=<br />
The data is split into five sections with variable size and different meanings:<br />
*card flags<br />
*pictures<br />
*sounds<br />
*element list<br />
*other resources<br />
<br />
==Card flags==<br />
This is just<br />
{| class="structure"<br />
|unsigned short||card_flags<br />
|}<br />
''card_flags'' seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.<br />
<br />
==Picture section==<br />
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with<br />
{| class="structure"<br />
|unsigned short||count<br />
|}<br />
If ''count'' = 0 then there is a single, static background picture and the whole section reduces to<br />
{| class="structure"<br />
|unsigned short||count = 0<br />
|-<br />
|unsigned short||picture_id<br />
|}<br />
where ''picture_id'' is the WDIB (or PICT) resource ID.<br />
<br />
Otherwise, if ''count'' > 0, the section contains ''count'' conditional blocks:<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||conditional blocks<br />
|}<br />
Each conditional block associates a variable with an array of picture IDs:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|short||picture_ids[id_count]<br />
|}<br />
The card will use the value of the specified variable to index the ID array and display that picture.<br />
<br />
==Sound section==<br />
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.<br />
<br />
{| class="structure"<br />
|short||sound<br />
|}<br />
<br />
If ''sound'' is -1 or -3, the section stops here.<br />
*-1 seems to continue with the current sound.<br />
*-3 seems to stop the current sound at all (mute).<br />
<br />
If ''sound'' is not negative or -2, the section includes a second field:<br />
{| class="structure"<br />
|short||sound<br />
|-<br />
|unsigned short||volume<br />
|}<br />
A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''volume''.<br />
<br />
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section:<br />
{| class="structure"<br />
|short||sound = -4<br />
|-<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||count<br />
|-<br />
|variable||sound specifications<br />
|}<br />
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/flags combination based on the given variable.<br />
<br />
==Element list==<br />
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||element specifications<br />
|}<br />
Each specification begins with an unsigned short ''type'' describing what the element is.<br />
*Type 1 is a picture (WDIB or PICT). Resource ID follows.<br />
*Type 2 is a sound (MSND). Resource ID follows.<br />
*Type 3 is a conditional block associating a variable with an ID array. This structure follows:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|unsigned short||u0<br />
|-<br />
|short||ids[id_count]<br />
|}<br />
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.<br />
*Type 4 seems to refer to pictures, since a WDIB ID follows.<br />
*Type 5 seems to refer to sounds, since a MSND ID follows.<br />
<br />
==Other resources==<br />
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:<br />
{| class="structure"<br />
|unsigned short||rlst_id<br />
|-<br />
|unsigned short||hint_id<br />
|-<br />
|unsigned short||init_id<br />
|-<br />
|unsigned short||exit_id<br />
|}<br />
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_VIEW_resources
Myst VIEW resources
2008-11-03T13:08:13Z
<p>TitoDalCanton: Protected "Myst VIEW resources" [edit=autoconfirmed:move=autoconfirmed]</p>
<hr />
<div>{{Myst}}<br />
<br />
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.<br />
<br />
Original hints by Petroff Heroj.<br />
<br />
=Basic Format=<br />
The data is split into five sections with variable size and different meanings:<br />
*card flags<br />
*pictures<br />
*sounds<br />
*element list<br />
*other resources<br />
<br />
==Card flags==<br />
This is just<br />
{| class="structure"<br />
|unsigned short||card_flags<br />
|}<br />
''card_flags'' seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.<br />
<br />
==Picture section==<br />
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with<br />
{| class="structure"<br />
|unsigned short||count<br />
|}<br />
If ''count'' = 0 then there is a single, static background picture and the whole section reduces to<br />
{| class="structure"<br />
|unsigned short||count = 0<br />
|-<br />
|unsigned short||picture_id<br />
|}<br />
where ''picture_id'' is the WDIB (or PICT) resource ID.<br />
<br />
Otherwise, if ''count'' > 0, the section contains ''count'' conditional blocks:<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||conditional blocks<br />
|}<br />
Each conditional block associates a variable with an array of picture IDs:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|short||picture_ids[id_count]<br />
|}<br />
The card will use the value of the specified variable to index the ID array and display that picture.<br />
<br />
==Sound section==<br />
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.<br />
<br />
{| class="structure"<br />
|short||sound<br />
|}<br />
<br />
If ''sound'' is -1 or -3, the section stops here.<br />
*-1 seems to continue with the current sound.<br />
*-3 seems to stop the current sound at all.<br />
<br />
If ''sound'' is not negative or -2, the section includes a second field:<br />
{| class="structure"<br />
|short||sound<br />
|-<br />
|short||flags<br />
|}<br />
A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''flags''. ''flags'' could also be volume/balance control.<br />
<br />
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section:<br />
{| class="structure"<br />
|short||sound = -4<br />
|-<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||count<br />
|-<br />
|variable||sound specifications<br />
|}<br />
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/flags combination based on the given variable.<br />
<br />
==Element list==<br />
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||element specifications<br />
|}<br />
Each specification begins with an unsigned short ''type'' describing what the element is.<br />
*Type 1 is a picture (WDIB or PICT). Resource ID follows.<br />
*Type 2 is a sound (MSND). Resource ID follows.<br />
*Type 3 is a conditional block associating a variable with an ID array. This structure follows:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|unsigned short||u0<br />
|-<br />
|short||ids[id_count]<br />
|}<br />
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.<br />
*Type 4 seems to refer to pictures, since a WDIB ID follows.<br />
*Type 5 seems to refer to sounds, since a MSND ID follows.<br />
<br />
==Other resources==<br />
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:<br />
{| class="structure"<br />
|unsigned short||rlst_id<br />
|-<br />
|unsigned short||hint_id<br />
|-<br />
|unsigned short||init_id<br />
|-<br />
|unsigned short||exit_id<br />
|}<br />
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_VIEW_resources
Myst VIEW resources
2008-11-03T13:07:42Z
<p>TitoDalCanton: killed old case studies</p>
<hr />
<div>{{Myst}}<br />
<br />
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.<br />
<br />
Original hints by Petroff Heroj.<br />
<br />
=Basic Format=<br />
The data is split into five sections with variable size and different meanings:<br />
*card flags<br />
*pictures<br />
*sounds<br />
*element list<br />
*other resources<br />
<br />
==Card flags==<br />
This is just<br />
{| class="structure"<br />
|unsigned short||card_flags<br />
|}<br />
''card_flags'' seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.<br />
<br />
==Picture section==<br />
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with<br />
{| class="structure"<br />
|unsigned short||count<br />
|}<br />
If ''count'' = 0 then there is a single, static background picture and the whole section reduces to<br />
{| class="structure"<br />
|unsigned short||count = 0<br />
|-<br />
|unsigned short||picture_id<br />
|}<br />
where ''picture_id'' is the WDIB (or PICT) resource ID.<br />
<br />
Otherwise, if ''count'' > 0, the section contains ''count'' conditional blocks:<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||conditional blocks<br />
|}<br />
Each conditional block associates a variable with an array of picture IDs:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|short||picture_ids[id_count]<br />
|}<br />
The card will use the value of the specified variable to index the ID array and display that picture.<br />
<br />
==Sound section==<br />
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.<br />
<br />
{| class="structure"<br />
|short||sound<br />
|}<br />
<br />
If ''sound'' is -1 or -3, the section stops here.<br />
*-1 seems to continue with the current sound.<br />
*-3 seems to stop the current sound at all.<br />
<br />
If ''sound'' is not negative or -2, the section includes a second field:<br />
{| class="structure"<br />
|short||sound<br />
|-<br />
|short||flags<br />
|}<br />
A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''flags''. ''flags'' could also be volume/balance control.<br />
<br />
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section:<br />
{| class="structure"<br />
|short||sound = -4<br />
|-<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||count<br />
|-<br />
|variable||sound specifications<br />
|}<br />
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/flags combination based on the given variable.<br />
<br />
==Element list==<br />
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||element specifications<br />
|}<br />
Each specification begins with an unsigned short ''type'' describing what the element is.<br />
*Type 1 is a picture (WDIB or PICT). Resource ID follows.<br />
*Type 2 is a sound (MSND). Resource ID follows.<br />
*Type 3 is a conditional block associating a variable with an ID array. This structure follows:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|unsigned short||u0<br />
|-<br />
|short||ids[id_count]<br />
|}<br />
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.<br />
*Type 4 seems to refer to pictures, since a WDIB ID follows.<br />
*Type 5 seems to refer to sounds, since a MSND ID follows.<br />
<br />
==Other resources==<br />
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:<br />
{| class="structure"<br />
|unsigned short||rlst_id<br />
|-<br />
|unsigned short||hint_id<br />
|-<br />
|unsigned short||init_id<br />
|-<br />
|unsigned short||exit_id<br />
|}<br />
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-23T09:14:58Z
<p>TitoDalCanton: added link to histogram</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
A histogram of command usage in Myst original RLST resources can be found [http://altivec.indivia.net/alitl/myst_rlst_cmd_hist.svg here].<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
In some cases it seems to toggle the associated variable between logical "0" and "1" (e.g. see the marker switches on MYST island). However, it's probably more complicated than this: for example, in Mechanical card 6267 it seems to ''increment'' the associated variable.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound, non-blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Start sound with ID ''sound_id''. Script execution resumes immediately and the sound plays in the background.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''card'' ''u1''<br />
<br />
Seems to go to card ''card''. ''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like card IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like card IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_variables
Myst variables
2008-10-22T18:25:19Z
<p>TitoDalCanton: /* Mechanical */</p>
<hr />
<div>As a preliminary step, this page lists Myst variable numbers and their meaning to aid the reverse engineering process. This is based on interpretation of VIEW conditional images and RLST scripts.<br />
<br />
The mechanism of variables is not yet very well understood. Apparently, there isn't a one-to-one mapping between variable numbers and variables themselves; for examples, it appears you can access the same variable by different numbers, and different variables by the same numbers (e.g. numbers 102 and 103 hold the status of red and blue pages in every Age).<br />
<br />
The scope of variable numbers seems to be local to the single stack (age). That is, variable 0 in Stoneship and variable 0 in Mechanical are independent. This raises the question of where global game info is kept.<br />
<br />
==Mechanical==<br />
0 status of the cache door in Achenar's room<br />
1 status of the cache door in Sirrus' room<br />
2 looks like a combination of blue page and box status in Achenar's cache<br />
3 status of the box in Achenar's cache<br />
4 status of the stair to the Myst book<br />
5 position of the fortress<br />
6 related to the position of the fortress<br />
7 status of the central elevator door<br />
10 status of the stair to the lower layer<br />
11 position of the "C" in the lower layer controls<br />
12 position of the gear in the lower layer<br />
13 position of the elevator<br />
14 tells if the elevator middle button has just been pressed<br />
15 status of the puzzle for accessing the Myst book<br />
16-19 symbol digits in the puzzle for the Myst book<br />
20-22 lighted crystal in Sirrus' room<br />
102 red page status<br />
103 blue page status<br />
<br />
==Selenitic==<br />
0 wind tunnel sound switch and, at the same time, mazerunner internal door button pushed<br />
1 caldera sound switch<br />
2 broken clock sound switch<br />
3 fountain sound switch<br />
4 stone forest sound switch<br />
5 antenna control door<br />
6 light in wind tunnel<br />
7 what you see outside the mazerunner window<br />
8 related to the antenna control monitor<br />
9-13 antenna control, source icons lighted<br />
14-17 antenna control, display digits<br />
18 antenna control, right arrow lighted<br />
19 antenna control, left arrow lighted<br />
20 see card 1147<br />
21 see card 1147<br />
22 see card 1147<br />
23 see card 1147<br />
24 see card 1147<br />
25 mazerunner direction indicator<br />
26 antenna control, sigma button lighted<br />
27 mazerunner speaker light on<br />
28 color of the button in the sound sliders panel<br />
29 mazerunner external blue button clicked<br />
30 see card 1182<br />
31 mazerunner FORWARD button pushed<br />
32 mazerunner arrow buttons pushed<br />
33 mazerunner BACKTRACK button pushed<br />
102 red page status<br />
103 blue page status<br />
<br />
==Stoneship==<br />
====0====<br />
Status of the water inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
<br />
====2====<br />
Status of the water in the room with the Myst linking book.<br />
*0: water is flooding the room.<br />
*1: no water.<br />
<br />
====4====<br />
Status of some things inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
*2: water is flooding the lighthouse, the box is floating.<br />
<br />
====5====<br />
Status of the lighthouse door:<br />
*0: door closed but unlocked.<br />
*1: door open.<br />
*2: door closed and still locked.<br />
<br />
====7====<br />
Whether the floating box with the key is closed (0) or open (1).<br />
<br />
====13====<br />
Status of light and water in the tunnels to Sirrus' and Achenar's rooms.<br />
*0: light off, water.<br />
*1: light off, no water.<br />
*2: light on, water.<br />
*3: light on, no water.<br />
<br />
====14====<br />
Related to the blue alarm in the tunnels.<br />
*0: alarm.<br />
*1: light.<br />
*2: alarm.<br />
<br />
====16====<br />
Status of the light in the Myst book room.<br />
*0: light off.<br />
*1: light on.<br />
<br />
====30====<br />
Related to the status of the lights in the tunnels.<br />
*0: submersed lights on.<br />
*1: submersed light off, tunnel light on.<br />
*2: alarm light on.<br />
<br />
====103====<br />
Seems to tell whether the blue page has been picked up.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_variables
Myst variables
2008-10-22T18:17:47Z
<p>TitoDalCanton: /* Mechanical */</p>
<hr />
<div>As a preliminary step, this page lists Myst variable numbers and their meaning to aid the reverse engineering process. This is based on interpretation of VIEW conditional images and RLST scripts.<br />
<br />
The mechanism of variables is not yet very well understood. Apparently, there isn't a one-to-one mapping between variable numbers and variables themselves; for examples, it appears you can access the same variable by different numbers, and different variables by the same numbers (e.g. numbers 102 and 103 hold the status of red and blue pages in every Age).<br />
<br />
The scope of variable numbers seems to be local to the single stack (age). That is, variable 0 in Stoneship and variable 0 in Mechanical are independent. This raises the question of where global game info is kept.<br />
<br />
==Mechanical==<br />
0 status of the cache door in Achenar's room<br />
1 status of the cache door in Sirrus' room<br />
2 looks like a combination of blue page and box status in Achenar's cache<br />
3 status of the box in Achenar's cache<br />
4 status of the stair to the Myst book<br />
5 position of the fortress<br />
6 related to the position of the fortress<br />
7 status of the central elevator door<br />
10 status of the stair to the lower layer<br />
11 position of the "C" in the lower layer controls<br />
12 position of the gear in the lower layer<br />
15 status of the puzzle for accessing the Myst book<br />
16-19 symbol digits in the puzzle for accessing the Myst book<br />
20-22 lighted crystal in Sirrus' room<br />
102 red page status<br />
103 blue page status<br />
<br />
==Selenitic==<br />
0 wind tunnel sound switch and, at the same time, mazerunner internal door button pushed<br />
1 caldera sound switch<br />
2 broken clock sound switch<br />
3 fountain sound switch<br />
4 stone forest sound switch<br />
5 antenna control door<br />
6 light in wind tunnel<br />
7 what you see outside the mazerunner window<br />
8 related to the antenna control monitor<br />
9-13 antenna control, source icons lighted<br />
14-17 antenna control, display digits<br />
18 antenna control, right arrow lighted<br />
19 antenna control, left arrow lighted<br />
20 see card 1147<br />
21 see card 1147<br />
22 see card 1147<br />
23 see card 1147<br />
24 see card 1147<br />
25 mazerunner direction indicator<br />
26 antenna control, sigma button lighted<br />
27 mazerunner speaker light on<br />
28 color of the button in the sound sliders panel<br />
29 mazerunner external blue button clicked<br />
30 see card 1182<br />
31 mazerunner FORWARD button pushed<br />
32 mazerunner arrow buttons pushed<br />
33 mazerunner BACKTRACK button pushed<br />
102 red page status<br />
103 blue page status<br />
<br />
==Stoneship==<br />
====0====<br />
Status of the water inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
<br />
====2====<br />
Status of the water in the room with the Myst linking book.<br />
*0: water is flooding the room.<br />
*1: no water.<br />
<br />
====4====<br />
Status of some things inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
*2: water is flooding the lighthouse, the box is floating.<br />
<br />
====5====<br />
Status of the lighthouse door:<br />
*0: door closed but unlocked.<br />
*1: door open.<br />
*2: door closed and still locked.<br />
<br />
====7====<br />
Whether the floating box with the key is closed (0) or open (1).<br />
<br />
====13====<br />
Status of light and water in the tunnels to Sirrus' and Achenar's rooms.<br />
*0: light off, water.<br />
*1: light off, no water.<br />
*2: light on, water.<br />
*3: light on, no water.<br />
<br />
====14====<br />
Related to the blue alarm in the tunnels.<br />
*0: alarm.<br />
*1: light.<br />
*2: alarm.<br />
<br />
====16====<br />
Status of the light in the Myst book room.<br />
*0: light off.<br />
*1: light on.<br />
<br />
====30====<br />
Related to the status of the lights in the tunnels.<br />
*0: submersed lights on.<br />
*1: submersed light off, tunnel light on.<br />
*2: alarm light on.<br />
<br />
====103====<br />
Seems to tell whether the blue page has been picked up.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-22T18:11:46Z
<p>TitoDalCanton: /* Command 0 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
In some cases it seems to toggle the associated variable between logical "0" and "1" (e.g. see the marker switches on MYST island). However, it's probably more complicated than this: for example, in Mechanical card 6267 it seems to ''increment'' the associated variable.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound, non-blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Start sound with ID ''sound_id''. Script execution resumes immediately and the sound plays in the background.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''card'' ''u1''<br />
<br />
Seems to go to card ''card''. ''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-22T17:47:08Z
<p>TitoDalCanton: /* Command 34 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound, non-blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Start sound with ID ''sound_id''. Script execution resumes immediately and the sound plays in the background.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''card'' ''u1''<br />
<br />
Seems to go to card ''card''. ''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-22T17:37:18Z
<p>TitoDalCanton: /* Command 27: play sound, blocking */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound, non-blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Start sound with ID ''sound_id''. Script execution resumes immediately and the sound plays in the background.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-22T17:19:20Z
<p>TitoDalCanton: /* Command 24: play sound */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound, non-blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Start sound with ID ''sound_id''. Script execution resumes immediately and the sound plays in the background.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done. Not sure what's the difference with command 24.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-22T17:11:32Z
<p>TitoDalCanton: /* Command 27 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27: play sound, blocking===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id'', blocking script execution until done. Not sure what's the difference with command 24.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-22T17:04:38Z
<p>TitoDalCanton: /* Command 27 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''. Not sure what's the difference with command 24.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_PICT_resources
Myst PICT resources
2008-10-17T21:32:08Z
<p>TitoDalCanton: DirectBits PICTs are RLE compressed</p>
<hr />
<div>{{Myst}}<br />
<br />
PICT resources contain the main game graphics in Myst Masterpiece Edition, replacing most [[Myst_WDIB_resources|WDIBs]] of the original edition with true-color versions.<br />
<br />
The data is usually stored in plain [http://en.wikipedia.org/wiki/PICT Apple PICT] format. It starts with the usual 512 byte block of platform-dependent data as in regular MacOS PICT resources. The PICT opcodes are usually a bunch of utility ones (e.g. PnSize and DefHilite) together with a CompressedQuickTime one containing JPEG data. The JPEG block seems to always start at offset 726 into the resource and can thus be simply extracted and decoded, ignoring the complicated PICT format.<br />
<br />
However, a few PICT resources contain more complex PICT data, also including LongComment opcodes. Pixels are given by a DirectBitsRect opcode and they are compressed using a run-length encoding similar to [http://en.wikipedia.org/wiki/PackBits PackBits] (packType = 4 in the PixMap). You spot these cases immediately from their large size with respect to JPEG ones. Among these exceptions there are PICT 2258 from STONE.DAT, PICTs 4109, 4112, 4113, 4447, 4461, 4462, 4479-4483, 4551, 4779, 11221, 11222 from MYST.DAT.<br />
<br />
Finally, a few perverse PICT resources just retain the WDIB format. Examples are PICTs 2105 and 2112 from STONE.DAT. Fortunately, it is quite easy to discriminate between WDIB and Apple PICT data.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_PICT_resources
Myst PICT resources
2008-10-17T15:38:43Z
<p>TitoDalCanton: restyle</p>
<hr />
<div>{{Myst}}<br />
<br />
PICT resources contain the main game graphics in Myst Masterpiece Edition, replacing most [[Myst_WDIB_resources|WDIBs]] of the original edition with true-color versions.<br />
<br />
The data is usually in plain [http://en.wikipedia.org/wiki/PICT Apple PICT] format. It starts with the usual 512 byte block of platform-dependent data as in regular MacOS PICT resources. The PICT opcodes are usually a bunch of utility ones (e.g. PnSize and DefHilite) together with a CompressedQuickTime one containing JPEG data. The JPEG block seems to always start at offset 726 into the resource and can thus be simply extracted and decoded, ignoring the complicated PICT format.<br />
<br />
However, a few PICT resources contain more complex PICT data, also including LongComment opcodes. Pixels are given by a DirectBits opcode so they are uncompressed (you spot those cases immediately from their huge size). Among these exceptions there are PICT 2258 from STONE.DAT, PICTs 4109, 4112, 4113, 4447, 4461, 4462, 4479-4483, 4551, 4779, 11221, 11222 from MYST.DAT.<br />
<br />
Finally, a few perverse PICT resources just retain the WDIB format. Examples are PICTs 2105 and 2112 from STONE.DAT. Fortunately, it is quite easy to discriminate between WDIB and Apple PICT data.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_PICT_resources
Myst PICT resources
2008-10-15T14:11:30Z
<p>TitoDalCanton: not invalid PICT data, just more complex</p>
<hr />
<div>{{Myst}}<br />
<br />
PICT resources contain the main game graphics in Myst Masterpiece Edition, replacing most [[Myst_WDIB_resources|WDIBs]] of the original edition with true-color versions.<br />
<br />
They contain pictures stored in plain [http://en.wikipedia.org/wiki/PICT Apple PICT] format. They start with the usual 512 byte block of platform-dependent data as in regular MacOS PICT resources. JPEG contents have been observed and correctly decoded; the JPEG block starts at offset 726 and can be simply extracted and decoded.<br />
<br />
However, a few cases do not contain simple JPEG data (e.g. PICT 2258 from STONE.DAT, PICT 4109, 4112, 4113, 4447, 4461, 4462, 4479-4483, 4551, 4779, 11221, 11222 from MYST.DAT). These contain more elaborate PICT data, such as LongComments and DirectBits QuickDraw opcodes. Also note that a few perverse PICT resources just retain the WDIB format (i.e. PICT 2105 and 2112 from STONE.DAT).</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_PICT_resources
Myst PICT resources
2008-10-15T14:08:23Z
<p>TitoDalCanton: Protected "Myst PICT resources" [edit=autoconfirmed:move=autoconfirmed]</p>
<hr />
<div>{{Myst}}<br />
<br />
PICT resources contain the main game graphics in Myst Masterpiece Edition, replacing most [[Myst_WDIB_resources|WDIBs]] of the original edition with true-color versions.<br />
<br />
They contain pictures stored in plain [http://en.wikipedia.org/wiki/PICT Apple PICT] format. They start with the usual 512 byte block of platform-dependent data as in regular MacOS PICT resources. JPEG contents have been observed and correctly decoded; the JPEG block starts at offset 726 and can be simply extracted and decoded.<br />
<br />
However, a few cases do not contain JPEG data (e.g. PICT 2258 from STONE.DAT, PICT 4109, 4112, 4113, 4447, 4461, 4462, 4479-4483, 4551, 4779, 11221, 11222 from MYST.DAT). These contain sort of invalid PICT data, as no program is able to decode them. Also note that a few perverse PICT resources just retain the WDIB format (i.e. PICT 2105 and 2112 from STONE.DAT).</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-15T11:50:39Z
<p>TitoDalCanton: /* Command 3: change cursor */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
This is used when picking up pages. Seems to check the associated variable and, depending on its value, set the appropriate cursor and alter the variable itself. ''clrc_id'' is always 800, 801, or 802, which match the cursors of the hand holding the white, red, and blue pages respectively.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_VIEW_resources
Myst VIEW resources
2008-10-15T11:11:24Z
<p>TitoDalCanton: /* Sound section */</p>
<hr />
<div>{{Myst}}<br />
<br />
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.<br />
<br />
Original hints by Petroff Heroj.<br />
<br />
=Basic Format=<br />
The data is split into five sections with variable size and different meanings:<br />
*card flags<br />
*pictures<br />
*sounds<br />
*element list<br />
*other resources<br />
<br />
==Card flags==<br />
This is just<br />
{| class="structure"<br />
|unsigned short||card_flags<br />
|}<br />
''card_flags'' seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.<br />
<br />
==Picture section==<br />
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with<br />
{| class="structure"<br />
|unsigned short||count<br />
|}<br />
If ''count'' = 0 then there is a single, static background picture and the whole section reduces to<br />
{| class="structure"<br />
|unsigned short||count = 0<br />
|-<br />
|unsigned short||picture_id<br />
|}<br />
where ''picture_id'' is the WDIB (or PICT) resource ID.<br />
<br />
Otherwise, if ''count'' > 0, the section contains ''count'' conditional blocks:<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||conditional blocks<br />
|}<br />
Each conditional block associates a variable with an array of picture IDs:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|short||picture_ids[id_count]<br />
|}<br />
The card will use the value of the specified variable to index the ID array and display that picture.<br />
<br />
==Sound section==<br />
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.<br />
<br />
{| class="structure"<br />
|short||sound<br />
|}<br />
<br />
If ''sound'' is -1 or -3, the section stops here.<br />
*-1 seems to continue with the current sound.<br />
*-3 seems to stop the current sound at all.<br />
<br />
If ''sound'' is not negative or -2, the section includes a second field:<br />
{| class="structure"<br />
|short||sound<br />
|-<br />
|short||flags<br />
|}<br />
A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''flags''. ''flags'' could also be volume/balance control.<br />
<br />
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section:<br />
{| class="structure"<br />
|short||sound = -4<br />
|-<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||count<br />
|-<br />
|variable||sound specifications<br />
|}<br />
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/flags combination based on the given variable.<br />
<br />
==Element list==<br />
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||element specifications<br />
|}<br />
Each specification begins with an unsigned short ''type'' describing what the element is.<br />
*Type 1 is a picture (WDIB or PICT). Resource ID follows.<br />
*Type 2 is a sound (MSND). Resource ID follows.<br />
*Type 3 is a conditional block associating a variable with an ID array. This structure follows:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|unsigned short||u0<br />
|-<br />
|short||ids[id_count]<br />
|}<br />
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.<br />
*Type 4 seems to refer to pictures, since a WDIB ID follows.<br />
*Type 5 seems to refer to sounds, since a MSND ID follows.<br />
<br />
==Other resources==<br />
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:<br />
{| class="structure"<br />
|unsigned short||rlst_id<br />
|-<br />
|unsigned short||hint_id<br />
|-<br />
|unsigned short||init_id<br />
|-<br />
|unsigned short||exit_id<br />
|}<br />
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions.<br />
<br />
= Old Case Studies =<br />
image name and sub-images (akin to Riven PLSTs)<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3001||-1||0/0||3001||3001||0||0<br />
|-<br />
| || ||name||neg.||bytes||colspan=4|(name name 0 0)<br />
|}<br />
<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3002||-2||0/144||0|| ||3002||3002||0||0<br />
|-<br />
|0||0||3003||-2||0/144||1||[1 3004]||3003||3003||0||0<br />
|-<br />
| || ||name||?|| ||count||entry||colspan=4|(name name 0 0)<br />
|}<br />
<br />
*I think ''3004'' is the name of a sub-image (small image to be placed in another) of ''3003'' here.<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3005||3005||0/144||1||[1 3006]||3005||3005||0||0<br />
|-<br />
| || ||colspan=2|name twice|| || ||colspan=4|(name name 0 0)<br />
|}<br />
<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3012||-2||0/50||5||[1 3013]||[1 3008]||[1 3009]||[1 3010]||[1 3011]||3012||0||0||3012<br />
|-<br />
| || ||name||?|| ||count||colspan=5|entries||colspan=4|(name 0 0 name)<br />
|}<br />
<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
!14<br />
|1||1||5||2||3030||3031||FFFC 3 2 3031 00_A0||4031||x00A0||2||2 4030||1 3030|| || ||3031||3031||0||0<br />
|-<br />
!44<br />
|1||1||2||2||3095||3096||FFFC 15 2 3095 00_A0||4095||x00A0||4||2 4095||1 3562||1 3097||2 5095||3095||3095||3095||0<br />
|-<br />
!348<br />
|1||1||16||2||3536||3535|| ||3535||x0060||0|| || || || ||3535||3535||0||0<br />
|-<br />
!359<br />
|1||1||5||2||3550||3552||FFFC 3 2 6552 00_80||3552||x0080||4||4 3550||4 3552||2 4552||2 5552||3552||3552||0||0<br />
|-<br />
!47<br />
|1||1||10||2||4140||4141|| ||5141||x0090||1||2 4141|| || || ||4141||4141||4141||4141<br />
|-<br />
!50<br />
|1||1||10||2||4148||4149|| ||4149||x0090||0|| || || || ||4149||4149||4149||0<br />
|-<br />
!51<br />
|1||1||10||2||4150||4151|| ||FFFE||x0070||0|| || || || ||4150||4150||0||0<br />
|-<br />
!94<br />
|1||1||10||2||4243||4244|| ||4244||x0050||0|| || || || ||4244||4244||0||0<br />
|-<br />
!116<br />
|1||1||40||2||4292||4294||FFFC 40 2 4292 00_50||4292||x0060||2||1 4293||2 5292|| || ||4292||4292||0||0<br />
|-<br />
!145<br />
|1||1||0||2||4358||4357|| ||FFFE||x0030||0|| || || || ||4357||4357||0||0<br />
|-<br />
!287<br />
|1||1||34||3||4698||4701|| ||4702||xFFFD||4||1 4699||2 4698||2 5698||2 6698||4698||4698||4698||4698<br />
|-<br />
!295<br />
|1||1||10||2||4717||4719|| ||4717||x0040||1||1 4718|| || || ||4717||4717||0||0<br />
|}</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_VIEW_resources
Myst VIEW resources
2008-10-15T10:46:53Z
<p>TitoDalCanton: /* Sound section */</p>
<hr />
<div>{{Myst}}<br />
<br />
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.<br />
<br />
Original hints by Petroff Heroj.<br />
<br />
=Basic Format=<br />
The data is split into five sections with variable size and different meanings:<br />
*card flags<br />
*pictures<br />
*sounds<br />
*element list<br />
*other resources<br />
<br />
==Card flags==<br />
This is just<br />
{| class="structure"<br />
|unsigned short||card_flags<br />
|}<br />
''card_flags'' seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.<br />
<br />
==Picture section==<br />
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with<br />
{| class="structure"<br />
|unsigned short||count<br />
|}<br />
If ''count'' = 0 then there is a single, static background picture and the whole section reduces to<br />
{| class="structure"<br />
|unsigned short||count = 0<br />
|-<br />
|unsigned short||picture_id<br />
|}<br />
where ''picture_id'' is the WDIB (or PICT) resource ID.<br />
<br />
Otherwise, if ''count'' > 0, the section contains ''count'' conditional blocks:<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||conditional blocks<br />
|}<br />
Each conditional block associates a variable with an array of picture IDs:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|short||picture_ids[id_count]<br />
|}<br />
The card will use the value of the specified variable to index the ID array and display that picture.<br />
<br />
==Sound section==<br />
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.<br />
<br />
{| class="structure"<br />
|short||sound<br />
|}<br />
<br />
If ''sound'' is -1 or -3, the section stops here.<br />
*-1 seems to simply continue with the currently running sound.<br />
*-3 is yet to be investigated.<br />
<br />
If ''sound'' is not negative or -2, the section includes a second field:<br />
{| class="structure"<br />
|short||sound<br />
|-<br />
|short||flags<br />
|}<br />
A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''flags''. ''flags'' could also be volume/balance control.<br />
<br />
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section:<br />
{| class="structure"<br />
|short||sound = -4<br />
|-<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||count<br />
|-<br />
|variable||sound specifications<br />
|}<br />
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/flags combination based on the given variable.<br />
<br />
==Element list==<br />
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.<br />
{| class="structure"<br />
|unsigned short||count<br />
|-<br />
|variable||element specifications<br />
|}<br />
Each specification begins with an unsigned short ''type'' describing what the element is.<br />
*Type 1 is a picture (WDIB or PICT). Resource ID follows.<br />
*Type 2 is a sound (MSND). Resource ID follows.<br />
*Type 3 is a conditional block associating a variable with an ID array. This structure follows:<br />
{| class="structure"<br />
|unsigned short||variable<br />
|-<br />
|unsigned short||id_count<br />
|-<br />
|unsigned short||u0<br />
|-<br />
|short||ids[id_count]<br />
|}<br />
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.<br />
*Type 4 seems to refer to pictures, since a WDIB ID follows.<br />
*Type 5 seems to refer to sounds, since a MSND ID follows.<br />
<br />
==Other resources==<br />
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:<br />
{| class="structure"<br />
|unsigned short||rlst_id<br />
|-<br />
|unsigned short||hint_id<br />
|-<br />
|unsigned short||init_id<br />
|-<br />
|unsigned short||exit_id<br />
|}<br />
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions.<br />
<br />
= Old Case Studies =<br />
image name and sub-images (akin to Riven PLSTs)<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3001||-1||0/0||3001||3001||0||0<br />
|-<br />
| || ||name||neg.||bytes||colspan=4|(name name 0 0)<br />
|}<br />
<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3002||-2||0/144||0|| ||3002||3002||0||0<br />
|-<br />
|0||0||3003||-2||0/144||1||[1 3004]||3003||3003||0||0<br />
|-<br />
| || ||name||?|| ||count||entry||colspan=4|(name name 0 0)<br />
|}<br />
<br />
*I think ''3004'' is the name of a sub-image (small image to be placed in another) of ''3003'' here.<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3005||3005||0/144||1||[1 3006]||3005||3005||0||0<br />
|-<br />
| || ||colspan=2|name twice|| || ||colspan=4|(name name 0 0)<br />
|}<br />
<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
|0||0||3012||-2||0/50||5||[1 3013]||[1 3008]||[1 3009]||[1 3010]||[1 3011]||3012||0||0||3012<br />
|-<br />
| || ||name||?|| ||count||colspan=5|entries||colspan=4|(name 0 0 name)<br />
|}<br />
<br />
{| cellpadding=2 style="border:1px #000 solid;border-collapse:collapse;text-align:center;"<br />
!14<br />
|1||1||5||2||3030||3031||FFFC 3 2 3031 00_A0||4031||x00A0||2||2 4030||1 3030|| || ||3031||3031||0||0<br />
|-<br />
!44<br />
|1||1||2||2||3095||3096||FFFC 15 2 3095 00_A0||4095||x00A0||4||2 4095||1 3562||1 3097||2 5095||3095||3095||3095||0<br />
|-<br />
!348<br />
|1||1||16||2||3536||3535|| ||3535||x0060||0|| || || || ||3535||3535||0||0<br />
|-<br />
!359<br />
|1||1||5||2||3550||3552||FFFC 3 2 6552 00_80||3552||x0080||4||4 3550||4 3552||2 4552||2 5552||3552||3552||0||0<br />
|-<br />
!47<br />
|1||1||10||2||4140||4141|| ||5141||x0090||1||2 4141|| || || ||4141||4141||4141||4141<br />
|-<br />
!50<br />
|1||1||10||2||4148||4149|| ||4149||x0090||0|| || || || ||4149||4149||4149||0<br />
|-<br />
!51<br />
|1||1||10||2||4150||4151|| ||FFFE||x0070||0|| || || || ||4150||4150||0||0<br />
|-<br />
!94<br />
|1||1||10||2||4243||4244|| ||4244||x0050||0|| || || || ||4244||4244||0||0<br />
|-<br />
!116<br />
|1||1||40||2||4292||4294||FFFC 40 2 4292 00_50||4292||x0060||2||1 4293||2 5292|| || ||4292||4292||0||0<br />
|-<br />
!145<br />
|1||1||0||2||4358||4357|| ||FFFE||x0030||0|| || || || ||4357||4357||0||0<br />
|-<br />
!287<br />
|1||1||34||3||4698||4701|| ||4702||xFFFD||4||1 4699||2 4698||2 5698||2 6698||4698||4698||4698||4698<br />
|-<br />
!295<br />
|1||1||10||2||4717||4719|| ||4717||x0040||1||1 4718|| || || ||4717||4717||0||0<br />
|}</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_variables
Myst variables
2008-10-13T17:43:13Z
<p>TitoDalCanton: mechanical vars</p>
<hr />
<div>As a preliminary step, this page lists Myst variable numbers and their meaning to aid the reverse engineering process. This is based on interpretation of VIEW conditional images and RLST scripts.<br />
<br />
The mechanism of variables is not yet very well understood. Apparently, there isn't a one-to-one mapping between variable numbers and variables themselves; for examples, it appears you can access the same variable by different numbers, and different variables by the same numbers (e.g. numbers 102 and 103 hold the status of red and blue pages in every Age).<br />
<br />
The scope of variable numbers seems to be local to the single stack (age). That is, variable 0 in Stoneship and variable 0 in Mechanical are independent. This raises the question of where global game info is kept.<br />
<br />
==Mechanical==<br />
0 status of the cache door in Achenar's room<br />
1 status of the cache door in Sirrus' room<br />
2 looks like a combination of blue page and box status in Achenar's cache<br />
3 status of the box in Achenar's cache<br />
4 status of the stair to the Myst book<br />
5 position of the fortress<br />
6 related to the position of the fortress<br />
7 status of the central elevator door<br />
10 status of the stair to the lower layer<br />
11 position of the "C" in the lower layer controls<br />
12 position of the gear in the lower layer<br />
16-19 symbol digits in the puzzle for accessing the Myst book<br />
20-22 lighted crystal in Sirrus' room<br />
102 red page status<br />
103 blue page status<br />
<br />
==Selenitic==<br />
0 wind tunnel sound switch and, at the same time, mazerunner internal door button pushed<br />
1 caldera sound switch<br />
2 broken clock sound switch<br />
3 fountain sound switch<br />
4 stone forest sound switch<br />
5 antenna control door<br />
6 light in wind tunnel<br />
7 what you see outside the mazerunner window<br />
8 related to the antenna control monitor<br />
9-13 antenna control, source icons lighted<br />
14-17 antenna control, display digits<br />
18 antenna control, right arrow lighted<br />
19 antenna control, left arrow lighted<br />
20 see card 1147<br />
21 see card 1147<br />
22 see card 1147<br />
23 see card 1147<br />
24 see card 1147<br />
25 mazerunner direction indicator<br />
26 antenna control, sigma button lighted<br />
27 mazerunner speaker light on<br />
28 color of the button in the sound sliders panel<br />
29 mazerunner external blue button clicked<br />
30 see card 1182<br />
31 mazerunner FORWARD button pushed<br />
32 mazerunner arrow buttons pushed<br />
33 mazerunner BACKTRACK button pushed<br />
102 red page status<br />
103 blue page status<br />
<br />
==Stoneship==<br />
====0====<br />
Status of the water inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
<br />
====2====<br />
Status of the water in the room with the Myst linking book.<br />
*0: water is flooding the room.<br />
*1: no water.<br />
<br />
====4====<br />
Status of some things inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
*2: water is flooding the lighthouse, the box is floating.<br />
<br />
====5====<br />
Status of the lighthouse door:<br />
*0: door closed but unlocked.<br />
*1: door open.<br />
*2: door closed and still locked.<br />
<br />
====7====<br />
Whether the floating box with the key is closed (0) or open (1).<br />
<br />
====13====<br />
Status of light and water in the tunnels to Sirrus' and Achenar's rooms.<br />
*0: light off, water.<br />
*1: light off, no water.<br />
*2: light on, water.<br />
*3: light on, no water.<br />
<br />
====14====<br />
Related to the blue alarm in the tunnels.<br />
*0: alarm.<br />
*1: light.<br />
*2: alarm.<br />
<br />
====16====<br />
Status of the light in the Myst book room.<br />
*0: light off.<br />
*1: light on.<br />
<br />
====30====<br />
Related to the status of the lights in the tunnels.<br />
*0: submersed lights on.<br />
*1: submersed light off, tunnel light on.<br />
*2: alarm light on.<br />
<br />
====103====<br />
Seems to tell whether the blue page has been picked up.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_variables
Myst variables
2008-10-13T13:30:22Z
<p>TitoDalCanton: /* Selenitic */</p>
<hr />
<div>As a preliminary step, this page lists Myst variable numbers and their meaning to aid the reverse engineering process. This is based on interpretation of VIEW conditional images and RLST scripts.<br />
<br />
The mechanism of variables is not yet very well understood. Apparently, there isn't a one-to-one mapping between variable numbers and variables themselves; for examples, it appears you can access the same variable by different numbers, and different variables by the same numbers (e.g. numbers 102 and 103 hold the status of red and blue pages in every Age).<br />
<br />
The scope of variable numbers seems to be local to the single stack (age). That is, variable 0 in Stoneship and variable 0 in Mechanical are independent. This raises the question of where global game info is kept.<br />
<br />
==Selenitic==<br />
0 wind tunnel sound switch and, at the same time, mazerunner internal door button pushed<br />
1 caldera sound switch<br />
2 broken clock sound switch<br />
3 fountain sound switch<br />
4 stone forest sound switch<br />
5 antenna control door<br />
6 light in wind tunnel<br />
7 what you see outside the mazerunner window<br />
8 related to the antenna control monitor<br />
9-13 antenna control, source icons lighted<br />
14-17 antenna control, display digits<br />
18 antenna control, right arrow lighted<br />
19 antenna control, left arrow lighted<br />
20 see card 1147<br />
21 see card 1147<br />
22 see card 1147<br />
23 see card 1147<br />
24 see card 1147<br />
25 mazerunner direction indicator<br />
26 antenna control, sigma button lighted<br />
27 mazerunner speaker light on<br />
28 color of the button in the sound sliders panel<br />
29 mazerunner external blue button clicked<br />
30 see card 1182<br />
31 mazerunner FORWARD button pushed<br />
32 mazerunner arrow buttons pushed<br />
33 mazerunner BACKTRACK button pushed<br />
102 red page status<br />
103 blue page status<br />
<br />
==Stoneship==<br />
====0====<br />
Status of the water inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
<br />
====2====<br />
Status of the water in the room with the Myst linking book.<br />
*0: water is flooding the room.<br />
*1: no water.<br />
<br />
====4====<br />
Status of some things inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
*2: water is flooding the lighthouse, the box is floating.<br />
<br />
====5====<br />
Status of the lighthouse door:<br />
*0: door closed but unlocked.<br />
*1: door open.<br />
*2: door closed and still locked.<br />
<br />
====7====<br />
Whether the floating box with the key is closed (0) or open (1).<br />
<br />
====13====<br />
Status of light and water in the tunnels to Sirrus' and Achenar's rooms.<br />
*0: light off, water.<br />
*1: light off, no water.<br />
*2: light on, water.<br />
*3: light on, no water.<br />
<br />
====14====<br />
Related to the blue alarm in the tunnels.<br />
*0: alarm.<br />
*1: light.<br />
*2: alarm.<br />
<br />
====16====<br />
Status of the light in the Myst book room.<br />
*0: light off.<br />
*1: light on.<br />
<br />
====30====<br />
Related to the status of the lights in the tunnels.<br />
*0: submersed lights on.<br />
*1: submersed light off, tunnel light on.<br />
*2: alarm light on.<br />
<br />
====103====<br />
Seems to tell whether the blue page has been picked up.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_variables
Myst variables
2008-10-13T13:26:26Z
<p>TitoDalCanton: intro fixes and selenitic vars</p>
<hr />
<div>As a preliminary step, this page lists Myst variable numbers and their meaning to aid the reverse engineering process. This is based on interpretation of VIEW conditional images and RLST scripts.<br />
<br />
The mechanism of variables is not yet very well understood. Apparently, there isn't a one-to-one mapping between variable numbers and variables themselves; for examples, it appears you can access the same variable by different numbers, and different variables by the same numbers (e.g. numbers 102 and 103 hold the status of red and blue pages in every Age).<br />
<br />
The scope of variable numbers seems to be local to the single stack (age). That is, variable 0 in Stoneship and variable 0 in Mechanical are independent. This raises the question of where global game info is kept.<br />
<br />
==Selenitic==<br />
0 see cards 1177, 1179, 1180, 1251<br />
1 caldera sound switch<br />
2 broken clock sound switch<br />
3 fountain sound switch<br />
4 stone forest sound switch<br />
5 antenna control door<br />
6 light in wind tunnel<br />
7 what you see outside the mazerunner window<br />
8 related to the antenna control monitor<br />
9-13 antenna control, source icons lighted<br />
14-17 antenna control, display digits<br />
18 antenna control, right arrow lighted<br />
19 antenna control, left arrow lighted<br />
20 see card 1147<br />
21 see card 1147<br />
22 see card 1147<br />
23 see card 1147<br />
24 see card 1147<br />
25 mazerunner direction indicator<br />
26 antenna control, sigma button lighted<br />
27 mazerunner speaker light on<br />
28 color of the button in the sound sliders panel<br />
29 mazerunner external blue button clicked<br />
30 see card 1182<br />
31 mazerunner FORWARD button pushed<br />
32 mazerunner arrow buttons pushed<br />
33 mazerunner BACKTRACK button pushed<br />
102 red page status<br />
103 blue page status<br />
<br />
==Stoneship==<br />
====0====<br />
Status of the water inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
<br />
====2====<br />
Status of the water in the room with the Myst linking book.<br />
*0: water is flooding the room.<br />
*1: no water.<br />
<br />
====4====<br />
Status of some things inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
*2: water is flooding the lighthouse, the box is floating.<br />
<br />
====5====<br />
Status of the lighthouse door:<br />
*0: door closed but unlocked.<br />
*1: door open.<br />
*2: door closed and still locked.<br />
<br />
====7====<br />
Whether the floating box with the key is closed (0) or open (1).<br />
<br />
====13====<br />
Status of light and water in the tunnels to Sirrus' and Achenar's rooms.<br />
*0: light off, water.<br />
*1: light off, no water.<br />
*2: light on, water.<br />
*3: light on, no water.<br />
<br />
====14====<br />
Related to the blue alarm in the tunnels.<br />
*0: alarm.<br />
*1: light.<br />
*2: alarm.<br />
<br />
====16====<br />
Status of the light in the Myst book room.<br />
*0: light off.<br />
*1: light on.<br />
<br />
====30====<br />
Related to the status of the lights in the tunnels.<br />
*0: submersed lights on.<br />
*1: submersed light off, tunnel light on.<br />
*2: alarm light on.<br />
<br />
====103====<br />
Seems to tell whether the blue page has been picked up.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_variables
Myst variables
2008-10-13T13:18:04Z
<p>TitoDalCanton: Protected "Myst variables" [edit=autoconfirmed:move=autoconfirmed]</p>
<hr />
<div>As a preliminary step, this page lists Myst variable numbers and their meaning to aid the reverse engineering process. This is based on interpretation of VIEW conditional images and RLST scripts.<br />
<br />
The scope of variable numbers seem to be local to the single stack (age). That is, variable 0 in Stoneship and variable 0 in Mechanical are independent. Note that this raises the question of where global game info is kept.<br />
<br />
==Stoneship==<br />
====0====<br />
Status of the water inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
<br />
====2====<br />
Status of the water in the room with the Myst linking book.<br />
*0: water is flooding the room.<br />
*1: no water.<br />
<br />
====4====<br />
Status of some things inside the lighthouse:<br />
*0: water is flooding the lighthouse.<br />
*1: no water.<br />
*2: water is flooding the lighthouse, the box is floating.<br />
<br />
====5====<br />
Status of the lighthouse door:<br />
*0: door closed but unlocked.<br />
*1: door open.<br />
*2: door closed and still locked.<br />
<br />
====7====<br />
Whether the floating box with the key is closed (0) or open (1).<br />
<br />
====13====<br />
Status of light and water in the tunnels to Sirrus' and Achenar's rooms.<br />
*0: light off, water.<br />
*1: light off, no water.<br />
*2: light on, water.<br />
*3: light on, no water.<br />
<br />
====14====<br />
Related to the blue alarm in the tunnels.<br />
*0: alarm.<br />
*1: light.<br />
*2: alarm.<br />
<br />
====16====<br />
Status of the light in the Myst book room.<br />
*0: light off.<br />
*1: light on.<br />
<br />
====30====<br />
Related to the status of the lights in the tunnels.<br />
*0: submersed lights on.<br />
*1: submersed light off, tunnel light on.<br />
*2: alarm light on.<br />
<br />
====103====<br />
Seems to tell whether the blue page has been picked up.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_RLST_resources
Myst RLST resources
2008-10-12T22:14:12Z
<p>TitoDalCanton: /* Type 11 */</p>
<hr />
<div>{{Myst}}<br />
<br />
These contain Myst's hotspot descriptions. Hotspots come in several "types" and depending on their type their action can be simple or very complex.<br />
<br />
RLST data is a list of records, each record describing one of the hotspots:<br />
{| class="structure"<br />
|short||record_count<br />
|-<br />
|variable||records<br />
|}<br />
<br />
The record length is variable, depending on the hotspot type. The record structure is:<br />
{| class="structure"<br />
|unsigned short||type<br />
|-<br />
|unsigned short||flags<br />
|-<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||right<br />
|-<br />
|short||bottom<br />
|-<br />
|unsigned short||destination<br />
|-<br />
|variable||additional data<br />
|}<br />
*''type'' specifies the hotspot action in a wide sense. Every value between 0 and 14 except for 9 has been observed. See below for the meaning of each type.<br />
*''flags'' seems to be a bit field. Observed values are 0, 1, 2, 3, 4, 5, 8 and 10 (4 variable bits). The value seems related to when the hotspot actions should be executed. For example, regular clickable hotspots usually have bit 1 set while hotspots that run background movies (e.g. the Channelwood windmill) have ''flags'' = 0. Bit 0 seems to indicate whether hotspot subimages are to be drawn (at least for type 8 hotspots). Hotspots with bit 2 set usually don't have any other bits set (except bit 0, encountered only twice). Bit 3 is suspected to flag Zip Mode hotspots.<br />
*(''left'', ''top'', ''right'', ''bottom'') is the hotspot rectangle in pixels. Note that weird rectangles are found, like (-32000, -32000, 32000, 32000).<br />
*''destination'' contains a destination card ID for hotspots that change card, or zero.<br />
*Additional data follows for some types, describing actions to perform. See below.<br />
<br />
==Hotspot types==<br />
===Types 0 to 4 and 14===<br />
"Simple" hotspots that just change card. There is no additional data in the hotspot record. Types 0 to 4 define the movement direction (forward, left, right, down and up respectively) while the purpose of type 14 is not yet clear. It is used prevalently near linking books.<br />
<br />
===Type 5===<br />
Type 5 hotspots have a simple script attached to them, which is executed when the hotspot is activated. See the [[Myst_scripts|page about scripts]] for the structure of scripts.<br />
<br />
===Type 6===<br />
Type 6 hotspots have a script like type 5 ones, but they also play a video when activated. The record starts with a full type 5 record. Then comes a zero-terminated string (C string) which defines the path to the video file within the Myst CD-ROM, without extension. Backslashes are used to separate directories, as usual in Windows. After the string, the input stream position should be padded to the next 2-byte boundary. Finally come 7 shorts:<br />
{| class="structure"<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||loop<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|}<br />
''left'' and ''top'' specify the movie position. Sometimes they misteriously exceed the correct position by 10000, so one has to take them modulo 10000 to get "safe" values. ''loop'' is 0 for movies that are to be played once, 1 for movies that must loop. The unknown fields are usually 0 or 1 but ''u3'' is found with 125 in one case. ''u0'' seems fixed to 1.<br />
<br />
===Type 7===<br />
Type 7 record serves as some kind of switch statement: it runs a script from a list indexed by the value of a variable:<br />
<br />
(var_index) {num_cases} [record_type <record_data>]<br />
<br />
Each case itself begins with a record type (always 5 or 6) and contains the data you would find in a hotspot record of that type, excluding the standard block common to all types.<br />
<br />
===Type 8===<br />
Type 8 record is like type 7, but additionally it specifies a list of pictures to draw over main WDIB. The particular picture is chosen depending on the value of variable. This record includes the type 7 record at start.<br />
<br />
<type_7_record> (var_index) {num_subs} [wdib_id <rectangle>]<br />
<br />
Here, each subimage record defines a source WDIB ID and a source rectangle inside this WDIB. Rectangle is defined in the usual (''left'', ''top'', ''right'', ''bottom'') format, with one exception: empty rectangle is defined as the single short -1. This is probably the case when source rectangle equals destination rectangle. Also, ''wdib_id'' itself can be -1, this probably means original WDIB for this card should be used as source WDIB.<br />
<br />
===Type 10===<br />
Type 10 hotspots implement slider-like controls. The record structure is:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|-<br />
|unsigned short||count3<br />
|-<br />
|short||list3[count3]<br />
|}<br />
''kind'' is a small number (0-3) and seems to describe what kind of control this is. ''left'', ''right'', ''top'' and ''bottom'' look like coordinates and probably specify the area available to the control (e.g. for sliders). The values in the final lists look like sound IDs.<br />
<br />
A few cases:<br />
* Myst island, card 4500: planetarium sliders, ''kind'' = 2<br />
* Myst island, card 4530: spaceship sliders, ''kind'' = 2<br />
* Selenitic Age, card 1147: sliders for accessing the mazerunner, ''kind'' = 2<br />
<br />
===Type 11===<br />
Type 11 hotspots implement controls that you click and hold or drag, like some of the levers. The record structure is similar to type 10 records, but lacks the last list:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|}<br />
The first list seems to list sounds that play at animation start, the second seems to loop in the middle and the third seems to play when the user releases the control.<br />
<br />
A few cases:<br />
* Myst island, card 4006: clock tower wheels, ''kind'' = 3<br />
* Myst island, card 4059: fireplace pattern book, ''kind'' = 3<br />
* Myst island, card 4098: huge tree control wheel, ''kind'' = 3<br />
* Selenitic Age, card 1245: arrows for rotating the cameras, ''kind'' = 1<br />
* Stoneship Age, card 2013: Achenar's toy lever, ''kind'' = 1<br />
* Stoneship Age, card 2161: generator handle, ''kind'' = 3<br />
* Stoneship Age, card 2218: telescope navigation, ''kind'' = 1<br />
<br />
===Type 12===<br />
Type 12 hotspots implement animated controls which use a sequence of separate pictures for the animation. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
* number of animation frames<br />
* ID of the picture with the first frame<br />
* two unsigned shorts<br />
* left,top coordinates of the animation<br />
<br />
A few cases:<br />
* Channelwood Age, card 3161<br />
* Channelwood Age, card 3246<br />
* Channelwood Age, card 3271<br />
* Mechanical Age, card 6044<br />
* Mechanical Age, card 6156<br />
* Mechanical Age, card 6180<br />
* Myst island, card 4100<br />
* Myst island, card 4113<br />
<br />
===Type 13===<br />
Type 13 record has just two unknown shorts ''u0'' and ''u1'' after the main block. In addition, ''destination'' seems to be a variable rather than a card ID.<br />
<br />
Type 13 hotspots are used when an action is triggered by mouse movements (enter/exit) rather than clicks. Examples:<br />
*the match box puzzle in Myst island<br />
*the icons for raising the ship in Myst island<br />
*the crystals in Sirrus' room in Mechanical Age.<br />
Looking at the scripts, these hotspots could trigger a variable change when the cursor enters and leaves them.<br />
<br />
==Case studies==<br />
Note: these are simply the data in little-endian shorts and line-broken where patterns are found. <l t b r> is the hotspot rect. count [entry]... are guesses at when there are lists of entries. The number in parentheses before the data is the card number (not the resource number).<br />
<br />
The following hotspots replace part of the image (in this case <417 260 544 333>) with part of another image (in this case 3004 <0 0 127 73>) based on a variable (103 2 plays in here somewhere):<br />
8 1 < 31 276 163 333> 0 FFFF 0 103 2 3006 <0 0 132 57> 3005 FFFF<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 3004 <0 0 127 73> 3003 FFFF<br />
<br />
Case studies from Channelwood:<br />
(CHANNEL 3001) 2<br />
1 2 <1 0 110 332> 3002<br />
2 2 <455 2 544 332> 3003<br />
<br />
(CHANNEL 3002) 2<br />
1 2 <0 1 100 332> 3005<br />
2 2 <431 0 544 332> 3001<br />
<br />
(CHANNEL 3003) 4<br />
5 2 <213 90 343 290> 3494 2 [6 0 0] [24 0 1 {3494}] (the door)<br />
1 2 <0 0 81 332> 3001 (left)<br />
2 2 <463 0 544 332> 3005 (right)<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 [3004 <0 0 127 73>] [3003 <FFFF>]<br />
<br />
(CHANNEL 3005) 4<br />
0 2 <76 152 196 330> 3012<br />
1 2 <0 0 106 332> 3003<br />
2 2 <438 0 544 332> 3002<br />
8 1 <31 276 163 333> 0 FFFF 0 103 2 [3006 <0 0 132 57>] [3005 <FFFF>]<br />
<br />
(CHANNEL 3012) 8<br />
8 3 <101 243 214 343> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [3013 <0 0 113 100>] [3012 <FFFF>]<br />
5 2 <255 193 269 208> 0 1 [117 0 1 {0}]<br />
5 2 <268 193 282 208> 0 1 [117 0 1 {1}]<br />
5 2 <281 193 295 208> 0 1 [117 0 1 {2}]<br />
5 2 <294 193 308 208> 0 1 [117 0 1 {3}]<br />
8 1 <252 190 310 210> 0 FFFF 0 17 4 [3008 <0 0 58 20>] [3009 <0 0 58 20>] [3010 <0 0 58 20>] [3011 <0 0 58 20>]<br />
0 4 <180 31 379 305> 0<br />
5 2 <0 0 544 332> 0 1 [34 0 2 {3005 0}]<br />
<br />
(MYST 4368) 3<br />
8 3 <305 148 375 238> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [FFFF <FFFF>] [4369 <0 0 70 90>]<br />
7 2 <216 110 304 235> 0 106 5<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (0)<br />
0 2 <0 0 544 332> 4345<br />
<br />
==== Intro Case Study ====<br />
(INTRO 1) 1<br />
0 2 <-32000 -32000 32000 32000> 5<br />
<br />
INTRO 1 is supposed to be the card which shows the opening movies and then switches to card 2.<br />
<br />
(INTRO 2) 1<br />
5 2 <245 202 304 253> 4 2 [37 0 0] [34 0 2 {3 11}]<br />
<br />
INTRO 2 is the first interactive part of the game, the part where you can pick up the Myst book. The rect correctly corresponds to where the book is on screen. But, look at the "destination" -- 4. There is no VIEW/RLST 4! However, there is a WDIB 4 and it is the open book with the water. Where this ''should'' go is to card 3 and show the Myst book cover before showing image 4 and then playing the video. And, there is a 3 in this chunk, but I'm not sure if that's the purpose. I have no idea what commands 37/34 could be. There is a WDIB 11, but it's of D'ni, so I doubt it's that. ;)<br />
<br />
(INTRO 3) 2<br />
0 2 <-32000 -32000 32000 32000> 5<br />
6 0 <312 70 441 159> 0 0 "\qtw\intro\intro2" 0x2848 0x2756 0 1 0 0 0<br />
<br />
Note that this one has a string for the video (null-terminated). This obviously calls that video which is the Myst fly-by for the linking book. And, that rect perfectly matches where the video should be displayed on screen. However, this also clearly breaks the format specified above for "type 2 hotspots".<br />
<br />
WDIB 3 is the cover of the Myst linking book. But, this doesn't match up with the video mentioned here which should be for WDIB 4 (or 10, they are identical)(the open linking book with the water image) and eventually ending at WDIB 12 (the open linking book with the dock image). The 5 after the very large numbers is the target card for the open linking book which seems correct. 0x2848 is 10,312 and 0x2756 is 10,070. The rate of the audio is 11,025. Not sure if this has any correlation.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_RLST_resources
Myst RLST resources
2008-10-12T22:06:21Z
<p>TitoDalCanton: /* Type 10 */</p>
<hr />
<div>{{Myst}}<br />
<br />
These contain Myst's hotspot descriptions. Hotspots come in several "types" and depending on their type their action can be simple or very complex.<br />
<br />
RLST data is a list of records, each record describing one of the hotspots:<br />
{| class="structure"<br />
|short||record_count<br />
|-<br />
|variable||records<br />
|}<br />
<br />
The record length is variable, depending on the hotspot type. The record structure is:<br />
{| class="structure"<br />
|unsigned short||type<br />
|-<br />
|unsigned short||flags<br />
|-<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||right<br />
|-<br />
|short||bottom<br />
|-<br />
|unsigned short||destination<br />
|-<br />
|variable||additional data<br />
|}<br />
*''type'' specifies the hotspot action in a wide sense. Every value between 0 and 14 except for 9 has been observed. See below for the meaning of each type.<br />
*''flags'' seems to be a bit field. Observed values are 0, 1, 2, 3, 4, 5, 8 and 10 (4 variable bits). The value seems related to when the hotspot actions should be executed. For example, regular clickable hotspots usually have bit 1 set while hotspots that run background movies (e.g. the Channelwood windmill) have ''flags'' = 0. Bit 0 seems to indicate whether hotspot subimages are to be drawn (at least for type 8 hotspots). Hotspots with bit 2 set usually don't have any other bits set (except bit 0, encountered only twice). Bit 3 is suspected to flag Zip Mode hotspots.<br />
*(''left'', ''top'', ''right'', ''bottom'') is the hotspot rectangle in pixels. Note that weird rectangles are found, like (-32000, -32000, 32000, 32000).<br />
*''destination'' contains a destination card ID for hotspots that change card, or zero.<br />
*Additional data follows for some types, describing actions to perform. See below.<br />
<br />
==Hotspot types==<br />
===Types 0 to 4 and 14===<br />
"Simple" hotspots that just change card. There is no additional data in the hotspot record. Types 0 to 4 define the movement direction (forward, left, right, down and up respectively) while the purpose of type 14 is not yet clear. It is used prevalently near linking books.<br />
<br />
===Type 5===<br />
Type 5 hotspots have a simple script attached to them, which is executed when the hotspot is activated. See the [[Myst_scripts|page about scripts]] for the structure of scripts.<br />
<br />
===Type 6===<br />
Type 6 hotspots have a script like type 5 ones, but they also play a video when activated. The record starts with a full type 5 record. Then comes a zero-terminated string (C string) which defines the path to the video file within the Myst CD-ROM, without extension. Backslashes are used to separate directories, as usual in Windows. After the string, the input stream position should be padded to the next 2-byte boundary. Finally come 7 shorts:<br />
{| class="structure"<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||loop<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|}<br />
''left'' and ''top'' specify the movie position. Sometimes they misteriously exceed the correct position by 10000, so one has to take them modulo 10000 to get "safe" values. ''loop'' is 0 for movies that are to be played once, 1 for movies that must loop. The unknown fields are usually 0 or 1 but ''u3'' is found with 125 in one case. ''u0'' seems fixed to 1.<br />
<br />
===Type 7===<br />
Type 7 record serves as some kind of switch statement: it runs a script from a list indexed by the value of a variable:<br />
<br />
(var_index) {num_cases} [record_type <record_data>]<br />
<br />
Each case itself begins with a record type (always 5 or 6) and contains the data you would find in a hotspot record of that type, excluding the standard block common to all types.<br />
<br />
===Type 8===<br />
Type 8 record is like type 7, but additionally it specifies a list of pictures to draw over main WDIB. The particular picture is chosen depending on the value of variable. This record includes the type 7 record at start.<br />
<br />
<type_7_record> (var_index) {num_subs} [wdib_id <rectangle>]<br />
<br />
Here, each subimage record defines a source WDIB ID and a source rectangle inside this WDIB. Rectangle is defined in the usual (''left'', ''top'', ''right'', ''bottom'') format, with one exception: empty rectangle is defined as the single short -1. This is probably the case when source rectangle equals destination rectangle. Also, ''wdib_id'' itself can be -1, this probably means original WDIB for this card should be used as source WDIB.<br />
<br />
===Type 10===<br />
Type 10 hotspots implement slider-like controls. The record structure is:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|-<br />
|unsigned short||count3<br />
|-<br />
|short||list3[count3]<br />
|}<br />
''kind'' is a small number (0-3) and seems to describe what kind of control this is. ''left'', ''right'', ''top'' and ''bottom'' look like coordinates and probably specify the area available to the control (e.g. for sliders). The values in the final lists look like sound IDs.<br />
<br />
A few cases:<br />
* Myst island, card 4500: planetarium sliders, ''kind'' = 2<br />
* Myst island, card 4530: spaceship sliders, ''kind'' = 2<br />
* Selenitic Age, card 1147: sliders for accessing the mazerunner, ''kind'' = 2<br />
<br />
===Type 11===<br />
Type 11 hotspots implement controls that you click and hold or drag, like some of the levers. The record structure is similar to type 10 records, but lacks the last list:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|}<br />
The first list seems to list sounds that play at animation start, the second seems to loop in the middle and the third seems to play when the user releases the control.<br />
<br />
A few cases:<br />
* Myst island, card 4006<br />
* Myst island, card 4059<br />
* Myst island, card 4098<br />
* Selenitic Age, card 1245<br />
* Stoneship Age, card 2013<br />
* Stoneship Age, card 2161<br />
* Stoneship Age, card 2218<br />
<br />
===Type 12===<br />
Type 12 hotspots implement animated controls which use a sequence of separate pictures for the animation. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
* number of animation frames<br />
* ID of the picture with the first frame<br />
* two unsigned shorts<br />
* left,top coordinates of the animation<br />
<br />
A few cases:<br />
* Channelwood Age, card 3161<br />
* Channelwood Age, card 3246<br />
* Channelwood Age, card 3271<br />
* Mechanical Age, card 6044<br />
* Mechanical Age, card 6156<br />
* Mechanical Age, card 6180<br />
* Myst island, card 4100<br />
* Myst island, card 4113<br />
<br />
===Type 13===<br />
Type 13 record has just two unknown shorts ''u0'' and ''u1'' after the main block. In addition, ''destination'' seems to be a variable rather than a card ID.<br />
<br />
Type 13 hotspots are used when an action is triggered by mouse movements (enter/exit) rather than clicks. Examples:<br />
*the match box puzzle in Myst island<br />
*the icons for raising the ship in Myst island<br />
*the crystals in Sirrus' room in Mechanical Age.<br />
Looking at the scripts, these hotspots could trigger a variable change when the cursor enters and leaves them.<br />
<br />
==Case studies==<br />
Note: these are simply the data in little-endian shorts and line-broken where patterns are found. <l t b r> is the hotspot rect. count [entry]... are guesses at when there are lists of entries. The number in parentheses before the data is the card number (not the resource number).<br />
<br />
The following hotspots replace part of the image (in this case <417 260 544 333>) with part of another image (in this case 3004 <0 0 127 73>) based on a variable (103 2 plays in here somewhere):<br />
8 1 < 31 276 163 333> 0 FFFF 0 103 2 3006 <0 0 132 57> 3005 FFFF<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 3004 <0 0 127 73> 3003 FFFF<br />
<br />
Case studies from Channelwood:<br />
(CHANNEL 3001) 2<br />
1 2 <1 0 110 332> 3002<br />
2 2 <455 2 544 332> 3003<br />
<br />
(CHANNEL 3002) 2<br />
1 2 <0 1 100 332> 3005<br />
2 2 <431 0 544 332> 3001<br />
<br />
(CHANNEL 3003) 4<br />
5 2 <213 90 343 290> 3494 2 [6 0 0] [24 0 1 {3494}] (the door)<br />
1 2 <0 0 81 332> 3001 (left)<br />
2 2 <463 0 544 332> 3005 (right)<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 [3004 <0 0 127 73>] [3003 <FFFF>]<br />
<br />
(CHANNEL 3005) 4<br />
0 2 <76 152 196 330> 3012<br />
1 2 <0 0 106 332> 3003<br />
2 2 <438 0 544 332> 3002<br />
8 1 <31 276 163 333> 0 FFFF 0 103 2 [3006 <0 0 132 57>] [3005 <FFFF>]<br />
<br />
(CHANNEL 3012) 8<br />
8 3 <101 243 214 343> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [3013 <0 0 113 100>] [3012 <FFFF>]<br />
5 2 <255 193 269 208> 0 1 [117 0 1 {0}]<br />
5 2 <268 193 282 208> 0 1 [117 0 1 {1}]<br />
5 2 <281 193 295 208> 0 1 [117 0 1 {2}]<br />
5 2 <294 193 308 208> 0 1 [117 0 1 {3}]<br />
8 1 <252 190 310 210> 0 FFFF 0 17 4 [3008 <0 0 58 20>] [3009 <0 0 58 20>] [3010 <0 0 58 20>] [3011 <0 0 58 20>]<br />
0 4 <180 31 379 305> 0<br />
5 2 <0 0 544 332> 0 1 [34 0 2 {3005 0}]<br />
<br />
(MYST 4368) 3<br />
8 3 <305 148 375 238> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [FFFF <FFFF>] [4369 <0 0 70 90>]<br />
7 2 <216 110 304 235> 0 106 5<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (0)<br />
0 2 <0 0 544 332> 4345<br />
<br />
==== Intro Case Study ====<br />
(INTRO 1) 1<br />
0 2 <-32000 -32000 32000 32000> 5<br />
<br />
INTRO 1 is supposed to be the card which shows the opening movies and then switches to card 2.<br />
<br />
(INTRO 2) 1<br />
5 2 <245 202 304 253> 4 2 [37 0 0] [34 0 2 {3 11}]<br />
<br />
INTRO 2 is the first interactive part of the game, the part where you can pick up the Myst book. The rect correctly corresponds to where the book is on screen. But, look at the "destination" -- 4. There is no VIEW/RLST 4! However, there is a WDIB 4 and it is the open book with the water. Where this ''should'' go is to card 3 and show the Myst book cover before showing image 4 and then playing the video. And, there is a 3 in this chunk, but I'm not sure if that's the purpose. I have no idea what commands 37/34 could be. There is a WDIB 11, but it's of D'ni, so I doubt it's that. ;)<br />
<br />
(INTRO 3) 2<br />
0 2 <-32000 -32000 32000 32000> 5<br />
6 0 <312 70 441 159> 0 0 "\qtw\intro\intro2" 0x2848 0x2756 0 1 0 0 0<br />
<br />
Note that this one has a string for the video (null-terminated). This obviously calls that video which is the Myst fly-by for the linking book. And, that rect perfectly matches where the video should be displayed on screen. However, this also clearly breaks the format specified above for "type 2 hotspots".<br />
<br />
WDIB 3 is the cover of the Myst linking book. But, this doesn't match up with the video mentioned here which should be for WDIB 4 (or 10, they are identical)(the open linking book with the water image) and eventually ending at WDIB 12 (the open linking book with the dock image). The 5 after the very large numbers is the target card for the open linking book which seems correct. 0x2848 is 10,312 and 0x2756 is 10,070. The rate of the audio is 11,025. Not sure if this has any correlation.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_RLST_resources
Myst RLST resources
2008-10-12T21:59:37Z
<p>TitoDalCanton: /* Type 13 */</p>
<hr />
<div>{{Myst}}<br />
<br />
These contain Myst's hotspot descriptions. Hotspots come in several "types" and depending on their type their action can be simple or very complex.<br />
<br />
RLST data is a list of records, each record describing one of the hotspots:<br />
{| class="structure"<br />
|short||record_count<br />
|-<br />
|variable||records<br />
|}<br />
<br />
The record length is variable, depending on the hotspot type. The record structure is:<br />
{| class="structure"<br />
|unsigned short||type<br />
|-<br />
|unsigned short||flags<br />
|-<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||right<br />
|-<br />
|short||bottom<br />
|-<br />
|unsigned short||destination<br />
|-<br />
|variable||additional data<br />
|}<br />
*''type'' specifies the hotspot action in a wide sense. Every value between 0 and 14 except for 9 has been observed. See below for the meaning of each type.<br />
*''flags'' seems to be a bit field. Observed values are 0, 1, 2, 3, 4, 5, 8 and 10 (4 variable bits). The value seems related to when the hotspot actions should be executed. For example, regular clickable hotspots usually have bit 1 set while hotspots that run background movies (e.g. the Channelwood windmill) have ''flags'' = 0. Bit 0 seems to indicate whether hotspot subimages are to be drawn (at least for type 8 hotspots). Hotspots with bit 2 set usually don't have any other bits set (except bit 0, encountered only twice). Bit 3 is suspected to flag Zip Mode hotspots.<br />
*(''left'', ''top'', ''right'', ''bottom'') is the hotspot rectangle in pixels. Note that weird rectangles are found, like (-32000, -32000, 32000, 32000).<br />
*''destination'' contains a destination card ID for hotspots that change card, or zero.<br />
*Additional data follows for some types, describing actions to perform. See below.<br />
<br />
==Hotspot types==<br />
===Types 0 to 4 and 14===<br />
"Simple" hotspots that just change card. There is no additional data in the hotspot record. Types 0 to 4 define the movement direction (forward, left, right, down and up respectively) while the purpose of type 14 is not yet clear. It is used prevalently near linking books.<br />
<br />
===Type 5===<br />
Type 5 hotspots have a simple script attached to them, which is executed when the hotspot is activated. See the [[Myst_scripts|page about scripts]] for the structure of scripts.<br />
<br />
===Type 6===<br />
Type 6 hotspots have a script like type 5 ones, but they also play a video when activated. The record starts with a full type 5 record. Then comes a zero-terminated string (C string) which defines the path to the video file within the Myst CD-ROM, without extension. Backslashes are used to separate directories, as usual in Windows. After the string, the input stream position should be padded to the next 2-byte boundary. Finally come 7 shorts:<br />
{| class="structure"<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||loop<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|}<br />
''left'' and ''top'' specify the movie position. Sometimes they misteriously exceed the correct position by 10000, so one has to take them modulo 10000 to get "safe" values. ''loop'' is 0 for movies that are to be played once, 1 for movies that must loop. The unknown fields are usually 0 or 1 but ''u3'' is found with 125 in one case. ''u0'' seems fixed to 1.<br />
<br />
===Type 7===<br />
Type 7 record serves as some kind of switch statement: it runs a script from a list indexed by the value of a variable:<br />
<br />
(var_index) {num_cases} [record_type <record_data>]<br />
<br />
Each case itself begins with a record type (always 5 or 6) and contains the data you would find in a hotspot record of that type, excluding the standard block common to all types.<br />
<br />
===Type 8===<br />
Type 8 record is like type 7, but additionally it specifies a list of pictures to draw over main WDIB. The particular picture is chosen depending on the value of variable. This record includes the type 7 record at start.<br />
<br />
<type_7_record> (var_index) {num_subs} [wdib_id <rectangle>]<br />
<br />
Here, each subimage record defines a source WDIB ID and a source rectangle inside this WDIB. Rectangle is defined in the usual (''left'', ''top'', ''right'', ''bottom'') format, with one exception: empty rectangle is defined as the single short -1. This is probably the case when source rectangle equals destination rectangle. Also, ''wdib_id'' itself can be -1, this probably means original WDIB for this card should be used as source WDIB.<br />
<br />
===Type 10===<br />
Type 10 hotspots implement slider-like controls. The record structure is:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|-<br />
|unsigned short||count3<br />
|-<br />
|short||list3[count3]<br />
|}<br />
''kind'' is a small number (0-3) and seems to describe what kind of control this is. ''left'', ''right'', ''top'' and ''bottom'' look like coordinates and probably specify the area available to the control (e.g. for sliders). The values in the final lists look like sound IDs.<br />
<br />
A few cases:<br />
* Myst island, card 4500<br />
* Myst island, card 4530<br />
* Selenitic Age, card 1147<br />
<br />
===Type 11===<br />
Type 11 hotspots implement controls that you click and hold or drag, like some of the levers. The record structure is similar to type 10 records, but lacks the last list:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|}<br />
The first list seems to list sounds that play at animation start, the second seems to loop in the middle and the third seems to play when the user releases the control.<br />
<br />
A few cases:<br />
* Myst island, card 4006<br />
* Myst island, card 4059<br />
* Myst island, card 4098<br />
* Selenitic Age, card 1245<br />
* Stoneship Age, card 2013<br />
* Stoneship Age, card 2161<br />
* Stoneship Age, card 2218<br />
<br />
===Type 12===<br />
Type 12 hotspots implement animated controls which use a sequence of separate pictures for the animation. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
* number of animation frames<br />
* ID of the picture with the first frame<br />
* two unsigned shorts<br />
* left,top coordinates of the animation<br />
<br />
A few cases:<br />
* Channelwood Age, card 3161<br />
* Channelwood Age, card 3246<br />
* Channelwood Age, card 3271<br />
* Mechanical Age, card 6044<br />
* Mechanical Age, card 6156<br />
* Mechanical Age, card 6180<br />
* Myst island, card 4100<br />
* Myst island, card 4113<br />
<br />
===Type 13===<br />
Type 13 record has just two unknown shorts ''u0'' and ''u1'' after the main block. In addition, ''destination'' seems to be a variable rather than a card ID.<br />
<br />
Type 13 hotspots are used when an action is triggered by mouse movements (enter/exit) rather than clicks. Examples:<br />
*the match box puzzle in Myst island<br />
*the icons for raising the ship in Myst island<br />
*the crystals in Sirrus' room in Mechanical Age.<br />
Looking at the scripts, these hotspots could trigger a variable change when the cursor enters and leaves them.<br />
<br />
==Case studies==<br />
Note: these are simply the data in little-endian shorts and line-broken where patterns are found. <l t b r> is the hotspot rect. count [entry]... are guesses at when there are lists of entries. The number in parentheses before the data is the card number (not the resource number).<br />
<br />
The following hotspots replace part of the image (in this case <417 260 544 333>) with part of another image (in this case 3004 <0 0 127 73>) based on a variable (103 2 plays in here somewhere):<br />
8 1 < 31 276 163 333> 0 FFFF 0 103 2 3006 <0 0 132 57> 3005 FFFF<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 3004 <0 0 127 73> 3003 FFFF<br />
<br />
Case studies from Channelwood:<br />
(CHANNEL 3001) 2<br />
1 2 <1 0 110 332> 3002<br />
2 2 <455 2 544 332> 3003<br />
<br />
(CHANNEL 3002) 2<br />
1 2 <0 1 100 332> 3005<br />
2 2 <431 0 544 332> 3001<br />
<br />
(CHANNEL 3003) 4<br />
5 2 <213 90 343 290> 3494 2 [6 0 0] [24 0 1 {3494}] (the door)<br />
1 2 <0 0 81 332> 3001 (left)<br />
2 2 <463 0 544 332> 3005 (right)<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 [3004 <0 0 127 73>] [3003 <FFFF>]<br />
<br />
(CHANNEL 3005) 4<br />
0 2 <76 152 196 330> 3012<br />
1 2 <0 0 106 332> 3003<br />
2 2 <438 0 544 332> 3002<br />
8 1 <31 276 163 333> 0 FFFF 0 103 2 [3006 <0 0 132 57>] [3005 <FFFF>]<br />
<br />
(CHANNEL 3012) 8<br />
8 3 <101 243 214 343> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [3013 <0 0 113 100>] [3012 <FFFF>]<br />
5 2 <255 193 269 208> 0 1 [117 0 1 {0}]<br />
5 2 <268 193 282 208> 0 1 [117 0 1 {1}]<br />
5 2 <281 193 295 208> 0 1 [117 0 1 {2}]<br />
5 2 <294 193 308 208> 0 1 [117 0 1 {3}]<br />
8 1 <252 190 310 210> 0 FFFF 0 17 4 [3008 <0 0 58 20>] [3009 <0 0 58 20>] [3010 <0 0 58 20>] [3011 <0 0 58 20>]<br />
0 4 <180 31 379 305> 0<br />
5 2 <0 0 544 332> 0 1 [34 0 2 {3005 0}]<br />
<br />
(MYST 4368) 3<br />
8 3 <305 148 375 238> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [FFFF <FFFF>] [4369 <0 0 70 90>]<br />
7 2 <216 110 304 235> 0 106 5<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (0)<br />
0 2 <0 0 544 332> 4345<br />
<br />
==== Intro Case Study ====<br />
(INTRO 1) 1<br />
0 2 <-32000 -32000 32000 32000> 5<br />
<br />
INTRO 1 is supposed to be the card which shows the opening movies and then switches to card 2.<br />
<br />
(INTRO 2) 1<br />
5 2 <245 202 304 253> 4 2 [37 0 0] [34 0 2 {3 11}]<br />
<br />
INTRO 2 is the first interactive part of the game, the part where you can pick up the Myst book. The rect correctly corresponds to where the book is on screen. But, look at the "destination" -- 4. There is no VIEW/RLST 4! However, there is a WDIB 4 and it is the open book with the water. Where this ''should'' go is to card 3 and show the Myst book cover before showing image 4 and then playing the video. And, there is a 3 in this chunk, but I'm not sure if that's the purpose. I have no idea what commands 37/34 could be. There is a WDIB 11, but it's of D'ni, so I doubt it's that. ;)<br />
<br />
(INTRO 3) 2<br />
0 2 <-32000 -32000 32000 32000> 5<br />
6 0 <312 70 441 159> 0 0 "\qtw\intro\intro2" 0x2848 0x2756 0 1 0 0 0<br />
<br />
Note that this one has a string for the video (null-terminated). This obviously calls that video which is the Myst fly-by for the linking book. And, that rect perfectly matches where the video should be displayed on screen. However, this also clearly breaks the format specified above for "type 2 hotspots".<br />
<br />
WDIB 3 is the cover of the Myst linking book. But, this doesn't match up with the video mentioned here which should be for WDIB 4 (or 10, they are identical)(the open linking book with the water image) and eventually ending at WDIB 12 (the open linking book with the dock image). The 5 after the very large numbers is the target card for the open linking book which seems correct. 0x2848 is 10,312 and 0x2756 is 10,070. The rate of the audio is 11,025. Not sure if this has any correlation.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_RLST_resources
Myst RLST resources
2008-10-12T21:52:44Z
<p>TitoDalCanton: several corrections</p>
<hr />
<div>{{Myst}}<br />
<br />
These contain Myst's hotspot descriptions. Hotspots come in several "types" and depending on their type their action can be simple or very complex.<br />
<br />
RLST data is a list of records, each record describing one of the hotspots:<br />
{| class="structure"<br />
|short||record_count<br />
|-<br />
|variable||records<br />
|}<br />
<br />
The record length is variable, depending on the hotspot type. The record structure is:<br />
{| class="structure"<br />
|unsigned short||type<br />
|-<br />
|unsigned short||flags<br />
|-<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||right<br />
|-<br />
|short||bottom<br />
|-<br />
|unsigned short||destination<br />
|-<br />
|variable||additional data<br />
|}<br />
*''type'' specifies the hotspot action in a wide sense. Every value between 0 and 14 except for 9 has been observed. See below for the meaning of each type.<br />
*''flags'' seems to be a bit field. Observed values are 0, 1, 2, 3, 4, 5, 8 and 10 (4 variable bits). The value seems related to when the hotspot actions should be executed. For example, regular clickable hotspots usually have bit 1 set while hotspots that run background movies (e.g. the Channelwood windmill) have ''flags'' = 0. Bit 0 seems to indicate whether hotspot subimages are to be drawn (at least for type 8 hotspots). Hotspots with bit 2 set usually don't have any other bits set (except bit 0, encountered only twice). Bit 3 is suspected to flag Zip Mode hotspots.<br />
*(''left'', ''top'', ''right'', ''bottom'') is the hotspot rectangle in pixels. Note that weird rectangles are found, like (-32000, -32000, 32000, 32000).<br />
*''destination'' contains a destination card ID for hotspots that change card, or zero.<br />
*Additional data follows for some types, describing actions to perform. See below.<br />
<br />
==Hotspot types==<br />
===Types 0 to 4 and 14===<br />
"Simple" hotspots that just change card. There is no additional data in the hotspot record. Types 0 to 4 define the movement direction (forward, left, right, down and up respectively) while the purpose of type 14 is not yet clear. It is used prevalently near linking books.<br />
<br />
===Type 5===<br />
Type 5 hotspots have a simple script attached to them, which is executed when the hotspot is activated. See the [[Myst_scripts|page about scripts]] for the structure of scripts.<br />
<br />
===Type 6===<br />
Type 6 hotspots have a script like type 5 ones, but they also play a video when activated. The record starts with a full type 5 record. Then comes a zero-terminated string (C string) which defines the path to the video file within the Myst CD-ROM, without extension. Backslashes are used to separate directories, as usual in Windows. After the string, the input stream position should be padded to the next 2-byte boundary. Finally come 7 shorts:<br />
{| class="structure"<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||loop<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|}<br />
''left'' and ''top'' specify the movie position. Sometimes they misteriously exceed the correct position by 10000, so one has to take them modulo 10000 to get "safe" values. ''loop'' is 0 for movies that are to be played once, 1 for movies that must loop. The unknown fields are usually 0 or 1 but ''u3'' is found with 125 in one case. ''u0'' seems fixed to 1.<br />
<br />
===Type 7===<br />
Type 7 record serves as some kind of switch statement: it runs a script from a list indexed by the value of a variable:<br />
<br />
(var_index) {num_cases} [record_type <record_data>]<br />
<br />
Each case itself begins with a record type (always 5 or 6) and contains the data you would find in a hotspot record of that type, excluding the standard block common to all types.<br />
<br />
===Type 8===<br />
Type 8 record is like type 7, but additionally it specifies a list of pictures to draw over main WDIB. The particular picture is chosen depending on the value of variable. This record includes the type 7 record at start.<br />
<br />
<type_7_record> (var_index) {num_subs} [wdib_id <rectangle>]<br />
<br />
Here, each subimage record defines a source WDIB ID and a source rectangle inside this WDIB. Rectangle is defined in the usual (''left'', ''top'', ''right'', ''bottom'') format, with one exception: empty rectangle is defined as the single short -1. This is probably the case when source rectangle equals destination rectangle. Also, ''wdib_id'' itself can be -1, this probably means original WDIB for this card should be used as source WDIB.<br />
<br />
===Type 10===<br />
Type 10 hotspots implement slider-like controls. The record structure is:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|-<br />
|unsigned short||count3<br />
|-<br />
|short||list3[count3]<br />
|}<br />
''kind'' is a small number (0-3) and seems to describe what kind of control this is. ''left'', ''right'', ''top'' and ''bottom'' look like coordinates and probably specify the area available to the control (e.g. for sliders). The values in the final lists look like sound IDs.<br />
<br />
A few cases:<br />
* Myst island, card 4500<br />
* Myst island, card 4530<br />
* Selenitic Age, card 1147<br />
<br />
===Type 11===<br />
Type 11 hotspots implement controls that you click and hold or drag, like some of the levers. The record structure is similar to type 10 records, but lacks the last list:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|}<br />
The first list seems to list sounds that play at animation start, the second seems to loop in the middle and the third seems to play when the user releases the control.<br />
<br />
A few cases:<br />
* Myst island, card 4006<br />
* Myst island, card 4059<br />
* Myst island, card 4098<br />
* Selenitic Age, card 1245<br />
* Stoneship Age, card 2013<br />
* Stoneship Age, card 2161<br />
* Stoneship Age, card 2218<br />
<br />
===Type 12===<br />
Type 12 hotspots implement animated controls which use a sequence of separate pictures for the animation. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
* number of animation frames<br />
* ID of the picture with the first frame<br />
* two unsigned shorts<br />
* left,top coordinates of the animation<br />
<br />
A few cases:<br />
* Channelwood Age, card 3161<br />
* Channelwood Age, card 3246<br />
* Channelwood Age, card 3271<br />
* Mechanical Age, card 6044<br />
* Mechanical Age, card 6156<br />
* Mechanical Age, card 6180<br />
* Myst island, card 4100<br />
* Myst island, card 4113<br />
<br />
===Type 13===<br />
Type 13 record has just two unknown shorts ''u0'' and ''u1'' after the main block. In addition, ''destination'' seems to be a variable rather than a card ID. Type 13 hotspots are used for example in the match box puzzle and in the icons for raising the ship, in Myst island. They possibly trigger a variable change when rolling over the hotspot.<br />
<br />
==Case studies==<br />
Note: these are simply the data in little-endian shorts and line-broken where patterns are found. <l t b r> is the hotspot rect. count [entry]... are guesses at when there are lists of entries. The number in parentheses before the data is the card number (not the resource number).<br />
<br />
The following hotspots replace part of the image (in this case <417 260 544 333>) with part of another image (in this case 3004 <0 0 127 73>) based on a variable (103 2 plays in here somewhere):<br />
8 1 < 31 276 163 333> 0 FFFF 0 103 2 3006 <0 0 132 57> 3005 FFFF<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 3004 <0 0 127 73> 3003 FFFF<br />
<br />
Case studies from Channelwood:<br />
(CHANNEL 3001) 2<br />
1 2 <1 0 110 332> 3002<br />
2 2 <455 2 544 332> 3003<br />
<br />
(CHANNEL 3002) 2<br />
1 2 <0 1 100 332> 3005<br />
2 2 <431 0 544 332> 3001<br />
<br />
(CHANNEL 3003) 4<br />
5 2 <213 90 343 290> 3494 2 [6 0 0] [24 0 1 {3494}] (the door)<br />
1 2 <0 0 81 332> 3001 (left)<br />
2 2 <463 0 544 332> 3005 (right)<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 [3004 <0 0 127 73>] [3003 <FFFF>]<br />
<br />
(CHANNEL 3005) 4<br />
0 2 <76 152 196 330> 3012<br />
1 2 <0 0 106 332> 3003<br />
2 2 <438 0 544 332> 3002<br />
8 1 <31 276 163 333> 0 FFFF 0 103 2 [3006 <0 0 132 57>] [3005 <FFFF>]<br />
<br />
(CHANNEL 3012) 8<br />
8 3 <101 243 214 343> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [3013 <0 0 113 100>] [3012 <FFFF>]<br />
5 2 <255 193 269 208> 0 1 [117 0 1 {0}]<br />
5 2 <268 193 282 208> 0 1 [117 0 1 {1}]<br />
5 2 <281 193 295 208> 0 1 [117 0 1 {2}]<br />
5 2 <294 193 308 208> 0 1 [117 0 1 {3}]<br />
8 1 <252 190 310 210> 0 FFFF 0 17 4 [3008 <0 0 58 20>] [3009 <0 0 58 20>] [3010 <0 0 58 20>] [3011 <0 0 58 20>]<br />
0 4 <180 31 379 305> 0<br />
5 2 <0 0 544 332> 0 1 [34 0 2 {3005 0}]<br />
<br />
(MYST 4368) 3<br />
8 3 <305 148 375 238> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [FFFF <FFFF>] [4369 <0 0 70 90>]<br />
7 2 <216 110 304 235> 0 106 5<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (0)<br />
0 2 <0 0 544 332> 4345<br />
<br />
==== Intro Case Study ====<br />
(INTRO 1) 1<br />
0 2 <-32000 -32000 32000 32000> 5<br />
<br />
INTRO 1 is supposed to be the card which shows the opening movies and then switches to card 2.<br />
<br />
(INTRO 2) 1<br />
5 2 <245 202 304 253> 4 2 [37 0 0] [34 0 2 {3 11}]<br />
<br />
INTRO 2 is the first interactive part of the game, the part where you can pick up the Myst book. The rect correctly corresponds to where the book is on screen. But, look at the "destination" -- 4. There is no VIEW/RLST 4! However, there is a WDIB 4 and it is the open book with the water. Where this ''should'' go is to card 3 and show the Myst book cover before showing image 4 and then playing the video. And, there is a 3 in this chunk, but I'm not sure if that's the purpose. I have no idea what commands 37/34 could be. There is a WDIB 11, but it's of D'ni, so I doubt it's that. ;)<br />
<br />
(INTRO 3) 2<br />
0 2 <-32000 -32000 32000 32000> 5<br />
6 0 <312 70 441 159> 0 0 "\qtw\intro\intro2" 0x2848 0x2756 0 1 0 0 0<br />
<br />
Note that this one has a string for the video (null-terminated). This obviously calls that video which is the Myst fly-by for the linking book. And, that rect perfectly matches where the video should be displayed on screen. However, this also clearly breaks the format specified above for "type 2 hotspots".<br />
<br />
WDIB 3 is the cover of the Myst linking book. But, this doesn't match up with the video mentioned here which should be for WDIB 4 (or 10, they are identical)(the open linking book with the water image) and eventually ending at WDIB 12 (the open linking book with the dock image). The 5 after the very large numbers is the target card for the open linking book which seems correct. 0x2848 is 10,312 and 0x2756 is 10,070. The rate of the audio is 11,025. Not sure if this has any correlation.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_RLST_resources
Myst RLST resources
2008-10-12T21:31:55Z
<p>TitoDalCanton: /* Type 10 */</p>
<hr />
<div>{{Myst}}<br />
<br />
These contain Myst's hotspot descriptions.<br />
<br />
The data is a list of records, each record describing one of the hotspots:<br />
{| class="structure"<br />
|short||record_count<br />
|-<br />
|variable||records<br />
|}<br />
<br />
The record length is variable, depending on the hotspot type. The record structure is:<br />
{| class="structure"<br />
|unsigned short||type<br />
|-<br />
|unsigned short||flags<br />
|-<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||right<br />
|-<br />
|short||bottom<br />
|-<br />
|unsigned short||destination<br />
|-<br />
|variable||additional data<br />
|}<br />
*''type'' seems to specify the hotspot action in a wide sense. Every value between 0 and 14 except for 9 has been observed. See below for the meaning.<br />
*''flags'' seems to be a bit field. Observed values are 0, 1, 2, 3, 4, 5, 8 and 10 (4 variable bits). The value seems related to when the hotspot actions should be executed. For example, regular clickable hotspots usually have bit 1 set while hotspots that run background movies (e.g. the Channelwood windmill) have ''flags'' = 0. Bit 0 seems to indicate whether hotspot subimages are to be drawn (at least for type 8 hotspots). Hotspots with bit 2 set usually don't have any other bits set (except bit 0, encountered only twice). Bit 3 is suspected to flag Zip Mode hotspots.<br />
*The following 4 fields define the hotspot rectangle. Note that "weird" rectangles are found, like (-32000, -32000, 32000, 32000).<br />
*''destination'' contains a destination card ID for hotspots that change card, or zero.<br />
*Additional data follows when ''type'' > 4 (complex hotspots), clearly representing lists of actions to perform. We have yet to figure out how to calculate the length of those complex records.<br />
<br />
==Hotspot types==<br />
===Types 0 to 4 and 14===<br />
"Simple" hotspots that just change card. There is no additional data in the hotspot record. Types 0 to 4 define the movement direction (forward, left, right, down and up respectively) while the purpose of type 14 is not yet clear. It is used prevalently near linking books.<br />
<br />
===Type 5===<br />
Type 5 hotspots have a script attached to them. See the [[Myst_scripts|page about scripts]] for the structure of scripts.<br />
<br />
===Type 6===<br />
Type 6 hotspots play a video when activated. The record starts with a full type 5 record. Then comes a zero-terminated string (C string) which defines the path to the video file without extension. After the string is read, input stream position should be padded to the next 2-byte boundary. Finally come 7 shorts:<br />
{| class="structure"<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||loop<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|}<br />
''left'' and ''top'' specify the movie position. Sometimes they misteriously exceed the correct position by 10000, so one has to take them modulo 10000 to get "safe" values. ''loop'' is 0 for movies that are to be played once, 1 for movies that must loop. The unknown fields are usually 0 or 1 but ''u3'' is found with 125 in one case. ''u0'' seems fixed to 1.<br />
<br />
===Type 7===<br />
Type 7 record serves as some kind of switch statement, executing one of several action lists (or cases) indexed by the value of a variable:<br />
<br />
(var_index) {num_cases} [record_type <record_data>]<br />
<br />
Each case itself begins with a record type, followed by additional record contents (without common prefix). Only type 5 and 6 records used in a switch statement have been observed.<br />
<br />
===Type 8===<br />
Type 8 record is like type 7, but additionally it specifies a list of subimages to draw over main WDIB. The particular subimage is chosen depending on the value of variable. This record includes the type 7 record at start.<br />
<br />
<type_7_record> (var_index) {num_subs} [wdib_id <rectangle>]<br />
<br />
Here, each subimage record defines a source WDIB ID and a source rectangle inside this WDIB. Rectangle is defined in the usual (''left'', ''top'', ''right'', ''bottom'') format, with one exception: empty rectangle is defined as the single short -1. This is probably the case when source rectangle equals destination rectangle. Also, ''wdib_id'' itself can be -1, this probably means original WDIB for this card should be used as source WDIB.<br />
<br />
===Type 10===<br />
Type 10 hotspots implement slider-like controls. The record structure is:<br />
{| class="structure"<br />
|variable||type 8 block<br />
|-<br />
|short||kind<br />
|-<br />
|short||left<br />
|-<br />
|short||right<br />
|-<br />
|short||top<br />
|-<br />
|short||bottom<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|-<br />
|short||u4<br />
|-<br />
|unsigned short||count0<br />
|-<br />
|short||list0[count0]<br />
|-<br />
|unsigned short||count1<br />
|-<br />
|short||list1[count1]<br />
|-<br />
|unsigned short||count2<br />
|-<br />
|short||list2[count2]<br />
|-<br />
|unsigned short||count3<br />
|-<br />
|short||list3[count3]<br />
|}<br />
''kind'' is a small number (0-3) and seems to describe what kind of control this is. ''left'', ''right'', ''top'' and ''bottom'' look like coordinates and probably specify the area available to the control (e.g. for sliders). The values in the final lists look like sound IDs.<br />
<br />
A few cases:<br />
* Myst island, card 4500<br />
* Myst island, card 4530<br />
* Selenitic Age, card 1147<br />
<br />
===Type 11===<br />
Type 11 hotspots implement controls that you click and hold or drag, like some of the levers. The record structure includes:<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs. The first list seems to play at animation start, the second seems to loop in the middle and the third seems to play when the user releases the control.<br />
<br />
A few cases:<br />
* Myst island, card 4006<br />
* Myst island, card 4059<br />
* Myst island, card 4098<br />
* Selenitic Age, card 1245<br />
* Stoneship Age, card 2013<br />
* Stoneship Age, card 2161<br />
* Stoneship Age, card 2218<br />
<br />
===Type 12===<br />
Type 12 hotspots implement animated controls which use a sequence of separate pictures for the animation. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
* number of animation frames<br />
* ID of the picture with the first frame<br />
* two unsigned shorts<br />
* left,top coordinates of the animation<br />
<br />
A few cases:<br />
* Channelwood Age, card 3161<br />
* Channelwood Age, card 3246<br />
* Channelwood Age, card 3271<br />
* Mechanical Age, card 6044<br />
* Mechanical Age, card 6156<br />
* Mechanical Age, card 6180<br />
* Myst island, card 4100<br />
* Myst island, card 4113<br />
<br />
===Type 13===<br />
Type 13 record has just two unknown shorts ''u0'' and ''u1'' after the main block. In addition, ''destination'' seems to be a variable rather than a card ID. Type 13 hotspots are used for example in the match box puzzle and in the icons for raising the ship, in Myst island. They possibly trigger a variable change when rolling over the hotspot.<br />
<br />
==Case studies==<br />
Note: these are simply the data in little-endian shorts and line-broken where patterns are found. <l t b r> is the hotspot rect. count [entry]... are guesses at when there are lists of entries. The number in parentheses before the data is the card number (not the resource number).<br />
<br />
The following hotspots replace part of the image (in this case <417 260 544 333>) with part of another image (in this case 3004 <0 0 127 73>) based on a variable (103 2 plays in here somewhere):<br />
8 1 < 31 276 163 333> 0 FFFF 0 103 2 3006 <0 0 132 57> 3005 FFFF<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 3004 <0 0 127 73> 3003 FFFF<br />
<br />
Case studies from Channelwood:<br />
(CHANNEL 3001) 2<br />
1 2 <1 0 110 332> 3002<br />
2 2 <455 2 544 332> 3003<br />
<br />
(CHANNEL 3002) 2<br />
1 2 <0 1 100 332> 3005<br />
2 2 <431 0 544 332> 3001<br />
<br />
(CHANNEL 3003) 4<br />
5 2 <213 90 343 290> 3494 2 [6 0 0] [24 0 1 {3494}] (the door)<br />
1 2 <0 0 81 332> 3001 (left)<br />
2 2 <463 0 544 332> 3005 (right)<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 [3004 <0 0 127 73>] [3003 <FFFF>]<br />
<br />
(CHANNEL 3005) 4<br />
0 2 <76 152 196 330> 3012<br />
1 2 <0 0 106 332> 3003<br />
2 2 <438 0 544 332> 3002<br />
8 1 <31 276 163 333> 0 FFFF 0 103 2 [3006 <0 0 132 57>] [3005 <FFFF>]<br />
<br />
(CHANNEL 3012) 8<br />
8 3 <101 243 214 343> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [3013 <0 0 113 100>] [3012 <FFFF>]<br />
5 2 <255 193 269 208> 0 1 [117 0 1 {0}]<br />
5 2 <268 193 282 208> 0 1 [117 0 1 {1}]<br />
5 2 <281 193 295 208> 0 1 [117 0 1 {2}]<br />
5 2 <294 193 308 208> 0 1 [117 0 1 {3}]<br />
8 1 <252 190 310 210> 0 FFFF 0 17 4 [3008 <0 0 58 20>] [3009 <0 0 58 20>] [3010 <0 0 58 20>] [3011 <0 0 58 20>]<br />
0 4 <180 31 379 305> 0<br />
5 2 <0 0 544 332> 0 1 [34 0 2 {3005 0}]<br />
<br />
(MYST 4368) 3<br />
8 3 <305 148 375 238> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [FFFF <FFFF>] [4369 <0 0 70 90>]<br />
7 2 <216 110 304 235> 0 106 5<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (0)<br />
0 2 <0 0 544 332> 4345<br />
<br />
==== Intro Case Study ====<br />
(INTRO 1) 1<br />
0 2 <-32000 -32000 32000 32000> 5<br />
<br />
INTRO 1 is supposed to be the card which shows the opening movies and then switches to card 2.<br />
<br />
(INTRO 2) 1<br />
5 2 <245 202 304 253> 4 2 [37 0 0] [34 0 2 {3 11}]<br />
<br />
INTRO 2 is the first interactive part of the game, the part where you can pick up the Myst book. The rect correctly corresponds to where the book is on screen. But, look at the "destination" -- 4. There is no VIEW/RLST 4! However, there is a WDIB 4 and it is the open book with the water. Where this ''should'' go is to card 3 and show the Myst book cover before showing image 4 and then playing the video. And, there is a 3 in this chunk, but I'm not sure if that's the purpose. I have no idea what commands 37/34 could be. There is a WDIB 11, but it's of D'ni, so I doubt it's that. ;)<br />
<br />
(INTRO 3) 2<br />
0 2 <-32000 -32000 32000 32000> 5<br />
6 0 <312 70 441 159> 0 0 "\qtw\intro\intro2" 0x2848 0x2756 0 1 0 0 0<br />
<br />
Note that this one has a string for the video (null-terminated). This obviously calls that video which is the Myst fly-by for the linking book. And, that rect perfectly matches where the video should be displayed on screen. However, this also clearly breaks the format specified above for "type 2 hotspots".<br />
<br />
WDIB 3 is the cover of the Myst linking book. But, this doesn't match up with the video mentioned here which should be for WDIB 4 (or 10, they are identical)(the open linking book with the water image) and eventually ending at WDIB 12 (the open linking book with the dock image). The 5 after the very large numbers is the target card for the open linking book which seems correct. 0x2848 is 10,312 and 0x2756 is 10,070. The rate of the audio is 11,025. Not sure if this has any correlation.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_RLST_resources
Myst RLST resources
2008-10-12T21:19:42Z
<p>TitoDalCanton: type 6 parameters</p>
<hr />
<div>{{Myst}}<br />
<br />
These contain Myst's hotspot descriptions.<br />
<br />
The data is a list of records, each record describing one of the hotspots:<br />
{| class="structure"<br />
|short||record_count<br />
|-<br />
|variable||records<br />
|}<br />
<br />
The record length is variable, depending on the hotspot type. The record structure is:<br />
{| class="structure"<br />
|unsigned short||type<br />
|-<br />
|unsigned short||flags<br />
|-<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||right<br />
|-<br />
|short||bottom<br />
|-<br />
|unsigned short||destination<br />
|-<br />
|variable||additional data<br />
|}<br />
*''type'' seems to specify the hotspot action in a wide sense. Every value between 0 and 14 except for 9 has been observed. See below for the meaning.<br />
*''flags'' seems to be a bit field. Observed values are 0, 1, 2, 3, 4, 5, 8 and 10 (4 variable bits). The value seems related to when the hotspot actions should be executed. For example, regular clickable hotspots usually have bit 1 set while hotspots that run background movies (e.g. the Channelwood windmill) have ''flags'' = 0. Bit 0 seems to indicate whether hotspot subimages are to be drawn (at least for type 8 hotspots). Hotspots with bit 2 set usually don't have any other bits set (except bit 0, encountered only twice). Bit 3 is suspected to flag Zip Mode hotspots.<br />
*The following 4 fields define the hotspot rectangle. Note that "weird" rectangles are found, like (-32000, -32000, 32000, 32000).<br />
*''destination'' contains a destination card ID for hotspots that change card, or zero.<br />
*Additional data follows when ''type'' > 4 (complex hotspots), clearly representing lists of actions to perform. We have yet to figure out how to calculate the length of those complex records.<br />
<br />
==Hotspot types==<br />
===Types 0 to 4 and 14===<br />
"Simple" hotspots that just change card. There is no additional data in the hotspot record. Types 0 to 4 define the movement direction (forward, left, right, down and up respectively) while the purpose of type 14 is not yet clear. It is used prevalently near linking books.<br />
<br />
===Type 5===<br />
Type 5 hotspots have a script attached to them. See the [[Myst_scripts|page about scripts]] for the structure of scripts.<br />
<br />
===Type 6===<br />
Type 6 hotspots play a video when activated. The record starts with a full type 5 record. Then comes a zero-terminated string (C string) which defines the path to the video file without extension. After the string is read, input stream position should be padded to the next 2-byte boundary. Finally come 7 shorts:<br />
{| class="structure"<br />
|short||left<br />
|-<br />
|short||top<br />
|-<br />
|short||loop<br />
|-<br />
|short||u0<br />
|-<br />
|short||u1<br />
|-<br />
|short||u2<br />
|-<br />
|short||u3<br />
|}<br />
''left'' and ''top'' specify the movie position. Sometimes they misteriously exceed the correct position by 10000, so one has to take them modulo 10000 to get "safe" values. ''loop'' is 0 for movies that are to be played once, 1 for movies that must loop. The unknown fields are usually 0 or 1 but ''u3'' is found with 125 in one case. ''u0'' seems fixed to 1.<br />
<br />
===Type 7===<br />
Type 7 record serves as some kind of switch statement, executing one of several action lists (or cases) indexed by the value of a variable:<br />
<br />
(var_index) {num_cases} [record_type <record_data>]<br />
<br />
Each case itself begins with a record type, followed by additional record contents (without common prefix). Only type 5 and 6 records used in a switch statement have been observed.<br />
<br />
===Type 8===<br />
Type 8 record is like type 7, but additionally it specifies a list of subimages to draw over main WDIB. The particular subimage is chosen depending on the value of variable. This record includes the type 7 record at start.<br />
<br />
<type_7_record> (var_index) {num_subs} [wdib_id <rectangle>]<br />
<br />
Here, each subimage record defines a source WDIB ID and a source rectangle inside this WDIB. Rectangle is defined in the usual (''left'', ''top'', ''right'', ''bottom'') format, with one exception: empty rectangle is defined as the single short -1. This is probably the case when source rectangle equals destination rectangle. Also, ''wdib_id'' itself can be -1, this probably means original WDIB for this card should be used as source WDIB.<br />
<br />
===Type 10===<br />
Type 10 hotspots implement slider-like controls. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 4 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
<br />
A few cases:<br />
* Myst island, card 4500<br />
* Myst island, card 4530<br />
* Selenitic Age, card 1147<br />
<br />
===Type 11===<br />
Type 11 hotspots implement controls that you click and hold or drag, like some of the levers. The record structure includes:<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs. The first list seems to play at animation start, the second seems to loop in the middle and the third seems to play when the user releases the control.<br />
<br />
A few cases:<br />
* Myst island, card 4006<br />
* Myst island, card 4059<br />
* Myst island, card 4098<br />
* Selenitic Age, card 1245<br />
* Stoneship Age, card 2013<br />
* Stoneship Age, card 2161<br />
* Stoneship Age, card 2218<br />
<br />
===Type 12===<br />
Type 12 hotspots implement animated controls which use a sequence of separate pictures for the animation. The record structure includes<br />
* a type 8 block<br />
* 10 unknown shorts<br />
* 3 lists of unsigned shorts (num_values followed by that many values) which look like sound IDs.<br />
* number of animation frames<br />
* ID of the picture with the first frame<br />
* two unsigned shorts<br />
* left,top coordinates of the animation<br />
<br />
A few cases:<br />
* Channelwood Age, card 3161<br />
* Channelwood Age, card 3246<br />
* Channelwood Age, card 3271<br />
* Mechanical Age, card 6044<br />
* Mechanical Age, card 6156<br />
* Mechanical Age, card 6180<br />
* Myst island, card 4100<br />
* Myst island, card 4113<br />
<br />
===Type 13===<br />
Type 13 record has just two unknown shorts ''u0'' and ''u1'' after the main block. In addition, ''destination'' seems to be a variable rather than a card ID. Type 13 hotspots are used for example in the match box puzzle and in the icons for raising the ship, in Myst island. They possibly trigger a variable change when rolling over the hotspot.<br />
<br />
==Case studies==<br />
Note: these are simply the data in little-endian shorts and line-broken where patterns are found. <l t b r> is the hotspot rect. count [entry]... are guesses at when there are lists of entries. The number in parentheses before the data is the card number (not the resource number).<br />
<br />
The following hotspots replace part of the image (in this case <417 260 544 333>) with part of another image (in this case 3004 <0 0 127 73>) based on a variable (103 2 plays in here somewhere):<br />
8 1 < 31 276 163 333> 0 FFFF 0 103 2 3006 <0 0 132 57> 3005 FFFF<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 3004 <0 0 127 73> 3003 FFFF<br />
<br />
Case studies from Channelwood:<br />
(CHANNEL 3001) 2<br />
1 2 <1 0 110 332> 3002<br />
2 2 <455 2 544 332> 3003<br />
<br />
(CHANNEL 3002) 2<br />
1 2 <0 1 100 332> 3005<br />
2 2 <431 0 544 332> 3001<br />
<br />
(CHANNEL 3003) 4<br />
5 2 <213 90 343 290> 3494 2 [6 0 0] [24 0 1 {3494}] (the door)<br />
1 2 <0 0 81 332> 3001 (left)<br />
2 2 <463 0 544 332> 3005 (right)<br />
8 1 <417 260 544 333> 0 FFFF 0 103 2 [3004 <0 0 127 73>] [3003 <FFFF>]<br />
<br />
(CHANNEL 3005) 4<br />
0 2 <76 152 196 330> 3012<br />
1 2 <0 0 106 332> 3003<br />
2 2 <438 0 544 332> 3002<br />
8 1 <31 276 163 333> 0 FFFF 0 103 2 [3006 <0 0 132 57>] [3005 <FFFF>]<br />
<br />
(CHANNEL 3012) 8<br />
8 3 <101 243 214 343> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [3013 <0 0 113 100>] [3012 <FFFF>]<br />
5 2 <255 193 269 208> 0 1 [117 0 1 {0}]<br />
5 2 <268 193 282 208> 0 1 [117 0 1 {1}]<br />
5 2 <281 193 295 208> 0 1 [117 0 1 {2}]<br />
5 2 <294 193 308 208> 0 1 [117 0 1 {3}]<br />
8 1 <252 190 310 210> 0 FFFF 0 17 4 [3008 <0 0 58 20>] [3009 <0 0 58 20>] [3010 <0 0 58 20>] [3011 <0 0 58 20>]<br />
0 4 <180 31 379 305> 0<br />
5 2 <0 0 544 332> 0 1 [34 0 2 {3005 0}]<br />
<br />
(MYST 4368) 3<br />
8 3 <305 148 375 238> 0 FFFF 1 5 (1 [3 103 1 {802}]) 103 2 [FFFF <FFFF>] [4369 <0 0 70 90>]<br />
7 2 <216 110 304 235> 0 106 5<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (1 [115 101 3 {4741 4370 4368}])<br />
5 (0)<br />
0 2 <0 0 544 332> 4345<br />
<br />
==== Intro Case Study ====<br />
(INTRO 1) 1<br />
0 2 <-32000 -32000 32000 32000> 5<br />
<br />
INTRO 1 is supposed to be the card which shows the opening movies and then switches to card 2.<br />
<br />
(INTRO 2) 1<br />
5 2 <245 202 304 253> 4 2 [37 0 0] [34 0 2 {3 11}]<br />
<br />
INTRO 2 is the first interactive part of the game, the part where you can pick up the Myst book. The rect correctly corresponds to where the book is on screen. But, look at the "destination" -- 4. There is no VIEW/RLST 4! However, there is a WDIB 4 and it is the open book with the water. Where this ''should'' go is to card 3 and show the Myst book cover before showing image 4 and then playing the video. And, there is a 3 in this chunk, but I'm not sure if that's the purpose. I have no idea what commands 37/34 could be. There is a WDIB 11, but it's of D'ni, so I doubt it's that. ;)<br />
<br />
(INTRO 3) 2<br />
0 2 <-32000 -32000 32000 32000> 5<br />
6 0 <312 70 441 159> 0 0 "\qtw\intro\intro2" 0x2848 0x2756 0 1 0 0 0<br />
<br />
Note that this one has a string for the video (null-terminated). This obviously calls that video which is the Myst fly-by for the linking book. And, that rect perfectly matches where the video should be displayed on screen. However, this also clearly breaks the format specified above for "type 2 hotspots".<br />
<br />
WDIB 3 is the cover of the Myst linking book. But, this doesn't match up with the video mentioned here which should be for WDIB 4 (or 10, they are identical)(the open linking book with the water image) and eventually ending at WDIB 12 (the open linking book with the dock image). The 5 after the very large numbers is the target card for the open linking book which seems correct. 0x2848 is 10,312 and 0x2756 is 10,070. The rate of the audio is 11,025. Not sure if this has any correlation.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T20:43:54Z
<p>TitoDalCanton: /* Command 23 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
The ''u0'' numbers are all 0, 4, or 5. Guess: toggle enable status for a list of hotspots.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_MJMP_resources
Myst MJMP resources
2008-10-12T20:32:56Z
<p>TitoDalCanton: Protected "Myst MJMP resources" [edit=autoconfirmed:move=autoconfirmed]</p>
<hr />
<div>MJMP resources (Msnd JuMPs) define aliases for identical sounds in Myst Masterpiece Edition, which were previously packaged as separate MSND resources, wasting disk space. Each resource of type MJMP contains a single little-endian short referencing real MSND ID.</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:45:16Z
<p>TitoDalCanton: /* Command 46 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Often found after commands 29 and 33. Guess: update the whole screen?<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:40:00Z
<p>TitoDalCanton: /* Command 28 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
Often used after command 29. <''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources. Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:31:48Z
<p>TitoDalCanton: /* Command 39 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
''u0'' is 100, 200, 400, 500, 1000, or 1100. Guess: pause execution for ''u0'' milliseconds?<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:29:29Z
<p>TitoDalCanton: /* Command 38 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 37, where it closes the script while command 37 opens it.<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:28:49Z
<p>TitoDalCanton: /* Command 37 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
Seems to form pairs with command 38, where it opens the script and command 38 ends it.<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:21:59Z
<p>TitoDalCanton: /* Command 20: disable hotspots */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to disable a list of hotspots, specified by ''indexes''. These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:21:20Z
<p>TitoDalCanton: /* Command 19: enable hotspots */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''indexes''[''count'']<br />
<br />
This seems to enable a list of hotspots, specified by ''indexes''.<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to disable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21). These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:16:44Z
<p>TitoDalCanton: /* Command 24 */</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to enable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21).<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to disable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21). These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24: play sound===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''sound_id''<br />
<br />
Play sound with ID ''sound_id''.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-12T19:13:46Z
<p>TitoDalCanton: edited the intro</p>
<hr />
<div>{{Myst}}<br />
This page describes Myst scripts, command lists used in record types 5, 6, 7, 8, 10, 11, and 12. Scripts always start with an unsigned short representing the command count. Each command has this structure:<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||arg_count<br />
|-<br />
|short||args[arg_count]<br />
|}<br />
When a variable is not given, ''var'' is set to 0. So when the key below says that the variable is ''optional'', that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to enable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21).<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to disable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21). These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-11T20:11:30Z
<p>TitoDalCanton: /* Command 28 */</p>
<hr />
<div>{{Myst}}<br />
This page contains, or will contain, a list of all known commands in Myst, as used in record types 5, 6, 7, 8, 10, 11, and 12. The script format always starts with an unsigned short representing the command count, and then per command has this structure:<br />
<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||num_values<br />
|-<br />
|unsigned short||values[num_values]<br />
|}<br />
<br />
The way scripts are stored, they each contain a command number, a variable number, and any number of arguments. When a variable number is not given, a "0" is used. So when the key below says that the variable is "optional", that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to enable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21).<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to disable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21). These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
Guess: update screen rectangle? See Mechanical card 6009.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton
https://insidethelink.ortiche.net/wiki/index.php/Myst_scripts
Myst scripts
2008-10-11T19:57:13Z
<p>TitoDalCanton: /* Command 33 */</p>
<hr />
<div>{{Myst}}<br />
This page contains, or will contain, a list of all known commands in Myst, as used in record types 5, 6, 7, 8, 10, 11, and 12. The script format always starts with an unsigned short representing the command count, and then per command has this structure:<br />
<br />
{| class="structure"<br />
|unsigned short||opcode<br />
|-<br />
|unsigned short||var<br />
|-<br />
|unsigned short||num_values<br />
|-<br />
|unsigned short||values[num_values]<br />
|}<br />
<br />
The way scripts are stored, they each contain a command number, a variable number, and any number of arguments. When a variable number is not given, a "0" is used. So when the key below says that the variable is "optional", that means that it has been found both with and without a variable being passed in. In some cases, the syntax of the arguments depends on whether a variable was passed in. In this case, the variable/arguments header is repeated for each form of the command.<br />
<br />
==Commands 0-99==<br />
These are suspected to be general-purpose commands.<br />
===Command 0===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
Seems to toggle a variable between 0 and 1. For example, see the marker switches on MYST island.<br />
<br />
===Command 1===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
Could mean "set variable to ''u0''". ''u0'' takes on any number between 0 and 7 (maybe a bit field?)<br />
<br />
===Command 2: alternative destination===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''dest''<br />
<br />
This command goes to ''dest'' instead of the regular destination if ''var'' is a certain (unknown) value. (Only used for SELEN 1240 and CHANNEL 3359)<br />
<br />
===Command 3: change cursor===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''clrc_id''<br />
<br />
*''clrc_id'' is always 800, 801, or 802. (Only 5 different cases). These are the "animated" cursors of dropping the white, red, and blue pages, respectively.<br />
<br />
This command seems to change cursor to ''clrc_id'' if var is a certain (unknown) value.<br />
<br />
===Command 4===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 6===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 7===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 8===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
<br />
===Command 9===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always either ''FFFF'' or omitted.<br />
<br />
===Command 12===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 13|command 13]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 13===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
''Related to [[#Command 12|command 12]]''.<br />
<br />
*''u0'' appears to be a nearby card.<br />
<br />
This may have similar function to [[#Command 2|command 2]].<br />
<br />
===Command 14===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 0, 1, or 2.<br />
<br />
===Command 15===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 0 or omitted.<br />
<br />
===Command 16===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 0.<br />
<br />
===Command 17===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' appears to be a nearby card.<br />
*''u1'' is always 4, 5, or 6.<br />
<br />
===Command 18===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is always 4, 5, or 6.<br />
<br />
===Command 19: enable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to enable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21).<br />
<br />
===Command 20: disable hotspots===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
This seems to disable a list of hotspots. All of the ''u0'' numbers are small (0-13, 21). These, unlike [[#Command 19|command 19]], can also be -1, which seems to disable the invoking hotspot.<br />
<br />
===Command 21===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''u3'' ''u4'' ''u5''<br />
<br />
There are this command is used 6 times.<br />
<br />
*''u0'' is always 0, 74, 76, 117, or 198.<br />
*''u1'' is always 0, 48, 213, or 226.<br />
*''u2'' is always 327, 406, 429, 459, or 544.<br />
*''u3'' is always 257, 332, or 333.<br />
*''u4'' is always 0, 1, 5, 6, or 11.<br />
*''u5'' is always 5 or 25.<br />
<br />
===Command 22===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 23===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count'']<br />
<br />
*The ''u0'' numbers are all 0, 4, or 5.<br />
<br />
===Command 24===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 26===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 27===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' appears to be a sound ID.<br />
<br />
===Command 28===<br />
*'''Variable:''' No<br />
*'''Arguments:''' (<''l t r b''>|''FFFF'')<br />
<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
<br />
===Command 29: copy picture over the hotspot===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''pict_id'' <''l t r b''> ''u0'' ''u1''<br />
<br />
*''pict_id'' appears to be a picture ID.<br />
*<''l t r b''> often corresponds with the intended location of one of the sub-images in the VIEW resources.<br />
*''u0'' appears to be a variable number (it is sometimes 0).<br />
*''u1'' may also be a variable number (it is sometimes 0, 1, or -1).<br />
<br />
This command seems to copy picture ''pict_id'' over the hotspot, using <''l'' ''t'' ''r'' ''b''> as the source rect. Additional data is unknown.<br />
<br />
===Command 30: start background sounds===<br />
*'''Variable:''' No<br />
*'''Arguments:''' variable<br />
<br />
This seems to start a background sound combination. The arg list seems to follow the philosophy of the sounds section in VIEW resources. In most cases there are just 2 args, a positive ''msnd_id'' (background sound ID to play) and ''flags''. However, there is a single exception with 8 args (RLST ID 3225 in Channelwood) which can be correctly interpreted simply as a more complex sounds section.<br />
<br />
===Command 31===<br />
*'''Variable:''' Yes (only ever 30)<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is always 0.<br />
*''u1'' looks like a card ID.<br />
<br />
===Command 32===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 33: draw picture===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''id'' <''sl st sr sb''> <''dl'' ''dt''><br />
<br />
Draw a picture, given the ID and source rect, at position <''dl'',''dt''>.<br />
<br />
===Command 34===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' is always 0, 1, 4, 5, 6, 9, 10, or 11.<br />
<br />
===Command 35===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a card ID.<br />
*''u2'' is always 0, 6, or 10.<br />
<br />
===Command 36===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 900 or 903.<br />
<br />
===Command 37===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 38===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 39===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 100, 200, 400, 500, 1000, or 1100.<br />
<br />
===Command 40: travel to destination age===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''dst_age_id'' ''src_msnd_id'' ''dst_msnd_id''<br />
<br />
*''dst_age_id'' is one of 0 (selen), 1 (stone), 2 (myst), 3 (mechan), 4 (channel) or 6 (dunny).<br />
*''src_msnd_id'' is a sound ID to play in source age.<br />
*''dst_msnd_id'' is a sound ID to play in destination age.<br />
<br />
===Command 41===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2'' ''count'' ''u3''[''count'']<br />
<br />
*''u0'' looks like a card ID.<br />
*''u1'' looks like a sound ID.<br />
*''u2'' is always 5 or 10.<br />
*''count'' is only ever 6 or 12.<br />
*''u3'' may be divided into groups of sixes.<br />
<br />
===Command 42===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1'' ''count'' ''u2''[''count'']<br />
<br />
*''u0'' looks like a sound ID.<br />
*''u1'' is always 5, 10, 15, or 20.<br />
*''count'' is only ever 6 or 12.<br />
*''u2'' may be divided into groups of sixes.<br />
<br />
===Command 43===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 44===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 46===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 100-199==<br />
These are suspected to be age-specific, as their syntax changes depending on the age.<br />
===Command 100===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is always 4, 6, or omitted.<br />
<br />
===Command 101===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1''[6]]<br />
<br />
*''u0'' is always 4225 or omitted.<br />
*''u1'' is a series of 6 positive numbers.<br />
<br />
===Command 102===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'' ''u1'' [''u2'']]<br />
<br />
*''u0'' looks like a card ID (or 0).<br />
*''u1'' looks like a card ID.<br />
*''u2'' looks like an (optional) bit field. (only 0x64 or 0)<br />
<br />
===Command 103===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''bit''<br />
<br />
This form of the command most likely negates bit ''bit'' of ''var''.<br />
<br />
*''bit'' is a power of 2 (bit mask).<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
This form of the command likely makes specified hotspot drawable.<br />
<br />
*''u0'' is a number between 13 and 18. It seems to refer to a hotspot index (see stone 2197).<br />
*''u1'' is either 1 or omitted.<br />
<br />
===Command 104===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' can be 0, 1, omitted, or 13 to 20. It seems to refer to a hotspot index (see stone 2004 and 2197).<br />
<br />
===Command 105===<br />
*'''Variable:''' Optional (set to 9 at one point, but usually not)<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 106===<br />
*'''Variable:''' 10<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 107===<br />
*'''Variable:''' 11<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 108===<br />
*'''Variable:''' 12<br />
*'''Arguments:''' 2287 (looks like sound ID)<br />
<br />
This command is only used once.<br />
<br />
===Command 109===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is ''FFFF'', 1, omitted, or 2287 (looks like sound ID).<br />
<br />
===Command 110===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1180 1179 12 203 78 345 167 6 10 203 166 345 306 5 10<br />
<br />
This command is only used once.<br />
<br />
===Command 111===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
This command likely makes specified hotspot not drawable.<br />
<br />
*''u0'' is 14 to 20 or omitted. It seems to refer to a hotspot index (see stone 2004).<br />
<br />
===Command 112===<br />
*'''Variable:''' 29<br />
*'''Arguments:''' ''u0'' ''u1'' ''u2''<br />
<br />
This command is only used twice.<br />
<br />
*''u0'' is 0 or 1800.<br />
*''u1'' is 400 or 2000.<br />
*''u2'' is 1.<br />
<br />
===Command 113===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 0 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 114===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely sound ID.<br />
<br />
===Command 115===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' ''u0''[3]<br />
<br />
*The ''u0'' look like card ID's.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 1139 1140 1140 10 6 204 64 343 279 6 50<br />
<br />
This form of the command is only used once.<br />
<br />
===Command 116===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 0, 1, or 6006.<br />
<br />
===Command 117===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0''|''u1'' ''u2'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
*''u1'' and ''u2'' are 5698 and 6698 (only used once).<br />
<br />
===Command 118===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [4707 5707 6707 7707 4705]<br />
<br />
This command is only used 3 times (once with values and twice omitted). Values are likely sound IDs.<br />
<br />
===Command 119===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, or omitted.<br />
<br />
===Command 120===<br />
*'''Variable:''' No<br />
*'''Arguments:''' [''u0'']<br />
<br />
*''u0'' is 0, 1, 2, 3, or omitted.<br />
<br />
===Command 121===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 0 or a card ID.<br />
*''u1'' is a card ID.<br />
<br />
===Command 122===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 123===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0'' [''u1'']<br />
<br />
*''u0'' is 0, 1, or 960.<br />
*''u1'' is 960, 1920, or omitted.<br />
<br />
===Command 124===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 125===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
*'''Variable:''' 21<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' is 13 or 14.<br />
<br />
===Command 126===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 127===<br />
*'''Variable:''' no<br />
*'''Arguments:''' ''u0'' ''u1''<br />
<br />
*''u0'' is 1, 2, or 3.<br />
*''u1'' is 0 or 1.<br />
<br />
===Command 129===<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 133===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 6500<br />
<br />
This command is only used once. Value is a sound ID.<br />
<br />
===Command 164===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 169===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 198===<br />
*'''Variable:''' No<br />
*'''Arguments:''' 5143 10 6 339 237 423 333 1 10<br />
<br />
This command is only used once. 5143 is likely a sound ID.<br />
<br />
===Command 199===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
==Commands 200-299==<br />
These are only seen in the [[Myst INIT resources|INIT]] scripts.<br />
===Command 200===<br />
*'''Variable:''' Optional<br />
*'''Arguments:''' None<br />
*'''Seen:''' DUNNY, INTRO, MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0 u1''[3]<br />
*'''Seen:''' MYST<br />
<br />
*''u1'' appears to be three sound IDs.<br />
<br />
===Command 201===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, INTRO, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MYST<br />
*''u0'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 0 4 5<br />
*'''Seen:''' MECHAN<br />
<br />
===Command 202===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MECHAN, SELEN, STONE<br />
<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' 13<br />
*'''Seen:''' MYST<br />
<br />
===Command 203===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' CHANNEL, MECHAN, MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
===Command 204===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' looks like a sound ID.<br />
<br />
===Command 205===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''count'' ''u0''[''count''] ''u1''<br />
*'''Seen:''' STONE<br />
<br />
*''u0'' look like node IDs.<br />
*''u1'' looks like a sound ID.<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[4]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 206===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST, SELEN, STONE<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[6]<br />
*'''Seen:''' MECHAN<br />
<br />
*''u0'' look like sound IDs.<br />
<br />
===Command 207===<br />
*'''Variable:''' No<br />
*'''Arguments:''' STONE<br />
<br />
===Command 208===<br />
*'''Variable:''' Yes<br />
*'''Arguments:''' None<br />
*'''Seen:''' MYST<br />
<br />
*'''Variable:''' No<br />
*'''Arguments:''' ''u0''[3]<br />
*'''Seen:''' STONE<br />
<br />
===Command 209===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 210===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 211===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 212===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 213===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 214===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 215===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 216===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 217===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 218===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 219===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 220===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 221===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 222===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
==Commands 300-399==<br />
These are only seen in the [[Myst EXIT resources|EXIT]] scripts.<br />
===Command 300===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 301===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 302===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 303===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 304===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
<br />
===Command 305===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 306===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 307===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 308===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 309===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:''' <br />
<br />
===Command 312===<br />
*'''Variable:''' No<br />
*'''Arguments:''' None<br />
*'''Seen:'''</div>
TitoDalCanton