DECORATE: Difference between revisions

From Zandronum Wiki
(Created page with "For more information on the DECORATE lump and it's use, see ZDoom's [http://Zdoom.org/wiki/Decorate Decorate] article. == Action Functions == * <code>A_FaceConsolePlayer</...")
 
(Add A_ClientsideExecute)
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
For more information on the DECORATE lump and it's use, see ZDoom's [http://Zdoom.org/wiki/Decorate Decorate] article.
For more information on the DECORATE lump and its use, see the ZDoom wiki's {{Zdoomwiki|DECORATE}} article.
== Action Functions ==
 
For a list of all the DECORATE functions supported by Zandronum, see [[List of DECORATE functions in Zandronum]].
== Action functions ==
* <code>[[A_FaceConsolePlayer]]</code>
* <code>[[A_FaceConsolePlayer]]</code>
* <code>[[A_CheckRailReload]]</code>
* <code>[[A_CheckRailReload]]</code>
* <code>[[A_FireRailgun]]</code> (exists in other ports, but behaves differently)
* <code>[[A_FireRailgun]]</code> (exists in other ports, but behaves differently)
* <code>[[A_ClientsideExecute]]</code> {{Devfeature|3.2|alpha}}


== Actor Flags ==
== Actor flags ==
=== Behaviour ===
=== Behaviour ===


Line 11: Line 14:
:Spawns the actor on the clientside. This only works for things on the map startup, meaning it will not affect newly spawned actors.
:Spawns the actor on the clientside. This only works for things on the map startup, meaning it will not affect newly spawned actors.
* <code>'''CLIENTSIDEONLY'''</code>
* <code>'''CLIENTSIDEONLY'''</code>
:Spawns the actor on the clientside no matter how it is spawned.
:Actors with this flag will only be spawned and simulated clientside. If spawned serverside, the server will merely tell clients to spawn it. This is useful for graphical effects such as explosion sprites that do not need to be tracked by the server.  
* <code>'''NONETID'''</code>
* <code>'''NONETID'''</code>
:Actors with this flag are not assigned a network id when spawned. Only use it if you know what you are doing!
:When spawned, actors with this flag will not be assigned a network ID, which is used to synchronise the actor state between the server and its clients. Only use this if you know what you are doing!
* <code>'''DONTIDENTIFYTARGET'''</code>
* <code>'''DONTIDENTIFYTARGET'''</code>
:Players using a class with this flag enabled won't be identified when looked at.
:Players using a class with this flag enabled won't be identified when looked at.
Line 19: Line 22:
:Used in conjunction with the flag to make the player score a point if he/she is holding the flag/skull item.
:Used in conjunction with the flag to make the player score a point if he/she is holding the flag/skull item.
* <code>'''SERVERSIDEONLY'''</code>
* <code>'''SERVERSIDEONLY'''</code>
:The clients don't spawn such actors, only the server does. Therefore, spawning or manipulating these actors does not need network bandwidth. Only use it on actors that are always invisible and don't block the movement of players.
:Actors with this flag will never be spawned clientside, and can only be spawned by the server. As such, these actors will not be synced across the network, using no network bandwidth. Only use it on actors that are always invisible and don't block the movement of players.
*<code>'''GIVEFISTINGMEDAL'''</code> {{Devfeature|3.2|alpha}}
:A projectile or puff will give a player a "fisting" medal if they frag an enemy player with it. If this flag is added to a weapon instead, then any melee attack due to {{Zdoomwiki|A_Punch}} or {{Zdoomwiki|A_CustomPunch}} will also give the medal to the player.
*<code>'''GIVESPAMMEDAL'''</code> {{Devfeature|3.2|alpha}}
:A projectile or puff will give a player a "spam" medal if they frag two or more enemy players in the same tic with it.
 
===(In)abilities===
*<code>'''FORCEALLYCOLLISION'''</code>
:A projectile or puff fired by an actor will always collide and push their teammates, even if [[DMFlags#ZaDMFlags|sv_shootthroughallies]] or [[DMFlags#ZaDMFlags|sv_dontpushallies]] are enabled.
*<code>'''USESPAWNEVENTSCRIPT'''</code>
: Actors with this flag will trigger GAMEEVENT_ACTOR_SPAWNED just before their first tic.
*<code>'''NOSPAWNEVENTSCRIPT'''</code>
:Actors with this flag will never trigger GAMEEVENT_ACTOR_SPAWNED, even if ForceSpawnEventScripts is enabled in the [[zdoom:GameInfo_definition|GameInfo Definition]].
*<code>'''USEDAMAGEEVENTSCRIPT'''</code>
:Actors with this flag will trigger GAMEEVENT_ACTOR_DAMAGED just before they're about to take damage.
*<code>'''NODAMAGEEVENTSCRIPT'''</code>
:Actors with this flag will never trigger GAMEEVENT_ACTOR_DAMAGED, even if ForceDamageEventScripts is enabled in the [[zdoom:GameInfo_definition|GameInfo Definition]].


=== Inventory ===
===Inventory===


* <code>'''INVENTORY.FORCERESPAWNINSURVIVAL'''</code>
*<code>'''INVENTORY.FORCERESPAWNINSURVIVAL'''</code>  
:Causes the item to respawn in survival, even if respawn items is off.
:Causes the item to respawn in survival, even if respawn items is off.


=== Weapons ===
===Weapons===


* <code>'''WEAPON.ALLOW_WITH_RESPAWN_INVUL'''</code>
* <code>'''WEAPON.ALLOW_WITH_RESPAWN_INVUL'''</code>  
:Allows the weapon to be used while in respawn protection.
:Allows the weapon to be used while in respawn protection.
* <code>'''WEAPON.NOLMS'''</code>
* <code>'''WEAPON.NOLMS'''</code>  
:This weapon is not given in the Last Man Standing game mode.
:This weapon is not given in the Last Man Standing game mode.
* <code>'''PIERCEARMOR'''</code>
*<code>'''PIERCEARMOR'''</code>
:Makes rail attacks ignore armor.
:Makes rail attacks ignore armor.


=== Limited Use ===
===Limited use===  


* <code>'''BLUETEAM'''</code> {{DeprecatedLink|the <code>LimitedToTeam</code> [[#Actor_Properties|actor property]]}}
*<code>'''BLUETEAM'''</code> {{DeprecatedLink|the <code>LimitedToTeam</code> [[#Actor_properties|actor property]]}}
* <code>'''REDTEAM'''</code> {{DeprecatedLink|the <code>LimitedToTeam</code> [[#Actor_Properties|actor property]]}}
: Does nothing, remains for compatibility purposes only.
* <code>'''NODE'''</code> {{deprecated}}
*<code>'''REDTEAM'''</code> {{DeprecatedLink|the <code>LimitedToTeam</code> [[#Actor_properties|actor property]]}}
:No-op
: Does nothing, remains for compatibility purposes only.
*<code>'''NODE'''</code> {{deprecated}}
: Does nothing, remains for compatibility purposes only.
* <code>'''BASEHEALTH'''</code>
* <code>'''BASEHEALTH'''</code>
: Indicates that the actor is a base health item, for bot scripting.
* <code>'''SUPERHEALTH'''</code>
* <code>'''SUPERHEALTH'''</code>
: Indicates that the actor is a super health item, for bot scripting.
* <code>'''BASEARMOR'''</code>
* <code>'''BASEARMOR'''</code>
: Indicates that the actor is a base armor item, for bot scripting.
* <code>'''SUPERARMOR'''</code>
* <code>'''SUPERARMOR'''</code>
:Flags the actor as base/super health/armor, used by bot scripting.
: Indicates that the actor is a super armor item, for bot scripting.
* <code>'''EXPLODEONDEATH'''</code>
* <code>'''EXPLODEONDEATH'''</code>
:Seems to have something to do with accuracy and precision medals. Defined on the grenade.
: Allows missiles to award [[Skulltag_medals#Accuracy|Accuracy]] and [[Skulltag_medals#Precision|Precision]] medals to the player who fired them upon exploding.


== Actor Properties ==
==Actor properties==  
* <code>'''Inventory.PickupAnnouncerEntry'''</code>
*<code>'''Inventory.PickupAnnouncerEntry'''</code>
Plays the specified announcer entry when the item is picked up.
Plays the specified announcer entry when the item is picked up.  
* <code>'''LimitedToTeam ''teamindex'''''</code>
*<code>'''LimitedToTeam ''teamindex'''''</code>
Forces the Player class to a certain team, i. e. LimitedToTeam 1 would assign this class to the second team in TEAMINFO (default Red; indexes start at 0 and 255 means not on a team and is set by default).
Forces the Player class to a certain team, i. e. LimitedToTeam 1 would assign this class to the second team in TEAMINFO (default Red; indexes start at 0 and 255 means not on a team and is set by default).
* <code>'''Player.MaxSkinSizeFactor'''</code>
*<code>'''Player.MaxSkinSizeFactor'''</code>
Adjusts player skin size limits. Example: Player.MaxSkinSizeFactor 3.44, 1.68 //This is also the limit for default skins.
Adjusts player skin size limits. Example: Player.MaxSkinSizeFactor 3.44, 1.68 //This is also the limit for default skins.
* <code>'''Rune.Color ''color'', ''alpha'''''</code>
*<code>'''Rune.Color ''color'', ''alpha'''''</code>
Same as [http://Zdoom.org/wiki/Classes:PowerupGiver#powerup.color Powerup.Color].
Same as {{Zdoomwiki|Powerup.Color}}.
* <code>'''Rune.Type'''</code>
*<code>'''Rune.Type'''</code>  
Sets what the rune does, similar to [http://Zdoom.org/wiki/Classes:PowerupGiver#powerup.type Powerup.Type]. Possible values are DoubleDamage, DoubleFiringSpeed, Drain, Spread, HalfDamage, Regeneration, Prosperity, Reflection, HighJump, Speed25.
Sets what the rune does, similar to {{Zdoomwiki|Powerup.Type}}. Possible values are DoubleDamage, DoubleFiringSpeed, Drain, Spread, HalfDamage, Regeneration, Prosperity, Reflection, HighJump, Speed25.
* <code>'''VisibleToTeam ''teamindex'''''</code>
*<code>'''SelfObituary'''</code> {{Devfeature|3.2|alpha}}
Defines the obituary used when a player kills themselves with an actor. As with the regular Obituary property, this should be applied to the projectile actor for projectile weapons.
*<code>'''VisibleToTeam ''teamindex'''''</code>
Makes the actor only visible for a certain team, i. e. VisibleToTeam 1 would make this actor only visible for the second team in TEAMINFO (default Red; indexes start at 0 and 255 means not on a team and is set by default).
Makes the actor only visible for a certain team, i. e. VisibleToTeam 1 would make this actor only visible for the second team in TEAMINFO (default Red; indexes start at 0 and 255 means not on a team and is set by default).
* <code>'''VisibleToPlayerClass ''classname'''''</code>
*<code>'''VisibleToPlayerClass ''classname'''''</code>
Makes the actor only visible for a certain class.
Makes the actor only visible for a certain class.
* <code>'''Weapon.PreferredSkin'''</code>
*<code>'''Weapon.SwayStyle'''</code> {{Devfeature|3.2|alpha}}
Sway style. One of <code>Normal</code>, <code>DownOnly</code>, <code>UpOnly</code>, or <code>HorizontalOnly</code>.
*<code>'''Weapon.SwaySpeed'''</code> {{Devfeature|3.2|alpha}}
Sway speed.
*<code>'''Weapon.ViewPitchStyle'''</code> {{Devfeature|3.2|alpha}}
Style of view pitch offset (moving weapon sprite when looking up or down). One of <code>Full</code>, <code>DownOnly</code>, <code>UpOnly</code>, <code>DownAndUp</code>, or <code>Centered</code>.
*<code>'''Weapon.ViewPitchOffset'''</code> {{Devfeature|3.2|alpha}}
Number of pixels to offset weapon sprite with view pitch offset.
*<code>'''Weapon.PreferredSkin'''</code>
Forces the Player class to use a certain skin when the weapon is selected.
Forces the Player class to use a certain skin when the weapon is selected.


== Damage Factors ==
== Damage factors ==
* <code>'''spawntelefrag'''</code>
*<code>'''spawntelefrag'''</code>
A separate damage factor for the initial spawn frags with maps lacking player starts. This is different from the '''telefrag''' damagefactor.
A separate damage factor for the initial spawn frags with maps lacking player starts. This is different from the '''telefrag''' damagefactor.
*<code>'''deadspectate'''</code>
A special damage type used by [[SetDeadSpectator]] when forcing a live player to dead spectators. No obituary message is printed with this damage type.


[[Category:Level Development]]
[[Category:Level Development]]
[[Category:Modding]]
[[Category:Modding]]
[[Category:Special lumps]]

Latest revision as of 09:31, 16 April 2024

For more information on the DECORATE lump and its use, see the ZDoom wiki's DECORATE article.

For a list of all the DECORATE functions supported by Zandronum, see List of DECORATE functions in Zandronum.

Action functions

Actor flags

Behaviour

  • ALLOWCLIENTSPAWN
Spawns the actor on the clientside. This only works for things on the map startup, meaning it will not affect newly spawned actors.
  • CLIENTSIDEONLY
Actors with this flag will only be spawned and simulated clientside. If spawned serverside, the server will merely tell clients to spawn it. This is useful for graphical effects such as explosion sprites that do not need to be tracked by the server.
  • NONETID
When spawned, actors with this flag will not be assigned a network ID, which is used to synchronise the actor state between the server and its clients. Only use this if you know what you are doing!
  • DONTIDENTIFYTARGET
Players using a class with this flag enabled won't be identified when looked at.
  • SCOREPILLAR
Used in conjunction with the flag to make the player score a point if he/she is holding the flag/skull item.
  • SERVERSIDEONLY
Actors with this flag will never be spawned clientside, and can only be spawned by the server. As such, these actors will not be synced across the network, using no network bandwidth. Only use it on actors that are always invisible and don't block the movement of players.
  • GIVEFISTINGMEDAL (development version 3.2-alpha and above only)
A projectile or puff will give a player a "fisting" medal if they frag an enemy player with it. If this flag is added to a weapon instead, then any melee attack due to A_Punch or A_CustomPunch will also give the medal to the player.
  • GIVESPAMMEDAL (development version 3.2-alpha and above only)
A projectile or puff will give a player a "spam" medal if they frag two or more enemy players in the same tic with it.

(In)abilities

  • FORCEALLYCOLLISION
A projectile or puff fired by an actor will always collide and push their teammates, even if sv_shootthroughallies or sv_dontpushallies are enabled.
  • USESPAWNEVENTSCRIPT
Actors with this flag will trigger GAMEEVENT_ACTOR_SPAWNED just before their first tic.
  • NOSPAWNEVENTSCRIPT
Actors with this flag will never trigger GAMEEVENT_ACTOR_SPAWNED, even if ForceSpawnEventScripts is enabled in the GameInfo Definition.
  • USEDAMAGEEVENTSCRIPT
Actors with this flag will trigger GAMEEVENT_ACTOR_DAMAGED just before they're about to take damage.
  • NODAMAGEEVENTSCRIPT
Actors with this flag will never trigger GAMEEVENT_ACTOR_DAMAGED, even if ForceDamageEventScripts is enabled in the GameInfo Definition.

Inventory

  • INVENTORY.FORCERESPAWNINSURVIVAL
Causes the item to respawn in survival, even if respawn items is off.

Weapons

  • WEAPON.ALLOW_WITH_RESPAWN_INVUL
Allows the weapon to be used while in respawn protection.
  • WEAPON.NOLMS
This weapon is not given in the Last Man Standing game mode.
  • PIERCEARMOR
Makes rail attacks ignore armor.

Limited use

Does nothing, remains for compatibility purposes only.
Does nothing, remains for compatibility purposes only.
  • NODE (deprecated)
Does nothing, remains for compatibility purposes only.
  • BASEHEALTH
Indicates that the actor is a base health item, for bot scripting.
  • SUPERHEALTH
Indicates that the actor is a super health item, for bot scripting.
  • BASEARMOR
Indicates that the actor is a base armor item, for bot scripting.
  • SUPERARMOR
Indicates that the actor is a super armor item, for bot scripting.
  • EXPLODEONDEATH
Allows missiles to award Accuracy and Precision medals to the player who fired them upon exploding.

Actor properties

  • Inventory.PickupAnnouncerEntry

Plays the specified announcer entry when the item is picked up.

  • LimitedToTeam teamindex

Forces the Player class to a certain team, i. e. LimitedToTeam 1 would assign this class to the second team in TEAMINFO (default Red; indexes start at 0 and 255 means not on a team and is set by default).

  • Player.MaxSkinSizeFactor

Adjusts player skin size limits. Example: Player.MaxSkinSizeFactor 3.44, 1.68 //This is also the limit for default skins.

  • Rune.Color color, alpha

Same as Powerup.Color.

  • Rune.Type

Sets what the rune does, similar to Powerup.Type. Possible values are DoubleDamage, DoubleFiringSpeed, Drain, Spread, HalfDamage, Regeneration, Prosperity, Reflection, HighJump, Speed25.

  • SelfObituary (development version 3.2-alpha and above only)

Defines the obituary used when a player kills themselves with an actor. As with the regular Obituary property, this should be applied to the projectile actor for projectile weapons.

  • VisibleToTeam teamindex

Makes the actor only visible for a certain team, i. e. VisibleToTeam 1 would make this actor only visible for the second team in TEAMINFO (default Red; indexes start at 0 and 255 means not on a team and is set by default).

  • VisibleToPlayerClass classname

Makes the actor only visible for a certain class.

  • Weapon.SwayStyle (development version 3.2-alpha and above only)

Sway style. One of Normal, DownOnly, UpOnly, or HorizontalOnly.

  • Weapon.SwaySpeed (development version 3.2-alpha and above only)

Sway speed.

  • Weapon.ViewPitchStyle (development version 3.2-alpha and above only)

Style of view pitch offset (moving weapon sprite when looking up or down). One of Full, DownOnly, UpOnly, DownAndUp, or Centered.

  • Weapon.ViewPitchOffset (development version 3.2-alpha and above only)

Number of pixels to offset weapon sprite with view pitch offset.

  • Weapon.PreferredSkin

Forces the Player class to use a certain skin when the weapon is selected.

Damage factors

  • spawntelefrag

A separate damage factor for the initial spawn frags with maps lacking player starts. This is different from the telefrag damagefactor.

  • deadspectate

A special damage type used by SetDeadSpectator when forcing a live player to dead spectators. No obituary message is printed with this damage type.