Skip to content

Visuals

Roman Chistokhodov edited this page Jan 20, 2025 · 17 revisions

Overview and reasoning

Originally in Half-Life the sprites, models and the parameters they're drawn with (like color, alpha value, etc.) are explicitly defined in the game code. This means that without changing the code the mod author can't, for example, change the color of alien controller's projectiles or parameters of vortigaunt's beams.

Featureful SDK introduces a concept of visuals which allows to modify some parameters without digging into the game code. Entities refer to visuals that can be defined in the outer file - templates/visuals.json. Each visual has a name that entities use to refer to them. Visuals define a set of properties related to rendering like the sprite/model in use, the render mode, the color and others.

Example:

{
    "Vortigaunt.ZapBeam": {
        "color": [242, 0, 213],
        "alpha": 200,
        "sprite": "sprites/xsmoke3.spr",
        "noise": 40,
        "width": 60
    },
    "Bullsquid.Spit": {
        "sprite": "sprites/e-tele1.spr",
        "scale": 0.25,
        "rendermode": "Additive",
        "alpha": 180,
        "renderfx": "Constant Glow",
        "framerate": 15.0
    }
}

This redefines the look of vortigaunts's zap beams and bullsquid's spit sprite. If some parameters are omitted, the default ones are used. This allows to configure only certain aspects of the visuals without a need for providing all parameters.

Format of visuals.json

The document is an object where each property presents a visual. Each entry in the document may have the following properties:

  • model - the model or sprite used by a visual.
  • sprite - a synonym for model.
  • rendermode - a render mode. Possible values: "Normal", "Color", "Texture", "Glow", "Solid", "Additive". As a mapper you should be familiar with render modes.
  • color - a render color.
  • alpha - render amount (opacity/brightness).
  • renderfx - a render special effect. Possible values: "Normal", "Constant Glow" (can be used with "Glow" render mode), "Distort", "Hologram", "Glow Shell".
  • scale - a scale of model/sprite. 1.0 is normal scale. Can be range.
  • framerate - the animation framerate. 0 means no animation. Animated sprites usually use 10.0 as framerate. Can be range.
  • width - how wide the beam is. The integer number between 1 and 255. Used by beams only.
  • noise - the amplitude of the beam. The integer number between 0 and 255. Used by beams only.
  • scrollrate - the scroll rate of the beam. The integer number between 0 and 255. Used by beams only.
  • life - the life (in seconds) of beams, dynamic/entity lights and some temporary sprites. Can be range.
  • radius - the dynamic/entity light radius. Used by some dynamic or entity lights. Can be range.

Some parameters are applied only to certain types of visuals (e.g. beam specific parameters are used by beams only). Defining these parameters has no effect if the visual doesn't use them.

Debugging

If you're unsure about applied visual properties, you can check them by the dump_visuals command in the console (the developer mode must be enabled and some map should be loaded).

  • Type dump_visuals to get all currently registered visuals and their properties (so e.g. if there were no Garg on a map, his visuals won't be shown).
  • Provide arguments to get only the visuals you're interested in, e.g. dump_visuals Vortigaunt.ZapBeam Vortigaunt.PowerupBeam.
  • If the provided argument ends with . the command will show all visuals starting with this string. E.g. dump_visuals Vortigaunt. Bullsquid. prints all registered visuals which names start with Vortigaunt. and Bullsquid..

Shared visuals

Some visuals act as a base for others. It means that through customization of the base visual you provide customized parameters for those visuals that depend on the base one. E.g Houndeye.WaveBase defines beam parameters (except the color) for Houndeye.Wave1, Houndeye.Wave2, Houndeye.Wave3 and Houndeye.Wave4 which define their own color on top of the base parameters. This is done to ease the configuration of some visuals. The developer still has the right to decide to configure parameters of each derived visual separately, e.g. provide a different sprite for each kind of houndeye's wave.

The list of entity visuals

All names are case-insensitive. For example Houndeye.WaveBase and houndeye.wavebase refer to the same visual.

NPC

monster_alien_controller

  • Controller.EnergyBall - energy balls attached to arms of the controller.
  • Controller.HeadOpenLight - entity light emitted when the controller's head gets open before the headball attack.
  • Controller.HeadShootLight - entity light emitted when a controller shoots its headball projectile.
  • Controller.EnergyBallLight - entity light emitted from the controller's arms when it changes/resets its energy ball brightness.
  • Controller.ZapBall - energy balls coming from arms.
  • Controller.HeadBall - big energy ball from the controller's head.
  • Controller.HeadBallBeam - a temporary beam produced when the headball hits the target.
  • Controller.HeadBallLight - entity light emitted from the headball as it travels.

Shared visuals:

  • Controller.EnergyBallBase - sprite, color and alpha shared by Controller.EnergyBall, Controller.HeadBall and Controller.ZapBall.
  • Controller.EnergyBallLightBase - color shared by Controller.HeadOpenLight, Controller.HeadShootLight and Controller.EnergyBallLight.

Notes:

  • Controller.ZapBall customizations are also applied to projectiles spawned by env_energy_ball_trap.

monster_alien_grunt

  • AlienGrunt.MuzzleFlash - temporary flash sprite played when firing a hornet.

Also uses visuals of hornet.

monster_alien_slave

  • Vortigaunt.PowerupBeam - beams produced on attack powerup.
  • Vortigaunt.PowerupLight - dynamic light emitted on attack powerup.
  • Vortigaunt.ZapBeam - attack zap beam.
  • Vortigaunt.RevivalBeam - revival beam.
  • Vortigaunt.IdleBeam - temporary beams occasionally played when vortigaunt is idle.
  • Vortigaunt.IdleLight - dynamic light occasionally emitted when vortigaunt is idle.
  • Vortigaunt.CoilBeam - ring beam produced on the coil attack.
  • Vortigaunt.HandGlow - sprites appearing on vortigaunt's hands when he uses range attacks or boosted melee attack.
  • Vortigaunt.MeleeTrailBeam - beam trail emitted from arms when vortigaunt uses a melee attack and has some spare energy.
  • Vortigaunt.SummonBeam - beams produced on summon animation.
  • Vortigaunt.SummonSprite - sprite of the summoning effect.
  • Vortigaunt.SummonLight - dynamic light emitted on summoning effect.
  • Vortigaunt.ChargeToken - charge token sprite.
  • Vortigaunt.ChargeTokenLight - entity light emitted from the charge token sprite.

Shared visuals:

  • Vortigaunt.ZapBeamColor - color shared by Vortigaunt.ZapBeam, Vortigaunt.RevivalBeam, Vortigaunt.SummonBeam, Vortigaunt.CoilBeam and Vortigaunt.HandGlow.
  • Vortigaunt.ArmBeamColor - color shared by Vortigaunt.PowerupBeam, Vortigaunt.IdleBeam and Vortigaunt.MeleeTrailBeam.
  • Vortigaunt.BeamLightColor - color shared by Vortigaunt.PowerupLight, Vortigaunt.IdleLight and Vortigaunt.SummonLight.

monster_alien_voltigore

  • Voltigore.ChargeBeam - beams played while preparing the range attack.
  • Voltigore.DeathBeam - beams played on death.

Shared visuals:

  • Voltigore.Beam - sprite, color and alpha properties shared by Voltigore.ChargeBeam and Voltigore.DeathBeam.

Bolt projectile visuals:

  • ChargedBolt.Sprite - the projectile sprite.
  • ChargedBolt.Beam - the beam accompanying the projectile. This should match Voltigore.ChargeBeam for consistent looks.
  • ChargedBolt.HitBeam - the accompanying beam when it hits something capable of getting damage. This uses a slightly different color. Should be kept in match with ChargedBolt.Beam for consistent looks.

monster_apache

  • Apache.RocketModel - apacke rocket model.
  • Apache.RocketTrail - apache rocket trailing beam.
  • Apache.FallingSmoke - smokes produced while apache is falling.
  • Apache.CrashSmoke - big smoke on crash.
  • Apache.RocketSmoke - smoke when launching rocket.
  • Apache.DamageSmoke - smoke indication of being damaged.
  • Apache.Fireball - big fireball played when apache crashes.
  • Apache.BlastCircle - wave played when apache crashes.
  • Wreckage.Smoke - smokes played after the apache crashed.

monster_babygarg

  • BabyGarg.Eye - eye sprite. Note: as brightness of the eye dynamically changes, the alpha of the visual means the maximum brightness.
  • BabyGarg.FlameBig - wider part of the flame (reddish by default). Derived from Garg.FlameBig with the smaller beam width.
  • BabyGarg.FlameSmall - narrower part of the flame (bluish by default). Derived from Garg.FlameSmall with the smaller beam width.
  • BabyGarg.FlameLight - entity light emitted on each flame update. Derived from Garg.FlameLight without changes.
  • BabyGarg.Stomp - sprites emitted by the stomp attack.

monster_bigmomma

  • BigMomma.Mortar - the spit projectile.
  • BigMomma.MortarSpray - sprite spray that comes from Big Momma when launching the spit projectile and when this projectile touches the wall.

monster_bullchicken

  • Bullsquid.TinySpit - sprites sprayed out of bullsquid mouth on spit attack.
  • Bullsquid.Spit - the spit projectile sprite.
  • Bullsquid.Fleck - sprites sprayed on the spit projectile impact with the wall.
  • Bullsquid.ToxicTinySpit - sprites sprayed out of bullsquid mouth on toxic spit attack.
  • Bullsquid.ToxicSpit - the toxic spit projectile sprite.
  • Bullsquid.ToxicFleck - sprites sprayed on the toxic spit projectile impact with the wall.
  • Bullsquid.ToxicParticle - sprites emitted from the toxic spit projectile as it flies. Note: currently can't be animated.

Shared visuals:

  • Bullsquid.TinySpitBase - defines a sprite used by Bullsquid.TinySpit, Bullsquid.ToxicTinySpit, Bullsquid.Fleck and Bullsquid.ToxicFleck.

Notes:

  • Spit customizations are also applied to env_blowercannon.

monster_floater

  • Floater.Blow - the sprite effect when the floater explodes.
  • Floater.BlowAlt - alternative sprite effect when the floater explodes. The effect is randomized between this and Floater.Blow.
  • Floater.BlowSpray - sprites sprayed out when the floater explodes.
  • Floater.BlowLight - the dynamic light produced when the floater explodes.
  • Floater.Glow - glowing sprite to use as a pair of sprites attached to the floater (when using a model with attachments).
  • Floater.GlowUnprovoked - glowing sprite when floater is set to Ignore Player and hasn't been provoked yet.
  • Floater.GlowBloating - glowing sprite when floater starts bloating.

monster_gargantua

  • Garg.Eye - eye sprite. Note: as brightness of the eye dynamically changes, the alpha of the visual means the maximum brightness.
  • Garg.FlameWide - wider part of the flame (reddish by default).
  • Garg.FlameNarrow - narrower part of the flame (bluish by default).
  • Garg.FlameLight - entity light emitted on each flame update.
  • Garg.Stomp - sprites emitted by the stomp attack.

Shared visuals:

  • Garg.FlameBase - alpha and beam scrollrate used by Garg.FlameBig and Garg.FlameSmall.

monster_houndeye

  • Houndeye.Wave1 - wave visual used when houndeye is not in squad.
  • Houndeye.Wave2 - wave visual used when houndeye is in squad of 2.
  • Houndeye.Wave3 - wave visual used when houndeye is in squad of 3.
  • Houndeye.Wave4 - wave visual used when houndeye is in squad of 4 or more.

Shared visuals:

  • Houndeye.WaveBase - sprite, life, beam parameters and alpha used by Houndeye.Wave1, Houndeye.Wave2, Houndeye.Wave3 and Houndeye.Wave4.

Note: when customizing the wave color you usually want to configure it for each wave, for the consistent looks.

monster_human_torch_ally

  • TorchGrunt.Beam - the torch beam.
  • TorchGrunt.DynLight - the dynamic light played during the cutting sequence.
  • TorchGrunt.EntLight - entity light played during the cutting sequence.

monster_nihilanth

  • NihilanthHVR.Zap - the sprite of the zap projectile.

  • NihilanthHVR.ZapBeam - the temporary beam created when the projectile hits the enemy.

  • NihilanthHVR.ZapLight - the entity light produced by the zap projectile.

  • NihilanthHVR.Teleport - the sprite of the teleport projectile.

  • NihilanthHVR.TeleportLight - the entity light produced by the teleport projectile.

  • NihilanthHVR.DyingBall - the sprite emitted when Nihilanth is dying.

  • NihilanthHVR.RechargerSphere - the sprite of the recharging spheres.

  • NihilanthHVR.AbsorbingBeam - the recharging beam.

  • NihilanthHVR.DissipationLight - the entity light produced when the recharging sphere is absorbed.

  • Nihilanth.IrritationBall

  • Nihilanth.IrritationLight

  • Nihilanth.HandLight

  • Nihilanth.DyingBeam

monster_pitdrone

  • Pitdrone.Spike - spike projectile.
  • Pitdrone.SpikeTrail - a trail beam following the projectile.
  • Pitdrone.TinySpit - sprites sprayed out of pitdrone head on spike attack.

monster_shocktrooper

  • ShockTrooper.MuzzleFlash - temporary flash sprite played when firing a shock projectile.

Also uses visuals of shock_beam and spore.

monster_tripmine

  • Tripmine.Beam - the tripmine beam.

monster_turret

  • Turret.Glow - the turret sprite (red by default).

Projectiles

displacer_ball

  • DisplacerBall.Sprite - displacer ball itself.
  • DisplacerBall.ArmBeam - beams created as the ball travels.
  • DisplacerBall.HitBeam - beam created when the ball hits something.
  • DisplacerBall.Ring - ring beam.
  • DisplacerBall.Light - dynamic light played along with the ring beam.

hornet

  • Hornet.Model - hornet itself.
  • Hornet.Trail - trail beam of the projectile (red by default).
  • Hornet.TrailAlt - trail beam of the alternative a bit faster projectile (orange by default).
  • Hornet.Puff - sprite that appears sometimes when hornet is close to the enemy.

Shared visuals:

  • Hornet.TrailBase - sprite, alpha, beam parameters and life used by Hornet.Trail and Hornet.TrailAlt.

rpg_rocket

  • RPG.Trail - trailing beam.

shock_beam

  • ShockBeam.Sprite - the sprite accompanying projectile.
  • ShockBeam.Beam1 - one of the beams attached to projectile.
  • ShockBeam.Beam2 - one of the beams attached to projectile.
  • ShockBeam.Light - dynamic light created on impact.
  • ShockBeam.Shell - render properties temporarily applied on the target.

spore

  • Spore.Model - spore itself.
  • Spore.Sprite - attached sprite.
  • Spore.Blow - sprite played on impact.
  • Spore.BlowAlt - alternative sprite played on impact.
  • Spore.Spray - spray played on impact.
  • Spore.Trail - trailing spray during the flight.
  • Spore.Light - dynamic light created on impact.

World objects

env_energy_ball_trap

  • ZapTrap.EnergyBall - the sprite of the trap. Derived from Controller.HeadBall.

item_healthcharger

  • WallHealth.Tank - the tank model (with a green liquid).

item_recharge

  • SuitRecharge.Glass - the glass model covering the electric coils.
  • SuitRecharge.Beam - the beam shown at the end of the charger's "arm".

xen_plantlight

  • XenLight.Glow - the glow sprite. If the visual is missing color, alpha or renderfx, these parameters for the glow sprite are still taken from the xen_plantlight itself (compatibility with the default behavior).