Difference between revisions of "DECORATE"

From ECWolf Wiki
m (→‎Syntax: Updated)
 
(6 intermediate revisions by the same user not shown)
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 ''] [replaces '' otheractor ''] ['' ednum '']
+
actor '' name '' [ : '' parent ''] [ replaces '' otheractor ''] ['' ednum '']
{
+
{
    '' properties ''
+
    '' [[Actor properties|properties]] ''
    '' +/-flags ''
+
    '' +/-[[Actor flags|flags]] ''
    states
+
    states
    {
+
    {
        '' states ''
+
          '' states ''
    }
+
    }
}</pre>
+
}
  
 
A state has the following syntax:
 
A state has the following syntax:
<pre>[Label:]
+
[Label:]
    GARD ABCD 10 ['' flags ''] ['' Action ''] ['' Thinker '']
+
    GARD ABCD 10 ['' flags ''] ['' [[Action functions|Action]] '' ['' [[Action functions|Thinker]] '']]
    [goto Label|loop|wait|stop]</pre>
+
    [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.
+
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.  ECWolf also supports randomized durations in the form random(min,max).
  
 
At this time the only state flag supported is BRIGHT.
 
At this time the only state flag supported is BRIGHT.
  
== Actor Flags ==
+
== See Also ==
 
+
* [[ZDoom:DECORATE|DECORATE information on the ZDoom wiki]]
* 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:
+
[[Category:Special Lumps]]
* 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 ==
 
* [http://zdoom.org/wiki/DECORATE DECORATE information on the ZDoom wiki]
 

Latest revision as of 19:25, 7 November 2014

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. ECWolf also supports randomized durations in the form random(min,max).

At this time the only state flag supported is BRIGHT.

See Also