Difference between revisions of "List of all event conditions"

From VCMI Project Wiki
Jump to: navigation, search
(have_0)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Win/Loss conditions ==
 
== Win/Loss conditions ==
 +
''version 1.0''
 +
 
These are event conditions that can be used in triggered events that control win/loss.
 
These are event conditions that can be used in triggered events that control win/loss.
 +
 +
 +
''"_0" suffix is an exception to rest of map format. All other fields from version 1.0 have no suffix (but fields from f.e. 1.1 will have "_1" ) ''
 +
 +
{{todo}}
 +
 +
=== have_0 (gather case) ===
 +
Have artifacts or resources
 +
 +
* position - optional, if set work like transport item or have on particular hero
 +
* type - object full type ("resource.gold", "artifact.someArtifact", "someMod:creature.creatureId")
 +
* value - amount
 +
* object - optional, if set (position ignored) work like transport item or have on particular hero
 +
 +
=== have_0 ===
 +
Any player must control smth
 +
 +
* position - optional, if set defines particular object
 +
* type - object full type ("object.mine", "object.town")
 +
* value - optional, amount of objects to control, default all objects
 +
* object - optional, instance id, if set defines particular object and all other fields are ignored
 +
 +
===haveBuilding_0===
 +
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
 +
* object - optional, alternate to position,  instance name
 +
 +
Note: if position is not set - building can be built in any town
 +
 +
===destroy_0===
 +
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 - object full type ("object.mine", "object.town")
 +
* object - optional, instance id
 +
* value - optional, default all, amount of object to destroy
 +
 +
== Win/Loss conditions pre 1.0 ==
 +
''version 0.0''
 +
 +
''"haveX", "control", "destroy", "transport" are for internal use only - backward compatibility with so called map patches.''
 +
 +
These are event conditions that can be used in triggered events that control win/loss.
 +
 
===haveArtifact===
 
===haveArtifact===
 
Any player hero must hold an artifact
 
Any player hero must hold an artifact
Line 33: Line 80:
 
Note: If position is not set - all objects of this type must be captured
 
Note: If position is not set - all objects of this type must be captured
 
===destroy===
 
===destroy===
Covers objections where player must remove from map certain object(s). This covers defeating hero, creature or even something like "collect all treasure chests"
+
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
 
* position - position of object to destroy, optional
 
* type - type of object to destroy
 
* type - type of object to destroy
Line 39: Line 86:
  
 
Note: If position is not set - all objects of this type must be destroyed
 
Note: If position is not set - all objects of this type must be destroyed
 +
 
===transport===
 
===transport===
 
Transport artifact in certain town
 
Transport artifact in certain town
Line 70: Line 118:
  
 
Note: if this condition is not present, player can be eliminated only by defeating all his heroes and capturing all his towns.
 
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

Latest revision as of 08:45, 20 May 2017

Win/Loss conditions

version 1.0

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


"_0" suffix is an exception to rest of map format. All other fields from version 1.0 have no suffix (but fields from f.e. 1.1 will have "_1" )

[Todo]

have_0 (gather case)

Have artifacts or resources

  • position - optional, if set work like transport item or have on particular hero
  • type - object full type ("resource.gold", "artifact.someArtifact", "someMod:creature.creatureId")
  • value - amount
  • object - optional, if set (position ignored) work like transport item or have on particular hero

have_0

Any player must control smth

  • position - optional, if set defines particular object
  • type - object full type ("object.mine", "object.town")
  • value - optional, amount of objects to control, default all objects
  • object - optional, instance id, if set defines particular object and all other fields are ignored

haveBuilding_0

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
  • object - optional, alternate to position, instance name

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

destroy_0

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 - object full type ("object.mine", "object.town")
  • object - optional, instance id
  • value - optional, default all, amount of object to destroy

Win/Loss conditions pre 1.0

version 0.0

"haveX", "control", "destroy", "transport" are for internal use only - backward compatibility with so called map patches.

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