List of all event conditions

From VCMI Project Wiki
Revision as of 14:28, 15 January 2016 by AVS (talk | contribs) (Win/Loss conditions)
Jump to: navigation, search

Win/Loss conditions

version 1.0

These are event conditions that can be used in triggered events that control win/loss.

[Todo]

have (pickable objects)

Have artifacts or resources

  • position - optional, if set work like transport item or have on particular hero
  • type - object type ("resource", "artifact", "creature")
  • subtype - object subtype
  • value - amount

have

Any player must control smth

  • position - optional, if set defines particular object
  • type - object type
  • subtype - object subtype
  • value - optional, default all objects
  • object - optional, instance id, if set defines particular object

haveBuilding

Player must control certain building, also includes H3 "build Grail" condition

  • position - town in which this structure must be built, optional
  • type - building ID to construct
  • value - N/A

Note: if position is not set - building can be built in any town

destroy

Covers objectives where player must remove from map certain object(s). This covers defeating hero, creature or even something like "collect all treasure chests"

  • position - position of object to destroy, optional
  • type - type of object to destroy
  • subtype - type of object to destroy
  • object - optional, instance id
  • value - optional, default all, amount of object to destroy

daysPassed

Player must survive or win in certain number of days

  • position - N/A
  • type - N/A
  • value - number of days for this objective to trigger

Note: covers both "win in X days" as well as "survive for X days" conditions, depending on block in which this objective will be placed.

isHuman

Helper condition to allow ai-only or human-only conditions

  • value - 0 will trigger this objective for AI players, 1 will trigger it for humans

standardWin

Standard win condition - defeat all enemies

daysWithoutTown

Standard lose condition - stay for X days without towns

  • value - number of days to survive, 0 = player dies on the next day.

Note: if this condition is not present, player can be eliminated only by defeating all his heroes and capturing all his towns.

constValue

Constant value that can not be changed

  • value - evaluates to false if set to 0 and to true when set to 1

Win/Loss conditions (old)

version 0.0

These are event conditions that can be used in triggered events that control win/loss.

haveArtifact

Any player hero must hold an artifact

  • position - N/A
  • type - required artifact ID
  • value - N/A

Possible changes: position that indicates object to which artifact must be transported (town or hero)

haveCreatures

Player must control certain number of creatures

  • position - N/A
  • type - creature ID to collect
  • value - required amount of creatures

haveResources

Player must have certain amount of resources

  • position - N/A
  • type - resource ID
  • value - required amount of resource

haveBuilding

Player must control certain building, also includes H3 "build Grail" condition

  • position - town in which this structure must be built, optional
  • type - building ID to construct
  • value - N/A

Note: if position is not set - building can be built in any town

control

Covers all conditions that require certain object(s) to be controlled by player

  • position - position of object to control, optional
  • type - type of object to control.
  • value - N/A

Note: If position is not set - all objects of this type must be captured

destroy

Covers objectives where player must remove from map certain object(s). This covers defeating hero, creature or even something like "collect all treasure chests"

  • position - position of object to destroy, optional
  • type - type of object to destroy
  • value - N/A

Note: If position is not set - all objects of this type must be destroyed

transport

Transport artifact in certain town

  • position - town to which this artifact must be transported
  • type - artifact ID to transport
  • value - N/A

Possible changes: merge transport into haveArtifact

daysPassed

Player must survive or win in certain number of days

  • position - N/A
  • type - N/A
  • value - number of days for this objective to trigger

Note: covers both "win in X days" as well as "survive for X days" conditions, depending on block in which this objective will be placed.

isHuman

Helper condition to allow ai-only or human-only conditions

  • position - N/A
  • type - N/A
  • value - 0 will trigger this objective for AI players, 1 will trigger it for humans

standardWin

Standard win condition - defeat all enemies

  • position - N/A
  • type - N/A
  • value - N/A

daysWithoutTown

Standard lose condition - stay for X days without towns

  • position - N/A
  • type - N/A
  • value - number of days to survive, 0 = player dies on the next day.

Note: if this condition is not present, player can be eliminated only by defeating all his heroes and capturing all his towns.

constValue

Constant value that can not be changed

  • position - N/A
  • type - N/A
  • value - evaluates to false if set to 0 and to true when set to 1