Script parameter

Geek The [b]script parameter[/b] is used for advanced configuration of “scripts” ([wiki]styles[/wiki] and mission maps). It is part of the [wiki]basic settings[/wiki] in [wiki]game scheme[/wiki]s. [h3]Explanation[/h3]The script parameter is a single text field which may be used by styles for additional settings specific to styles and mission maps. For example, you can change the gravity in the [wiki]Gravity[/wiki] style to 150% or whatever value you like. To use the script parameter, you first need to select a style or mission map which actually makes use of it. If you play in Normal mode, or the style doesn't use the script parameter, this setting is simply ignored. When in doubt, leave this field empty; this guarantees default advanced settings. [h3]Useful examples[/h3]Here's a list of examples which you can immediately try out: [list][*][code]g=150[/code]: 150% gravity in [wiki]Gravity[/wiki] [*][code]rounds=5[/code]: Play with 5 rounds in [wiki]TechRacer[/wiki] [*][code]nocake=true[/code]: Disable cakes in [wiki]ClimbHome[/wiki] [*][code]teamrope=true[/code]: Activate colorful rope in [wiki]Racer[/wiki] [/list] [h3]Scripts which use the script parameter[/h3]Each script uses the script parameter differently. Refer to the pages below to learn how: [h4]Styles[/h4][list] [*][wiki]Gravity[/wiki] (set gravity) [*][wiki]TechRacer[/wiki] (set number of rounds and map) [*][wiki]Racer[/wiki] (set number of rounds and more) [*][wiki]Highlander[/wiki] (Loyal Highlander) [*][wiki]Capture The Flag[/wiki] (set number of captures) [*][wiki]Continental supplies[/wiki] (for custom continents, undocumented) [*][wiki]HedgeEditor[/wiki] (undocumented and obscure usage) [/list] [h4]Mission maps[/h4][list] [*][wiki]ClimbHome[/wiki] (water settings, disable cake, etc.)[/list] [h3]Script Paramter Standard Format[/h3]Most styles follow a simple format for the script parameter. It is a comma-seperated list of key-and-value pairs. A key-and-value pair is simply a short text (the key) followed by an equals sign followed by another short text (the value of the key). A key-and-value pair specifies a single setting for the style. Spaces are allowed after a comma to improve readability, but not in a key-and-value pair. Note: You don't have to specify every possible key-and-value pair when using styles. You can safely omit some or all of them, the styles will simply assume default values. [h4]Examples[/h4][list][*] [code]rounds=4[/code]: Has a single key “rounds” which has been assigned the value “4”. In [wiki]TechRacer[/wiki], you'll play with 4 rounds [*] [code]rounds=4, m=5[/code]: Same as above, but it also has a key “m” with value “5”. This is another [wiki]TechRacer[/wiki] example. [*] [code]a=b, d=e, f=4, foo=bar[/code]: Another example with arbitrary values. [*] [code]example=1,test=2[/code]: Example without spaces. [*] [code]rounds = 4[/code]: [b]Warning![/b] This will assign the key “rounds ” the value “ 4” (mind the spaces!). This is probably not what you want and will not cause [wiki]TechRacer[/wiki] to use 4 rounds.[/list]

User login

Copyright © 2004-2023 Hedgewars Project. All rights reserved. [ contact ]