Skip to content

MSX2DAAD Wiki: DAAD Condacts: a quick reference

NataliaPC edited this page Feb 4, 2021 · 10 revisions

Go back to Index


Index


Conditions of player locations

AT locno

Succeeds if the current location is the same as locno.

NOTAT locno

Succeeds if the current location is different to locno.

ATGT locno

Succeeds if the current location is greater than locno.

ATLT locno

Succeeds if the current location is less than locno.


Conditions of object locations

PRESENT objno

Succeeds if Object objno. is carried (254), worn (253) or at the current location [fPlayer].

ABSENT objno

Succeeds if Object objno. is not carried (254), not worn (253) and not at the current location [fPlayer].

WORN objno

Succeeds if object objno. is worn.

NOTWORN objno

Succeeds if Object objno. is not worn.

CARRIED objno

Succeeds if Object objno. is carried.

NOTCARR objno

Succeeds if Object objno. is not carried.

ISAT objno locno+

Succeeds if Object objno. is at Location locno.

ISNOTAT objno locno+

Succeeds if Object objno. is not at Location locno.


Conditions for values/flags comparation

ZERO flagno

Succeeds if Flag flagno. is set to zero.

NOTZERO flagno

Succeeds if Flag flagno. is not set to zero.

EQ flagno value

Succeeds if Flag flagno. is equal to value.

NOTEQ flagno value

Succeeds if Flag flagno. is not equal to value.

GT flagno value

Succeeds if Flag flagno. is greater than value.

LT flagno value

Succeeds if Flag flagno. is set to less than value.

SAME flag1 flag2

Succeeds if Flag flagno 1 has the same value as Flag flagno 2.

NOTSAME flag1 flag2

Succeeds if Flag flagno 1 does not have the same value as Flag flagno 2 .

BIGGER flag1 flag2

Will be true if flagno 1 is larger than flagno 2.

SMALLER flag1 flag2

Will be true if flagno 1 is smaller than flagno 2.


Conditions to check logical sentence

ADJECT1 word

Succeeds if the first noun's adjective in the current LS is word.

ADVERB word

Succeeds if the adverb in the current LS is word.

PREP word

Succeeds if the preposition in the current LS is word.

NOUN2 word

Succeeds if the second noun in the current LS is word.

ADJECT2 word

Succeeds if the second noun's adjective in the current LS is word.


Conditions for random

CHANCE percent

Succeeds if percent is less than or equal to a random number in the range 1-100 (inclusive). Thus a CHANCE 50 condition would allow PAW to look at the next CondAct only if the random number generated was between 1 and 50, a 50% chance of success.


Conditions for sub-process success/fail

ISDONE

Succeeds if the last table ended by exiting after executing at least one Action. This is useful to test for a single succeed/fail boolean value from a Sub-Process. A DONE action will cause the 'done' condition, as will any condact causing exit, or falling off the end of the table - assuming at least one CondAct (other than NOTDONE) was done.
See also ISNDONE and NOTDONE actions.

ISNDONE

Succeeds if the last table ended without doing anything or with a NOTDONE action.


Conditions for object attributes

HASAT value

Checks the attribute specified by value is set. 0-15 are the object attributes for the current object. There are also several attribute numbers specified as symbols in SYMBOLS.SCE which check certain parts of the DAAD system flags.

HASNAT value

Checks the attribute specified by value is not set. 0-15 are the object attributes for the current object. There are also several attribute numbers specified as symbols in SYMBOLS.SCE which check certain parts of the DAAD system flags.


Conditions for player interaction

INKEY

Is a condition which will be satisfied if the player is pressing a key. In 16Bit machines Flags Key1 and Key2 (60 & 61) will be a standard IBM ASCII code pair. On 8 bit only Key1 will be valid, and the code will be machine specific.

QUIT

SM12 ("Are you sure?") is printed and called. Will succeed if the player replies starts with the first letter of SM30 ("Y") to then the remainder of the entry is discarded is carried out.


Actions for object position manipulation

GET objno

If Object objno. is worn or carried, SM25 ("I already have the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not at the current location, SM26 ("There isn't one of those here.") is printed and actions NEWTEXT & DONE are performed.

If the total weight of the objects carried and worn by the player plus Object objno. would exceed the maximum conveyable weight (Flag 52) then SM43 ("The _ weighs too much for me.") is printed and actions NEWTEXT & DONE are performed.

If the maximum number of objects is being carried (Flag 1 is greater than, or the same as, Flag 37), SM27 ("I can't carry any more things.") is printed and actions NEWTEXT & DONE are performed. In addition any current DOALL loop is cancelled.

Otherwise the position of Object objno. is changed to carried, Flag 1 is incremented and SM36 ("I now have the _.") is printed.

DROP objno

If Object objno. is worn then SM24 ("I can't. I'm wearing the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is at the current location (but neither worn nor carried), SM49 ("I don't have the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not at the current location then SM28 ("I don't have one of those.") is printed and actions NEWTEXT & DONE are performed.

Otherwise the position of Object objno. is changed to the current location, Flag 1 is decremented and SM39 ("I've dropped the _.") is printed.

WEAR objno

If Object objno. is at the current location (but not carried or worn) SM49 ("I don't have the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is worn, SM29 ("I'm already wearing the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not carried, SM28 ("I don't have one of those.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not wearable (as specified in the object definition section) then SM40 ("I can't wear the _.") is printed and actions NEWTEXT & DONE are performed.

Otherwise the position of Object objno. is changed to worn, Flag 1 is decremented and SM37 ("I'm now wearing the _.") is printed.

REMOVE objno

If Object objno. is carried or at the current location (but not worn) then SM50 ("I'm not wearing the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not at the current location, SM23 ("I'm not wearing one of those.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not wearable (and thus removable) then SM41 ("I can't remove the _.") is printed and actions NEWTEXT & DONE are performed.

If the maximum number of objects is being carried (Flag 1 is greater than, or the same as, Flag 37), SM42 ("I can't remove the _. My hands are full.") is printed and actions NEWTEXT & DONE are performed.

Otherwise the position of Object objno. is changed to carried. Flag 1 is incremented and SM38 ("I've removed the _.") printed.

CREATE objno

The position of Object objno. is changed to the current location and Flag 1 is decremented if the object was carried.

DESTROY objno

The position of Object objno. is changed to not-created and Flag 1 is decremented if the object was carried.

SWAP objno1 objno2

The positions of the two objects are exchanged. Flag 1 is not adjusted. The currently referenced object is set to be Object objno 2.

PLACE objno locno+

The position of Object objno. is changed to Location locno. Flag 1 is decremented if the object was carried. It is incremented if the object is placed at location 254 (carried).

PUTO locno+

The position of the currently referenced object (i.e. that object whose number is given in flag 51), is changed to be Location locno. Flag 54 remains its old location. Flag 1 is decremented if the object was carried. It is incremented if the object is placed at location 254 (carried).

PUTIN objno locno

If Object objno. is worn then SM24 ("I can't. I'm wearing the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is at the current location (but neither worn nor carried), SM49 ("I don't have the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not at the current location, but not carried, then SM28 ("I don't have one of those.") is printed and actions NEWTEXT & DONE are performed.

Otherwise the position of Object objno. is changed to Location locno. Flag 1 is decremented and SM44 ("The _ is in the"), a description of Object locno. and SM51 (".") is printed.

TAKEOUT objno locno

If Object objno. is worn or carried, SM25 ("I already have the _.") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is at the current location, SM45 ("The _ isn't in the"), a description of Object locno. and SM51 (".") is printed and actions NEWTEXT & DONE are performed.

If Object objno. is not at the current location and not at Location locno. then SM52 ("There isn't one of those in the"), a description of Object locno. and SM51 (".") is printed and actions NEWTEXT & DONE are performed.

If Object locno. is not carried or worn, and the total weight of the objects carried and worn by the player plus Object objno. would exceed the maximum conveyable weight (Flag 52) then SM43 ("The _ weighs too much for me.") is printed and actions NEWTEXT & DONE are performed.

If the maximum number of objects is being carried (Flag 1 is greater than, or the same as, Flag 37), SM27 ("I can't carry any more things.") is printed and actions NEWTEXT & DONE are performed. In addition any current DOALL loop is cancelled.

Otherwise the position of Object objno. is changed to carried, Flag 1 is incremented and SM36 ("I now have the _.") is printed.Note: No check is made, by either PUTIN or TAKEOUT, that Object locno. is actually present. This must be carried out by you if required.

DROPALL

All objects which are carried or worn are created at the current location (i.e. all objects are dropped) and Flag 1 is set to 0. This is included for compatibility with older writing systems.

Note that a DOALL 254 will carry out a true DROP ALL, taking care of any special actions included.

AUTOG

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; here, carried, worn.

i.e. The player is more likely to be trying to GET an object that is at the current location than one that is carried or worn. If an object is found its number is passed to the GET action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM26 ("There isn't one of those here.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).

Either way actions NEWTEXT & DONE are performed.

AUTOD

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here.

i.e. The player is more likely to be trying to DROP a carried object than one that is worn or here. If an object is found its number is passed to the DROP action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM28 ("I don't have one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).

Either way actions NEWTEXT & DONE are performed.

AUTOW

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here.

i.e. The player is more likely to be trying to WEAR a carried object than one that is worn or here. If an object is found its number is passed to the WEAR action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM28 ("I don't have one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).

Either way actions NEWTEXT & DONE are performed.

AUTOR

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; worn, carried, here.

i.e. The player is more likely to be trying to REMOVE a worn object than one that is carried or here. If an object is found its number is passed to the REMOVE action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM23 ("I'm not wearing one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).

Either way actions NEWTEXT & DONE are performed.

AUTOP

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here.

i.e. The player is more likely to be trying to PUT a carried object inside another than one that is worn or here. If an object is found its number is passed to the PUTIN action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM28 ("I don't have one of those.") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).

Either way actions NEWTEXT & DONE are performed.

AUTOT

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; in container, carried, worn, here.

i.e. The player is more likely to be trying to get an object out of a container which is actually in there than one that is carried, worn or here. If an object is found its number is passed to the TAKEOUT action. Otherwise if there is an object in existence anywhere in the game or if Noun1 was not in the vocabulary then SM52 ("There isn't one of those in the"), a description of Object locno. and SM51 (".") is printed. Else SM8 ("I can't do that.") is printed (i.e. It is not a valid object but does exist in the game).

Either way actions NEWTEXT & DONE are performed.

COPYOO objno1 objno2

The position of Object objno2 is set to be the same as the position of Object Objno1. The currently referenced object is set to be Object objno2.

RESET

This Action bears no resemblance to the one with the same name in PAW. It has the pure function of placing all objects at the position given in the Object start table. It also sets the relevant flags dealing with no of objects carried etc.


Actions for object in flags manipulation

COPYOF objno flagno

The position of Object objno. is copied into Flag flagno. This could be used to examine the location of an object in a comparison with another flag value.

COPYFO flagno objno

The position of Object objno. is set to be the contents of Flag flagno. An attempt to copy from a flag containing 255 will result in a run time error. Setting an object to an invalid location will still be accepted as it presents no danger to the operation of PAW.

WHATO

A search for the object number represented by Noun(Adjective)1 is made in the object definition section in order of location priority; carried, worn, here. This is because it is assumed any use of WHATO will be related to carried objects rather than any that are worn or here. If an object is found its number is placed in flag 51, along with the standard current object parameters in flags 54-57. This allows you to create other auto actions (the tutorial gives an example of this for dropping objects in the tree).

SETCO objno

Sets the currently referenced object to objno.

WEIGH objno flagno

The true weight of Object objno. is calculated (i.e. if it is a container, any objects inside have their weight added - don't forget that nested containers stop adding their contents after ten levels) and the value is placed in Flag flagno. This will have a maximum value of 255 which will not be exceeded. If Object objno. is a container of zero weight, Flag flagno will be cleared as objects in zero weight containers, also weigh zero!


Actions to manipulate flags

SET flagno

Flag flagno. is set to 255.

CLEAR flagno

Flag flagno. is cleared to 0.

LET flagno value

Flag flagno. is set to value.

PLUS flagno value

Flag flagno. is increased by value. If the result exceeds 255 the flag is set to 255.

MINUS flagno value

Flag flagno. is decreased by value. If the result is negative the flag is set to 0.

ADD flagno1 flagno2

Flag flagno 2 has the contents of Flag flagno 1 added to it. If the result exceeds 255 the flag is set to 255.

SUB flagno1 flagno2

Flag flagno 2 has the contents of Flag flagno 1 subtracted from it. If the result is negative the flag is set to 0.

COPYFF flagno1 flagno2

The contents of Flag flagno 1 is copied to Flag flagno 2.

COPYBF flagno1 flagno2

Same as COPYFF but the source and destination are reversed, so that indirection can be used.

RANDOM flagno

Flag flagno. is set to a number from the Pseudo-random sequence from 1 to 100.

MOVE flagno

This is a very powerful action designed to manipulate PSI's. It allows the current LS Verb to be used to scan the connections section for the location given in Flag flagno. If the Verb is found then Flag flagno is changed to be the location number associated with it, and the next condact is considered. If the verb is not found, or the original location number was invalid, then PAW considers the next entry in the table - if present.


Actions to manipulate player flags

GOTO locno

Changes the current location to locno. This effectively sets flag 38 to the value locno.

WEIGHT flagno

Calculates the true weight of all objects carried and worn by the player (i.e. any containers will have the weight of their contents added up to a maximum of 255), this value is then placed in Flag flagno. This would be useful to ensure the player was not carrying too much weight to cross a bridge without it collapsing etc.

ABILITY value1 value2

This sets Flag 37, the maximum number of objects conveyable, to value 1 and Flag 52, the maximum weight of objects the player may carry and wear at any one time (or their strength), to be value 2. No checks are made to ensure that the player is not already carrying more than the maximum. GET and so on, which check the values, will still work correctly and prevent the player carrying any more objects, even if you set the value lower than that which is already carried!


Actions for screen mode/format flags

MODE option

Allows the current window to have its operation flags changed. In order to calculate the number to use for the option just add the numbers shown next to each item to achieve the required bitmask combination:

1 - Use the upper character set. (A permanent ^G)
2 - SM32 ("More...") will not appear when the window fills.

e.g. MODE 3 stops the 'More...' prompt and causes all to be translated to the 128-256 range.

INPUT stream option

The 'stream' parameter will set the bulk of input to come from the given window/stream. A value of 0 for 'stream' will not use the graphics stream as might be expected, but instead causes input to come from the current stream when the input occurs.

Bitmask options:
1 - Clear window after input.
2 - Reprint input line in current stream when complete.
4 - Reprint current text of input after a timeout.

TIME duration option

Allows input to be set to 'timeout' after a specific duration in 1 second intervals, i.e. the Process 2 table will be called again if the player types nothing for the specified period. This action alters flags 48 & 49. 'option' allows this to also occur on ANYKEY and the "More..." prompt. In order to calculate the number to use for the option just add the numbers shown next to each item to achieve the required combination:

1 - While waiting for first character of Input only.
2 - While waiting for the key on the "More..." prompt.
4 - While waiting for the key on the ANYKEY action.

e.g. TIME 5 6 (option = 2+4) will allow 5 seconds of inactivity on behalf of the player on input, ANYKEY or "More..." and between each key press. Whereas TIME 5 3 (option = 1+2) allows it only on the first character of input and on "More...".

TIME 0 0 will stop timeouts (default).


Actions for screen control and output

WINDOW window

Selects window (0-7) as current print output stream.

WINAT line col

Sets current window to start at given line and column. Height and width to fit available screen.

WINSIZE height width

Sets current window size to given height and width. Clipping needed to fit available screen.

CENTRE

Will ensure the current window is centered for the current column width of the screen. (Does not affect line position).

CLS

Clears the current window.

SAVEAT

Save print position for current window. This allows you to maintain the print position for example while printing elsewhere in the window. You should consider using a seperate window for most tasks. This may find use in the creation of a new input line or in animation sequences...

BACKAT

Restore print position for current window. This allows you to maintain the print position for example while printing elsewhere in the window. You should consider using a seperate window for most tasks. This may find use in the creation of a new input line or in animation sequences...

PAPER colour

Set paper colour acording to the lookup table given in the graphics editors.

INK colour

Set text colour acording to the lookup table given in the graphics editors.

BORDER colour

Set border colour acording to the lookup table given in the graphics editors.

*MSX2 note: *For Screen 8/12 the color value is using a standard EGA palette unless you use the GFX condact to change it. But Screen 5/6/7 are paletted modes and must use the current Picture palette.

PRINTAT line col

Sets current print position to given point if in current window. If not then print position becomes top left of window.

TAB col

Sets current print position to given column on current line.

SPACE

Will simply print a space to the current output stream. Shorter than MES a space!

NEWLINE

Prints a carriage return/line feed.

MES mesno

Prints Message mesno.
With DRC you can also use the syntax:

MES "This is a message"

MESSAGE mesno

Prints Message mesno., then carries out a NEWLINE action.
With DRC you can also use the syntax:

MESSAGE "This is a message"

SYSMESS sysno

Prints System Message sysno.

DESC locno

Prints the text for location locno. without a NEWLINE.

PRINT flagno

The decimal contents of Flag flagno. are displayed without leading or trailing spaces.

DPRINT flagno

Will print the contents of flagno and flagno+1 as a two byte number.


Actions for listing objects

LISTOBJ

If any objects are present then SM1 ("I can also see:") is printed, followed by a list of all objects present at the current location. If there are no objects then nothing is printed.

LISTAT locno+

If any objects are present then they are listed. Otherwise SM53 ("nothing.") is printed - note that you will usually have to precede this action with a message along the lines of "In the bag is:" etc.


Actions for current game state save/load

SAVE opt

This action saves the current game position on disc or tape. SM60 ("Type in name of file.") is printed and the input routine is called to get the filename from the player. If the supplied filename is not acceptable SM59 ("File name error.") is printed - this is not checked on 8 bit machines, the file name is MADE acceptable!

LOAD opt

This action loads a game position from disc or tape. A filename is obtained in the same way as for SAVE. A variety of errors may appear on each machine if the file is not found or suffers a load error. Usually 'I/O Error'. The next action is carried out only if the load is successful. Otherwise a system clear, GOTO 0, RESTART is carried out.

RAMSAVE

In a similar way to SAVE this action saves all the information relevant to the game in progress not onto disc but into a memory buffer. This buffer is of course volatile and will be destroyed when the machine is turned off which should be made clear to the player. The next action is always carried out.

RAMLOAD

This action is the counterpart of RAMSAVE and allows the saved buffer to be restored. The parameter specifies the last flag to be reloaded which can be used to preserve values over a restore.

Note 1: The RAM actions could be used to implement an OOPS command that is common on other systems to take back the previous move; by creating an entry in the main loop which does an automatic RAMSAVE every time the player enters a move.

Note 2: These four actions allow the next Condact to be carried out. They should normally always be followed by a RESTART or describe in order that the game state is restored to an identical position.


Actions to pause game

ANYKEY

SM16 ("Press any key to continue") is printed and the keyboard is scanned until a key is pressed or until the timeout duration has elapsed if enabled.

PAUSE value

Pauses for value/50 secs. However, if value is zero then the pause is for 256/50 secs.


Actions to control the parse

PARSE n

The parameter 'n' controls which level of string indentation is to be searched. At the moment only two are supported by the interpreters so only the values 0 and 1 are valid.

0 - Parse the main input line for the next LS.
1 - Parse any string (phrase enclosed in quotes [""]) that was contained in the last LS extracted.

NEWTEXT

Forces the loss of any remaining phrases on the current input line. You would use this to prevent the player continuing without a fresh input should something go badly for his situation. e.g. the GET action carries out a NEWTEXT if it fails to get the required object for any reason, to prevent disaster with a sentence such as: GET SWORD AND KILL ORC WITH IT as attacking the ORC without the sword may be dangerous!

SYNONYM verb noun

Substitutes the given verb and noun in the LS. Nullword (Usually '_') can be used to suppress substitution for one or the other - or both I suppose! e.g.

> MATCH    ON         SYNONYM LIGHT MATCH
> STRIKE   MATCH      SYNONYM LIGHT _
> LIGHT    MATCH      ....                 ; Actions...

will switch the LS into a standard format for several different entries. Allowing only one to deal with the actual actions.


Actions for flow control

PROCESS procno

This powerful action transfers the attention of DAAD to the specified Process table number. Note that it is a true subroutine call and any exit from the new table (e.g. DONE, OK etc) will return control to the condact which follows the calling PROCESS action. A sub-process can call (nest) further process' to a depth of 10 at which point a run time error will be generated.

REDO

Will restart the currently executing table, allowing.

DOALL

Another powerful action which allows the implementation 'ALL' type command.

1 - An attempt is made to find an object at Location locno. If this is unsuccessful the DOALL is cancelled and action DONE is performed.
2 - The object number is converted into the LS Noun1 (and Adjective1 if present) by reference to the object definition section. If Noun(Adjective)1 matches Noun(Adjective)2 then a return is made to step 1. This implements the "Verb ALL EXCEPT object" facility of the parser.
3 - The next condact and/or entry in the table is then considered. This effectively converts a phrase of "Verb All" into "Verb object" which is then processed by the table as if the player had typed it in.
4 - When an attempt is made to exit the current table, if the DOALL is still active (i.e. has not been cancelled by an action) then the attention of DAAD is returned to the DOALL as from step 1; with the object search continuing from the next highest object number to that just considered.

The main ramification of the search method through the object definition section is; objects which have the Same Noun(Adjective) description (where the game works out which object is referred to by its presence) must be checked for in ascending order of object number, or one of them may be missed.

Use the DOALL to implement things like OPEN ALL must account for fact that doors are often flags only and would have to bemade into objects if they were to be included in a DOALL.

SKIP distance

Skip a distance of -128 to 128, or to the specified label. Will move the current entry in a table back or fore.

0 means next entry (so is meaningless).
-1 means restart current entry (Dangerous).

RESTART

Will cancel any DOALL loop, any sub-process calls and make a jump to execute process 0 again from the start.

END

SM13 ("Would you like to play again?") is printed and the input routine called. Any DOALL loop and sub-process calls are cancelled. If the reply does not start with the first character of SM31 a jump is made to Initialise. Otherwise the player is returned to the operating system - by doing the command EXIT 0.

EXIT value

If value is 0 then will return directly to the operating system. Any value other than 0 will restart the whole game. Note that unlike RESTART which only restarts processing, this will clear and reset windows etc. The non zero numbers actually specify a part number to jump to on AUTOLOAD versions. Only the PCW supports this feature at the moment. It will probably be added to PC as part of the HYPERCARD work. So if you intend using it as a reset ensure you use your PART number as the non zero value!


Actions for exit tables

DONE

This action jumps to the end of the process table and flags to DAAD that an action has been carried out. i.e. no more condacts or entries are considered. A return will thus be made to the previous calling process table, or to the start point of any active DOALL loop.

NOTDONE

This action jumps to the end of the process table and flags PAW that NO action has been carried out. i.e. no more condacts or entries are considered. A return will thus be made to the previous calling process table or to the start point of any active DOALL loop. This will cause PAW to print one of the "I can't" messages if needed. i.e. if no other action is carried out and no entry is present in the connections section for the current Verb.

OK

SM15 ("OK") is printed and action DONE is performed.


Actions to call external routines

EXTERN value routine

Calls external routine with parameter value. The address is set by linking the #extern pre-compiler command.

MSX2 Note: this target machine emulates Maluva Extern functions and can't add custom user externs.

Maluva Extern supported function are:

Condact Description
XPICTURE Load Raster Graphic
XSAVE Save Game on disk
XLOAD Load Game on disk
XMES Print a external message

CALL address

Allows 'address' in memory (or in the database segment for 16bit) to be executed. See the extern secion for more details.

MSX2 Note: Not supported at this momment.

SFX value1 value2

This is a second EXTERN type action designed for Sound Effects extensions.
e.g. It has a 'default' function which allows value 'value1' to be written to register 'value2' of the sound chip on 8 bits machines. This can be changed with #sfx or through linking - see the machine details and extern section for specifics.

GFX param routine

An EXTERN which is meant to deal with any graphics extensions to DAAD. On 16 bits and MSX2 (8 bits machine) it is used to implement the screen switching facilities. This can be changed with #gfx or through linking. See the machine details and extern section for specifics.

Routine Description MSX2 PC Amiga AtariST
0 Copy Back->Phys ✔️ ✔️ ✔️ ✔️
1 Copy Phys->Back ✔️ ✔️ ✔️ ✔️
2 Swap (Phys<>Back) (In CGA this is a bit rough...) ✔️ ✔️ ✔️ ✔️
3 Graphics Write to Phys ✔️ ✔️ ✔️ ✔️
4 Graphics Write to Back ✔️ ✔️ ✔️ ✔️
5 Clear Phys ✔️ ✔️ ✔️ ✔️
6 Clear Back ✔️ ✔️ ✔️ ✔️
7 Text Write to Phys -ST only- ✔️
8 Text Write to Back -ST only- ✔️
9 Set Palette value (Value is offset of 4 flag data block containing Num,Red,Green,Blue. RGB values are 0-255 ✔️ ✔️ ✔️ ✔️
10 Read Palette value (Value is offset of 4 flag data block) ✔️ ✔️ ✔️
128 Copy current Window Back->Phys ✔️
129 Copy current Window Phys->Back ✔️

N.B.: SWAP in CGA is so slow as it uses the processor, there is no real page switching so you may want to code for that special case (ScMode=4)

Routines 128 and above are extended and exclusive for MSX2.

Routines 9 and 10 use the first GFX parameter 'param' to point at a four flag data block:

flag offset Content
0 palette no
1 RED 0-255
2 GREEN 0-255
3 BLUE 0-255

Note that most machines only use the most significant bits. E.g PC the top 6, ST (and MSX2) the top 3 and Amiga the top 4! This system allows the same numbers to represent the same colours in each machine.


Actions to show pictures

PICTURE picno

Will load into the picture buffer the given picture. If there no corresponding picture the next entry will be carried out, if there is then the next CondAct is executed.

DISPLAY value

If value=0 then the last buffered picture is placed onscreen. If value !=0 and the picture is not a subroutine then the given window area is cleared. This is normally used with indirection and a flag to check and display darkness.


Actions miscellaneous

MOUSE option

This action in preparation for the hypercard system implements skeleton mouse handler on the IBM.

BEEP length tone

Length is the duration in 1/100 seconds. Tone is like BEEP in ZX Basic but adding 60 to it and multiplied by 2.
See: http://www.worldofspectrum.org/ZXBasicManual/zxmanchap19.html

Length Note
200 Whole note
100 Half note
50 Quarter note
25 Eighth note
12 Sixteenth note
6 Thirty-second note
3 Sixty-fourth note
Table DAAD BEEP Tones by octave:

Oct  C   C#  D   D#  E   F   F#  G   G#  A   A#  B
==== ===============================================
#1   48  50  52  54  56  58  60  62  64  66  68  70
#2   72  74  76  78  80  82  84  86  88  90  92  94
#3   96  98  100 102 104 106 108 110 112 114 116 118
#4   120 122 124 126 128 130 132 134 136 138 140 142
#5   144 146 148 150 152 154 156 158 160 162 164 166
#6   168 170 172 174 176 178 180 182 184 186 188 190
#7   192 194 196 198 200 202 204 206 208 210 212 214
#8   216 218 220 222 224 226 228 230 232 234 236 238

Example:

BEEP  50  126       ; O4 D#
BEEP  50  154       ; O5 F
BEEP  50  170       ; O6 C#

DRC virtual condacts

DRC compiles these condacts depending the platform target/subtarget you use to maintain platform compatibility (ZX, C64, PC, MSX, PCW, etc).

More info here: https://github.com/daad-adventure-writer/MALUVA/wiki
https://github.com/daad-adventure-writer/DRC/wiki

For MSX2DAAD the equivalences are:

XPICTURE picno

Equivalent to:

PICTURE picno
DISPLAY 0

XMESSAGE

Equivalent to MESSAGE but the message text is write to a external disk file to keep free space in the DDB file:

XMESSAGE "This is a message"

XMES

Equivalent to MES but the message text is write to a external disk file to keep free space in the DDB file:

XMES "This is a message"

XLOAD opt

Equivalent to LOAD opt. It's used to maintain compatibility.

XSAVE opt

Equivalent to SAVE opt. It's used to maintain compatibility.

XBEEP length tone

Equivalent to BEEP length tone. It's used to maintain compatibility.

XPLAY mmlString

This condact expands to the XBEEPcondacts needed to play the mmlString music.

The mmlString use a very similar format as MSX Basic PLAY instruction but with just one channel:

Command Description
A-G#n. Notes:CDEFGAB. #/+ sharp, - flat. n is length in 1/n fullnote. . is period.
Tn Specifies the tempo (number of quarter notes per minute) n=32...255 [default: 120]
On Default octave for notes from here. n=1...8 [default: 4]
Ln Default note length for notes from here. n is length in 1/n fullnote..
Rn. Create a silence of 1/n fullnote length. . is period.
Nn Note pitch. n=0...96. 0=C octave 1. Each number increment halt tone.
Vn Volume. n=0...15 [default: 8] Not supported at this time.
< Decrease one octave.
> Increase one octave.

Example:

> PLAY   PIANO
	; Minuet Boccherini
	XPLAY "T110O5G16F#16G16A16G8O4G4B4O5D8D8C8C4C16O4B16O5C16D16C8O4D4A4O5C8C8"
	XPLAY "T110O4B8B4O5G4.E16D8C#8C#8C#8G4.E16D8C#8C#8C#8G4.E16F#8D8O4B8"
	XPLAY "T110O5G8E4.D32E32D4"
	MESSAGE "Sounds nice!"
	DONE

You can search for a lot of MML files here: https://archeagemmllibrary.com/

XPART num

Equivalent to Maluva extern call:

EXTERN num 4

Is not implemented/used in MSX2DAAD.