GameCreateParams Class Reference

Game parametrization data used when creating new games. More...

#include <gamecreateparams.h>

Public Types

enum  HostMode { Host, Offline, Demo, Remote }
 

Public Member Functions

const QString & connectPassword () const
 Password that allows clients to connect to the server. More...
 
QStringList & customParameters ()
 
const QStringList & customParameters () const
 
QList< GameCVar > & cvars ()
 Contents of this list will be passed as "+consoleCommand value" to the command line. More...
 
const QList< GameCVar > & cvars () const
 
const QString & demoPath () const
 Use if running in HostMode::Demo mode or recording a demo. More...
 
const GameDemodemoRecord () const
 Type of demo to record; applicable only in Offline game. More...
 
QList< DMFlagsSection > & dmFlags ()
 
const QList< DMFlagsSection > & dmFlags () const
 
const QString & email () const
 
const QString & executablePath () const
 Path to the game executable. More...
 
const GameModegameMode () const
 
HostMode hostMode () const
 
const QString & ingamePassword () const
 Internal game password. More...
 
bool isBroadcastToLan () const
 
bool isBroadcastToMaster () const
 
bool isRandomMapRotation () const
 
QString iwadName () const
 Name of IWAD, derived from iwadPath(). More...
 
const QString & iwadPath () const
 
const QString & map () const
 Level name as in E1M1 or MAP01. More...
 
const QStringList & mapList () const
 List of maps in cycle, as in MAP01, MAP02, MAP03, and so on. More...
 
int maxClients () const
 
int maxPlayers () const
 
int maxTotalClientSlots () const
 Derived basing on maxClients() and maxPlayers() value; higher value wins. More...
 
const QString & motd () const
 Message of the Day. More...
 
const QString & name () const
 
QVariant option (const QString &name) const
 Option is a means for game plugin to set plugin specific settings. More...
 
unsigned short port () const
 
QList< PWadpwads () const
 PWad objects with just the file names and optional statuses. More...
 
QStringList pwadsNames () const
 Names of PWADs, derived from pwadsPaths(). More...
 
QList< bool > & pwadsOptional ()
 
const QList< bool > & pwadsOptional () const
 
QStringList & pwadsPaths ()
 
const QStringList & pwadsPaths () const
 
const QString & rconPassword () const
 Password required to connect to remote admin console. More...
 
void setBroadcastToLan (bool b)
 
void setBroadcastToMaster (bool b)
 
void setConnectPassword (const QString &pass)
 
void setCustomParameters (const QStringList &customParameters)
 
void setCvars (const QList< GameCVar > &cvars)
 
void setDemoPath (const QString &demoPath)
 
void setDemoRecord (const GameDemo &demo)
 
void setEmail (const QString &email)
 
void setExecutablePath (const QString &executablePath)
 
void setGameMode (const GameMode &mode)
 
void setHostMode (HostMode mode)
 
void setIngamePassword (const QString &pass)
 
void setIwadPath (const QString &iwadPath)
 
void setMap (const QString &map)
 
void setMapList (const QStringList &mapList)
 
void setMaxClients (int num)
 
void setMaxPlayers (int num)
 
void setMotd (const QString &motd)
 
void setName (const QString &name)
 
void setOption (const QString &name, const QVariant &value)
 
void setPort (unsigned short port)
 
void setPwadsOptional (const QList< bool > &pwadsOptional)
 
void setPwadsPaths (const QStringList &pwadsPaths)
 
void setRandomMapRotation (bool b)
 
void setRconPassword (const QString &pass)
 
void setSkill (int skill)
 
void setUpnp (bool upnp)
 
void setUpnpPort (quint16 port)
 
void setUrl (const QString &url)
 
int skill () const
 Difficulty level. More...
 
bool upnp () const
 If set, the game should try to enable UPnP. More...
 
quint16 upnpPort () const
 Game or plugin can use this network port as it sees fit within the UPnP context. More...
 
const QString & url () const
 URL for server's website or for WADs download. More...
 

Detailed Description

Game parametrization data used when creating new games.

Definition at line 42 of file gamecreateparams.h.

Member Function Documentation

const QString & GameCreateParams::connectPassword ( ) const

Password that allows clients to connect to the server.

Definition at line 83 of file gamecreateparams.cpp.

QList< GameCVar > & GameCreateParams::cvars ( )

Contents of this list will be passed as "+consoleCommand value" to the command line.

Definition at line 98 of file gamecreateparams.cpp.

const QString & GameCreateParams::demoPath ( ) const

Use if running in HostMode::Demo mode or recording a demo.

Used either as a path to already existing demo that should be played back, or as a path to a new demo that should be recorded.

When hostMode() is HostMode::Demo then this points to a demo for playback.

When hostMode() is HostMode::Offline and demoRecord() is not GameDemo::NoDemo then this points to a new demo to record.

See also
hostMode()
demoRecord()

Definition at line 108 of file gamecreateparams.cpp.

const GameDemo & GameCreateParams::demoRecord ( ) const

Type of demo to record; applicable only in Offline game.

If set to record a demo, then demoPath() must also be set. Default is GameDemo::NoDemo.

Definition at line 113 of file gamecreateparams.cpp.

const QString & GameCreateParams::executablePath ( ) const

Path to the game executable.

Definition at line 138 of file gamecreateparams.cpp.

const QString & GameCreateParams::ingamePassword ( ) const

Internal game password.

Definition at line 168 of file gamecreateparams.cpp.

QString GameCreateParams::iwadName ( ) const

Name of IWAD, derived from iwadPath().

Definition at line 178 of file gamecreateparams.cpp.

const QString & GameCreateParams::map ( ) const

Level name as in E1M1 or MAP01.

Definition at line 184 of file gamecreateparams.cpp.

const QStringList & GameCreateParams::mapList ( ) const

List of maps in cycle, as in MAP01, MAP02, MAP03, and so on.

Definition at line 189 of file gamecreateparams.cpp.

int GameCreateParams::maxTotalClientSlots ( ) const

Derived basing on maxClients() and maxPlayers() value; higher value wins.

Definition at line 204 of file gamecreateparams.cpp.

const QString & GameCreateParams::motd ( ) const

Message of the Day.

Definition at line 209 of file gamecreateparams.cpp.

QVariant GameCreateParams::option ( const QString &  name) const

Option is a means for game plugin to set plugin specific settings.

Plugins can implement custom "create game" pages and through setOption() and option() pass options to their GameHost implementation where they can be further processed.

These options do not necessarily need to produce any game command line arguments, but they may be used to alter the generation of others. The exact usage is up to the plugin.

Definition at line 219 of file gamecreateparams.cpp.

QList< PWad > GameCreateParams::pwads ( ) const

PWad objects with just the file names and optional statuses.

Definition at line 265 of file gamecreateparams.cpp.

QStringList GameCreateParams::pwadsNames ( ) const

Names of PWADs, derived from pwadsPaths().

Definition at line 254 of file gamecreateparams.cpp.

const QString & GameCreateParams::rconPassword ( ) const

Password required to connect to remote admin console.

Definition at line 276 of file gamecreateparams.cpp.

int GameCreateParams::skill ( ) const

Difficulty level.

Definition at line 406 of file gamecreateparams.cpp.

bool GameCreateParams::upnp ( ) const

If set, the game should try to enable UPnP.

Definition at line 411 of file gamecreateparams.cpp.

quint16 GameCreateParams::upnpPort ( ) const

Game or plugin can use this network port as it sees fit within the UPnP context.

This value should be ignored if upnp() is false.

Definition at line 421 of file gamecreateparams.cpp.

const QString & GameCreateParams::url ( ) const

URL for server's website or for WADs download.

Definition at line 431 of file gamecreateparams.cpp.


The documentation for this class was generated from the following files: