Page MenuHomeFeedback Tracker

New script command: serverMissions
New, NormalPublic

Description

Request:
It would be very useful now to have a command, like serverMissions, which will send the current list of missions on the server to the requesting client (or server).

Purpose:
It would be used to:

  • display a list of missions to players, for voting purposes,
  • map preview purposes.
  • automatic mission launch execution via new server admin commands

 
When would it be beneficial to use?
Immediately. Some mods already have Mission Voting dialogs which currently have to manually maintain the list of missions which are "likely to be" on the server. See image.

Click Screen shot 

(Note: This request is duplicated from a post on the BI forums.)

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Additional Information

Implementation:
eg: 

  • If obtaining the data and performing the transfer is efficient, then a normal command result can be used:
_missionList = serverMissions;
  • Or, (not ideal, but) if obtaining the file list might not be instant, so you could specify a variable name to save the results in, which may not be instant. eg: it may take 1 seconds to obtain and send the data, similar to a public variable.

eg:

serverMissions "var_name";
waitUntil {!isNil "var_name"};

 
Data syntax:
The suggested array format would be a 2 string record per mission, the mission name and pbo path:

[
  ["[M-30] Operation Dangerous v3", "sub-folder\mission_name.pbo"],
  ["this is the mission briefing name", "this is the pbo file name and folder"],
  ...
]

Ideally, it would be good to be able to access other properties in every mission.pbo description.ext file, such as: author, class Header, gameType, class Params, etc, (but not absolutely essential, if it meant not getting a command to get the mission list at least).

This would extend the above array format into a multi-item record instead. This could also be a separate script command in itself, like serverMissionProperties.
 
Foreseeable Problems:

  • The data array sent, might be quite large, but it would be up to the mod dev to manage any such potential issue, eg: such as only using it at the end of the game.

Event Timeline