武器配置
Last updated
Last updated
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 Source KeyValues.
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.
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是纹理(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:
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
FX values are indexed, which you can refer to while reading the sub-headers.
特效(FX)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.
特效(FX)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.
The Boolean data type is a data type that has one of two possible values (usually denoted true and false) which is intended to represent the two truth values of logic and Boolean algebra.
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>
.
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 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
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.
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.
UI elements (basically graphical elements) are indexed in this page
图标和HUDVariables used to change the icon. The expected value is a path to material as a string.
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.
施工中
施工中
施工中
施工中