This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ded:thing [2020-06-24 10:02] โ [On touch] skyjake | ded:thing [2020-06-24 10:02] (current) โ skyjake | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Thing (DED) ====== | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | < | ||
+ | Thing | ||
+ | { | ||
+ | ID = "" | ||
+ | Doomed Number = 0 | ||
+ | Name = "" | ||
+ | | ||
+ | Spawn State = "" | ||
+ | See State = "" | ||
+ | Pain State = "" | ||
+ | Melee State = "" | ||
+ | Missile State = "" | ||
+ | Crash State = "" | ||
+ | Death State = "" | ||
+ | Xdeath State = "" | ||
+ | Raise State = "" | ||
+ | | ||
+ | See Sound = "" | ||
+ | Attack Sound = "" | ||
+ | Pain Sound = "" | ||
+ | Death Sound = "" | ||
+ | Active Sound = "" | ||
+ | | ||
+ | Reaction Time = 0 | ||
+ | Pain Chance = 0 | ||
+ | Spawn Health = 0 | ||
+ | Speed = 0.0 | ||
+ | Radius = 0.0 | ||
+ | Height = 0.0 | ||
+ | Mass = 0 | ||
+ | Damage = 0 | ||
+ | Flags = "" | ||
+ | Flags2 = "" | ||
+ | Flags3 = "" | ||
+ | | ||
+ | On touch = "" | ||
+ | On death = "" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Spawn/ | ||
+ | |||
+ | A [[state]] defines what a thing will be doing and looks like at any given time in game. | ||
+ | |||
+ | The things " | ||
+ | |||
+ | The other states series are called by various actions attached to other state series. Said actions will make the thing immediately enter one of these state series. Bad guys and such will usually use all of these other state series. | ||
+ | |||
+ | |||
+ | ==== See/ | ||
+ | |||
+ | Various sounds that will be played at different times by the thing. These are all tied to either entering various state series or states with certain actions attached. | ||
+ | |||
+ | The See Sound will be played when the thing is forced to enter it's " | ||
+ | |||
+ | |||
+ | ==== Reaction Time ==== | ||
+ | |||
+ | A forced delay that determines how long a bad guy will take to first attack the player after being alerted. Note that this is canceled out if the thing enters its pain or melee state series' | ||
+ | |||
+ | |||
+ | ==== Pain Chance ==== | ||
+ | |||
+ | Whenever a bad guy is hit, it has a certain chance to enter its " | ||
+ | |||
+ | |||
+ | ==== Spawn Health ==== | ||
+ | |||
+ | How much damage the thing can take. When a things health is reduced to 0 it will automatically enter its " | ||
+ | |||
+ | |||
+ | ==== Speed ==== | ||
+ | |||
+ | How far a thing moves in the game world during every state it enters that has the '' | ||
+ | |||
+ | |||
+ | ==== Radius ==== | ||
+ | |||
+ | Radius of the thing. | ||
+ | |||
+ | |||
+ | ==== Height ==== | ||
+ | |||
+ | Height of the thing. | ||
+ | |||
+ | |||
+ | ==== Mass ==== | ||
+ | |||
+ | How much the thing will be pushed when it is hit. Higher numbers mean it won't be pushed as far. | ||
+ | |||
+ | |||
+ | ==== Damage ==== | ||
+ | |||
+ | The amount of damage the thing will do if it collides with something. This field is reserved for things with the " | ||
+ | |||
+ | |||
+ | ==== Flags ==== | ||
+ | |||
+ | Any number of flags can be attached to a thing, but not all flags will work in all games. To use more than one flag, use the following syntax: | ||
+ | |||
+ | Flags = solid | shootable | ||
+ | |||
+ | ^ Flag^ Doom^ Heretic^ Hexen^ Description | | ||
+ | | special| Yes| Yes| Yes| | | ||
+ | | solid| Yes| Yes| Yes| The thing can not be walked through. | | ||
+ | | shootable| Yes| Yes| Yes| The thing can be shot and auto-aimmed at by any weapon. | | ||
+ | | nosector| Yes| Yes| Yes| | | ||
+ | | noblockmap| Yes| Yes| Yes| | | ||
+ | | ambush| Yes| Yes| Yes| | | ||
+ | | justhit| Yes| Yes| Yes| | | ||
+ | | justattacked| Yes| Yes| Yes| | | ||
+ | | spawnceiling| Yes| Yes| Yes| The thing spawns attached to the sectors ceiling, rather than the default floor. It should be noted that if the thing doesn' | ||
+ | | nogravity| Yes| Yes| Yes| The thing is unaffected by gravity. | | ||
+ | | dropoff| Yes| Yes| Yes| Allows a non-flying thing (i.e the player) to travel off cliff' | ||
+ | | pickup| Yes| Yes| Yes| | | ||
+ | | clip| Yes| Yes| Yes| | | ||
+ | | slide| Yes| Yes| Yes| | | ||
+ | | float| Yes| Yes| Yes| The thing can fly if it also has mf_nogravity attached to it. | | ||
+ | | teleport| Yes| Yes| Yes| | | ||
+ | | missile| Yes| Yes| Yes| The thing is considered a missile. It will enter it's death state as soon as it touches another thing or floor/wall. | | ||
+ | | dropped| Yes| Yes| | | | ||
+ | | altshadow| | | Yes| The thing is rendered as near completely transparrent. | | ||
+ | | shadow| Yes| Yes| Yes| The thing is rendered as semi-transparrent. | | ||
+ | | noblood| Yes| Yes| Yes| When the the thing is hit, puff's will be spawned instead of blood splays. | | ||
+ | | corpse| Yes| Yes| Yes| | | ||
+ | | infloat| Yes| Yes| Yes| The thing is spawned at a random height between the floor and ceiling of the sector it start' | ||
+ | | countkill| Yes| Yes| Yes| This thing is counted on the kill counter at the intermission screen. | | ||
+ | | countitem| Yes| Yes| | This thing is counted on the item counter at the intermission screen. | | ||
+ | | icecorpse| | | Yes| | | ||
+ | | skullfly| Yes| Yes| Yes| | | ||
+ | | tdmatch| Yes| Yes| Yes| | | ||
+ | | translation| Yes| Yes| Yes| | | ||
+ | | transshift| Yes| Yes| Yes| | | ||
+ | | local| Yes| Yes| Yes| | | ||
+ | | brightexplode| Yes| Yes| Yes| | | ||
+ | | brightshadow| Yes| Yes| Yes| | | ||
+ | | viewalign| Yes| Yes| Yes| The thing will always be aligned to the camera. | | ||
+ | |||
+ | |||
+ | ==== Flags2 ==== | ||
+ | |||
+ | |||
+ | ^ Flag^ Doom^ Heretic^ Hexen^ Description | | ||
+ | | alwayslit| Yes| Yes| | The thing is always lit. This is the same effect as applying 327xx frame numbers to every state. | | ||
+ | | lograv| Yes| Yes| Yes| | | ||
+ | | windthrust| | Yes| Yes| The thing will be affected by wind sectors (both Heretic/ | ||
+ | | floorbounce| Yes| Yes| Yes| The thing will bouce along/off the floor/ | ||
+ | | blasted| | | Yes| | | ||
+ | | thrughost| Yes| Yes| | If attached to a missile, this will make it go through a thing with the mf_shadow flag. | | ||
+ | | fly| Yes| Yes| Yes| | | ||
+ | | footclip| Yes| Yes| Yes| If the thing enters sectors with certain floor graphics, it's graphics will be lowered by a few pixels to give the impression of it wading (i.e through water). | | ||
+ | | spawnfloat| Yes| Yes| Yes| | | ||
+ | | noteleport| Yes| Yes| Yes| The thing will not activate teleporter line types. | | ||
+ | | rip| Yes| Yes| Yes| | | ||
+ | | pushable| Yes| Yes| Yes| The thing can be pushed like Heretic' | ||
+ | | slide| Yes| Yes| Yes| | | ||
+ | | onmobj| | | Yes| | | ||
+ | | passmobj| Yes| Yes| Yes| | | ||
+ | | cantpush| Yes| Yes| Yes| | | ||
+ | | dropped| | | Yes| | | ||
+ | | boss| Yes| Yes| Yes| In Doom. Heretic and HeXen, this renders the bad guy immune to splash damage. In Heretic and HeXen no bad guy will try to fight it if struck by it andit also raises the things ascioated sound effects to max volume (i.e the sounds become unaffected by distance). | | ||
+ | | firedamage| | Yes| Yes| If a shootable thing is killed by a missile with this flag attached, it will burst into flames. | | ||
+ | | dmgthrust| Yes| Yes| Yes| | | ||
+ | | telestomp| Yes| Yes| Yes| The thing can use a teleporter line type even if something is standing on the destination (it gib's them) | | ||
+ | | floatbob| Yes| Yes| Yes| The thing will bob up and down. Note this can lead to it clipping through the floor/ | ||
+ | | dontdraw| Yes| Yes| Yes| | | ||
+ | | impact| | | Yes| | | ||
+ | | pushwall| | | Yes| | | ||
+ | | mcross| | | Yes| Things with this flag attached will actiavte standard HeXen lines with a " | ||
+ | | pcross| | | Yes| Things with this flag attached will actiavte standard HeXen lines with a " | ||
+ | | cantleavefloorpic| | | Yes| The thing can not enter sectors that are higher or lower than the one it starts in unless pushed by an attack. | | ||
+ | | nonshootable| | | Yes| The thing can't be hurt and auto-aim will not register it as a target. Some Hexen actions can turn this flag on and off in a things states. | | ||
+ | | invulnerable| | | Yes| The thing can't be hurt. Some Hexen actions can turn this flag on and off in a things states. | | ||
+ | | dormant| | | Yes| The thing will start in a " | ||
+ | | icedamage| | | Yes| If a missile has this flag attached, anything killed by it will turn into an ice statue. | | ||
+ | | seekermissile| | | Yes| | | ||
+ | | reflective| | | Yes| The thing will reflect any missile that hit's it back at it's origin. Some Hexen actions can turn this flag on and off in a things states. | | ||
+ | |||
+ | |||
+ | ==== Flags3 ==== | ||
+ | |||
+ | ^ Flag^ Doom^ Heretic^ Hexen^ Description | | ||
+ | | noinfight| Yes| Yes| Yes| Thing will not be attacked by another monster even if accidently hurt by them. But '' | ||
+ | | noblast | | | Yes | Not affected by blast damage. | | ||
+ | | nomorph | | Yes | Yes | Cannot be morphed to Chicken/ | ||
+ | |||
+ | |||
+ | ==== On touch ==== | ||
+ | |||
+ | (As of [[version: | ||
+ | |||
+ | [[:Script]] that gets run when the thing is touched. If set, this replaces any hardcoded logic that would have affected the thing. Example: | ||
+ | |||
+ | On touch = " | ||
+ | import Game; | ||
+ | print ' | ||
+ | self.startSound(' | ||
+ | Game.setMessage(' | ||
+ | return ' | ||
+ | "; | ||
+ | |||
+ | The return value of the script determines what happens to the special thing afterwards. It must be '' | ||
+ | |||
+ | ; " | ||
+ | ; " | ||
+ | ; " | ||
+ | ; " | ||
+ | |||
+ | Please note: | ||
+ | * All features of Doomsday Script are available during this callback. | ||
+ | * The special mobj being touched is referenced by //self//. | ||
+ | * The toucher mobj (e.g., the player) is referenced by // | ||
+ | * Semicolons must be used like this at the end of each line because the DED parser replaces whitespace around newlines with a single space. | ||
+ | * The entire script is inside a DED string token, which means double quotes need to escaped. Single quotes can be used normally. | ||
+ | |||
+ | |||
+ | ==== On death ==== | ||
+ | |||
+ | (Since [[version: | ||
+ | |||
+ | [[:Script]] that gets run when the thing is killed. The key difference to a script action in the Death/ | ||
+ | |||
+ | Variables available in the script: | ||
+ | * //self// is the thing that has been killed. | ||
+ | * //killer// refers to the killer. This may also be None. | ||
+ | |||
+ | See the notes of the [[#On touch]] script regarding the syntax requirements. | ||