Overlay.txt

Overlay.txt

Description: By Desocupado - This guide describes the uses of most fields in overlay.txt

Categories: File Guides (1.1x)


[size=14] [color=Green]Overlay.txt File Guide[/size] [/color]

[color=yellow][size=8]Overview:[/size][/color]
This txt controls the overlay graphics. These graphics are usually associated with casting animations, auras, curses/buffs and states.
Used by:
[b]states.txt
skills.txt
missiles.txt
internally by the code[/b]

[color=yellow][size=8]Column Descriptions:[/size][/color]
[color=#00FF00]Overlay[/color]
This column defines the name the game will associate with your overlay in the related files.
[color=#00FF00]Filename[/color]
Where is the overlay? The game looks at[color=darkorchid] dataglobaloverlays [/color]for a dcc file.
[color=#00FF00]Version[/color]
Which game version? (0 = classic and 100 = expansion)
[color=grey]Frames[/color]
The game don't read it, instead the game reads the # of frames from the DCC file.
[color=grey]Character[/color]
Misleading, you can write on this field with no consequence if you want.
[color=#00FF00]PreDraw[/color]
Does it show behind characters/monsters? (boolean, 0 = in front of the images, 1 = behind the images)

[color=yellow][size=8]Least used Columns:[/size][/color]
[color=grey]1ofN[/color] (Default value is 1)
1ofN is for random overlay states that may set the overlay to index+rand(1ofN). I have no idea how to use it.
[color=grey]Dir[/color] (Default value is 0)
Produces no noticeable effect. You can even write on this field with no consequence if you want.
[color=grey]Open[/color] (Default values between 0 and 1)
[color=grey]Beta[/color] (Default values between 0 and 1)
None of these columns produces a noticeable effect. You can even write on this field with no consequence if you want. They are probably comment fields related to the game development.

[color=yellow][size=8]Position Settings:[/size][/color]
[i]Note: All values are in pixels.[/i]
[color=#00FF00]Xoffset [/color]
Positive values (+) place it to the left and Negative Values (-) to the right the target base.
[color=#00FF00]Yoffset[/color]
Positive values (+) place it bellow and Negative Values (-) above the target base.
[color=#00FF00]Height1, Height2 , Height3 and Height4[/color]
These values modify the placement on Y-axis according to the unit height value (monstats2).
[i]Note: If the value set on monstats2 is 0, then it uses Height2. (Thanks Nefarius for clarifying what heights are used for)[/i]
[quote]This is actually a index in an array. That refers to the four height columns in Overlays.txt
Height1, Height2, Height3, Height4
Players always use Height2
A special case, if you set OverlayHeight to 0 ( the value returned by D2Common.10090 is decremented by 1 ), the special case -1 will
use a height 75 (i.e. the default ).[/quote]
[i]Note: Testing has shown that height 4 is only used by primeevils.[/i]

[color=yellow][size=8]Animation Settings:[/size][/color]
[color=#00FF00]AnimRate[/color]
It controls how fast the animation play. Testing has show it this field controls how many frames of animation are played per 25 frames of time. i.e. number of frames per second .
[color=grey]LoopWaitTime[/color] (Default value is 0)
This column seems to produce no effect. Nefarius pointed that it is used by the game for some overlays that loop only after waiting for short period of time.
[i]Note: Only 'itemgleam, multigleam, npcalert, gleamtest3 and gleamtest4' have values on this.[/i]
[color=yellow]

[size=8]Transparency and Light Settings:[/size][/color]
[color=#00FF00]Trans[/color]
It changes the overlay color accordingly to the value is set.
0 - Faded
1 - Half Solid with small black borders
2 - Entirely Solid with small black borders
3 - Entirely Solid without black borders (black = transparent)
4 - Darkened and Transparent (like a shadow)
5 - Entirely Solid with big black borders
6 - It looks like '2'...
7 - Whitened and Entirely Solid with small black boarders (high gamma)
8 - Like '3' but it flickers
9 - It looks like '2'...
[color=#00FF00]InitRadius[/color]
It seems to control the light radius increase per frame. Never set this to 0 or less, or it crashes the game.
[color=#00FF00]Radius[/color]
Controls the maximum light radius, must be bigger or equal to InitRadius. The Light radius only expands unfortunately...
[color=#00FF00]Red, Green, Blue[/color]
They control the color of the light radius.

[color=yellow][size=8]Settings with Unknown effects:[/size][/color]
[color=grey]NumDirections[/color] (Default value is 1)
Produces no noticeable effect. You can even write on this field with no consequence if you want. The game reads the # of directions from the DCC file.
[i]Note: Only 'vulturedemonfeathers' overlay have a value of 4.[/i]
[color=grey]LocalBlood[/color]
Not used by vanilla. LocalBlood is only used if you edit [color=darkorchid]data/color.txt[/color] and set the localblood global boolean to true. What it does is replace blood colors with the entires from GreenBlood.dat.
[i]Note: In vanilla it's only used by two overlays 'durieldead_rear' and 'tentacleheadbloodripple'.[/i]

[color=yellow][size=8]Recommended Readings:[/size][/color]
MagicMatze posted a nice [url=https://d2mods.info/forum/viewtopic.php?t=23208]guide[/url] on using overlays to display a custom messages back on 2004.

Also check the File Guides for:
[url=https://d2mods.info/forum/kb/viewarticle?a=452]States.txt[/url]
[url=https://d2mods.info/forum/kb/viewarticle?a=440]Skills.txt[/url]
[url=https://d2mods.info/forum/kb/viewarticle?a=364]Missiles.txt[/url]

[color=yellow][size=8]Tips, Ideas and Suggestions:[/size][/color]
1 - You can add an overlay to almost any skill by using the 'castoverlay' column on skills.txt. You could even add the monster animation as an overlay and produce an illusion effect while it casts some spell.
2 - You can add overlays to the targets of some skills. This is done by adding the overlay to 'srvoverlay'. For example: vengeance could cause that neat overlay on [color=darkorchid]'extravengeance'[/color] easily, if you want.
3 - Some missiles hit functions allows overlays. The classic 10/X (charged bolt function) being the most prominent example.
4 - How the overlay is played depends on how it has been called. Usually only overlays used by states.txt are repeated.

Link to this article: Select all

[url=https://d2mods.info/forum/kb/viewarticle?a=465&sid=46643646bb3492891db0f8c014091dd0]Knowledge Base - Overlay.txt[/url]