Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
Protected Attributes | List of all members
dp88_conquestController Class Reference

Conquest Mode - Controller. More...

#include <dp88_misc.h>

Protected Attributes

unsigned char m_scoringMode
 
int m_points [2]
 
int m_targets [2]
 

Static Protected Attributes

Scoring Modes

Scoring mode definitions, see the class description for an explaination of these modes

static const unsigned char MODE_DEFAULT = 0
 
static const unsigned char MODE_DEDUCTION = 1
 

Detailed Description

Author
Daniel Paul (danpa.nosp@m.ul88.nosp@m.@yaho.nosp@m.o.co.nosp@m..uk)

This script controls conquest mode and must be placed on exactly one object on any map where you want to enable conquest mode, such as a Daves Arrow. It stores the points totals for each team and continually sends messages to the server with the current scores.

The controller allows you to choose from one of two scoring systems, which basically work the same way but in different directions. The default scoring system is points accumulation mode, where each team starts with zero points and the points they earn are added to their total. The first team to reach the target score wins the game.

Alternatively you can enable points deducation mode, where each team starts with a set number of points and the points they score are removed from the other teams total. The first team to have their score reduced to zero loses the game.

Precondition
Requires the base destruction victory mode to be enabled in the server configuration otherwise it will be unable to end the game when a team achieves their victory condition
Parameters
ScoringModeSpecifies which scoring system to use. 0 = default, 1 = deduction mode
TargetScoreTeam0This is the number of points team 0 (Nod / Soviet) need to win the game or, if deduction mode is enabled, the number of points team 0 starts with
TargetScoreTeam1This is the number of points team 1 (GDI / Allies) need to win the game or, if deduction mode is enabled, the number of points team 1 starts with
IntroStringThe name of an entry in the strings database containing a message to be displayed to players at the start of the map which can be used to explain how to win. It will also be sent to players when they join mid game. See the note below for a list of macros you can use in this string
ScoreIntervalSpecifies how often, in seconds, the controller should send a message to the server with the current scores. Set this to 0 if you do not want the scores to be shown.
ScoreStringThe name of strings database entry containing the message to be sent to the server with the current scores. If this is blank a generic message will be shown. See the note below for a list of macros you can use in this string
ScoreStringTeam0Optional. The name of a strings database entry containing an alternative score string to be used if team 0 are currently winning. If this is blank the value of ScoreString will be used instead. See the note below for a list of macros you can use in this string
ScoreStringTeam1Optional. The name of a strings database entry containing an alternative score string to be used if team 1 are currently winning. If this is blank the value of ScoreString will be used instead. See the note below for a list of macros you can use in this string
Note
The following macros can be used in strings database entries;

Macro Value
%TEAM0% Translated name of team 0
%TEAM1% Translated name of team 1
%WINNINGTEAM% Translated name of winning team, or 'Neither' if the points are level
%LOSINGTEAM% Translated name of losing team, or 'Neither' if the points are level
%TEAM0TARGET% Target score for team 0 (or starting score in deduction mode)
%TEAM1TARGET% Target score for team 1 (or starting score in deduction mode)
%TEAM0SCORE% Current score for team 0
%TEAM1SCORE% Current score for team 1
%TEAM0SCORENEEDED% Points required before team 0 will win
%TEAM1SCORENEEDED% Points required before team 1 will win

Member Data Documentation

◆ m_points

int dp88_conquestController::m_points[2]
protected

Current points total for each team

◆ m_scoringMode

unsigned char dp88_conquestController::m_scoringMode
protected

The scoring mode being used

◆ m_targets

int dp88_conquestController::m_targets[2]
protected

Target for each team, or starting points in deduction mode

◆ MODE_DEDUCTION

const unsigned char dp88_conquestController::MODE_DEDUCTION = 1
staticprotected

Points deduction mode

◆ MODE_DEFAULT

const unsigned char dp88_conquestController::MODE_DEFAULT = 0
staticprotected

Default, points accumulation mode