物品大纲

From Team Fortress Wiki
Jump to: navigation, search
有关Steam 网页 API和 GetSchema 的详细技术文档,请参见网页 API

物品大纲(item schema)是《军团要塞 2》的资源,它定义了所有现有的物品和分配给它们的属性。游戏客户端可以在界面的各种菜单中访问物品大纲,包括曼恩公司商店目录以及玩家的背包。大纲中的每个物品都被描述为作为具有各种不同的 key 值的对象,分别表示它们的名称、类型、槽位、可被装备的兵种,以及其功能(如,能否使用油漆桶名称标签)。所有key值在网页API/GetSchema中均有详细列出。


In addition to the standard item schema, the schema version pulled by the game client is known as the 'client schema'. The client schema is obtained in VDF format for parsing by the game engine, and includes other details not in the standard schema, such as equip regions, attached weapon sounds, and bodygroups for each item. Both versions of the item schema include definitions of all item attributes, item sets, particle effects and item levels and ranks for Strange weapons and cosmetics.

The client schema is stored locally on both the client and the server as tf/scripts/items/items_game.txt. The client and server load this copy of the schema on startup. Once connected, the item server sends the client and server a URL where the most recent schema can be downloaded, which the client and server then download and use. Subsequent updates to the schema are handled through the item server in this way. As of the 2014年10月15日补丁, items_game.txt is protected by a digital signature and neither the client nor the server will start up if it has been modified.

参见