VOTEDEF
Jump to navigation
Jump to search
Warning: This feature is Skulltag specific, and is not compatible with ZDoom! To see all of Skulltag's specific features, see Skulltag features. |
NOTE: This article is a draft for a future custom vote type implementation. This is not supported in any current Zandronum version! Details available on the tracker and on the forums.
VoteType <name> { Argument = {int | float | string | player | map} [(minimum, maximum)] Action = CallACS (<scriptnumber> or "<scriptname>") Description = <string> ForbidCVar = <string> MenuRange = <value>, <value> MenuStep = <value> [Flags] }
- Argument can be one of the following. If the argument is not given, the vote command will not take one.
- int: an integer number, e.g. 5
- float: decimal value, e.g. 3.14
- player: a valid player, e.g. Doomcrate
- string: a string, e.g. "hello, world"
- map: a map name, e.g. "MAP01"
For int and float types, a value range must be given. This details what the minimum and maximum values for the vote are. Example:
Argument = int (0, 100) // integer argument ranging from 0 to 100
- Action = CallACS (<number> / "<name>") - defines what happens if the vote passes. Currently, the only action is CallACS. A script number or name must be given for CallACS. The vote caller is the script activator (unless they left already before the vote passed, in which case the world executes it instead) and the script will be passed the vote parameter, if any:
- Int: the value as an integer
- Float: the value converted to fixed point
- Player: the player index
- String: the parameter as a dynamic string
- Map: the lump name of the map as a dynamic string
- Description = <text> - Describes the vote. It will show up in the Call a Vote menu and the listvotetypes CCMD.
- ForbidCVar = <cvarname> - sets the name of the cvar that forbids this vote type's usage. It defaults to sv_no<name>vote. If the cvar does not exist, it will be automatically created.
- MenuRange = <min>, <max> - defines what is used as the value range for the call vote menu. For example fraglimit votes allow values up to 32767 but only 0-100 are used in the menu. Defaults to the value range given in the argument field.
- MenuStep = <value> - defines how much the value changes in the menu when arrow keys are used. Defaults to 1.
- NoPassedLimit - If this call succeeds, the caller will not be forced to wait 10 minutes to call another vote of this kind.
- NotOnSelf - The vote cannot be called with the vote caller as the player value.
- NotOnAdmin - The vote cannot be called with anyone in the admin list as the player value.
- NotOnSpectators - The vote cannot be called with a spectator as the player value. Does not prevent the vote from being called on dead LMS players.
- NotOnBots - The vote cannot be called with a bot as the player value.
- PlayerAsIndex - If the argument is a player, the player must be passed to the vote via index rather than name.
- MapInRotation - With a map argument, the map must be in the map rotation.
- NeedsNextMap - A next map must be available for the vote to be called.
Zandronum comes with stock, natively defined vote types. These have internal implementation and do not run ACS scripts.