LogoLogo
简体中文
简体中文
  • 主页
  • 联系我们
  • 感谢名单
  • 维基101 - 如何开始?
    • 修改指南
      • 如何备份,解包和重新打包
      • 如何配置修改用一个工作环境
      • 修改工具
        • 如何使用RSPNVPK
        • 资源
          • 游戏目录
          • BSP
            • BSPSource
            • BSP Viewer
            • BSP2MAP
            • BSPZIP
            • EntEd
            • Entspy
            • Map Analyst
            • PackBsp
            • Pakrat
            • VBSP_h4xed
            • VIDE
            • VMEX
            • WinBSPC
            • WinBSPZip
          • Hammer
            • 位移Luxel密度
          • VTF & VMT
            • VTFEdit
            • Vtex
              • Vtex - 编译参数
              • Vtex - 疑难解答
  • 信息
    • 纹理
      • Valve纹理格式-VTF
        • 创建材质
        • 创建动画粒子
        • 修改动画粒子-Wanty的方法
      • Valve材质类型-VMT
      • 纹理和颜色
        • 颜色和纹理信息
      • 着色器
        • $basetexture
        • $color
        • $reflectivity
        • 材质标志
      • 反照率贴图
      • 凹凸贴图
        • $bumpmap
        • $ssbump
      • 立方环境贴图
      • 光照贴图
      • 矢量材质
      • 纹理映射
      • 内容丢失
      • 基础天空盒
        • 2D天空盒
        • 3D天空盒
    • 脚本
      • 关键值
        • Gameinfo.txt
        • 武器配置
      • VScript
    • 文件格式
      • NUT & GNUT-Squirrel游戏语言
      • PSD-Photoshop文档
      • TGA-Truevision图像文件
      • TXT-文本文件
      • VPK-Valve包文件
    • 文件位置
      • VPK
      • 武器
        • 武器模型
        • 武器脚本
        • 武器配置
      • 模型
        • 模型-天空背景
        • 铁驭
          • 模型-铁驭能力
          • 模型-铁驭武器
        • 泰坦
        • 模型-引导标志
        • 模型-容器
        • 模型- Fixtures
        • 模型-IMC基础
        • 模型-工业
        • 模型- 虎大前进基地_live_fire
        • 模型-NPC
        • 模型-边境防御
  • 修改
    • 武器
      • 自定义武器皮肤
        • 使用\应用自定义武器皮肤
          • VTF文件制作
        • 制作武器自定义皮肤
          • 2D图像线框渲染模式(Wireframe mode)
        • 武器自定义皮肤样例
      • 武器效果
      • 准星修改
        • 批量修改准星
        • 准星样例
      • 武器定位
      • 武器视野
      • 一键更换武器视野
      • 特殊/独特武器修改
        • 电能步枪-电弧枪
        • 电能步枪-蓄力颜色
        • LSTAR-蓄力颜色
    • 铁驭
      • 模型-铁驭类
    • 泰坦
      • 泰坦的穹顶护盾
      • 北极星
        • 线缆-钩爪和绊索陷阱
        • 电浆磁轨炮-蓄力特效
        • 北极星-重力特效
        • 北极星-铝热剂特效
      • 浪人
        • 剑封颜色
      • 军团
        • 强大火力-蓄力颜色
      • 离子
        • 镭射炮-蓄力颜色
        • 漩涡防护罩颜色
    • 地图
      • 地图-天空背景
      • 地图-立体地图
      • 战争游戏
        • 全息墙颜色
    • 用户界面
      • 游戏文本修改-r1_language
      • 游戏中
        • 计分板背景
      • 菜单
        • 暂停菜单模糊
        • 主菜单背景
        • 网路-菜单
        • 新闻和聚焦
        • 设置
          • 控制
          • 按键设置
    • 声音
      • 击杀音效
      • 大厅背景音乐
    • 杂项
      • 电缆-滑索
      • 马文机器人-胸部显示屏
      • 脉冲刀范围特效
      • 被声呐探测到的效果
      • 模型-炸蛛
      • 尼斯湖水怪模型
  • 脚本数据
    • 准星
    • 特效(FX)
    • 特效
      • 特效-铁驭
        • 特效-铁驭武器
          • 特效-突击步枪
          • 特效-冲锋枪
          • 特效-轻机枪
          • 特效-狙击步枪
          • 特效-散弹枪
          • 特效-榴弹发射器
          • 特效-副手武器和手枪
          • 特效-反泰坦武器
          • 特效-特殊武器
        • 特效-铁驭投掷物
          • 特效-电弧效果
          • 特效-飞火星
          • 特效-重力星
        • 特效-铁驭能力
      • 特效-泰坦
        • 特效-离子
        • 特效-强力
        • 特效-北极星
          • 特效-电浆轨道炮
          • 特效- Holo Railgun
          • 特效-毒蛇
        • 特效-帝王
          • 特效-Monarch Beam
        • 特效-浪人
        • 特效-烈焰
          • 特效-铝热剂发射器
          • 特效-Meteor First
          • 特效-火墙
        • 特效-军团
      • 特效-NPC和炮台
        • 特效-NPC
          • 特效-无人机
          • FX - Drone Cloak
          • FX - Drone Frag
          • FX - MRVN
          • FX - Mortar
          • FX - Holo Spectre
        • 特效-炮台
      • 特效-杂项和未知项
        • FX - Holo Map
        • FX - Beacon
        • FX - Skybox
          • FX - Skybox 1K
          • FX - Skybox Carrier
          • FX - Skybox Creature
          • FX - Skybox Nuke
          • FX - Skybox Station Traffic
        • FX - Skyway
        • FX - Dev
          • FX - Bug Repro
        • FX - Droppod
        • FX - Scan
      • 特效-原始数据
        • FX - EMP
        • FX - Env
        • FX - Grenade
        • FX - Harvester
          • FX - Coop Harvester FX
        • FX - HUD
          • FX - HUD AR FX
          • FX - HUD AR Impacts
          • FX - HUD AR Lines
          • FX - HUD AR Ordinance
          • FX - HUD AR Pings
          • FX - HUD AR Titandroppoint
        • FX - Impact
          • FX - Impact FX EXP Cutom
        • FX - Light
        • FX - Orbital Strike
        • FX - Projectile Plasma
        • FX - Reload
        • FX - Shell Eject
        • FX - Smoke
        • FX - Tracers
        • FX - Weapon
          • FX - Arc Cannon
          • FX - Dragonbreath
          • FX - Flamethrower
          • FX - Malta Gun
          • FX - Triple Threat
    • 声音
      • 声音-默认语音
      • 声音-铁驭
        • 铁驭武器
          • 突击步枪
          • 冲锋枪
          • 轻机枪
          • 狙击步枪
          • 散弹枪
          • 榴弹枪
          • 副手武器及手枪
          • 反泰坦武器
        • 铁驭投掷物
        • 铁驭能力
      • 声音-泰坦
        • 声音-离子
        • 声音-强力
        • 声音-北极星
        • 声音-帝王
        • 声音-浪人
        • 声音-烈焰
        • 声音-军团
      • 声音-无人机和NPC
        • 声音 -巨型炮塔
      • 声音-杂项和未知项
        • 声音-电弧炮
        • 声音-电弧枪
        • 声音- Flamethrower
        • 声音- Triplethreat
    • 图标和HUD
      • 菜单
        • 私房加载界面
        • 私人比赛
        • 计分板
  • 修改样例
    • 低配模式
    • 无HUD修改
  • 导出资源
    • 导出地图
    • 导出模型
    • 使用Legion的方式导出
  • 资源
    • 纹理库
Powered by GitBook
On this page
  • 介绍
  • 文件位置
  • 主页-变量(关键值)
  • 模型和动画
  • 特效(FX)
  • 弹药-直线弹道追踪
  • 弹药-抛物线弹道追踪
  • 弹药-镭射核心
  • 弹药-冲击效果
  • 蓄能效果
  • Ignition
  • 枪焰
  • Shell
  • 涡流护盾
  • 图标和菜单
  • 准星
  • HUD
  • 菜单
  • 文本
  • 参考资料及来源

Was this helpful?

  1. 信息
  2. 脚本
  3. 关键值

武器配置

PreviousGameinfo.txtNextVScript

Last updated 4 years ago

Was this helpful?

介绍

The so called weapon config files are in a text file format, so they can easily be read and edited. The format of the content is known as .

Beside being a general source of information, this page will be used as a reference point of documentation for the different aspects and uses of the weapon config files. Either by modding guides or other documentation pages.

文件位置

Weapon config files can be found in this folder relative to your VPK.

<VPK archive>\scripts\weapons

The VPK of your choice will depend of the context of your modding. If it is for multiplayer or for single player. For multiplayer purpose it will be the "Common" VPK and for other than multiplayer you will need to modify each VPK archives for their respective levels.

主页-变量(关键值)

Down below is embedded a table used as an index. All (known) variables are split in different tabs (Models, Effects, Sounds, etc.) with categories per tab. Each tab will have its own header so it can easily be browsed in the contents table. The different categories will also have their own sub headers.

模型和动画

特效(FX)

特效是粒子系统在起源引擎中的最终应用之一。 作为一种基础方法,FX是纹理(2D图形元素)和不同类型参数的结合,用以创建拥有3D视觉效果的产物,如爆炸、云、轨迹等。

At this time, there isn't an in depth reference page for the Particle System and their pcf files. The page will be included here and hyperlinked on keywords. If you would like to help, please contact us.

A different sub header will be made for the different category of variables used in the purpose of FX. The complete list of variables can be viewed from the index table in the Effect (FX) tab.

By the very nature of config files, the usage of FX can be restrictive, as they are easier to edit (the config files) but at the cost of possibilities. With that said, for anything that cannot be done from the config file, vscript files open more possibilities.

While looking at pre-existing files, the FX variables will often be around the comment:

// Effects

In KeyValues format, a comment is defined by a double forward slash, everything after will not be interpreted by the engine (Source Engine). This method is very useful to leave annotations, default values, etc. Thus making your file easier to read and / or easier to modify over time.

Note that the variables do not need to be after the // Effect comment. You can learn more about the KeyValues format here

Weapons can have different FX when they are amped. To modify this aspect, your FX variables will need to be included inside the Mods braces. Most of the time this part is already implemented, at the bottom of the weapon config file.

The following code block is what you should look for in the weapon config file. While it won't be exactly the same, it should look similar. It should include is_burn_mod in the braces

{
	"is_burn_mod"		              "1"

	//FX
	"tracer_effect"   				   	"P_wpn_tracer_BC"
	"tracer_effect_first_person"  "P_wpn_tracer_BC"
	"fx_muzzle_flash_view"			  "wpn_muzzleflash_smg_elec_FP"
	"fx_muzzle_flash_world"		  	"wpn_muzzleflash_smg_elec"
}

FX values are indexed, which you can refer to while reading the sub-headers.

<FX Value>

The expected value <FX Value> is the name of an effect from the Particle System as a string. Those names are set from pcf files (particle files)

The FX can be found in the reference index in the page down bellow.

<Attachment>

Even if the effect of this variable are not known with certainties. Here is a the list of the known values that can be used.

FX_GLOW
center
exhaust
fx_center
fx_top
muzzle_flash
muzzle_flash_scoped
muzzle_flash_suppressor_sq
muzzle_flash_l
shell
shell_l
shell_scoped
MissileAirBurst

<Boolean int> / <Boolean str>

A boolean as an integer (int) will differ from a boolean as a string (str), they are used depending on the syntax of the language. Its use varies in different areas of the engine but for the most part, in weapon config files boolean values are used in a form of intergers. Howhever there are some exeptions, those will be differenciated by either <Boolean int> or <Boolean str>.

0
1
false
true

弹药-直线弹道追踪

The FX for hitscan bullets are known as tracer effects. They will behave as intended for hitscan based weapons but will not work properly on projectile based weapons.

The tracers FX will change the aesthetics of your bullets, either for the bullet itself or the trail it leaves behind (the bullet itself being the leading graphical element as it moves in one direction) Combination are of course possible, but not from the weapon config file. (refer to the mentions under the main FX header) Different "kinds" of bullets can be achieved (energy, electric, fire, high velocity, etc.)

  • tracer_effect will set an FX to the given weapon from other entities (players & NPC's)

  • tracer_effect_first_person will set an FX only from your uses of the weapon

While modding with large quantities of FX, it is recommended to primarily focus on first person variables, thus having a lower impact on performance and being less confusing.

"tracer_effect_first_person"    <FX Value>
"tracer_effect"   							<FX Value>
"tracer_effect_first_person"    "P_wpn_tracer"
"tracer_effect"   							"P_wpn_tracer"

Tracer variables are known to not work very well with FX that are used for projectiles originally. However this is not a golden rule. Trying different kind of FX values can lead to very interesting results. Feel free to play around with them.

弹药-抛物线弹道追踪

The FX for projectile bullets are known as projectile trail effects. They will behave as intended for projectile based weapons but will not work properly on hitscan based weapons.

The projectile trail FX will change the aesthetics of your projectiles, either for the projectile itself or the trail it leaves behind (the projectile itself being the leading graphical element as it moves in one direction). Combination are of course possible, but not from the weapon config file. (refer to the mentions under the main FX header) Different "kinds" of bullets can be achieved (energy, electric, fire, high velocity, etc.)

  • projectile_trail_effect_0 will set an FX to the given weapon from other entities (players & NPC's)

  • projectile_trail_attachment the effect of this variable are unknown for now.

Note that some weapons can have the use of. Very few of them can use it, if you don't find them already in the weapon config file, it will likely have no effect

  • projectile_trail_effect_1

  • projectile_trail_effect_2

"projectile_trail_effect_0"      <FX Value>
"projectile_trail_effect_1"      <FX Value>
"projectile_trail_effect_2"      <FX Value>
"projectile_trail_attachment"    <Attachment>
"projectile_trail_effect_0"      "weapon_kraber_projectile"
"projectile_trail_effect_1"      "P_titan_sniper1"
"projectile_trail_effect_2"      "P_titan_sniper2"
"projectile_trail_attachment"    "FX_GLOW"

弹药-镭射核心

The FX for lasers are known as sustained laser effects. With the weapon config file, this category is used only for Ion's laser core. It is unlikely to get those variables to work on other weapons, to achieve similar / equivalent effects on other weapons this will have to be done from weapon script files.

^ REFERENCE GIF REQUIRED HERE ^ using this one waiting for a better one to be made

The sustained laser FX will change the aesthetics of your laser, either for the laser itself or the impact itself. Combination are of course possible, but not from the weapon config file. (refer to the mentions under the main FX header)

  • sustained_laser_effect_1p will set an FX only from your uses of the weapon

  • sustained_laser_effect_3p will set an FX to the given weapon from other entities (players & NPC's)

  • sustained_laser_attachment the effect of this variable are unknown for now.

  • sustained_laser_effect_loops the effect of this variable are unknown for now.

  • sustained_laser_impact_effect will set an FX for the laser impact.

"sustained_laser_attachment"        <ATTACHMENT>
"sustained_laser_effect_1p"         <FX Value>
"sustained_laser_effect_3p"         <FX Value>
"sustained_laser_effect_loops"      <Boolean str>  
"sustained_laser_impact_effect"     <FX Value>
"sustained_laser_attachment"        "muzzle_flash"
"sustained_laser_effect_1p"					"P_wpn_lasercannon_FP"
"sustained_laser_effect_3p"					"P_wpn_lasercannon"
"sustained_laser_effect_loops"      "false"  
"sustained_laser_impact_effect"     "P_lasercannon_endglow"

弹药-冲击效果

Those variables defines the impact animation when the bullet, laser, projectile, etc. hit a surface or an entity (player, titans, NPC's, etc.)

The variables can be added to weapons that do not have it originally. It should be noted that impact FX cannot be combined (using more than one) from the weapon config file. However this is possible with weapon script files. Reference pages will be linked from the main FX header.

You also can have different values between normal and amped modes on each weapon config files.

"impact_effect_table" 							<FX Value>
"impact_effect_table" 							"exp_defender"

蓄能效果

"charge_effect_1p"                    <FX Value>
"charge_effect_3p"                    <FX Value>
"charge_effect_attachment"            <Attachment>
"charge_effect_show_during_drain"     <Boolean int>
"charge_effect2_1p"                   <FX Value>
"charge_effect2_3p"                   <FX Value>
"charge_effect2_attachment"           <Attachment>
"charge_effect_1p"                    "P_wpn_defender_charge_FP"
"charge_effect_3p"                    "P_wpn_defender_charge"
"charge_effect_attachment"            "muzzle_flash"
"charge_effect_show_during_drain"     "0"
"charge_effect2_1p"                   "P_wpn_lasercannon_FP"
"charge_effect2_3p"                   "defender_charge_CH_dlight"
"charge_effect2_attachment"           "muzzle_flash"

Ignition

"ignition_effect"                     <Attachment>
"pre_ignition_impact_effect_table"    <FX Value>
"pre_ignition_trail_effect"           <FX Value>
"ignition_effect"                     "MissileAirBurst"
"pre_ignition_impact_effect_table"    "exp_smr"
"pre_ignition_trail_effect"           "Rocket_Smoke_SMR"

枪焰

"fx_muzzle_flash_attach"            <Attachment>
"fx_muzzle_flash_attach_scoped"     <Attachment>
"fx_muzzle_flash_view"              <FX Value>
"fx_muzzle_flash_world"             <FX Value>
"fx_muzzle_flash2_attach"           <Attachment>
"fx_muzzle_flash2_view"             <FX Value>
"fx_muzzle_flash2_world"            <FX Value>
"fx_muzzle_flash_attach"            "muzzle_flash_suppressor_sq"
"fx_muzzle_flash_attach_scoped"     "muzzle_flash_scoped"
"fx_muzzle_flash_view"              "wpn_muzzleflash_smg_elec_FP"
"fx_muzzle_flash_world"             "wpn_muzzleflash_smg_elec"
"fx_muzzle_flash2_attach"           "muzzle_flash_l"
"fx_muzzle_flash2_view"             "wpn_mflash_xo_rocket_shoulder_FP"
"fx_muzzle_flash2_world"            "P_muzzleflash_predator"

Shell

"fx_shell_eject_attach"            <Attachment>
"fx_shell_eject_attach_scoped"     <Attachment>
"fx_shell_eject_view"              <FX Value>
"fx_shell_eject_world"             <FX Value>
"fx_shell_eject2_attach"           <Attachment>
"fx_shell_eject2_view"             <FX Value>
"fx_shell_eject2_world"            <FX Value>
"fx_shell_eject_attach"            "shell"
"fx_shell_eject_attach_scoped"     "shell_scoped"
"fx_shell_eject_view"              "wpn_shelleject_rifle_large_FP"
"fx_shell_eject_world"             "wpn_shelleject_rifle_large"
"fx_shell_eject2_attach"           "shell_l"
"fx_shell_eject2_view"             "wpn_shelleject_rifle_assault_FP"
"fx_shell_eject2_world"            "wpn_shelleject_rifle_assault"

涡流护盾

"vortex_absorb_effect"                <FX Value>
"vortex_absorb_effect_third_person"   <FX Value>
"vortex_impact_effect"                <FX Value>
"vortex_absorb_effect"                "wpn_vortex_projectile_SuperSpec_FP"
"vortex_absorb_effect_third_person"   "wpn_vortex_projectile_SuperSpec"
"vortex_impact_effect"                "P_impact_xo_shield_cp"

图标和菜单

UI elements (basically graphical elements) are indexed in this page

<Icon>

If your desired weapon already has an icon RUI location allocated on your screen then it becomes fairly easy to modify. This will be the case most of the time.

Custom icons, using icons that aren't shipped with the game files is possible. A modding guide on this topic might be added in the future. If so, it will also be linked in this section of the page.

However if you would like to add an icon that does not have an RUI location allocated (basically a new location on your screen) you will have to code it.

This topic is not yet covered in the wiki. This might be added in the future. If you would like to contribute, please contact us.

In the table down bellow you will find an index with previews (partially) of the different icons. This list is not complete, there is a lot of unused icons left in the game files.

准星

施工中

HUD

"enable_hud_alert"                        <Boolean int>
"grenade_arc_impact_indicator_effect"     TODO
"grenade_arc_indicator_bounce_count"      <Int>
"grenade_arc_indicator_effect"            TODO
"grenade_arc_indicator_effect_first"      TODO
"grenade_arc_indicator_show_from_hip"     <Boolean int>
"grenade_indicator_icon_enemy"            TODO
"grenade_indicator_icon_friendly"         TODO
"grenade_show_indicator_to_owner"         <Boolean int>
"hud_grapple_indicator"                   <Boolean int>
"hud_icon"                                <Icon>
"smart_ammo_hud_lock_style"               TODO
"smart_ammo_hud_type"                     TODO
"enable_hud_alert"                        "0"
"grenade_arc_impact_indicator_effect"     "grenade_arc_impact_proto_orange"
"grenade_arc_indicator_bounce_count"      "2"
"grenade_arc_indicator_effect"            "P_grenade_arc_proto"
"grenade_arc_indicator_effect_first"      "P_grenade_arc_proto_first"
"grenade_arc_indicator_show_from_hip"     "0"
"grenade_indicator_icon_enemy"            "P_wpn_grenade_frag_blue_icon"
"grenade_indicator_icon_friendly"         "P_wpn_grenade_frag_blue_icon"
"grenade_show_indicator_to_owner"         "0"
"hud_grapple_indicator"                   "1"
"hud_icon"                                "rui/pilot_loadout/ordnance/gravity_grenade"
"smart_ammo_hud_lock_style"               "pilot_launcher"
"smart_ammo_hud_type"                     "predator_cannon"

施工中

菜单

"menu_anim_class"    <Anim Class>
"menu_category"      <Category>
"menu_icon"          <Icon>
"stat_accuracy"      <Int>
"stat_damage"        <Int>
"stat_range"         <Int>
"stat_rof"           <Int>
"menu_anim_class"    "custom"
"menu_category"      "special"
"menu_icon"          "r2_ui/menus/loadout_icons/primary_weapon/primary_r102"
"stat_accuracy"      "100"
"stat_damage"        "68"
"stat_range"         "80"
"stat_rof"           "12"

施工中

文本

施工中

参考资料及来源

The Boolean data type is a that has one of two possible values (usually denoted true and false) which is intended to represent the two of and .

Variables used to change the icon. The expected value is a path to as a string.

关键值
特效(FX)
特效(FX)
data type
truth values
logic
Boolean algebra
图标和HUD
material
https://developer.valvesoftware.com/wiki/Particle_System_Overview
https://developer.valvesoftware.com/wiki/Particles_In_Code
https://steamcommunity.com/sharedfiles/filedetails/?id=530493383
https://en.wikipedia.org/wiki/Boolean_data_type
https://developer.valvesoftware.com/wiki/Boolean
Source KeyValues
An example of tracer FX
An example of projectile FX
Icons index