Template:VT: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(filterclass)
mNo edit summary
 
(70 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<code><{{#switch: {{{1|}}}
{{Doc}}
|bool=[[boolean]]
<includeonly>
|int=[[integer]]
 
|Choices
<onlyinclude>{{#switch: {{language}}<!--
|choices=choices
-----------------------------------------------------------------------------------
|filterclass = [[filter]]
English
|scriptlist=[[VScript|scriptlist]]
-->| #default = <kbd><{{#switch:{{lc:{{{1|}}}}}
|script=[[VScript|script]]
| ??? = <span style="color:grey" title="Type not yet identified — check the games FGD documentation">???</span>
|studio=[[Model|model path]]
| angle = {{lx|QAngle|angle}}{{VT/{{{type|}}}rawtypelink|Vector}}
|target_source=[[targetname]]
| angles = {{lx|QAngle|angles}}{{VT/{{{type|}}}rawtypelink|Vector}}
|target_destination=[[targetname]]
| axis = axis
|vecline=[[vector]]
| bool
| boolean = {{Lx|boolean}}{{VT/{{{type|}}}rawtypelink|boolean}}
| unsigned char
| byte = {{Lx|byte}}
| byte choices = {{Lx|byte}} choices
| char = {{Lx|char}}
| char choices = {{Lx|char}} choices
| choices = choices
| rgb
| color255 = {{Lx|color255}}{{VT/{{{type|}}}rawtypelink|color32}}
| color1 = {{Lx|color1}}
| color255+int
| color255 + int = {{Lx|color255}} + {{Lx|int}}
| cubemap/texture
| cubemap / texture
| env cubemap/texture
| env cubemap / texture
| env_cubemap/texture
| env_cubemap / texture = {{Ent|env_cubemap}}/{{Lx|texture}}{{VT/{{{type|}}}rawtypelink|string}}
| ehandle = [[IO type ehandle|targetname*]]{{VT/{{{type|}}}rawtypelink|ehandle}}
| file
| filename
| filepath = file path{{VT/{{{type|}}}rawtypelink|string}}
| filter
| filterclass = {{Lx|filter}}{{VT/{{{type|}}}rawtypelink|string}}
| float = {{Lx|float}}{{VT/{{{type|}}}rawtypelink|float}}
| int
| integer = {{Lx|integer}}{{VT/{{{type|}}}rawtypelink|integer}}
| integer choices = {{Lx|integer}} choices{{VT/{{{type|}}}rawtypelink|integer}}
| int 0-10
| integer 0-10 = {{Lx|integer}} 0–10 <!-- for ambient_generic -->
| int 0-100
| integer 0-100 = {{Lx|integer}} 0–100 <!-- for ambient_generic -->
| int 0-1000
| integer 0-1000 = {{Lx|integer}} 0–1000 <!-- for ambient_generic -->
| int 0-255
| integer 0-255 = {{Lx|integer}} 0–255 <!-- for ambient_generic; not to be confused with byte -->
| material property
| property = {{Lx|Material surface properties|property}}{{VT/{{{type|}}}rawtypelink|string}}
| script
| vscript = {{Lx|VScript/script|script}}{{VT/{{{type|}}}rawtypelink|string}}
| sky
| skybox
| skyname = {{Lx|Skybox|sky name}}{{VT/{{{type|}}}rawtypelink|string}}
| rgb matrix = {{Lx|RGB}} {{Lx|matrix}}
| scriptlist = {{Lx|VScript/scriptlist|scriptlist}}{{VT/{{{type|}}}rawtypelink|string}}
| str
| string = {{Lx|string}}{{VT/{{{type|}}}rawtypelink|string}}
| string choices = {{Lx|string}} choices{{VT/{{{type|}}}rawtypelink|string}}
| model
| modelname
| model name
| modelpath
| model path
| studio = {{Lx|Model|model path}}{{VT/{{{type|}}}rawtypelink|string}}
| target
| targetname
| target_destination = {{Lx|targetname|targetname}}{{VT/{{{type|}}}rawtypelink|string}}
| target_source = {{Lx|targetname|string}}{{VT/{{{type|}}}rawtypelink|string}}
| variant = [[IO type variant|variant]]{{VT/{{{type|}}}rawtypelink|variant}}
| vec
| vecline
| vector = {{Lx|Material vector|vector}}{{VT/{{{type|}}}rawtypelink|Vector}}
| vec2
| vector2 = {{Lx|Material vector#vector2|vector2}}
| vec3
| vector3 = {{Lx|Material vector#vector3|vector3}}
| vec4
| vector4 = {{Lx|Material vector#vector4|vector4}}
| void = <span style="color:grey">void</span>
| {{#if:{{{1|}}}|{{Lx|{{{1|}}}}}|void}}
}}></kbd><!--
-----------------------------------------------------------------------------------
Croatian
-->| hr = <kbd><{{#switch:{{lc:{{{1|}}}}}
| ??? = <span style="color:grey" title="Vrsta još nije identificirana — provjerite FGD dokumentaciju igre">???</span>
| angle = {{lx|QAngle|angle}}{{VT/{{{type|}}}rawtypelink|Vector}}
| angles = {{lx|QAngle|angles}}{{VT/{{{type|}}}rawtypelink|Vector}}
| axis = axis
| bool
| boolean = {{Lx|boolean|Booleov}}{{VT/{{{type|}}}rawtypelink|boolean}}
| unsigned char
| byte = {{Lx|byte|bajt}}
| byte choices = izbor {{Lx|byte|bajtova}}
| char = {{Lx|char}}
| char choices = {{Lx|char}} izbora
| choices = izbora
| rgb
| color255 = {{Lx|color255|boja255}}{{VT/{{{type|}}}rawtypelink|color32}}
| color1 = {{Lx|color1|boja1}}
| color255+int
| color255 + int = {{Lx|color255|boja255}} + {{Lx|int|cijeli broj}}
| cubemap/texture
| cubemap / texture
| env cubemap/texture
| env cubemap / texture
| env_cubemap/texture
| env_cubemap / texture = {{Ent|env_cubemap}}/{{Lx|texture|tekstura}}{{VT/{{{type|}}}rawtypelink|string}}
| ehandle = {{Lx|IO type ehandle|targetname*}}{{VT/{{{type|}}}rawtypelink|ehandle}}
| file
| filename
| filepath = put datoteke{{VT/{{{type|}}}rawtypelink|string}}
| filter
| filterclass = {{Lx|filter}}{{VT/{{{type|}}}rawtypelink|string}}
| float = {{Lx|float}}{{VT/{{{type|}}}rawtypelink|float}}
| int
| integer = {{Lx|integer|cijeli broj}}{{VT/{{{type|}}}rawtypelink|integer}}
| integer choices = {{Lx|integer|cjelobrojni}} izbori{{VT/{{{type|}}}rawtypelink|integer}}
| int 0-10
| integer 0-10 = {{Lx|integer|cijeli broj}} 0–10 <!-- for ambient_generic -->
| int 0-100
| integer 0-100 = {{Lx|integer|cijeli broj}} 0–100 <!-- for ambient_generic -->
| int 0-1000
| integer 0-1000 = {{Lx|integer|cijeli broj}} 0–1000 <!-- for ambient_generic -->
| int 0-255
| integer 0-255 = {{Lx|integer|cijeli broj}} 0–255 <!-- for ambient_generic; not to be confused with byte -->
| material property
| property = {{Lx|Material surface properties|vlasništvo}}{{VT/{{{type|}}}rawtypelink|string}}
| script
| vscript = {{Lx|VScript/script|script}}{{VT/{{{type|}}}rawtypelink|string}}
| sky
| skybox
| skyname = {{Lx|Skybox|ime neba}}{{VT/{{{type|}}}rawtypelink|string}}
| rgb matrix = {{Lx|RGB}} {{Lx|matrix|matrica}}
| scriptlist = {{Lx|VScript/scriptlist|popis skripti}}{{VT/{{{type|}}}rawtypelink|string}}
| str
| string = {{Lx|string|niz}}{{VT/{{{type|}}}rawtypelink|string}}
| string choices = izbor {{Lx|string|nizova}}{{VT/{{{type|}}}rawtypelink|string}}
| model
| modelname
| model name
| modelpath
| model path
| studio = {{Lx|Model|put modela}}{{VT/{{{type|}}}rawtypelink|string}}
| target
| targetname
| target_destination = {{Lx|targetname|targetname}}{{VT/{{{type|}}}rawtypelink|string}}
| target_source = {{Lx|targetname|niz}}{{VT/{{{type|}}}rawtypelink|string}}
| variant = {{Lx|IO type variant|varijanta}}{{VT/{{{type|}}}rawtypelink|variant}}
| vec
| vecline
| vector = {{Lx|Material vector|vektor}}{{VT/{{{type|}}}rawtypelink|Vector}}
| vec2
| vector2 = {{Lx|Material vector#vector2|vektor2}}
| vec3
| vector3 = {{Lx|Material vector#vector3|vektor3}}
| vec4
| vector4 = {{Lx|Material vector#vector4|vektor4}}
| void = <span style="color:grey">void</span>
| {{#if:{{{1|}}}|{{Lx|{{{1|}}}}}|void}}
}}></kbd><!--
-----------------------------------------------------------------------------------
Simplified Chinese
-->|zh = <kbd><{{#switch: {{{1|}}}
|axis = 轴
|boolean
|bool =  {{L|boolean|布尔值}}
|float
|浮点型 = {{L|float|浮点型}}
|int
|整数型
|integer = {{L|integer|整数}}
|int 0-10
|integer 0-10
|整数型 0-10
|整数 0-10 = {{L|integer|整数 0-10 }}<!-- for ambient_generic -->
|int 0-100
|integer 0-100
|整数型 0-100
|整数 0-100 = {{L|integer|整数 0-100 }}<!-- for ambient_generic -->
|int 0-1000
|integer 0-1000
|整数型 0-1000
|整数 0-1000 = {{L|integer|整数 0-1000 }}<!-- for ambient_generic -->
|int 0-255
|integer 0-255
|整数型 0-255
|整数 0-255 = {{L|integer|整数 0-255 }}<!-- for ambient_generic -->
|vector = {{L|Material vector|向量}}
|vector2 = {{L|Material vector#vector2|向量2}}
|vector3 = {{L|Material vector#vector3|向量3}}
|vector4 = {{L|Material vector#vector4|向量4}}
|rgb matrix = {{L|RGB}} {{L|matrix}}
|property = {{L|Material_surface_properties|属性}}
|choices = choices
|env_cubemap / texture = {{ent|env_cubemap}} / {{L|texture|纹理}}
|color
|color255 = {{L|color255}}
|color255 + int = {{L|color255}} + {{L|int|整数}}
|float = {{L|float|浮点型}}
|filterclass = {{L|filter|过滤器}}
|scriptlist = {{L|VScript|脚本列表}}
|script = {{L|VScript|脚本}}
|string
|字符串 = {{L|String|字符串}}
|studio = {{L|Model|模型文件路径}}
|target_source = target_source
|target_destination = target_destination
|target
|targetname = {{L|targetname|目标名}}
|实体名
|目标名 = {{L|targetname|目标名}}
|vecline = {{L|vector|向量}}
|void = void
|布尔值 = {{L|boolean|布尔值}}
|纹理= {{L|texture|纹理}}
|#default = {{#if:{{{1|}}}|{{L|{{{1|}}}}}|void}}
}}></kbd><!--
-----------------------------------------------------------------------------------
Russian
-->| ru = <kbd><{{#switch:{{lc:{{{1|}}}}}
| ??? = <span style="color:grey" title="Тип не определён — проверьте документацию FGD-файлов игры">???</span>
| angle = {{Lx|QAngle|угол}}{{VT/{{{type|}}}rawtypelink|Vector}}
| angles = {{Lx|QAngle|углы}}{{VT/{{{type|}}}rawtypelink|Vector}}
| axis = {{Lx|coordinates|координаты}}
| bool
| boolean = {{Lx|boolean|булева переменная}}{{VT/{{{type|}}}rawtypelink|boolean}}
| unsigned char
| byte = {{Lx|byte|байт}}
| byte choices = {{Lx|byte|байт}} выбор
| char = {{Lx|char|символ}}
| char choices = {{Lx|char|символ}} выбор
| choices = варианты выбора
| rgb
| color255 = {{Lx|color255|цвет КЗС}}{{VT/{{{type|}}}rawtypelink|color32}}
| color1 = {{Lx|color1|цвет КЗС}} 0-1
| color255+int
| color255 + int = {{Lx|color255|цвет КЗС}} + {{Lx|integer|целое число}}
| cubemap/texture
| cubemap / texture
| env cubemap/texture
| env cubemap / texture
| env_cubemap/texture
| env_cubemap / texture = {{Ent|env_cubemap}}/{{Lx|texture|текстура}}{{VT/{{{type|}}}rawtypelink|string}}
| ehandle = [[IO type ehandle|целевой_объект*]]{{VT/{{{type|}}}rawtypelink|ehandle}}
| file
| filename
| filepath = путь файла{{VT/{{{type|}}}rawtypelink|string}}
| filter
| filterclass  =  {{Lx|filter|фильтр}}{{VT/{{{type|}}}rawtypelink|string}}
| float = {{Lx|float|число с плавающей запятой}}{{VT/{{{type|}}}rawtypelink|float}}
| int
| integer = {{Lx|integer|целое число}}{{VT/{{{type|}}}rawtypelink|integer}}
| integer choices = {{Lx|integer|целое число}} выбор{{VT/{{{type|}}}rawtypelink|integer}}
| int 0-10
| integer 0-10 = {{Lx|integer|целое число}} 0–10 <!-- для ambient_generic -->
| int 0-100
| integer 0-100 = {{Lx|integer|целое число}} 0–100 <!-- для ambient_generic -->
| int 0-1000
| integer 0-1000 = {{Lx|integer|целое число}} 0–1000 <!-- для ambient_generic -->
| int 0-255
| integer 0-255 = {{Lx|integer|целое число}} 0–255 <!-- для ambient_generic; не следует путать с байтом -->
| material property
| property = {{Lx|Material surface properties|свойство}}{{VT/{{{type|}}}rawtypelink|string}}
| script
| vscript = {{Lx|VScript/script|скрипт}}{{VT/{{{type|}}}rawtypelink|string}}
| sky
| skybox
| skyname = {{Lx|Skybox|имя неба}}{{VT/{{{type|}}}rawtypelink|string}}
| rgb matrix = {{Lx|RGB|КЗС}} {{Lx|Matrix3x4_t|матрица}}
| scriptlist = {{Lx|VScript/scriptlist|скриптлист VScript}}{{VT/{{{type|}}}rawtypelink|string}}
| str
| string = {{Lx|string|строка}}{{VT/{{{type|}}}rawtypelink|string}}
| string choices = {{Lx|string|строка}} выбор{{VT/{{{type|}}}rawtypelink|string}}
| model = {{Lx|Model|модель}}
| modelname
| model name = {{Lx|Model|имя модели}}
| modelpath
| model path
| studio = {{Lx|Model|путь к модели}}{{VT/{{{type|}}}rawtypelink|string}}
| target
| targetname
| target_destination = {{Lx|targetname|целевой объект}}{{VT/{{{type|}}}rawtypelink|string}}
| target_source = {{Lx|targetname|объект источник}}{{VT/{{{type|}}}rawtypelink|string}}
| variant = [[IO type variant|варианта]]{{VT/{{{type|}}}rawtypelink|variant}}
| vec
| vecline
| vector = {{Lx|Material vector|вектор данных}}{{VT/{{{type|}}}rawtypelink|Vector}}
| vec2
| vector2 = {{Lx|Material vector#vector2|вектор данных2}}
| vec3
| vector3 = {{Lx|Material vector#vector3|вектор данных3}}
| vec4
| vector4 = {{Lx|Material vector#vector4|вектор данных4}}
| void = <span style="color:grey">пусто</span>
| {{#if:{{{1|}}}|{{L|{{{1|}}}}}|void}}
}}></kbd><!--
-----------------------------------------------------------------------------------
French
-->| fr = <kbd><{{#switch:{{lc:{{{1|}}}}}
|bool={{L|boolean|bool}}
|booléen={{L|boolean|booléen}}
|integer={{L|integer|entier}}
|entier={{L|integer|entier}}
|float={{L|float|float}}
|string={{L|string|chaîne}}
|chaîne={{L|string|chaîne}}
|choices=les choix
|filterclass = {{L|filter}}
|scriptlist={{L|VScript|scriptlist}}
|script={{L|VScript|script}}
|studio={{L|Model|chemin du modèle}}
|target_source={{L|targetname|targetname}}
|target_destination={{L|targetname|targetname}}
|vecline={{L|vector|vecteur}}
|vecteur={{L|vector|vecteur}}
|void=void
|void=void
|#default={{#if: {{{1|}}} | [[{{{1|}}}]] | void }}
|#default = {{#if: {{{1|}}} | {{L|{{{1|}}}}} | void }}
}}></code><noinclude>
}}></kbd>
[[Category:FGD Templates]]
<!--------------------------->
</noinclude>
}}<!--End of switch --></onlyinclude>
 
</includeonly>

Latest revision as of 06:52, 1 June 2025

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Just a list template for FGD and shader parameter templates to easily link to a wide variety of variable types.

Usage

This template accepts one parameter: the name of the variable type. It outputs a specific string depending on this parameter. It is not case-sensitive.

The following table lists inputs, their results, other inputs yielding the same results, and any things to note. Case variations are not included.

Code Output Aliases Notes
{{VT|???}} <???> Unknown type, verify from FGD docs. (with hover info)
{{VT|angle}} <angle> Parsed as QAngle.
{{VT|angles}} <angles> Parsed as QAngle.
{{VT|axis}} <axis>
{{VT|bool}} <boolean> boolean FGD KV type is (in all games since Alien Swarm engine branch) (also in Garry's Mod)
Use choices instead in earlier games' FGDs, but note them as Booleans on the game pages themselves.
{{VT|byte}} <byte> unsigned char Range 0-255.
If the variable uses a regular integer with clamped range, use <integer 0–255> instead.
{{VT|byte choices}} <byte choices>
{{VT|char}} <char> Use for signed chars (-128 to 127).
{{VT|char choices}} <char choices>
{{VT|choices}} <choices> Preferably use version which indicates the actual data type parsed by the code, such as <byte choices>, <integer choices>, or <string choices>.
{{VT|color1}} <color1>
{{VT|color255}} <color255> RGB, rgb
{{VT|color255 + int}} <color255 + int> color255+int
{{VT|env_cubemap / texture}} <env_cubemap/texture> cubemap/texture, cubemap / texture, env cubemap/texture, env cubemap / texture, env_cubemap/texture, env_cubemap / texture
{{VT|ehandle}} <targetname*> IO type ehandle.
{{VT|file}} <file path> filename, filepath File path, treated as string.
{{VT|filter}} <filter> filterclass
{{VT|float}} <float>
{{VT|int}} <integer> integer Enums without explicit type use this.
{{VT|int 0-10}} <integer 0–10> For ambient_generic.
{{VT|int 0-100}} <integer 0–100> For ambient_generic.
{{VT|int 0-1000}} <integer 0–1000> For ambient_generic.
{{VT|int 0-255}} <integer 0–255> integer 0-255 For ambient_generic. Not to be confused with <byte>.
{{VT|integer}} <integer> int
{{VT|integer choices}} <integer choices> Parsed as int with selectable options.
{{VT|material property}} <property> material property Link to Material surface properties.
{{VT|RGB matrix}} <RGB matrix> Two separate links.
{{VT|script}} <script> vscript Link to Vscript.
{{VT|scriptlist}} <scriptlist>
{{VT|sky}} <sky name> skybox, skyname Link to Skybox.
{{VT|string}} <string> str
{{VT|string choices}} <string choices> String with selectable options.
{{VT|studio}} <model path> model, modelname, model name, modelpath, model path Link to Model.
{{VT|target}} <targetname> targetname, target_destination, target_source
{{VT|variant}} <variant> IO type variant.
{{VT|vector}} <vector> vecline, vec
{{VT|vector2}} <vector2> vec2 Link to Material vector#vector2.
{{VT|vector3}} <vector3> vec3 Link to Material vector#vector3.
{{VT|vector4}} <vector4> vec4 Link to Material vector#vector4.
{{VT|void}} <void> <blank> Signifies IO truly has no parameter instead of missing type.

Any other input will be a link to that input.

See also