[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/ModOptions.lua [Back]  [Original]

   
-- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $


--  Custom Options Definition Table format
--  NOTES:
--  - using an enumerated table lets you specify the options order

--
--  These keywords must be lowercase for LuaParser to read them.
--
--  key:      the string used in the script.txt
--  name:     the displayed name
--  desc:     the description (could be used as a tooltip)
--  type:     the option type ('list','string','number','bool')
--  def:      the default value
--  min:      minimum value for number options
--  max:      maximum value for number options
--  step:     quantization step, aligned to the def value
--  maxlen:   the maximum string length for string options
--  items:    array of item strings for list options
--  section:  so lobbies can order options in categories/panels
--  scope:    'all', 'player', 'team', 'allyteam'      >
--

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
--  Example ModOptions.lua
--

local options = {
  -- do deployment and tactics even work?
  {
    key    = 'a_important',
    name   = 'Important',
    desc   = 'Commonly used options.',
    type   = 'section',
  },
  {
    key    = 'startconds',
    name   = 'Start',
    desc   = 'Start condition settings.',
    type   = 'section',
  },
  {
    key    = 'mapsettings',
    name   = 'Map',
    desc   = 'Map settings.',
    type   = 'section',
  },
  {
    key    = 'multipliers',
    name   = 'Multipliers',
    desc   = 'Statistics multipliers.',
    type   = 'section',
  },
  {
    key    = 'silly', -- lava, fun, zombies
    name   = 'Silly',
    desc   = 'Silly options for trolling.',
    type   = 'section',
  },
	{
		key     = 'mutespec',
		name    = 'Mute Spectators',
		desc    = 'Determines whether spectators can talk to players.',
		type    = 'list',
		section = 'a_important',
		def     = 'autodetect',
		items   = {
			{ key='mute', name = "Mute", desc = 'Mutes spectators.' },
			{ key='autodetect', name = "Autodetect", desc = 'Mutes spectators in FFA (more than two teams).' },
			{ key='nomute', name = "No Mute", desc = 'Does not mute spectators.' },
		},
	},
	{
		key     = 'mutelobby',
		name    = 'Mute Lobby',
		desc    = 'Determines whether chat in the lobby is visible ingame.',
		type    = 'list',
		section = 'a_important',
		def     = 'autodetect',
		items   = {
			{ key='mute', name = "Mute", desc = 'Mutes the lobby.' },
			{ key='autodetect', name = "Autodetect", desc = 'Mutes the lobby in FFA (more than two teams).' },
			{ key='nomute', name = "No Mute", desc = 'Does not mute the lobby.' },
		},
	},
	{
		key     = 'sharemode',
		name    = 'Commshare',
		desc    = 'Determines whether players can merge together during gameplay.',
		type    = 'list',
		section = 'a_important',
		def     = 'invite',
		items   = {
			{ key='all', name = "Merge All", desc = 'Merges all at game start. Recommend using allowunmerge = false with this.' },
			{ key='invite', name = "Invite Only", desc = 'Allows players to merge only if both give consent.' },
			{ key='none', name = "Off", desc = 'Turns commsharing off.' },
		},
	},
	{
		key    = 'mergeresourceshare',
		name   = 'Commshare Resource Share',
		desc   = 'Merged players recieve this much extra resource share per additional player.',
		type   = 'number',
		section= 'a_important',
		def=0.5,
		min=0,
		max=1,
		step=0.05,
	},
	
  {
    key    = 'zombies',
    name   = 'Enable zombies',
    desc   = "All features self-resurrect.",
    type   = 'bool',
    section= 'silly',
    def    = false,
  },
  {
    key    = 'zombies_delay',
    name   = 'Zombie min spawn time',
    desc   = "In seconds, unit will resurrection no faster than this.",
    type   = 'number',
    section= 'silly',
    def=10,
    min=1,
    max=600,
    step=1,
  },
  {
    key    = 'zombies_rezspeed',
    name   = 'Zombie resurrection speed',
    desc   = "In metal per second.",
    type   = 'number',
    section= 'silly',
    def=12,
    min=1,
    max=10000,
    step=1,
  },
  {
    key    = 'zombies_permaslow',
    name   = 'Zombie permaslow modifier',
    desc   = "If more than 0 zombies are permaslowed to half of that amount, so 1 means 50% slow.",
    type   = 'number',
    section= 'silly',
    def=1,
    min=0,
    max=1,
    step=0.01,
  },
  {
    key    = 'zombies_partial_reclaim',
    name   = 'Zombies partially reclaimable',
    desc   = "Partially reclaimed zombies are partially damaged.",
    type   = 'bool',
    section= 'silly',
    def = false,
  },
  {
    key = "max_com_level",
    name = "Commander level limit",
    desc = "Choose the commander level limit. 0 for unlimited.",
    type = "number",
    section= 'startconds',
    def = 0,
    min = 0,
    step = 1,
    max = 20,
  },
  {
	key		= "disabledunits",
	name	= "Disable units",
	desc	= "Prevents specified units from being built ingame. Specify multiple units by using + ",
	section	= 'startconds',
	type	= "string",
	def		= "",
  },
	{
		key = 'globallos',
		name = 'Full visibility',
		desc = 'No fog of war, everyone can see the entire map.',
		type = 'bool',
		section = 'startconds',
		def = false,
	},
  {
    key = "enablelagmonitor",
    name = "Inactive Player Unit Sharing",
    desc = "Whether to automatically share units of inactive players to another player within the team.",
    type   = "list",
    section= 'a_important',
    def    = "auto",
    items  = {
      {
        key  = "on",
        name = "Enable",
        desc = "Share units of inactive players.",
      },
      {
        key  = "auto",
        name = "PvP Only",
        desc = "Enable if there are at least two teams of non-AIs. Lagging or dropped players will still share units.",
      },
      {
        key  = "off",
        name = "Disable",
        desc = "Do not share units of inactive players. Lagging or dropped players will still share units.",
      },
    },
  },
  {
    key         = "allyreclaim",
    name        = "Reclaimable allies",
    desc        = "Allows reclaiming allied units and structures",
    type        = "bool",
    section     = "experimental",
    def         = false,
  },
  {
    key         = "reveal_superweapons",
    name        = "Reveal superweapons",
    desc        = "Reveals superweapons as soon as they exceed 5% completion.",
    type        = "bool",
    section     = "experimental",
    def         = false,
  },
  {
    key         = "artefact_control",
    name        = "Artefact Control",
    desc        = "Win the game by taking control of all the artefacts on the map.",
    type        = "bool",
    section     = "experimental",
    def         = false,
  },
  {
    key         = "techk",
    name        = "Tech-K",
    desc        = "Adds a tech level system",
    type        = "bool",
    section     = "experimental",
    def         = false,
  },
  {
    key         = "aiusetechk",
    name        = "AIs Use Tech-K",
    desc        = "Diverts some AI metal income for automatic upgrades of factories and mexes. This lets any AI approximate an understanding of Tech-K with minimal cheating.",
    type        = "bool",
    section     = "experimental",
    def         = true,
  },
  {
    key         = "disableresurrect",
    name        = "Disable resurrect",
    desc        = "Removes resurrect abilities from the game",
    type        = "bool",
    section     = "experimental",
    def         = false,
  },
  {
    key    = "equalcom",
    name   = "Equalize team commanders",
    desc   = "Give extra commanders to players on teams with fewer players, so that each team has the same number of commanders. Automatically enabled in 'Team' type rooms.",
    type   = "list",
    section= 'startconds',
    def    = "auto",
    items  = {
      {
        key  = "off",
        name = "Disabled",
        desc = "No extra commanders are spawned for smaller teams.",
      },
      {
        key  = "auto",
        name = "Autodetect",
        desc = "Spawn extra commanders for some players on the smaller team in the room type 'Team'.",
      },
      {
        key  = "enable",
        name = "Enabled",
        desc = "Spawn extra commanders for some players on smaller teams to make up the difference in team size.",
      },
    },
  },
  {
    key    = "shuffle",
    name   = "Start Boxes",
    desc   = "Start box settings.",
    type   = "list",
    section= 'startconds',
    def    = "auto",
    items  = {
      {
        key  = "off",
        name = "Fixed",
        desc = "Startboxes have a fixed correspondence to teams.",
      },
      {
        key  = "shuffle",
        name = "Shuffle",
        desc = "Shuffle among boxes that would be used.",
      },
      {
        key  = "allshuffle",
        name = "All Shuffle",
        desc = "Shuffle all present boxes.",
      },
      {
        key  = "auto",
        name = "Autodetect",
        desc = "Shuffle if FFA.",
      },
      {
        key  = "disable",
        name = "Start Anywhere",
        desc = "Allow to place anywhere. Boxes are still drawn for reference but are not obligatory.",
      },
    },
  },
  {
    key='setaispawns',
    name='Set AI Spawns',
    desc='Allow players to set the start positions of AIs.',
    type='bool',
    section= 'startconds',
    def=false,
  },
  {
    key='disable_ai_team_resign',
    name='Disable AI Resignation',
    desc='Prevents AIs from resigning when they run out of constructors and factories.',
    type='bool',
    section= 'a_important',
    def=false,
  },
  {
    key='disable_overwhelming_advantage',
    name='Disable Overwhelming Advantage',
    desc='Disable team reveal when the opposing team has 25x more assets.',
    type='bool',
    section= 'a_important',
    def=false,
  },
  {
    key='disable_local_widgets',
    name='Disable Local Widgets',
    desc='Disable loading of local widget.',
    type='bool',
    section= 'a_important',
    def=false,
  },
	{
		key = "noelo",
		name = "No Elo",
		desc = "Prevent battle from affecting Elo rankings",
		type = "bool",
		section= 'a_important',
		def = false,
	},

  {
    key='campaign_chassis',
    name='Allow campaign commander chassis',
    desc='Allows you to choose the campaign commander chassis.',
    type='bool',
    section= 'startconds',
    def=false,
  },
  {
    key='typemapsetting',
    name='No roads',
    desc='Some maps have roads that allow faster unit movement. When enabled, units will move at their regular unboosted speed on roads.',
    type='bool',
    section= 'mapsettings',
    def=false,
  },
  {
    key    = 'sudden_death_minutes',
    name   = 'Sudden Death Minutes',
    desc   = 'How many minutes until sudden death begins. This mode quickly determines a winner via a contracting death circle. Set -1 to disable.',
    type   = 'number',
    section= 'mapsettings',
    def    = -1,
    min    = -1,
    max    = 2000,
    step   = 1,
  },
  {
    key    = 'sudden_death_sweep_seconds',
    name   = 'Sudden Death Sweep Seconds',
    desc   = 'How many seconds it takes for the sudden death circle to contract to the centre of the map.',
    type   = 'number',
    section= 'mapsettings',
    def    = 60,
    min    = 1,
    max    = 9000,
    step   = 1,
  },
  { -- Might cause desync, check if they occur.
    key    = 'waterlevel',
    name   = 'Manual Water Level',
    desc   = 'How much to raise water level, in elmos.',
    type   = 'number',
    section= 'mapsettings',
    def    = 0,
    min    = -2000,
    max    = 2000,
    step   = 1,
  },
  {
    key    = 'waterpreset',
    name   = 'Water Level',
    desc   = 'Adjusts the water level of the map',
    type   = "list",
    section= 'mapsettings',
    def    = 'manual',
    items  = {
      {
        key  = "manual",
        name = "Manual",
        desc = "Input height manually",
      },
      {
        key  = "dry",
        name = "Dry",
        desc = "Drain the map of water",
      },
      {
        key  = "flooded",
        name = "Flooded",
        desc = "Cover half the map area with water",
      },
    },
  },
  {
    key    = 'metalmult',
    name   = 'Metal Extraction Multiplier',
    desc   = 'Multiplies metal extraction rate. For use in large team games when there are fewer mexes per player.',
    type   = 'number',
    section= 'multipliers',
    def    = 1,
    min    = 0,
    max    = 100,
    step   = 0.05,  -- quantization is aligned to the def value
                    -- (step 

Web Proxy Viewer  |  New URL  |  Original Page