This would load (and create) a variable named FC with the 32-bit value that can be found frome the current position in File 0. Will load (and create if necessary) the variable 'VarName' (any name will do) with the value of datatype Type that is found from the current file position of file File. Specification of the loop variable (T in this case) is obligatory. The For loop will be closed with the Next statement. Question: Is there any equivalent to the 'while Filenum (whatever the number that is loaded there) times. These control structures include Do.While, For.Next, and the classic If.Then.Else loops. Note that when MyVar2 is a numeric value that this value will be converted to a text string and then appended to MyVar.īMS scripts are executed in order from top to bottom unless an alternate control structure is encountered. Thus, String MyVar += MyVar2 will append the string in MyVar2 at the end of the string in MyVar. To be precise, it will add another string (or numeric value converted to a string) to the target string. Note that this command will not only use the value in the target variable, but also change it to the outcome value of the operation.įinally, the String statement will do some simple string manipulation. Similarly, Math MyVar /= MyVar2 would divide the value in MyVar by the value in MyVar2. Math MyVar += 2 would then add 2 to the value in MyVar. The Math statement can be used to do some simple arithmetic calculations. Finally, you could do Set MyVar String MultiEx and MyVar would now be a string variable with the text 'MultiEx'. Alternatively, you could write Set MyVar Long MyVar2 to assign the value of MyVar2 to MyVar. For example, you could write Set MyVar Long 1024 to assign the value of 1024 to a long (32-bit) variable MyVar. This value can be any number, the value of another variable or a text string. The Set statement can be used to asign a value to a variable of your choice. Variables MUST have been previously declared when used in other statements. To declare a new variable simply use them in a Set, Get or SavePos statement for the first time. So, if you declare a variable 'FileOffset', be sure to keep the cases when referencing this variable later on.īMS scripts can declare variables and perform basic arithmetic operations on them and control operations with them. However, variable names ARE case-sensitive. Statements and operators are expected at the correct space-delimited column(s), so there's no need for case-sensitivity here. Statements are not case sensitive, so you could for example write IDString as idStrIng. These must be removed prior to saving, or an error will be returned.Īs of version 4.3, comments are allowed, single line, preceded by a #, although single-quotes are forbidden. Remember, if you copy a BMS script from the Internet, there will often be extra spaces after the semicolons. As it is, the need for a semi-colon will probably be removed in some future update.įor now, it will need to be one space away from the last token on a line. This is superfluous, yes, but was intented to foresee multi-line statements. The statement can be broken down into a series of tokens.Įach line can only contain one statement, but is nevertheless terminated by a semi-colon ( ). In the current version of the scriptor, the Help dialog offers a rudimentary overview of the available statements.Įach line of a BMS script contains a single statement. The scriptor can be found in MexBinderPlus, a BMS-package tool that can save a selection of BMS-es as an MRF (MultiEx Resource File) file. MexScriptor is a tool that comes with MexCom that enables one to write BMS scripts and save them as BMS files, which MexCom can read. Consequently, you can also add new BMS to the WIKI in a way that it is included in a database that can be called by MexCom. The XeNTaX WIKI and XeNTaX Forum are the places to go to find a huge number of BMS, that could greatly help you understand the way the script works. In MexCom, users can run their custom made BMS against an archive of their choice. A few scriptlines may be enough to support any new game resource archive, thus no hassle to code large plugins or low-level detailed scripts. The power of the script lies in the simple and compact use of it. MultiEx Commander then enables the user to extract and replace resources in these game archives. The interpreter uses the instructions to traverse through a GRAF file and search for key data such as names, offsets, and sizes of various constituent files. The file format consists of a text file with a series of instructions to be run through an interpreter. It is the format used by MultiEx Commander (MexCom) to "disassemble" an impressive array of GRAFs.
0 Comments
Leave a Reply. |