The missions API used for the logics, extended basics, and other missions is very simple. The realistic missions API is quite similar though it uses a different 'control' file and a different 'win' file.

First some basic terms (as called by me, they are not in the API files themselves but since I am the one that wrote PnP and I had these terms in mind I'll just publish em here).PnP - Plug and Play - the name for the APIPnPS - PnP Strict - the type of system where the template and mission loading is done by a middle manPnPL - PnP Lite the template is controlled by the mission itself (like the realistic missions), and it only calls the 'win' file if you actually won.

Controlled by a few distinct files PnP is very easy to use and create missions with.

The CONTROL file is the file that gets the input, verifies it for security problems, and ensures that the level you requested is available.It works in one of two ways:PnPS - This file is included by template.php and is ignored after thatPnPL - This file is included by the mission and is barely used, it can be ignored.

The TEMPLATE file only exists for PnPS and it looks something like this:This is being rewritten in PnP 1.3 or PnP 2.0; the particular variable names will change though the concept is similar.

<?php $plug['type']='category'; //the name in the database or the category (basic/extbasic/stego) $require_basic = FALSE; //Require the user to have done the basic missions $require_order = FALSE; //Require the user to do all the missions in order $showform=TRUE; //Show the standard input form, this variable will be changed soon to be based on whether you chose PnPL or PnPS $win_mode = 'normal'; //this is very important though will be addressed in the lvl.php file below $helptext = 'show stuff '; //this text is shown on every mission....//Auth stuff require_once('../plugplay.php'); //include the CONTROL file require_once 'lvl/'.$lvl.'.php'; //in PnPS all levels are kept in a folder called lvl and in a file called lvl#.php require_once ('../plugplaywin.php'); //include the WIN file\?>

This file is only shown to show which variables you can override in your level file. We don't recommend you override any of them but if you need special requirements you can.

The WIN file is mainly verification (and the file that displays the standard input) and I will paste the important parts

switch ($win_mode) { case 'win': $plug['win']=TRUE; break; case 'text': if ($pass != '') {$plug['win']=TRUE;} break; case 'empty': if (isset($_GET['pass']) && empty($_GET['pass'])) {$plug['win']=TRUE;} break; case 'normal': if ($pass == $submit_correct) {$plug['win']=TRUE;} break; case 'regex': if (preg_match($submit_correct,$pass)) {$plug['win']=TRUE;} break; }//if $plug['win']=TRUE you will see the go on button/* $pass is the input text$submit_correct is the answer supplied by the mission. I will assume you have some knowledge of PHP and will let you figure out what each one does. Note that if none of them suit you you can always change $win_ mode to 'no' and let the mission change it to 'win' if need be.*/

As for the most important file and the one that you will be creating you get the simplest of them all:

Thats it. If you want to attach a file you can do so by using <img> tags or such.

I think I pretty much covered this and guaranteed I am not as clear as I should be. Please let me know in this thread and I will update it.Please note:'This is ONLY for PnP 1.2.Version 1.3 will fix most of the variable name problems as well as allow for a bit more control over template. It should also fix the code duplication (some of which you don't see).Version 2.0 will create a mission class which will be more in line with OOP and such.Version 2.1 will be dropable namely that the particular file names and such will be unimportant and that missions will be self unaware.