LuaGlobals.wiki
changeset 1772 73305d96e954
parent 1771 695712d731b3
child 1820 8dd93fe308aa
equal deleted inserted replaced
1771:695712d731b3 1772:73305d96e954
    32 || `CurrentHedgehog` || The hedgehog gear that is currently in play ||
    32 || `CurrentHedgehog` || The hedgehog gear that is currently in play ||
    33 || `AmmoTypeMax` || Maximum ammo type ID (useful to iterate through all ammo types, starting by 0) ||
    33 || `AmmoTypeMax` || Maximum ammo type ID (useful to iterate through all ammo types, starting by 0) ||
    34 
    34 
    35 == !GameFlags ==
    35 == !GameFlags ==
    36 The !GameFlags are used to store simple boolean settings of the game.
    36 The !GameFlags are used to store simple boolean settings of the game.
    37 You can read/modify them using the [LuaAPI#GameFlags_functions GameFlags-Functions].
    37 You can read/modify them using the [LuaGameplay#GameFlags_functions GameFlags functions].
    38 
    38 
    39 || *Identifier* || *Description (active state)* ||
    39 || *Identifier* || *Description (active state)* ||
    40 || `gfOneClanMode` || Used when only one clan is in the game. This game flag is primarily used for training missions. ||
    40 || `gfOneClanMode` || Used when only one clan is in the game. This game flag is primarily used for training missions. ||
    41 || `gfMultiWeapon` || Shooting any weapon enters multi-shot mode with infinite shots. The remaining shots counter for weapons like shotgun is suppressed. Intended for target practice missions, not recommended for anything else. ||
    41 || `gfMultiWeapon` || Shooting any weapon enters multi-shot mode with infinite shots. The remaining shots counter for weapons like shotgun is suppressed. Intended for target practice missions, not recommended for anything else. ||
    42 || `gfSwitchHog` || Free hog switching at turn start ||
    42 || `gfSwitchHog` || Free hog switching at turn start ||
    76 || `LandDigest` || _N/A_ || Digest for the current map. Only meant for internal use by Hedgewars ||
    76 || `LandDigest` || _N/A_ || Digest for the current map. Only meant for internal use by Hedgewars ||
    77 || `MapGen` || `mgRandom` || Type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`. ||
    77 || `MapGen` || `mgRandom` || Type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`. ||
    78 || `TemplateFilter` || `0` || _unknown meaning_ ||
    78 || `TemplateFilter` || `0` || _unknown meaning_ ||
    79 || `TemplateNumber` || `0` || _unknown meaning_ ||
    79 || `TemplateNumber` || `0` || _unknown meaning_ ||
    80 || `MapFeatureSize` || `50` (`12` in 1.0.0) || Used by random maps to determine its “curvyness” or complexity. This value can be set by the user with the slider under the random map preview in the game setup screen. The user-set value ranges from 1 (leftmost position) to 25 (rightmost position). A good starting value is `12`. ||
    80 || `MapFeatureSize` || `50` (`12` in 1.0.0) || Used by random maps to determine its “curvyness” or complexity. This value can be set by the user with the slider under the random map preview in the game setup screen. The user-set value ranges from 1 (leftmost position) to 25 (rightmost position). A good starting value is `12`. ||
    81 || `GameFlags` || `0` || All `GameFlags` combined as a bitmask. Setting `GameFlags` directly is discouraged, use the [LuaAPI#GameFlags_functions] instead ||
    81 || `GameFlags` || `0` || All `GameFlags` combined as a bitmask. Setting `GameFlags` directly is discouraged, use the [LuaGameplay#GameFlags_functions GameFlags functions] instead ||
    82 || `Ready` || `5000` || Ready timer at the start of the turn (in milliseconds) ||
    82 || `Ready` || `5000` || Ready timer at the start of the turn (in milliseconds) ||
    83 || `Delay` || `100` || Time the current hedgehog needs to be inactive before gear stuff gets updated in infinite attack mode, like applying hog damage and deaths. This is quite an obscure variable, only change it if you know what you're doing ||
    83 || `Delay` || `100` || Time the current hedgehog needs to be inactive before gear stuff gets updated in infinite attack mode, like applying hog damage and deaths. This is quite an obscure variable, only change it if you know what you're doing ||
    84 || `TurnTime` || `45000` || Turn time in milliseconds ||
    84 || `TurnTime` || `45000` || Turn time in milliseconds ||
    85 || `GetAwayTime` || `100` || Retreat time in percent ||
    85 || `GetAwayTime` || `100` || Retreat time in percent ||
    86 || `CaseFreq` || `5` || Probability that a crate drops in a turn. 0: never, >0: probability = `1/CaseFreq` ||
    86 || `CaseFreq` || `5` || Probability that a crate drops in a turn. 0: never, >0: probability = `1/CaseFreq` ||
   123 || `lfBouncy` || Bouncy terrain, hogs and some other gears will bounce off when they collide with it. ||
   123 || `lfBouncy` || Bouncy terrain, hogs and some other gears will bounce off when they collide with it. ||
   124 || `lfIndestructible` || Almost indestructible terrain, most weapons will not destroy it. ||
   124 || `lfIndestructible` || Almost indestructible terrain, most weapons will not destroy it. ||
   125 || `0` || Normal destroyable terrain. Note that this is the case when no other land flag is set. ||
   125 || `0` || Normal destroyable terrain. Note that this is the case when no other land flag is set. ||
   126 
   126 
   127 == More globals ==
   127 == More globals ==
   128 More globals are at at [GearTypes Gear Types] , [AmmoTypes Ammo Types], [Sounds], [States], [Sprites], [VisualGearTypes Visual Gear Types].
   128 More globals are at at [GearTypes Gear Types], [VisualGearTypes Visual Gear Types], [AmmoTypes Ammo Types], [Sounds], [States], [Sprites].
   129 
   129 
   130 Note: Some globals are specific to a few functions only and are not mentioned explicitly here; they are instead documented at the corresponding function (example: effect types for the `SetEffect` function).
   130 Note: Some globals are specific to a few functions only and are not mentioned explicitly here; they are instead documented at the corresponding function (example: effect types for the `SetEffect` function).