Template:KV BaseEntity/doc/zh: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Documentation subpage:zh-cn}}
{{Doc/subpage}}
本模板最后由[[User:1416006136|大康]]更新于2022年6月4日。
----
继承{{ent|CBaseEntity}}的所有相关[[keyvalues|键值]]的信息持有者[[File:Cpp.png|link=Wikipedia:C++|alt=C++]] 。模板参数对于显示适当的信息至关重要,因为这些年来新游戏增加了新功能。有关命名参数的更多信息,请参见 [[Help:Templates]]。
继承{{ent|CBaseEntity}}的所有相关[[keyvalues|键值]]的信息持有者[[File:Cpp.png|link=Wikipedia:C++|alt=C++]] 。模板参数对于显示适当的信息至关重要,因为这些年来新游戏增加了新功能。有关命名参数的更多信息,请参见 [[Help:Templates]]。


此处并未涵盖{{ent|CBaseEntity}}的所有键值。但是您可以在 [[Template:KV BaseEntity/doc/Uncovered_Keyvalues|Uncovered Keyvalues]] 页面看到它们。
此处并未涵盖{{ent|CBaseEntity}}的所有键值。但是你可以在 [[Template:KV BaseEntity/doc/Uncovered_Keyvalues|Uncovered Keyvalues]] 页面看到它们。


{{note:zh-cn|编辑此模板后,请确保您还编辑了目标实体的页面。出于技术原因,“每个游戏”的键值可能会重复。参见 [[FGD Template Prototype]]。}}
{{note|编辑此模板后,请确保你还编辑了目标实体的页面。出于技术原因,''每个游戏''的键值可能会重复。参见 [[FGD Template Prototype]]。}}


== 用法 ==
== 用法 ==
这些必须以特定的语法使用!——所有参数的值都必须为 1,例如:
这些必须以特定的语法使用!——所有参数的值都必须为 1,例如:
<code>l4d2=1</code>. 一次可以使用''Only Once''游戏参数。
<code>l4d2=1</code>''一次''只能使用一个游戏参数。
<pre>
<pre>
{{KV BaseEntity:zh-cn|l4d2=1}}
{{KV BaseEntity|l4d2=1}}
</pre>
</pre>


=== 参数 ===
=== 参数 ===
如果您将参数字段留空(不使用参数),模板将自动回退以显示当前默认游戏的键值。
如果你将参数字段留空(不使用参数),模板将自动回退以显示当前默认游戏的键值。


此模板的所有参数:
此模板的所有参数:
Line 25: Line 27:
*<code>l4d</code>- <strike>(DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)</strike>
*<code>l4d</code>- <strike>(DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)</strike>
*<code>tf2</code>- <strike>(DEPRECATED 20/4/2021: Was only used to show<code>TeamNum</code>keyvalue's TF2 specific information. Use {{tl|KV TeamNum}} instead.)</strike>
*<code>tf2</code>- <strike>(DEPRECATED 20/4/2021: Was only used to show<code>TeamNum</code>keyvalue's TF2 specific information. Use {{tl|KV TeamNum}} instead.)</strike>
| 显示已弃用的: }}
| 已弃用的内容: }}


有关示例,请参阅[[#Examples|示例]]部分。
有关示例,请参阅[[#示例|示例]]部分。


== 示例 ==
== 示例 ==
=== 显示特定于游戏的信息 {{l4d2}} ===
=== 显示特定于游戏的信息 {{l4d2}} ===
这使得仅显示与 {{l4d2}} 相关的信息。
这使得仅显示与 {{l4d2}} 相关的信息。
<pre>{{KV BaseEntity:zh-cn|l4d2=1}}</pre>
<pre>{{KV BaseEntity|l4d2=1}}</pre>
{{ExpandBox|{{KV BaseEntity:zh-cn|l4d2=1}}|将会:}}
{{ExpandBox| expandtext=显示 | collapsetext=隐藏 |{{KV BaseEntity|l4d2=1}}|将会:}}
=== 显示特定于基础引擎的信息 ===
=== 显示特定于基础引擎的信息 ===
仅显示与基础引擎相关的信息。 ({{src13}} / {{src13mp}})
仅显示与基础引擎相关的信息。 ({{src13}} / {{src13mp}})
<pre>{{KV BaseEntity:zh-cn|base=1}}</pre>
<pre>{{KV BaseEntity|base=1}}</pre>
{{ExpandBox|{{KV BaseEntity:zh-cn|base=1}}|将会:}}
{{ExpandBox| expandtext=显示 | collapsetext=隐藏 |{{KV BaseEntity|base=1}}|将会:}}
=== 显示与笔刷相关的额外信息 ===
=== 显示与笔刷相关的额外信息 ===
额外的笔刷相关的键值与此一起显示。
额外的笔刷相关的键值与此一起显示。
<pre>{{KV BaseEntity:zh-cn|brush=1}}</pre>
<pre>{{KV BaseEntity|brush=1}}</pre>
{{ExpandBox|{{KV BaseEntity:zh-cn|brush=1}}|将会:}}
{{ExpandBox| expandtext=显示 | collapsetext=隐藏 |{{KV BaseEntity|brush=1}}|将会:}}
=== 使用模板默认值 ===
=== 使用模板默认值 ===
不使用任何参数,模板回退到默认值,即最新的 Source 游戏。
不使用任何参数,模板回退到默认值,即最新的 Source 游戏。
<pre>{{KV BaseEntity:zh-cn}}</pre>
<pre>{{KV BaseEntity}}</pre>
{{ExpandBox|{{KV BaseEntity:zh-cn}}|将会:}}
{{ExpandBox| expandtext=显示 | collapsetext=隐藏 |{{KV BaseEntity}}|将会:}}


==另请参阅==
==另请参阅==

Latest revision as of 16:45, 13 August 2024

Edit-copy.png
This is a documentation subpage for Template:KV BaseEntity.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

本模板最后由大康更新于2022年6月4日。


继承CBaseEntity的所有相关键值的信息持有者C++ 。模板参数对于显示适当的信息至关重要,因为这些年来新游戏增加了新功能。有关命名参数的更多信息,请参见 Help:Templates

此处并未涵盖CBaseEntity的所有键值。但是你可以在 Uncovered Keyvalues 页面看到它们。

Note.png注意:编辑此模板后,请确保你还编辑了目标实体的页面。出于技术原因,每个游戏的键值可能会重复。参见 FGD Template Prototype

用法

这些必须以特定的语法使用!——所有参数的值都必须为 1,例如: l4d2=1一次只能使用一个游戏参数。

{{KV BaseEntity|l4d2=1}}

参数

如果你将参数字段留空(不使用参数),模板将自动回退以显示当前默认游戏的键值。

此模板的所有参数:

  • base- 不显示特定于游戏的信息,仅显示基本引擎功能。 (The Source 2013 / Source 2013 Multiplayer iteration engine)
  • l4d2- 设置特定于 求生之路2 (VScripts) 的模板键值
  • csgo- [当前默认值] 设置特定于 Counter-Strike: Global Offensive 的模板 KV(VScripts + 自动瞄准目标)
  • brush- 另外包括特定于各种笔刷的信息。对于适用于可见笔刷的额外键值,请结合使用 Template:KV visiblebrush。可以与游戏参数一起使用。
已弃用的内容:  
  • css- (DEPRECATED 10/1/18: Previously used for a notice that was thought to apply to all entities in CS:S. The purpose of this now exists in Template:PreservedEnt. This is completely removed from the template and won't affect anything.) (DEPRECATED 24/3/2021 was brought back for info specific to theteamnumkey. Use {{KV TeamNum}} instead.)
  • l4d- (DEPRECATED 9/21/18: Found out these keyvalues only work with renderable things (cpu / gpu level). They have been migrated to visiblebrush and BaseAnimating KV templates. This is completely removed from the template and won't affect anything.)
  • tf2- (DEPRECATED 20/4/2021: Was only used to showTeamNumkeyvalue's TF2 specific information. Use {{KV TeamNum}} instead.)

有关示例,请参阅示例部分。

示例

显示特定于游戏的信息 求生之路2

这使得仅显示与 求生之路2 相关的信息。

{{KV BaseEntity|l4d2=1}}
将会: 

显示特定于基础引擎的信息

仅显示与基础引擎相关的信息。 (Source 2013 / Source 2013 Multiplayer)

{{KV BaseEntity|base=1}}
将会: 

显示与笔刷相关的额外信息

额外的笔刷相关的键值与此一起显示。

{{KV BaseEntity|brush=1}}
将会: 

使用模板默认值

不使用任何参数,模板回退到默认值,即最新的 Source 游戏。

{{KV BaseEntity}}
将会: 

另请参阅

  • {{KV BaseAnimating}}
  • {{I BaseEntity}}
  • {{I BaseAnimating}}