MexScript to Wiki

From XentaxWiki
Revision as of 21:19, 25 August 2006 by imported>Mr.Mouse (→‎Introduction)
Jump to navigation Jump to search

Introduction

Before we go on, let's get one thing straight:

BMS = Binary MultiEx Script = Binary MexScipt =/= MexScript Is that clear?
So, BMS files are the binary representation of MexScript, which is text. BMS is parsed and compiled MexScript. Good. Now we've got that out of the way, let's talk about the topic at hand.

Even though BMS=/=MexScript, we are going to interchange them anyway, because that's what people have done in the past, and let's just illogically keep it that way. Thus, if I talk about BMS, then I mean MexScript.

MexCom talks to Xentax WIKI

As of MultiEx Commander v4.3 (MexCom), MexCom can download an XML file from the WIKI BMS database. The WIKI BMS database? Yes, the WIKI BMS database. This XML file will be parsed and effectively contain BMS that users have posted at the WIKI. MexCom can then be told to process game resource archives with those scripts, instead of the local MRF.

Vote!

The user can vote for scripts downloaded from the WIKI. In the Supported files dialog, there will be a Vote option for each script. Users may vote 1 time only, and it needs to be an Aye or a Naye. Say you downloaded a script that should open Prey .DAT files, and you tried it but it failed. Then you tried it on more Prey files and it still failed. You would then vote Naye. If a script get's 5 Aye votes it will become an Official script. If it falls below 5 it's no longer official. All new scripts start at 0.

TAG me Baby!

As a user of MexCom and this WIKI, you can add BMS to the seperate database, than can be called upon by MexCom. To do this, you need to TAG the BMS (script) section.

The opening and closing tags are

<bms> and </bms>

.

In between would be the script. However, this is not enough, because you have got to specify:

1. The file extension of the game resource archive to open. TAG : ext
2. The list of games that use this type of game resource archive. TAG: games
3. The list of platforms that the games are on. TAG: platforms
4. The author of the script. TAG: author
5. The version of the script. TAG: version


Let's explain by giving an example:

Example WIKI BMS tag

<bms ext="grp" games="'Duke Nukem 3d', 'Shadow Warrior'" author="Mr.Mouse" 
 platforms="'PC', 'Xbox'" version="1.0">
ImpType SFileSize ;
IDString 0 KenSilverman ;
Get FC Long 0 ;
Set MFC Long FC ;
Math MFC *= 16 ;
Math MFC += 16 ;
SavePos FS 0 ;
For TE = 1 To FC ;
GoTo FS 0 ;
GetDString FN 12 0 ;
SavePos FSO 0 ;
Get FSI Long 0 ;
SavePos FS 0 ;
Log FN MFC FSI 0 FSO ;
Math MFC += FSI ;
Next TE ;
</bms>

Notice how the values are in between double-quotes.
Next, notice how the list of games is formatted. Each game is listed in between single-quotes (') and seperated by a comma (,).
The same goes for the list of platforms. The list of platforms is linked in order to the list of games. So in the above example, the Duke Nukem 3d GRP files are from the PC version, while the Shadow Warrior GRP files come from the XBox.
There is NO other way to do this, so follow the rules.

User rights

Every logged-in visitor of the site can post a tagged BMS like that, however, only sysops or higher can actually post it to the database. A sysop will be notified of the new script and check it for correct syntax. If all is ok, then he'll resave the page and the script will be stored in the database.

Return values

There should be no special return values, the script will be visible with an automatic formating of the values. It may be that there's a log of current database events, or errors.

Platforms

These are the valid platform descriptions:

PC
PS
PS2
PS3
XBox
XBox360
Other