====== Door list and door groups ====== The **door list** shows a caller the doors he may play and runs the one he picks. Doors can be put into **groups** (Adventure, Fantasy, Puzzle and so on), the way message and file areas are, so callers can browse by kind of game. It works like the file base: the caller picks a group from a numbered list, ProBoard remembers it (in his user record) and shows it in the menu prompt, and the doors of that group are listed with numbers. A ready-made menu, ''PBDOORS'', with ANSI, ASCII and RIP screens, ties it together. It is an addition, not a replacement. A menu item that runs one door (function **Run a door**, with the door's name as its data) works exactly as before, whether or not the door is in a group. You can keep adding doors with menu items, and put only some of them in the list. Every setting on this page is optional. ===== Setting it up ===== All of this is in **System > Door Configuration** in PBConfig. - **Groups...** Add the groups you want: a name, a title and description for callers, who may see the group (level and flags) and, if you like, an ANSI screen. The order in the list is the order callers see. - **Edit a door, then List && Access...** Give the door a title and description, tick the groups it belongs to (up to eight), choose whether it appears in the list, who may play it, and how many times a day each caller may play it. - **Add the PBDOORS menu** (below), or make your own menu items for the list, and save. Up to 200 groups can be defined. The list is read each time a caller opens it, so no restart is needed. ===== The PBDOORS menu ===== PBInstall provides ''PBDOORS.PBM'' with ''PBDOORS.ANS'', ''PBDOORS.ASC'' and ''PBDOORS.RIP''. It is an ordinary menu, so you can change the keys and the art in PBConfig. Like the file and message menus its screen is only a **header**: a title box, the caller's current door group and a line of keys. ProBoard itself draws the numbered group list below it, and marks the caller's own group with ''*''. A caller on RIP gets the RIP screen, which has the header and a row of buttons, with the list printed inside its panel. To reach it, add a menu item with function **Gosub menu** and the data ''PBDOORS''. ^ Key ^ Function ^ Data ^ What it does ^ | //(automatic)// | Show ANS/ASC (40) | ''PBDOORS'' | Shows the header screen. | | //(automatic)// | Select door group (84) | ''/L'' | Draws the group list under the header. | | ''G'' | Select door group (84) | ''/P'' | Asks "Enter group number:" and remembers the choice. | | ''L'' | List / run doors (83) | ''/DG /L'' | The doors of his current group. | | ''U'' | List / run doors (83) | ''/U /L'' | Only the doors that are in no group. | | ''A'' | List / run doors (83) | ''/L'' | Every door he may play. | | ''P'' | List / run doors (83) | ''/DG'' | Asks "Enter door number (Press Enter to list):". | | ''-'' | Goto previous menu | | Back. | The prompt reads like the file menu's, for example ''Door #2 [Adventure Games]>''. Doors that belong to no group also appear in the group list as **Other doors**. After ''G'' the menu is drawn again, so the header shows the new group. ===== Menu items ===== Function **Select door group** (84) takes ''/L'' (only show the list, below the menu screen), ''/P'' (only ask for the number) or nothing (clear the screen, show the list and ask). Function **List / run doors** (83) takes these flags in its **Data**, in any combination: ^ Data ^ What the caller gets ^ | //(blank)// | One list of every door he may play. | | ''/DG'' | The doors of his current door group; asks him to pick one first if he has none. | | ''/G'' | Always asks for a group first, then lists its doors. | | ''/G=Adventure'' | Only the doors of that group, nothing remembered. Quote a name that has spaces: ''/G="Role Playing"''. | | ''/U'' | Only the doors that are in no group. | | ''/L'' | Show the list at once instead of waiting for Enter. | The caller types a door's number and presses Enter. Pressing Enter alone goes back. ===== Command words ===== A "/" command word is an ordinary menu item (see [[v4:menus:overview|Menus and commands]]). Put these in ''GLOBAL.PBM'' and every menu gets them: ^ Command word ^ Function ^ Data ^ | ''doors'' | Gosub menu | ''PBDOORS'' | | ''adventure'' | List / run doors | ''/G=Adventure /L'' | | ''puzzles'' | List / run doors | ''/G=Puzzle /L'' | | ''tw2002'' | Run a door | ''TW2002'' | A caller types ''/adventure'' and Enter from any menu, or ''/adv'' while the shortened word is unique. ===== Plug-in games (P3X) as doors ===== A ProBoard plug-in game (StreetKing, PBBlocks, Poker ... a ''NAME.P3X'' in the PEX folder) can have a door block too, so it is listed, grouped, access-checked, daily-limited and logged like any other door. In PBConfig choose **P3X plug-in** as the Door Type and give the plug-in name and, if it needs any, its arguments. By hand: door STREETKING type p3x plugin STREETKING pluginargs days=30 plays=10 title Street King group Strategy enddoor The plug-in runs inside ProBoard on the caller's own connection, exactly as a menu item for function 60 starts it, so a plug-in door needs no drop file, work folder, DOSBox or PBLegacy, and Time Limit is not used. If the ''.P3X'' file is missing the caller is told the door is not available, and that attempt does not count against his daily limit. ===== Who sees a door and who can play it ===== * A door's **own** level and flags are checked every time it starts, from a menu item or from the list. A caller who fails them is told he is not allowed to use it. * A group's level and flags decide what the **list** shows. A grouped door is listed if the caller passes the door's own access and may use at least one of its groups. An ungrouped door is listed to anyone who passes its own access. * **List: no** keeps a door out of the list. Its menu item still starts it. ===== Daily limit ===== Setting **Plays per day** to 3 lets each caller start that door three times a calendar day, from a menu item or the list. The count comes from the play log (below), so it is the same on every node and survives a restart. Zero means no limit. ===== ANSI screens ===== ProBoard looks in ''TXTFILES'' for these display files (ANS, ASC or RIP, the usual language rules): ^ File ^ Shown ^ | ''DOORGRPS'' | Above a group list that ProBoard draws on its own (not under the PBDOORS header). | | //the group's art name// | Above that group's list. | A missing file is skipped. A list of doors has no default screen above it; ''DOORS.ANS'' belongs to the old DOORS menu and is not shown there. In an ANSI screen the code ''^K'' followed by ''3'' prints the caller's current door group (''4'' prints its number); a menu prompt can use ''@@'' and ''@@''. The wording of the door prompts is built in (English) and is not in the language file yet. ===== Play log ===== Each time a door starts and ends, a line is added to ''LOGS\DOORPLAY-YYYYMM.LOG'' (one file a month, shared by all nodes). The fields are separated by tabs, so the file opens directly in a spreadsheet: S date time node user-record user-name door-name a play started E date time node user-record user-name door-name seconds the same play ended Count the ''S'' lines for plays, and add up the ''E'' seconds for time played. A door-play section in the PBDispatch Reporting panel is not built yet. ===== In DOORS.PRO ===== PBConfig writes these for you. By hand: group Adventure title Adventure and RPG description Quests, dungeons and trading level 10 flags A flagsnot C art ADVENT endgroup door TW2002 ... the usual lines ... title Trade Wars 2002 description Classic space trading group Adventure, Strategy list yes dailylimit 3 enddoor A door that names a group which has no ''group'' block is reported as an error when the file is read, so a typo never silently hides a door.