Atdm:campaign info: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Line 16: Line 16:


Working examples for a few weapon limits are:
Working examples for a few weapon limits are:
  "weapon_limit_gasarrow" "1" // Max. 1 gas arrow on all difficulties
  "weapon_limit_gasarrow"                       "1" // Max. 1 gas arrow on all difficulties
  "diff_0_weapon_limit_blackjack" "0" // "0" means: no blackjack on easy
  "diff_0_weapon_limit_blackjack"               "0" // "0" means: no blackjack on easy
  "diff_0_weapon_limit_sword" "1" // "1" means: the sword will be kept ("-1" works as well) on easy
  "diff_0_weapon_limit_sword"                   "1" // "1" means: the sword will be kept ("-1" works as well) on easy
  "diff_0_weapon_limit_waterarrow" "20" // keep no more than 20 water arrows on easy
  "diff_0_weapon_limit_waterarrow"               "20" // keep no more than 20 water arrows on easy
  "diff_0_weapon_limit_firearrow" "-1" // "-1" means: no limit on easy
  "diff_0_weapon_limit_firearrow"               "-1" // "-1" means: no limit on easy


For quick reference, possible weapon IDs for vanilla TDM are (you can look them up in the tdm_weapon_....def files in the tdm_defs01.pk4):
For quick reference, possible weapon IDs for vanilla TDM are (you can look them up in the tdm_weapon_....def files in the tdm_defs01.pk4):

Revision as of 07:57, 1 May 2011

The campaign info entity can be placed once in a mission to control the amount of inventory items and weapons that are carried over to the next mission in a campaign. It's possible to define more than one rule on such an entity, see below for a description of the spawnarg and their syntax.

Syntax

While weapons and "regular" items such as the lantern, keys or health potions are all located in the player's inventory, there are two different sets of spawnargs for defining the carry-over rules after Mission Complete.

For both types of spawnargs it's possible to define a "general" rule (which is applied to all difficulty levels) and optionally a difficulty-specific rule. If provided, the difficulty-specific rule will always override the general one. The difficulty-specific spawnargs have the same syntax as the general ones except for the diff_N prefix (with N being the difficulty level ranging from 0 to 2 - "Easy" is 0).

Weapon Limits

The general syntax is lie this:

"weapon_limit_WEAPONNAME" "X"

with WEAPONNAME being a placeholder for the actual weapon names. The weapon name is a unique identifier found on the weapon items and their ammo. The value "X" is an integer number defining the maximum amount of ammo that is allowed to be carried over to the next mission (for ammo-based weapons like the Water Arrow). For melee weapons without ammo (Shortsword, Blackjack) values greater than "1" won't make any difference and will be treated like a "1" (which is equivalent to "will be kept").

The "weapon_limit_X" spawnarg affects all difficulty levels, but it's possible to override that one by adding spawnargs with a "diff_N_" prefix, e.g. "diff_0_weapon_limit_waterarrow" which will trump the "weapon_limit_waterarrow" without prefix. (The "diff_0" prefix applies to Easy difficulty.)

A limit value of "-1" always means "no limit", e.g. there is no carry-over limit applied to this weapon.

Working examples for a few weapon limits are:

"weapon_limit_gasarrow"                        "1"	// Max. 1 gas arrow on all difficulties
"diff_0_weapon_limit_blackjack"                "0"	// "0" means: no blackjack on easy
"diff_0_weapon_limit_sword"                    "1"	// "1" means: the sword will be kept ("-1" works as well) on easy
"diff_0_weapon_limit_waterarrow"               "20"	// keep no more than 20 water arrows on easy
"diff_0_weapon_limit_firearrow"                "-1"	// "-1" means: no limit on easy

For quick reference, possible weapon IDs for vanilla TDM are (you can look them up in the tdm_weapon_....def files in the tdm_defs01.pk4):

shortsword
blackjack
broadhead
waterarrow
firearrow
ropearrow
gasarrow
mossarrow
noisemaker
unarmed (for completeness' sake)

Note: while "unarmed" is a valid weaponname it's not necessary or recommended to apply a limit to that one. I doubt that any desired effect could be achieved by applying any rules to this type.