Difference between revisions of "DECORATE"

From ECWolf Wiki
(Basic information dump)
 
m (→‎Syntax: Updated)
Line 4: Line 4:
  
 
The general format of a DECORATE script looks like this:
 
The general format of a DECORATE script looks like this:
<pre>actor '' name '' [ : '' parent ''] ['' ednum '']
+
<pre>actor '' name '' [ : '' parent ''] [replaces '' otheractor ''] ['' ednum '']
 
{
 
{
 
     '' properties ''
 
     '' properties ''
Line 16: Line 16:
 
A state has the following syntax:
 
A state has the following syntax:
 
<pre>[Label:]
 
<pre>[Label:]
     GARD ABCD 10 ['' Action ''] ['' Thinker '']
+
     GARD ABCD 10 ['' flags ''] ['' Action ''] ['' Thinker '']
     [goto Label|loop|wait]</pre>
+
     [goto Label|loop|wait|stop]</pre>
  
 
Those familiar with ZDoom will notice the addition of a ''Thinker''.  This is the same as the normal ''Action'' function, but will be executed every tic.  Note that Wolf3D runs at 70Hz instead of 35Hz so this function will essentially execute every half tic.  ECWolf uses durations in 1/35th of a second so durations of X.5 are possible.
 
Those familiar with ZDoom will notice the addition of a ''Thinker''.  This is the same as the normal ''Action'' function, but will be executed every tic.  Note that Wolf3D runs at 70Hz instead of 35Hz so this function will essentially execute every half tic.  ECWolf uses durations in 1/35th of a second so durations of X.5 are possible.
 +
 +
At this time the only state flag supported is BRIGHT.
  
 
== Actor Flags ==
 
== Actor Flags ==

Revision as of 14:08, 27 September 2012

DECORATE is a text actor defintion language based upon the language from ZDoom. DECORATE allows you to define many things such as monsters, decorations, key, and weapons.

Syntax

The general format of a DECORATE script looks like this:

actor '' name '' [ : '' parent ''] [replaces '' otheractor ''] ['' ednum '']
{
    '' properties ''
    '' +/-flags ''
    states
    {
         '' states ''
    }
}

A state has the following syntax:

[Label:]
    GARD ABCD 10 ['' flags ''] ['' Action ''] ['' Thinker '']
    [goto Label|loop|wait|stop]

Those familiar with ZDoom will notice the addition of a Thinker. This is the same as the normal Action function, but will be executed every tic. Note that Wolf3D runs at 70Hz instead of 35Hz so this function will essentially execute every half tic. ECWolf uses durations in 1/35th of a second so durations of X.5 are possible.

At this time the only state flag supported is BRIGHT.

Actor Flags

  • AMBUSH
  • ATTACKMODE
  • BONUS
  • BRIGHT
  • CANUSEWALLS
  • COUNTKILL
  • COUNTITEM
  • COUNTSECRET
  • FIRSTATTACK
  • MISSILE
  • PICKUP
  • SHOOTABLE
  • SOLID
  • VISIBLE

In addition, if you inherit from Inventory then these flags are also available:

  • INVENTORY.AUTOACTIVATE

Finally flag combination can be set by the shortcuts MONSTER and PROJECTILE.

Actor Properties

  • attacksound
  • damage
  • deathsound
  • dropitem
  • health
  • points
  • radius
  • seesound
  • sighttime
  • speed

For Inventory:

  • inventory.amount
  • inventory.icon
  • inventory.maxamount
  • inventory.missilechance
  • inventory.pickupsound

For PlayerPawn:

  • player.startitem
  • player.weaponslot

For Weapon:

  • weapon.ammogive1
  • weapon.ammotype1
  • weapon.ammouse1
  • weapon.selectionorder
  • weapon.slotnumber
  • weapon.slotpriority
  • weapon.yadjust

Action Functions

  • A_BossDeath()
  • A_CustomMissile(string missiletype)
  • A_DeathScream()
  • A_Dormant()
  • A_Fall()
  • A_Jump(int chance, state frame, ...)
  • A_Look/A_LookEx(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 180)
  • A_MeleeAttack(int damage, float accuracy = 0.6275);
  • A_PlaySound(string soundname);
  • A_SpawnItem(string type);
  • A_WolfAttack(int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, float runspeed = 160.0);
  • T_Chase(int flags = 0);

For Weapons the following are also available:

  • A_CustomPunch(int damage, bool norandom=false, int flags=0, string pufftype="", float range=0, float lifesteal=0)
  • A_GunAttack()
  • A_Lower()
  • A_Raise()
  • A_ReFire()
  • A_WeaponReady()

See Also