Skip to content

Instantly share code, notes, and snippets.

@hemebond
Last active March 7, 2020 05:52
Show Gist options
  • Save hemebond/0fa0cb9e3702e67c4c64e1b479a61a92 to your computer and use it in GitHub Desktop.
Save hemebond/0fa0cb9e3702e67c4c64e1b479a61a92 to your computer and use it in GitHub Desktop.
DarkPlaces Quake custom particle effects
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: effectinfo
file_extensions:
- txt
scope: source.effectinfo
variables:
identifier: '\b[[:alpha:]_][[:alnum:]_]*\b'
particle_props: (underwater|notunderwater|count|countabsolute|type|blend|orientation|color|tex|sizeincrease|size|alpha|time|gravity|bounce|airfriction|liquidfriction|originoffset|velocityoffset|originjitter|velocityjitter|velocitymultiplier|trailspacing|stretchfactor|rotate)
decal_props: (staincolor|stainalpha|stainsize|staintex|stainless)
light_props: (lightradius|lightradiusfade|lighttime|lightcolor|lightshadow|lightcubemapnum)
contexts:
main:
# Comments begin with a '//' and finish at the end of the line
- match: '//.*'
scope: punctuation.definition.comment.effectinfo
push: line_comment
- match: /\*
scope: punctuation.definition.comment.c
push:
- - meta_scope: comment.block.effectinfo
- match: \*/
scope: punctuation.definition.comment.c
pop: true
- match: ^\s*(\*)(?!/)
captures:
1: punctuation.definition.comment.c
- match: ^(effect)\b
scope: entity.name.type
captures:
1: storage.type.class.effectinfo keyword.declaration.class.effectinfo
push:
- meta_scope: meta.class.effectinfo
- include: line-continuation-or-pop
- match: ':'
scope: punctuation.section.class.begin.effectinfo
pop: true
- match: "(?={{identifier}})"
push:
- meta_content_scope: entity.name.class.effectinfo
- include: entity-name-class
- match: ''
pop: true
- match: ^(underwater|notunderwater)$
scope: constant.language
- match: '\b({{particle_props}}|{{decal_props}}|{{light_props}})\b'
captures:
1: keyword.directive.effectinfo
push:
- meta_scope: punctuation.definition.variable
- match: $
pop: true
- include: values
values:
- include: variables
- match: '(0x[0-9a-fA-F]{6})'
captures:
1: constant.numeric.effectinfo
- match: '(-?[0-9\.]+)'
captures:
1: constant.numeric.effectinfo
- match: '[\t ](alphastatic|static|spark|beam|rain|raindecal|snow|bubble|blood|smoke|decal|entityparticle)'
scope: constant.language.effectinfo
- match: '[\t ](alpha|add|invmod)'
scope: constant.language.effectinfo
- match: '[\t ](billboard|oriented|beam|spark)'
scope: constant.language.effectinfo
- match: '//.*'
push: line_comment
variables:
- match: '(\$[A-Za-z0-9\_]+)\b'
scope: variable.other.nginx
line-continuation-or-pop:
- include: line-continuation
- match: (?=\s*($|;|#))
pop: true
line_comment:
- meta_scope: comment.line.effectinfo
- match: $
pop: true
entity-name-class:
- include: generic-names
generic-names:
- match: '{{identifier}}'
scope: meta.generic-name.effectinfo
// Unmodded Quake Particle Effects
//
// Some effects and values taken from
// Arcane Dimensions and Quake 1.5
//
// Default particlefont.tga indices:
// 0-7 smoke
// 8-15 decal (gradient circle with dots)
// 16-23 splatter with variable dot sizes (inverted)
// 24-31 blood splatter (small dots, inverted)
// 32 completely transparent
// 33-59 squares
// 60 lightning
// 61 droplet
// 62 bubble
// 63 circle gradient
//----------------------------------------------------------------------
// Skrag Explosion
//----------------------------------------------------------------------
effect TE_WIZSPIKE
notunderwater
count 8
type static
tex 24 32
color 0x6fff00 0xfdff00
alpha 32 128 256
originjitter 8 8 8
velocityjitter 32 32 32
size 6 10
gravity 1
bounce 1
sizeincrease 2
liquidfriction 10
lightradius 128
lightradiusfade 192
lightcolor 0.4 1 0
effect TE_WIZSPIKE
underwater
count 16
tex 24 32
blend invmod
type static
color 0x6fff00 0xfdff00
alpha 32 128 128
originjitter 4 4 4
velocityoffset 0 0 20
velocityjitter 32 32 32
size .1 .1
bounce 1
sizeincrease 10
liquidfriction 10
lightradius 128
lightradiusfade 192
lightcolor 0.4 1 0
//----------------------------------------------------------------------
// Skrag Trail
//----------------------------------------------------------------------
effect TR_WIZSPIKE
trailspacing 6
type smoke
tex 24 32
color 0x6fff00 0xfdff00
size 1 3
alpha 64 128 256
sizeincrease 2
velocityjitter 8 0 8
lightradius 64
lighttime 0
lightcolor 0.4 1 0
gravity -0
rotate 0 360 1 100
//----------------------------------------------------------------------
// Nailgun
//----------------------------------------------------------------------
effect TE_SPIKE
countabsolute 1
type decal
size 1 2
alpha 256 256 0
originjitter 6 6 6
// smoke puff
effect TE_SPIKE
count 4
tex 0 7
type smoke
color 0x101010 0x707070 // dark/light grey
size 1 4
sizeincrease 2
alpha 64 96 128 // Quickly dispate
originjitter 2 2 2
velocityjitter 8 8 8
gravity -0.05
// small sharp sparks
effect TE_SPIKE
notunderwater
count 2
type spark
tex 33 33
color 0xFFAB57 0xFFAB57
size 0.1 0.5
alpha 256 256 1536
alpha 256 256 2048
stretchfactor .4
bounce 1
gravity 0.125
originjitter 1 1 1
velocityjitter 128 128 160
// debris
effect TE_SPIKE
count 1
type alphastatic
tex 33 33
color 0x505050 0x707070
alpha 128 128 0
size 0.2 0.4
sizeincrease -0.05
bounce 1
gravity 0.5
originjitter 1 1 1
velocityjitter 32 32 64
time 2 4
liquidfriction 32
rotate 0 360 -90 90
//----------------------------------------------------------------------
// Super Nailgun
//----------------------------------------------------------------------
effect TE_SUPERSPIKE
countabsolute 1
type decal
size 3 3
alpha 256 256 0
originjitter 6 6 6
// smoke puff
effect TE_SUPERSPIKE
count 1
tex 0 8
type smoke
color 0x101010 0x707070 // dark/light grey
size 4 6
sizeincrease 2
alpha 64 96 128 // Quickly dispate
originjitter 2 2 2
velocityjitter 8 8 8
gravity -0.05
// small sharp sparks
effect TE_SUPERSPIKE
notunderwater
count 8
type spark
tex 33 33
color 0xFFAB57 0xFFAB57
size 0.1 0.5
alpha 256 256 1536
alpha 256 256 2048
stretchfactor .4
bounce 1
gravity 0.125
originjitter 1 1 1
velocityjitter 128 128 160
// debris
effect TE_SUPERSPIKE
count 2
type alphastatic
tex 33 33
color 0x505050 0x707070
alpha 128 128 0
size 0.4 0.8
sizeincrease -0.1
bounce 1
gravity 0.5
originjitter 1 1 1
velocityjitter 32 32 64
time 2 4
liquidfriction 32
rotate 0 360 -90 90
//----------------------------------------------------------------------
// Shotgun
//----------------------------------------------------------------------
effect TE_GUNSHOT
countabsolute 1
type decal
blend add
size 2 4
alpha 64 192 0
originjitter 6 6 6
// bubbles
effect TE_GUNSHOT
underwater
type bubble
tex 62 62
count 1
color 0x101010 0x808080 // Dark/Light Grey
size 1 2
alpha 96 256 64
originjitter 2 2 2
velocityjitter 8 8 8
gravity -0.125
bounce 0.1
liquidfriction 0.25
// smoke puff
effect TE_GUNSHOT
count 1
tex 0 8
type smoke
color 0x101010 0x707070 // dark/light grey
size 4 6
sizeincrease 2
alpha 64 96 128 // Quickly dispate
originjitter 2 2 2
velocityjitter 8 8 8
gravity -0.05
rotate 0 360 -90 90
// small sharp sparks
effect TE_GUNSHOT
notunderwater
count 2
type spark
tex 33 33
color 0xFFAB57 0xFFAB57
size 0.25 0.5
alpha 256 256 1536
alpha 256 256 3072
stretchfactor .4
bounce 1
gravity 0.125
originjitter 1 1 1
velocityjitter 128 128 160
// debris
effect TE_GUNSHOT
count 2
type alphastatic
tex 33 33
color 0x505050 0x707070
alpha 128 128 0
size 0.4 0.8
sizeincrease -0.1
bounce 1
gravity 0.5
originjitter 1 1 1
velocityjitter 32 32 64
time 2 4
liquidfriction 32
//----------------------------------------------------------------------
// Rocket and Grenade Explosion
//----------------------------------------------------------------------
// scorch mark
effect TE_EXPLOSION
countabsolute 1
type decal
size 48 48
alpha 256 256 0
originjitter 40 40 40
// light
effect TE_EXPLOSION
lightradius 350
lightradiusfade 700
lightcolor 4 2 0.5
// bubbles
effect TE_EXPLOSION
underwater
count 128
type bubble
tex 62 62
color 0x404040 0x808080
size 2 2
alpha 128 256 96
gravity -0.125
bounce 0.1
liquidfriction 0.25
originjitter 16 16 16
velocityjitter 96 96 96
// large embers
effect TE_EXPLOSION
notunderwater
count 128
type static
color 0xFFAB57 0xFF0A0A
color 0xf95e0a 0xFFE700
stretchfactor 0
size 0.5 1.5
size 0.25 1
tex 0 8
tex 33 33
alpha 128 256 80
alpha 192 256 128
gravity 0.3
bounce 1
airfriction 0.5
gravity 1
liquidfriction 100
originjitter 10 10 10
velocityoffset 0 0 64
velocityjitter 512 512 320
// explosion core
effect TE_EXPLOSION
count 2
type alphastatic
color 0xffc156 0x2d2d2d
size 20 20
alpha 62 86 192
bounce -1
tex 0 7
airfriction 0.2
gravity 0.5
velocityjitter 64 64 128
velocityoffset 0 0 64
// smoke plume
effect TE_EXPLOSION
notunderwater
count 16
type smoke
color 0x101010 0x303030
size 20 40
alpha 64 128 32
bounce 1
tex 0 7
airfriction 1
liquidfriction 1
gravity -0.05
velocityjitter 128 128 256
velocityoffset 0 0 64
rotate -120 0 50 100
// small embers
effect TE_EXPLOSION
notunderwater
count 32
type spark
tex 63 63
tex 33 33
color 0xFFAB57 0xFFAB57
size 0.1 0.5
alpha 256 256 1536
alpha 192 256 128
stretchfactor 0.5
bounce 1
airfriction 5
gravity 0.25
liquidfriction 44
originjitter 1 1 1
velocityjitter 512 512 640
velocitymultiplier 1
//----------------------------------------------------------------------
// Spawn Explosion
//----------------------------------------------------------------------
effect TE_TAREXPLOSION
countabsolute 1
type decal
tex 8 16
size 48 48
alpha 256 256 0
originjitter 40 40 40
effect TE_TAREXPLOSION
lightradius 600
lightradiusfade 1200
lightcolor 1.6 0.8 2
// bubbles
effect TE_TAREXPLOSION
underwater
count 128
type bubble
tex 62 62
color 0x404040 0x808080
size 2 2
alpha 128 256 64
gravity -0.125
bounce 0.1
liquidfriction 0.25
originjitter 16 16 16
velocityjitter 96 96 96
// smoke plume
effect TE_TAREXPLOSION
notunderwater
count 4
type smoke
color 0x6304f9 0x4f43d6
size 20 40
alpha 64 128 128
bounce 1
tex 0 7
airfriction 1
liquidfriction 1
gravity -0.05
velocityjitter 128 128 256
velocityoffset 0 0 64
rotate -120 0 50 100
// globs
effect TE_TAREXPLOSION
count 128
type static
//tex 33 33
color 0x6304f9 0x4f43d6
alpha 64 256 32
originjitter 8 8 8
velocityjitter 32 32 32
size 16 32
size 1 4
gravity 1
bounce 1
liquidfriction 10
velocityjitter 64 64 96
velocityjitter 256 256 320
velocityoffset 0 0 32
// small globs
effect TE_TAREXPLOSION
count 128
type spark
tex 33 33
color 0x6304f9 0x4f43d6
size 0.1 0.5
alpha 192 256 128
stretchfactor 0.5
bounce 1
airfriction 5
gravity 0.25
liquidfriction 10
originjitter 1 1 1
velocityjitter 512 512 640
velocitymultiplier 1
//----------------------------------------------------------------------
// Blood Explosion
//----------------------------------------------------------------------
effect TE_BLOOD
count 0.333
type blood
tex 24 31
size 8 8
alpha 256 256 64
bounce -1
airfriction 1
//liquidfriction 4
liquidfriction 8
velocityjitter 64 64 64
velocitymultiplier 1
gravity 1
bounce 1
//----------------------------------------------------------------------
// Chthon Eruption
//----------------------------------------------------------------------
effect TE_LAVASPLASH
count 128
type static
color 0xf95e0a 0xFFE700
color 0x6f0f00 0xe3974f
size 10 20
tex 17 23
tex 0 7
alpha 128 256 32
gravity 0.3
bounce 1
airfriction 1
gravity -0.0125
originoffset 0 0 16
originjitter 128 128 0
velocityoffset 0 0 0
velocityjitter 128 128 32
// slow-falling embers
effect TE_LAVASPLASH
count 256
type static
color 0xFFAB57 0xFF0A0A
color 0xf95e0a 0xFFE700
size 1 4
alpha 64 256 4
gravity 0.3
bounce 1
airfriction 1
gravity 0.01
liquidfriction 100
originoffset 0 0 16
originjitter 128 128 0
velocityoffset 0 0 256
velocityjitter 128 128 256
//----------------------------------------------------------------------
// Teleport Explosion
//----------------------------------------------------------------------
effect TE_TELEPORT
count 112
type static
color 0xA0A0A0 0xFFFFFF
size 10 10
alpha 64 128 256
airfriction 1
liquidfriction 4
originoffset 0 0 28
originjitter 16 16 28
velocityjitter 0 0 256
//----------------------------------------------------------------------
// Rocket Trail
//----------------------------------------------------------------------
// smoke trail
effect TR_ROCKET
notunderwater
trailspacing 1
type smoke
color 0x303030 0x606060
tex 0 8
size 3 6
alpha 4 32 64
lightradius 128
lighttime 0
lightcolor 3.0 1.5 0.5
// flame trail
effect TR_ROCKET
trailspacing 3
type static
color 0x801010 0xFFA020
tex 0 8
size 3 3
alpha 144 144 700
velocityjitter 20 20 20
velocitymultiplier -0.25
// bubble trail
effect TR_ROCKET
underwater
trailspacing 3
type bubble
tex 62 62
color 0x404040 0x808080
size 1 2
sizeincrease -0.5
alpha 64 256 64
gravity -0.125
bounce 0.1
liquidfriction 0.25
velocityjitter 16 16 16
//----------------------------------------------------------------------
// Grenade Trail
//----------------------------------------------------------------------
effect TR_GRENADE
notunderwater
count 40
tex 63 63
tex 33 33
type smoke
color 0x424242 0x333333
stretchfactor 0
size .6 1.6
alpha 0 256 90
bounce -1
airfriction 1
gravity -0.06
liquidfriction 5
originjitter 5 5 0
originoffset 0 0 0
velocityjitter 5 5 -10
// bubble trail
effect TR_GRENADE
underwater
trailspacing 6
type bubble
tex 62 62
color 0x404040 0x808080
size 2 2
alpha 64 256 64
gravity -0.125
bounce 0.1
liquidfriction 0.25
velocityjitter 16 16 16
//----------------------------------------------------------------------
// Blood Trail
//----------------------------------------------------------------------
effect TR_BLOOD
trailspacing 16
type blood
color 0xFFFFFF 0xFFFFFF
tex 24 32
size 8 8
alpha 384 384 192
bounce -1
airfriction 1
liquidfriction 4
velocityjitter 64 64 64
velocitymultiplier 0.5
effect TR_SLIGHTBLOOD
trailspacing 32
type blood
color 0xFFFFFF 0xFFFFFF
tex 24 32
size 8 8
alpha 384 384 192
bounce -1
airfriction 1
liquidfriction 4
velocityjitter 64 64 64
velocitymultiplier 0.5
//----------------------------------------------------------------------
// Hell Knight Trail
//----------------------------------------------------------------------
// small sparks
effect TR_KNIGHTSPIKE
notunderwater
trailspacing 1
count 1
type snow
color 0x7f1707 0xe7ab5f // Red/Orange picked from projectile palette
size 1 1
sizeincrease -1
gravity 0
time 0.5 1
velocityjitter 16 16 16
originjitter 4 4 4
// slow-falling stretched particles
effect TR_KNIGHTSPIKE
notunderwater
count 3
type spark
color 0xFFAB57 0xFF0A0A
stretchfactor 0
size 1 2
alpha 64 256 160
gravity 0.3
bounce 1
airfriction 0.5
gravity 0.05
liquidfriction 5
originjitter 0 0 0
velocityjitter 50 50 50
rotate 0 360 1000 1000
// smokey flame trail
effect TR_KNIGHTSPIKE
trailspacing 3
type static
color 0x801010 0xFFA020
size 5 1
alpha 10 20 15
velocityjitter 25 25 25
airfriction 3
liquidfriction 3
// bubble trail
effect TR_KNIGHTSPIKE
trailspacing 9
type bubble
tex 62 62
color 0x404040 0x808080
size 2 2
alpha 64 256 128
gravity -0.125
bounce 1.5
liquidfriction 0.25
originjitter 16 16 16
velocityjitter 96 96 96
//----------------------------------------------------------------------
// Hell Knight Explosion
//----------------------------------------------------------------------
effect TE_KNIGHTSPIKE
countabsolute 1 // Only one per particle emitter
type decal
tex 0 8
size 3 9 // Large decal
alpha 32 96 0 // Variable alpha
originjitter 6 6 6
effect TE_KNIGHTSPIKE
countabsolute 1 // Only one per particle emitter
type decal
size 1 6 // variable size
alpha 1024 1024 0
lightradius 64 // Small light
lightradiusfade 64 // gentle fade
lightshadow 0
lightcolor 1 0.75 0 // hot yellow glow
effect TE_KNIGHTSPIKE
tex 0 8
notunderwater
count 512
type alphastatic
color 0x903010 0xFFD030
size 1 6
alpha 0 128 512
gravity -0.1
airfriction 6
velocityoffset 0 0 32
velocityjitter 384 384 384
effect TE_KNIGHTSPIKE
tex 0 8
notunderwater
count 512
type static
color 0x903010 0xFFD030
size 0.1 0.2
alpha 0 256 256
gravity 0.1
airfriction 6
liquidfriction 12
velocityoffset 0 0 32
velocityjitter 162 162 162
// lingering flame
effect TE_KNIGHTSPIKE
tex 0 8
count 16
type smoke
//color 0x101010 0x606060
color 0x903010 0xFFD030
size 6 8
alpha 64 128 128
gravity -0.05
liquidfriction 1
originjitter 16 16 16
velocityjitter 16 16 16
// bubbles
effect TE_KNIGHTSPIKE
underwater
count 64
type bubble
tex 62 62
color 0x404040 0x808080
size 2 2
alpha 64 256 128
gravity -0.125
bounce 1.5
liquidfriction 0.25
originjitter 8 8 8
velocityjitter 64 64 64
//----------------------------------------------------------------------
// Vore Trail
//----------------------------------------------------------------------
effect TR_VORESPIKE
lightradius 64
lighttime 0
lightcolor 0.3 0.1 0.2
// floaters
effect TR_VORESPIKE
trailspacing 1
count 1
type snow
tex 33 33
color 0x502030 0x502030
size 1 2
sizeincrease -1
gravity 0
time 0.5 2
velocityjitter 16 16 16
originjitter 4 4 4
// sparkles
effect TR_VORESPIKE
trailspacing 1
type spark
tex 33 33
stretchfactor 0.25
color 0x502030 0x502030
size 0.5 1.0
alpha 192 256 1024
gravity 0.05
originjitter 8 8 8
velocityjitter 256 256 256
// smokey trail
effect TR_VORESPIKE
trailspacing 3
type smoke
color 0x502030 0x502030
size 5 10
alpha 10 20 15
velocityjitter 25 25 25
airfriction 3
liquidfriction 3
This file has been truncated, but you can view the full file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment