Thinggroup: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "'''thinggroup''' is an EDF block which groups separate thingtypes into categories and gives them special flags, without also subjecting them to inheritance. The origin...")
 
mNo edit summary
Line 12: Line 12:
''Name'' is the name of this category. Currently it's merely descriptive, but must be unique per '''thinggroup'''.
''Name'' is the name of this category. Currently it's merely descriptive, but must be unique per '''thinggroup'''.


Each <thingtypeX> is the mnemonic of a [[thingtype]] already defined in EDF. In order for this definition to have any effect on gameplay, you must set '''flags''' to any of the following values, joined by | (as in EDF flag settings):
Each ''thingtypeX'' is the mnemonic of a [[thingtype]] already defined in EDF. In order for this definition to have any effect on gameplay, you must set '''flags''' to any of the following values, joined by | (as in EDF flag settings):
* '''PROJECTILEALLIANCE''': this prevents monsters from '''types''' from harming each other with projectiles. Hell knights and barons of hell have this flag set in the base things.edf.
* '''PROJECTILEALLIANCE''': this prevents monsters from '''types''' from harming each other with projectiles. Hell knights and barons of hell have this flag set in the base things.edf.
* '''DAMAGEIGNORE''': monsters in the '''types''' list may be damaged by each other, but will not infight as a result. This generalizes the deprecated BOSSIGNORE '''thingtype''' flag. It will ''not'' prevent monsters from infighting others of the ''same'' species; for that, use a new thingtype flag (see below).
* '''DAMAGEIGNORE''': monsters in the '''types''' list may be damaged by each other, but will not infight as a result. This generalizes the deprecated BOSSIGNORE '''thingtype''' flag. It will ''not'' prevent monsters from infighting others of the ''same'' species; for that, use a new thingtype flag (see below).

Revision as of 07:57, 17 March 2018

thinggroup is an EDF block which groups separate thingtypes into categories and gives them special flags, without also subjecting them to inheritance. The original motivation for this flag was extending the hell knight and baron of hell 'alliance' behaviour, where they can't harm each other by projectiles, but others monsters of separate species are always affected.

Syntax

The syntax is as follows:

thinggroup <name>
{
  flags <flags>
  types { <thingtype1>, <thingtype2>, ... }
}

Name is the name of this category. Currently it's merely descriptive, but must be unique per thinggroup.

Each thingtypeX is the mnemonic of a thingtype already defined in EDF. In order for this definition to have any effect on gameplay, you must set flags to any of the following values, joined by | (as in EDF flag settings):

  • PROJECTILEALLIANCE: this prevents monsters from types from harming each other with projectiles. Hell knights and barons of hell have this flag set in the base things.edf.
  • DAMAGEIGNORE: monsters in the types list may be damaged by each other, but will not infight as a result. This generalizes the deprecated BOSSIGNORE thingtype flag. It will not prevent monsters from infighting others of the same species; for that, use a new thingtype flag (see below).
  • INHERITED: only has meaning if any of the other flags above is set. It makes it so any thingtypes inheriting the ones from the list are also included in this group. By default they don't inherit.

Types don't have to be monsters specifically; any thingtype will do.

Example

The following EDF makes imps and cacodemons immune to each other's attacks:

thinggroup ClassicDevils  // name can be anything but must be unique
{
  flags ProjectileAlliance
  types { DoomImp, Cacodemon }
}

Other infighting-related properties

As infighting is a rather complex rule in Doom and related games, there are also other means to customize it:

  • thingtype damagefactor attribute "immune". Unlike "damagefactor Xyz, 0", this also prevents pain, thrusting and retaliation. Useful to prevent friendly fire and infighting for arbitrary damage types (means of death) between monsters. Example:
thingdelta
{
  name Zombieman
  mod ZombiemanMOD  // their default MOD is "unknown"; it needs to be set to a custom one.
  damagefactor ZombiemanMOD, immune
}
damagetype ZombiemanMOD { num 100 }  // MOD definition: use a number that doesn't conflict with the stock ones.
  • new thingtype flags:
  • NOSPECIESINFIGHT, which, in addition to DAMAGEIGNORE from thinggroup, also prevents monsters from the same species from infighting due to damage.
  • HARMSPECIESMISSILE, which allows monsters of the same species to be affected by each other's projectiles, overriding the default immunity from classic Doom.
  • FRIENDFOEMISSILE, which makes projectiles shot by friends harm enemies of the same species, and viceversa. Default MBF behaviour makes them immune due to being the same species.