VisualGearTypes.wiki
author Wuzzy <Wuzzy@disroot.org>
Mon, 27 May 2024 19:59:44 +0200
changeset 2270 22a964a1fe85
parent 2217 50275983a97a
permissions -rw-r--r--
Add Worms/Hedgewars taunt conversions

#summary List of all visual gear types
This is a list of available visual gear types.

For a current list of the visual gear types look at `hedgewars/uTypes.pas` at
the `TVisualGearType` enumeration: https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uTypes.pas#l115

= List of visual gear types =
== Environment ==
|| *Variable name* || *Short description* ||
|| `vgtFlake` || Theme flake ||
|| `vgtChunk` || Theme chunk (spawns when blowing up land) ||
|| `vgtCloud` || Cloud ||
|| `vgtDust` || Dust cloud (e.g. of mudball) ||
|| `vgtSplash` || Water splash ||
|| `vgtDroplet` || Water droplet ||
|| `vgtBubble` || Underwater bubble ||
|| `vgtSteam` || Steam cloud (when fire hits water) ||
|| `vgtFire` || Small decorative/harmless flame ||
|| `vgtSmoke` || Gray smoke cloud ||
|| `vgtSmokeWhite` || White smoke cloud ||

== Explosion  ==
|| *Variable name* || *Short description* ||
|| `vgtExplosion` || Small explosion (complete animation) ||
|| `vgtBigExplosion` || Big explosion (complete animation which also makes screen shake) ||
|| `vgtExplPart` || Small explosion particle, part of explosion animation ||
|| `vgtExplPart2` || Another small explosion particle, part of explosion animation ||
|| `vgtSmokeRing` || Smoke ring, part of explosion animation ||

== Weapons and projectiles ==
|| *Variable name* || *Short description* ||
|| `vgtNote` || Piano note ||
|| `vgtBeeTrace` || Random colored flower (bee particle) ||
|| `vgtEgg` || Broken egg shell particle ||
|| `vgtFeather` || Birdy's feather ||
|| `vgtSmokeTrace` || Strange smoke-like cloud from mortar ||
|| `vgtEvilTrace` || Strange red cloud from hellish hand-grenade ||
|| `vgtShell` || Bullet shell ||
|| `vgtBulletHit` || Bullet impact animation ||
|| `vgtLineTrail` || Straight shot line from e.g. desert eagle and the likes ||

== HUD ==
|| *Variable name* || *Short description* ||
|| `vgtCircle` || Simple circle. Highly configurable! ||
|| `vgtNoPlaceWarn` || Overlay when the placement of something failed ||
|| `vgtAmmo` || Briefly displays an ammo icon. Appears when collecting a crate ||
|| `vgtSmoothWindBar` || Changes the wind bar smoothly ||
|| `vgtTeamHealthSorter` || When added, updates the sorting of the team health bars ||
|| `vgtHealthTag` || Hedgehog health tag ||
|| `vgtSmallDamageTag` || Small damage tag after hog damage. ||
|| `vgtSpeechBubble` || Speech bubble with text. ||

== Misc. ==
|| *Variable name* || *Short description* ||
|| `vgtStraightShot` || Moving sprite || 

= Detailed visual gear reference =
Here you will find a (more or less) detailed references of the various possible values for the visual gears (for `SetVisualGearValues`). This is useful to customize your visual gears.

If not specified otherwise, the visual gear values have the meaning as defined in `SetVisualGearValues` (See [LuaGears]).

This section is still under construction!

== `vgtCircle` ==
A simple circle which doesn't move. It is one of the few visual gears which is not removed automatically. It can be drawn in 2 different styles. With `dX`, `dY` and `FrameTicks`, you can set the circle to pulsate in opacity.


 * `dX`: Minimum opacity (0-255)
 * `dY`: Maximum opacity (0-255)
 * `Angle`: Circle style. 1 = Radial gradient (`sprVampiric` sprite). 0 = Simple circular line
 * `FrameTicks`: Period length of opacity change. Set to `0` to disable.
 * `State`: Radius
 * `Timer`: Line thickness (only if `Angle` does not equal `1`)

== `vgtAmmo` ==
Displays an ammo icon.

 * `Frame`: !AmmoType ID of ammo to display (see [AmmoTypes])

== `vgtHealthTag` ==
A health/damage tag for hedgehogs. It shows a whole number surrounded by a simple border. `dX` and `dY` can be used for moving it around.

This is shown at the end of a turn to show the total damage received by each hedgehog in that turn, or when a hedgehog drowned.
But this visual gear is also very useful to show an arbitrary whole number on the screen.

By default, it is white and moves upwards a few pixels before it disappears. Set `dX` and `dY` to 0 to disable movement. If this visual gear was spawned below the water line (`Y>WaterLine`), it will disappear as soon  `Y-10<WaterLine` is `true` and `Timer` is ignored.

 * `Angle`: Scale ratio (only has an effect if `Frame` is non-zero). `0` or `1` = 100%
 * `Frame`: If `0`, its position is relative to the landscape. If non-zero, it will align to the screen instead
 * `State`: Number to display (must be a whole number). NOTE: Can only be set in the same tick in which it was spawned, not later
 * `Timer`: Expiration timer (not used if spawned below water line (`Y>WaterLine`))
 * `Tint`: Color of number and border
 * `Scale`: Unused. Use `Angle` for scaling instead

== `vgtSmallDamageTag` ==
NOTE: Due to a bug, this cannot currently be used in Lua scripts.

Damage indicator, displays a damage value. Hedgewars uses this as the "small" damage tag used to instantly show damage of a single hit.

Looks and behaves similar to `vgtHealthTag`, but is slightly smaller.

== `vgtSpeechBubble` ==
Displays a speech bubble with text. In Lua, you cannot change the text after this has been created. Use `HogSay` in Lua to spawn a speech bobble properly.

 * `Frame`: ID of the gear to which the speech bubble belongs
 * `FrameTicks`: Speech bubble type (`SAY_SAY`, `SAY_THINK` or `SAY_SHOUT`)
 * (Text is stored internally that cannot be accessed by Lua)

== `vgtStraightShot` ==
Displays an arbitrary sprite which moves in a random direction (can be overwritten in `dX` and `dY`) and fades out after a short time.

 * `State`: ID of the custom sprite (use an ID from [Sprites]) (default: `sprSnowDust`)
 * `Frame`: Frame of custom sprite (default: 0)
 * `FrameTicks`: Life time in milliseconds (default: random between 750 and 2000)

== `vgtLineTrail` ==
A straight thin yellowish line between two points which fades out after some time. As if a bullet has been fired. A `vgtLineTrail` has a start and an end point. The default `Timer` is too low so you must set it manually

 * `X`, `Y`: Start point of line
 * `dX`, `dY`: End point of line
 * `Timer`: Life time (default: 0)
 * `Tint`: Opacity (0-255). The color itself can't be changed