Difficulty Levels

From The DarkMod Wiki
Revision as of 17:42, 10 April 2009 by SneaksieDave (talk | contribs) (Added info about per-entity difficulty settings)
Jump to navigationJump to search

Excluding & Restricting Entities from/to Difficulty Levels

To restrict an entity to a particular difficulty setting you exclude it from the others, as follows...

To exclude an entity from a particular difficulty level you set it to not spawn as follows:

  • Select the entity
  • Add the following property and value:
  • diff_N_nospawn 1 ... replace N with...
    • 0 = 'Easy'
    • 1 = 'Hard'
    • 2 = 'Expert'
  • The '1' enables it to not spawn and 0 would allow it to spawn (the default)

Placing Entities at Different Locations on Different Difficulty Settings

TO DO: THE FOLLOWING WORKS BUT THERE IS NOW A SPECIAL SPAWNARG TO SET LOCATION ON DIFFERENT DIFFICULTIES.

You can position an entity in different locations on different difficulty levels. To do this...

  • Clone the entity so you have one copy for each location you want.
  • Optionally rename the entities, eg, sceptor_easy, sceptor_hard, sceptor_expert
  • Add the properties and values, eg, for the one to be used on Easy you would exclude Hard(1) and Expert(2)...
    • diff_1_nospawn 1
    • diff_2_nospawn 1
  • Move the entities to the locations you want.

Objectives: If the entity is an objective then you will need three objectives each having their own difficulty setting (see Objectives)

Inventory Name Clash: If testing with no difficulty settings set then all three copies of the entity will appear the in the mission. In that case if the entity can go in the player inventory, each must have an exclusive inventory name or only the first one can be frobbed (if already in inventory at start not sure - maybe error or only one show.) You can get round that by varying the inv_name property on each, eg, 'A sceptor', 'The sceptor', 'Sceptor', 'Lord's sceptor' but you might want to change those back to one name after testing.

Changing Properties on Entity Instances based on Difficulty Settings

As an example, say you wanted a statue on medium difficulty to face 90 degrees instead where it faces on easy difficulty, 0 degrees. On that instance of the statue, you could add the properties:

"diff_1_change_0" "angle"
"diff_1_arg_0" "90"

Translated: At difficulty 1 (medium), the first (0) of a possible list of changes, is applied to the property called "angle". The value of the corresponding change is then passed by the arg(ument) keypair, and is "90".

The properties of individual entities can be controlled with difficulty level in this manner, in contrast to the Difficulty Editor, which changes classes instead of instances.


Changing the Difficulty Level Names

Mappers can change the default names of the difficulty levels, eg, for style, story, or type. For example, suppose in your mission you want one level to include no kills or KOs and add other obstacles so the player has a richer experience playing more stealthily you might want to call it say "Stealthy". Then another difficulty level in your same mission where you put extra enemies in brightly lit areas that the player can only get past by fighting them then you might want to call it say, "Warrior". Another idea you might have would be "Extra Clues". To do this...

  • Select any worldspawn brush or patch
  • Add the following properties and values:
    • diff0default Extra Clues
    • diff1default Warrior
    • diff2default Stealthy

Other suggested styles :"Assassin", "Ninja", "Key Hunt" and so on.

Testing Different Difficulty Settings

To test an uninstalled map on different difficulty levels

  • Select any worldspawn brush or patch
  • Add the following property and value:
  • difficulty N ... replace N with...
    • 0 = 'Easy'
    • 1 = 'Hard'
    • 2 = 'Expert'

There is also a CVAR tdm_difficulty which can be used to override any map-specific or menu-chosen setting. Set the CVAR

tdm_difficulty 2

in the console before starting the map and it will always be using this level. Set the CVAR back to -1 (default) to disable the override. This setting is not saved between sessions to prevent it from unintentionally overriding your settings.