Script parameter

Geek

The script parameter is used for advanced configuration of “scripts” (styles and mission maps). It is part of the basic settings in game schemes.

Explanation

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 Gravity 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.

Useful examples

Here's a list of examples which you can immediately try out:

  • g=150: 150% gravity in Gravity
  • rounds=5: Play with 5 rounds in TechRacer
  • nocake=true: Disable cakes in ClimbHome
  • teamrope=true: Activate colorful rope in Racer

Scripts which use the script parameter

Each script uses the script parameter differently. Refer to the pages below to learn how:

Styles

Mission maps

  • ClimbHome (water settings, disable cake, etc.)

Script Paramter Standard Format

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.

Examples

  • rounds=4: Has a single key “rounds” which has been assigned the value “4”. In TechRacer, you'll play with 4 rounds
  • rounds=4, m=5: Same as above, but it also has a key “m” with value “5”. This is another TechRacer example.
  • a=b, d=e, f=4, foo=bar: Another example with arbitrary values.
  • example=1,test=2: Example without spaces.
  • rounds = 4: Warning! This will assign the key “rounds ” the value “ 4” (mind the spaces!). This is probably not what you want and will not cause TechRacer to use 4 rounds.

User login

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