Stalker's weapon. Stalker how to change weapon parameters How to increase the lethality of weapons in Stalker

Answer from NeKeT[active]
not needed Today we will look at how you can edit weapons in the game - from characteristics to descriptions. Weapon characteristics are stored here: ...\\S.T.A.L.K.E.R\\gamedata\\config\\weapons\\w_[...].ltx Analysis of the config structure Let's take, for example, the w_g36.ltx config. It is divided into sections: The first section General information about the weapon is stored here - its class, type, links to spawn, etc. We are interested in the following lines: description = enc_weapons1_wpn-g36 - link to string_id, from which the game loads the description of this weapon. ef_main_weapon_type = 2 - the main type to which the weapon belongs ef_weapon_type = 6 - the subtype to which the weapon belongs Second section Contains modifiers that are given to the angle of view/vision range of the NPC holding this weapon in his hands: holder_range_modifier = 1.85 - how many times it increases eye_range holder_fov_modifier = 0.3 - how many times the eye_fov increases The third section Contains data about the weapon itself, its some characteristics: cost = 18000 - base price (merchants multiply it by a certain coefficient) weapon_class = assault_rifle - weapon class (here - assault rifle) ammo_mag_size = 30 - magazine size ammo_class = ammo_5.56x45_ss190, ammo_5.56x45_ap - types of cartridges used grenade_class = ammo_m209 - type of grenades used fire_modes = 1, -1 - firing modes hand_dependence = 1 - dependence on hands (?) - perhaps we are talking about swinging the barrel single_handed = 0 - whether it is held in only one hand slot = 2 - slot in the inventory animation_slot = 2 - type of animation (for a pistol/for a rifle) inv_name = wpn-g36 - a link to the name displayed in the inventory, also taken from string table, like the description inv_name_short = wpn-g36 - short name; in this case the same is used inv_weight = 3.6 - weight inv_grid_width = 5 - coordinates of the first corner of the icon in x inv_grid_height = 2 - coordinates of the first corner of the icon in y inv_grid_x = 0 - coordinates of the second corner of the icon in x inv_grid_y = 10 - coordinates of the second corner of the icon by y Fourth section The fourth section stores information about weapon wear/recoil. Almost all the parameters there are provided with comments, so I will give only the most interesting ones: cam_relax_speed = 5.7 - speed of return to the original position cam_dispersion = 0.2 - increase in angle (in degrees) with each shot fire_dispersion_condition_factor = 5 - increase in dispersion in percentage at maximum wear misfire_probability = 0.003 - probability of misfire at maximum wear misfire_condition_k = 0. 05 - threshold (in this case - 5%) after which the weapon can jam condition_shot_dec = 0.0002 - increase in wear with each shot Fifth section Many parameters are stored here, of which the most interesting are these: hit_power = 0.50, 0.54, 0.57, 0.60 - strength shot hit_impulse = 105 - bullet impulse (the force that a flying bullet transfers to the victim affects the behavior of the ragdoll body) hit_type = fire_wound - type of damage caused, in this case - bullet wounds (the parameter in single player has no effect) fire_distance = 600 - maximum distance for a shot bullet_speed = 925 - initial bullet speed hud = wpn_g36_hud - appearance of the weapon The sixth section position = -0.026, -0.132, 0.0 - position in relation to the player (?) orientation = 0, 0, 0 - direction, in which is looking at the trunk (?)

All stalker players, while playing, had a desire to improve their weapons, although in Call of Pripyat there is such an opportunity (only for money). In this article, we will consider the option of how to edit weapons yourself in S.T.A.L.K.E.R. - The shadow of Chernobyl. Now you can choose the characteristics yourself, and also make mods yourself.

Edit weapons in S.T.A.L.K.E.R. - The shadow of Chernobyl

Today we will look at how you can edit weapons in the game S.T.A.L.K.E.R. - Shadow of Chernobyl - from characteristics to description. Weapon characteristics are stored here:
...S.T.A.L.K.E.Rgamedataconfigweaponsw_[...].ltx (the file can be opened in any TXT editor)

Parsing the config structure

Let's take, for example, the w_g36.ltx config. It is divided into sections:

1 section of the config structure

General information about the weapon is stored here - its class, type, links to spawn, etc. We are interested in the following lines:
description = enc_weapons1_wpn-g36 - link to the string_id from which the game loads the description of this weapon.
ef_main_weapon_type = 2 - the main type to which the weapon belongs
ef_weapon_type = 6 - subtype to which the weapon belongs

Section 2 of the config structure

Contains modifiers that are given to the visual angle/distance of the NPC holding this weapon in his hands:
holder_range_modifier = 1.85 - how many times the eye_range increases
holder_fov_modifier = 0.3 - how many times the eye_fov increases

Section 3 of the config structure

Contains data about the weapon itself and some of its characteristics:
cost = 18000 - base price (traders multiply it by a certain coefficient)
weapon_class = assault_rifle - weapon class (here - assault rifle)
ammo_mag_size = 30 - magazine size
ammo_class = ammo_5.56x45_ss190, ammo_5.56x45_ap - types of cartridges used
grenade_class = ammo_m209 - type of grenades used
fire_modes = 1, -1 - firing modes
hand_dependence = 1 - hand dependence (?) - perhaps we are talking about barrel swinging
single_handed = 0 - whether it is held in only one hand
slot = 2 - slot in inventory
animation_slot = 2 - animation type (for pistol/rifle)
inv_name = wpn-g36 - a link to the name displayed in the inventory is also taken from the string table, as is the description
inv_name_short = wpn-g36 - short name; in this case the same thing is used
inv_weight = 3.6 - weight
inv_grid_width = 5 - x coordinates of the first corner of the icon
inv_grid_height = 2 - y coordinates of the first corner of the icon
inv_grid_x = 0 - x coordinates of the second corner of the icon
inv_grid_y = 10 - y coordinates of the second corner of the icon

Section 4 of the config structure

Contains information about weapon wear/kickback. Almost all parameters there are provided with comments, so I will give only the most interesting ones:
cam_relax_speed = 5.7 - speed of return to the starting position
cam_dispersion = 0.2 - angle increases (in degrees) with each shot
fire_dispersion_condition_factor = 5 - percentage increase in dispersion at maximum wear
misfire_probability = 0.003 - misfire probability at maximum wear
misfire_condition_k = 0.05 - threshold (in this case - 5%) after which the weapon can jam
condition_shot_dec = 0.0002 - increased wear with each shot

Section 5 of the config structure Do you like Shadow Fight 2?

Many parameters are stored here, of which the most interesting are these:
hit_power = 0.50, 0.54, 0.57, 0.60 - shot power
hit_impulse = 105 - bullet impulse (the force that a flying bullet transfers to the victim affects the behavior of the ragdoll body)
hit_type = fire_wound - the type of damage caused, in this case - bullet wounds (the parameter in single player does not affect anything)
fire_distance = 600 - maximum distance for a shot
bullet_speed = 925 - initial bullet speed
hud = wpn_g36_hud - weapon appearance

Section 6 of the config structure

position = -0.026, -0.132, 0.0 - position in relation to the player (?)
orientation = 0, 0, 0 - the direction in which the barrel is facing (?)

Section 7 of the config structure

Contains descriptions of the visual side of the weapon and some other parameters:
startup_ammo = 90 - as you might guess, the starting amount of ammo (in single player does not affect anything)
visual = weaponsg36wpn_g36.ogf - weapon model used by NPCs, as well as by the player in third-person view
ph_mass = 4 - physical mass used in calculations
scope_status = 1 - situation with a detachable sight
silencer_status = 0 - situation with a removable silencer
grenade_launcher_status = 0 - situation with a grenade launcher under the barrel
Options:
0 - no, a new one cannot be attached
1 - already there, non-removable
2 - can be attached

After changing the weapon configuration, you must restart the game (required)

After editing a weapon, you need to find it, for this there is a mod with a spawn menu where you can add any weapon, look on this page

Weapon characteristics are located in .ltx files in the configs/weapons folder. For them to appear there, the folder must be unpacked. Download the unpacker for example here
http://stalker-inside.ru/page.php?al=stalker_cop_unpacker
Follow the instructions.
All parameters given below are subject to editing.

Let's compare the regular Kalash and the G36 in terms of real characteristics. Just like a gun with a very large spread and vice versa with the smallest recoil.
LET'S COMPARE WITH REAL NUMBERS FROM CONFIGS.

Damage: (Hit_power) G36 - 0.32 / Kalash - 0.31
The initial speed of the bullet (a parameter, as I understand from the weapon upgrade configs, is directly related to “flatness”, i.e. when upgrading to flatness, it is this parameter of the weapon in the config that increases, flatness is a decrease in the bullet with increasing distance, i.e. the higher flatness, especially since the bullet flies in a “straight line”, without deviating downward with the distance traveled): (bullet_speed)
G36 - 570 / Kalash - 550
Technical rate of fire (rpm) - G36 - 630 / Kalash - 570

Below are some interesting facts that some may not know.
Weapons have different wear when firing in bursts and single shots, i.e. if you shoot the horn in single bursts or fire it all in one burst, the wear will be different.
increase in wear with a single shot: G36 - 0.0008, Kalash - 0.001 CONCLUSION! - when firing single shots, the G36 has a full resource of 1250 rounds, the Kalash - exactly 1000.
increase in wear when firing in bursts: G36 - 0.0009, Kalash - 0.0012 Conclusion - when firing in bursts, G36 has a full resource - 1111 shots, Kalash - 833.
Here in the configs the dependence of the probability of misfire on wear is also specified.
You can also make any weapon one-handed)))) And set arbitrary fire models, for example, set a cutoff for the queue, say, 7 rounds each) Well, this is already modder's troubles.

So now the most interesting part is accuracy and impact.
Accuracy is set by such a parameter as “base dispersion” - that is, the angle in degrees by which the barrel (= bullet) can deviate when the weapon is completely stationary. Consider this the barrel's own accuracy without taking into account all other factors (shooter position, recoil, etc.) That is. we shoot carefully aiming, crouching and taking a position at a certain point, so even with a single shot the bullet will deviate somewhat from this point, at a small angle, literally tenths of a degree. Accordingly, over a long distance, this deviation can lead to a miss of several centimeters and even tens of centimeters. This is precision. Those. The smaller the deviation, the better.
Basic dispersion:
For G36, the maximum deviation of the bullet from the aiming point is 0.24 degrees.
For G36, the maximum deviation of the bullet from the aiming point is 0.33 degrees.
Those. The G36 is 1.375 times more accurate than the Kalash when shooting single shots. Or, if you like, 37.5%. Decent! Let me explain once again - a Kalash bullet will deviate from the ideal trajectory almost 40% further than a G36 bullet.

Recoil! This is where these ears differ so much! And this is clearly visible from the configs:
Recoil is specified by two parameters. Scattering - i.e. deterioration in “absolute accuracy (see previous paragraph) for each shot. And “barrel lifting” when firing.
Angle in degrees by which accuracy drops after each shot: G-36 - 0.2 degrees, Kalash - 1.0
Thus, the accuracy of the first shot (see paragraph above) for the G36 was 0.24 - after the first shot, the accuracy of the second next in line will become 0.24 + 0.2 = 0.44, for Kalash - the first was 0.33 - and the second is already 1.33 !!! Those. if at the first shot the accuracy of these two guns differed by 37.5%, then at the second shot (in one burst) it was already 0.44 to 1.33 = 3 times!!! That is, the second G36 bullet flies almost like the first Kalash bullet, and the second Kalash bullet flies God knows where with a dispersion coefficient of 1.33. :weep:

Further, the configs contain an additional modifier by which the accuracy will drop with subsequent shots (in one burst)
For G36 it is 0.1, for Kalash - 0.5.
Let me explain. We have already calculated the accuracy of the first and second shots higher for the G36 and Kalash, now we can calculate the accuracy of the rest: for the G36 - the first shot (= base dispersion, see section accuracy) - 0.24, the second (the angle at which the accuracy drops after the first shot + base dispersion ) = 0.24+0.2=0.44, the accuracy of the next shots will drop constantly by 0.1 degrees (modifier for the dispersion of shots in the queue) - 0.44 + 0.1 (+0.1+0.1+0.1... etc. for each next shot), i.e. e. the third shot will have an accuracy of 0.54, the fourth 0.64, the fifth 0.74, etc.

That is, let's make a list of the accuracy of the first five shots in the queue for the G36 - 0.24/0.44/0.54/0.64/0.74
And now the same for Kalash - 0.33/1.33/1.83/2.33/2.83
What do we see? - Within the burst, the FIFTH shot of the G36 will be twice as accurate as the SECOND shot of the Kalash. And the fifth shot of the Kalash itself (dispersion coefficient 2.83) is 4 times less accurate than the fifth shot of the G36 (dispersion coefficient 0.74). And with each next shot this difference will only grow.

Now lifting the barrel up - there is a complex formula with several variables.
For those who have the patience to do the math, I’ll write it in Russian:
Barrel elevation angle with each shot = (dispersion angle with each next shot in the queue) x (barrel elevation coefficient) +\- [(dispersion angle with each subsequent shot in the queue) x (1-) barrel elevation coefficient)]
Those. the formula gives an inconsistent result and the lifting of the barrel with each burst will be different. The barrel lift coefficient for both the Kalash and the G36 is 1, and the rest of the weapons seem to be the same.
Let's roughly substitute it into the formula.
For G36 = Barrel elevation angle at first shot = (0.24) x 1 +\- [(0.24) x (1-1)] i.e. = 0.24 - the barrel will rise up 0.24 degrees after the first shot
Second shot = (0.44) x 1 +\- [(0.44)x(1-1)] i.e. = 0.44 - the barrel will rise up by 0.44 degrees after the second shot
Third = (0.54) x 1 +\- [(0.54)x(1-1)] i.e. = 0.54 - the barrel will rise up by 0.24 degrees after the third shot
the total rise of the barrel for 3 shots will be 0.24 + 0.44 + 0.54 = 1.22 degrees, and will continue to increase according to an arithmetic progression.

In short, in the second part it always turns out to be zero. And the upward recoil of the barrel is equal to the drop in accuracy with each shot. (1-1) - this modifier is made for upgrades, for example, with the upgrade “recoil - 10%” it becomes equal to = 0.9 (1- 10%)
And we get:
For G36 = Barrel elevation angle at first shot = (0.24) x 0.9 +\- [(0.24)x(1-0.9)] i.e. = 0.216 +\- 0.024 = 0.192 or 0.24 degrees
Second shot = (0.44) x 0.9 +\- [(0.44)x(1-0.9)] i.e. = 0.396 +\- 0.044 = 0.352 or 0.44 degrees
Third = (0.54) x 0.9 +\- [(0.54) x (1-0.9)] i.e. = 0.486 +\- 0.054 = 0.432 or 0.54

Thus, all recoil bursts are different - in the worst case, even with a full recoil upgrade, you can get a burst like the standard model, barrel lifting - 1.22 degrees (but the chance of this is very small). In the best case, the recoil for these three shots will be 0.192 + 0.352 + 0.432 = 0.967 degrees (versus the standard 1.22) - that is, it will be 26% less. On average, according to probability theory, half of the shots will be positive, half will be negative, and the reduction in recoil will be about 10%.

Next, so as not to tire me out, I carried out all the same calculations for three shots from a Kalash without pumping.
For the G36, the barrel elevation angle for three shots will be 1.22 degrees. For Kalash - 0.33+1.33+1.83 = 2.49 degrees, the difference is doubled.
Also for five shots - the G36 barrel will move up by 2.6 degrees, the Kalash by 8.65 degrees. Here the difference is generally more than three times, almost 4.
With large queues the difference becomes enormous.

Now we’ve disassembled two barrels into pieces) I wanted to write a short post, but I wrote a FAQ on weapon modification for modders) I’ll post it on PS. It turned out massively, I hope at least someone can handle it.
By the way, if anyone is interested, I can see the exact characteristics of other weapons. In numbers, using the formulas, do the math yourself, otherwise I’m already sweating)

If you want to discuss)

The stalker had been crawling through the contaminated area for ten minutes now. A huge gang armed with Kalash rifles was chasing him. There was practically no chance of survival; there was only one cartridge left in the pistol. An old machine gun found in a pile of radioactive trash promised only a short delay to certain death.

But the very first shot cut one of the bandits in two. The second one cut two at once. Having destroyed almost all the bandits, the stalker began to carefully study the found trunk. Strange inscription Made in Igromania on the butt and the nuclear symbols on the bolt clearly indicated that the weapon was not a simple one, but a modified one.

Stalker features mostly Soviet-made weapons. Today we will add several futuristic specimens to our arsenal. Do you want to burn enemies with lasers and wipe out mutants from the face of the earth with atomic charges? You're welcome!

Training

The developers hid all the most valuable things from prying eyes in the archives. There are eleven of them in total, and they all have the same name - gamedata. The difference is in the expansion. It looks like db*(in place of the asterisk is a number or letter, different for each file). To unpack these archives you can use the utility STALKER Data Unpacker(take her from our DVD from the “Igrostroy” section ). Using the program is easy. Copy the file to the game folder STALKER_Data_Unpacker_RU.exe, if you have a Russian version of the game, or STALKER_Data_Unpacker_EN.exe, if suddenly English, and run with the parameter: gamedata.db* [Extract directory inside the game folder](you don’t have to specify the latter - then the archive will be unpacked directly into the game directory). For example: STALKER_Data_Unpacker_RU.exe gamedata.db0 gamedata.

After you make changes to the unzipped files, create a folder in the game directory \gamedata and place them there, maintaining the hierarchy of the subdirectories in which they are located (the game will give priority to new files, not to those packed into archives). Let's say for ltx-files from the archive gamedata.db0(they describe the weapon) in the directory \config\weapons you should create a folder in the game directory \gamedata\config\weapons and put them there.

You can speed up the game loading process a little if you unpack all eleven archives into a directory <Каталог игры>\gamedata. Plus, after this all the files will be in your sight and creating mods will become more convenient.

As for the archives themselves, this time we will need gamedata.db0 And gamedata.db8. The latter is filled with textures sorted into subdirectories, including weapon textures; gamedata.db0 contains, among other things, the folder \config, filled with various configuration files (usually having the extension ltx). Those of them that are dedicated to weapons are in the subdirectory \weapons- each such file corresponds to a separate gun. The only exceptions are delayed_action_fuse.ltx And weapons.ltx(it contains the characteristics of ammunition and all sorts of gadgets for barrels).

Structure ltx-files (you can edit them in regular Notepad) is built on the following principle. All of them consist of sections, the names of which are marked with square brackets. In weapon files, as a rule, there are two of them: the first contains the combat characteristics of the barrel, the second (the name contains the abbreviation hud) is responsible for the screen of the hero armed with the specified gun.

In some cases, the parameters inside the blocks are provided with comments in Russian - you can easily figure out such attributes on your own. But most of them are still not accompanied by hints. Familiarization with the most important of these parameters will help you make the weapon you want.

cost- cost of weapons.

hit_power- weapon damage. The parameter value consists of four numbers: the first indicates the minimum damage, the last - the maximum, the middle two, respectively, intermediate.

hit_impulse- the force of shaking to which the victim is subjected.

fire_distance- range.

bullet_speed- starting speed of the bullet. This and the three previous parameters in some files have analogues with the prefix silencer_, these characteristics describe the barrel with a silencer attached to it.

hit_type- type of damage caused by the weapon. Gunshot wound - fire_wound, knife - wound And wound_2, explosion - explosion.

rpm- rate of fire.

hit_power_2- damage from an alternative attack.

hit_impulse_2- shaking of the victim attacked by an alternative blow/shot.

hit_type_2- type of damage from an alternative attack.

startup_ammo- initial number of cartridges.

ammo_limit- the maximum number of cannon cartridges that you can carry in your backpack at one time.

ammo_mag_size- clip capacity.

ammo_class- type of cartridges. The value area of ​​this and the next parameters indicates the name of the corresponding section of the file weapons.ltx.

grenade_class- the type of grenades that the cannon fires (if it, of course, is endowed with such an ability).

explode_duration- duration of the explosion (only for weapons that fire explosive shells) in seconds.

sprint_allowed- determines whether a character with this gun is able to run ( true- Yes, false- No).

inv_weight- weight.

shell_particles- a model of cartridges flying off in different directions when firing.

The following three characteristics indicate the presence of a certain addition to the trunk. Possible values: 0 - absent at all, 1 - available immediately, 2 - can be attached.

scope_status- sniper scope.

silencer_status- muffler.

grenade_launcher_status- underbarrel grenade launcher.

zoom_enabled- possibility of zooming ( true- available, false- No).

scope_zoom_factor- maximum zoom. Please note that the dependence here is inversely proportional: the higher the value of the indicator, the smaller the approximation. The same parameter, by the way, is also present in the file weapons.ltx, in the sections on detachable sights.

Dagger

Let's add several new types of weapons to the game. We will make them on the basis of existing copies. This whole process consists of three main stages, the first is editing combat characteristics.

Let's start with edged weapons, which in the game are represented only by a knife. Let's turn it into a dagger. To begin, open the file in Notepad w_knife.ltx and make a small edit to it. Increase the value of the characteristic cost before 100 , as a result of which the price of this weapon will increase to 100 rubles.

The damage it causes to parameters will also increase in our fashion. hit_power And hit_power_2 assign a series of numbers 2.00, 2.20, 2.40, 2.60 in the first case and 2.10, 2.25, 2.40, 2.55 in the second. Initially, the knife's alternative attack power almost duplicates the main one. The only differences are in the animation.

With a dagger everything will be different. The first type of strike, as you can see, here has a greater spread in strength - therefore, the attack can turn out to be both strong and not very strong. The alternative swing with a dagger is more stable, but it will not be possible to inflict very serious wounds on the enemy.

Don't forget the attributes hit_impulse And hit_impulse_2, to which values ​​should be assigned 140 And 125 . The first type of attack will then push enemies away from the main character more strongly, which in some cases makes finishing moves more difficult.

Let's work on the balance a little. Attributes inv_weight, rpm(minimum time interval between two attacks) and bullet_speed(speed of striking) determine the values ​​accordingly 0.8 And 600 . Unlike a knife, a dagger, although a little, weighs a little, which means it takes up a little space in your backpack - this, you see, is quite natural.

You have excellent melee weapons at your disposal. One precise injection into the body of a weak enemy - and he gives up the ghost. The only disadvantage of a dagger compared to a knife is its reduced speed. The main character swings the dagger a little slower, but if he hits... In the original game, almost no one used the knife, it was too weak. A dagger is a very serious aid to a pistol. With its help you can easily knock down some mutants and finish off wounded bandits.

Laser rifle

Now let's start creating futuristic trunks. The first one is a laser rifle. We will make it based on a sniper rifle SVUMk2, which is described in detail in the file w_svu.ltx. Start again with the price, raising the number corresponding to the indicator Cost, before 12000 . But the supply of ammunition should be limited by setting the characteristics ammo_limit, ammo_current, ammo_mag_size And startup_ammo values 40 (the first of them) and 6 (the other three).

It also wouldn’t hurt to make the rifle a little heavier (specify the parameter inv_weight meaning 5.2 ) and strengthen it (adjusting the settings will help us with this hit_power And hit_impulse). The first one should now correspond to the value 1.20 , 1.30 , 1.40 , 1.50 , second - 180 . We also increase the projectile flight speed and firing range: parameters bullet_speed And fire_distance write down 1130 . But the rate of fire ( rpm) it is better to reduce to 150 .

Let's weaken the cannon's zoom by assigning it to the attribute scope_zoom_factor number 30 - the increase from threefold will become twofold. The value of the indicator shell_particles should be reset by deleting the previous weapons\generic_shells. As a result, when shooting from a rifle, cartridges falling to the ground will no longer be visible, which is what we need. Now she shoots with a laser. Finally, slightly increase the barrel wear rate: condition_shot_dec write down the number 0.00035 .

The laser rifle is ready. It gives a lot of damage, has high accuracy and a long firing range, and a crazy speed of charge flight, but reloading is quite slow. This weapon opens up completely new combat tactics. You can hide behind some structure standing on a hill, wait for a group of bandits, let them come within shooting range and begin to gradually retreat, shooting enemies catching up with you.

Previously, such tactics with a sniper did not work, because the enemies running ahead would catch up with you before you destroyed them. But with a laser rifle, you can kill unprotected enemies with one shot. The main thing is to learn to shoot accurately.

But trying to sit down with a laser rifle on the top is definitely not worth it. Due to the fact that it takes a long time to reload, enemies will have time to get to you in the interval between shots.

Atomic cannon

For dessert we have an atomic cannon. We will get it from a rocket launcher ( RPG-7u). Therefore, you need to edit the file w_rpg7.ltx, and the first thing to do is to raise the price of weapons ( cost) before 14000 . Indicator ammo_limit importance should be given 10 to reduce the projectile's flight speed, to the characteristics launch_speed, bullet_speed And fragment_speed substitute the numbers accordingly 3 , 50 And 30 . We also reduce the rate of fire: we reduce the speed of the parameter rpm to the mark 100 , and range ( fire_distance) reduce to 300 .

Now let's work on recoil. With such a powerful gun it should be quite noticeable. Therefore, settings cam_relax_speed, cam_dispersion And cam_max_angle values ​​should be set 1 , 8 And 12 respectively.

But the balance still remains skewed: the thing we have turned out to be too powerful. Let's add another serious drawback to the barrel - we'll make it wear out quickly. Attribute condition_shot_dec it would be logical to set the value 0.00150 . In addition, the probability of misfire at maximum wear ( misfire_probability) must be made equal 0.01 . It is clear that the weight of the bulky new product will be appropriate: this can be achieved by setting the indicator inv_weight number 8 .

The damage from the new gun will be truly enormous. Set parameters hit_power, hit_impulse And explode_duration values 5 , 600 And 8 . You also need to edit the third section of the file wpn_rpg7_missile(make all remaining changes in it), which characterizes the rocket itself. Here you will again find the indicator explode_duration, to which this time we must assign a value 8 . To make the rocket explosion even more powerful, “link” to the setting blast number 8 , To blast_impulse - 450 , and to expand its radius, increase the indicator blast_r before 18 .

We recommend making the explosion more spectacular. Changing the parameter values ​​will help you with this light_range And light_time accordingly to 50 And 2.6 . This will make the flash after the shell burst longer and brighter. It would not hurt to enlarge the marks on the walls left after the explosion: set the attribute wm_size meaning 0.3 .

Finally, set the price for the projectile ( cost) at the rate of 300 rubles. The resulting murder weapon will be worth its weight in gold in the game - it simply has no equal in terms of destructive power. Although, of course, you can’t get by with them alone. This is due to the lack of charges, slowness, and short firing range. Yes, and it wears out very quickly.

However, in some troubles, when you are attacked by a whole crowd of mutants or bandits, only an atomic cannon can save you from certain death. Just one shot - and only mountains of corpses remain around.

Y

X here is the code name of the object (in this case, weapons, accessories or ammunition) to which the inscription refers. Y- text (optionally - the name of the object).

Finding the desired section is not difficult - its heading (X) invariably contains the short name of the trunk (the same thing that follows in the name of the corresponding ltx-file from folder \config\weapons after the prefix w_).

Let's give the new weapons appropriate names. The name of the knife is indicated in the file string_table_general.xml(containing basic gaming terms and concepts and having the same structure as string_table_enc_weapons.xml). It is located in the block st_knife. The word written here Knife change to Dagger.

The following conversions apply exclusively to the file string_table_enc_weapons.xml. The name of the sniper rifle we modified can be found in the section wpn-svu, in which the abbreviation SVUMk2 needs to be corrected to Laser rifle. As for the rocket launcher, the developers allocated a block for it wpn-rpg7, where is the abbreviation RPG-7u must be replaced with the phrase Atomic cannon. The new weapon is now called as it should be, but the descriptions remain the same for now - it is advisable to correct them too.

The knife has a block enc_weapons1_wpn-knife. The phrase included in it Hunting knife can be converted, for example, into Sharp Dagger. The characteristics of SVUmk2 are contained in the section enc_weapons1_wpn-svu, and RPG-7u - in enc_weapons1_wpn-rpg7. In the first case, in place of Y you can enter, say, the following text: The latest development of domestic scientists. Shoots a laser, in the second - like this: The most powerful weapon. Created on the territory of the Zone specifically to combat mutants. Uses nuclear energy. It’s not difficult to come up with more sophisticated descriptions - the main thing is that now you know where to put them.

And one last thing. Edited files string_table_general.xml And string_table_enc_weapons.xml move to folder <Каталог игры>\gamedata\config\text\rus.

The second stage of weapons development is graphical. On it we will update the textures of weapons. This will require a set of tools DXT Tools(contact him at our DVD, in the “Igrostroy” section ). As for the pictures themselves, they are presented in files of the format dds, are in the archives gamedata.db5, gamedata.db6, gamedata.db7 And gamedata.db8. It is the latter, as already mentioned, that carries weapon skins, which are located in the catalog inside the archive \textures\wpn. The file here corresponds to the knife wpn_knife.dds, SVUmk2 - wpn_svu-a.dds, RPG-7u - wpn_rpg-7.dds.

This will help you convert DDS files into the familiar TGA format DXT Tools. This is done according to the following scheme. Copy selected dds-file to the directory where you installed the utility package. While in the folder, enter at the command prompt: readdxt<имя dds-файла> (For example, readdxt wpn_colt.dds). As a result, a file will appear in the directory test.tga with the picture you are interested in.

You can safely redraw it in a graphic editor (for example, in Photoshop). After editing is complete, convert the modified drawing back to format dds by typing in the command line (of course, without leaving the DXT Tools directory) nvdxt test.tga. All you have to do is return the resulting file test.dds the previous name (in the example given it is wpn_colt.dds) and put it in the appropriate folder (in the case of weapons this is <Каталог игры>\gamedata\textures\wpn).

It's time to start redrawing textures so that new types of weapons acquire a unique look. For example, why don't you engrave some inscription or simple design on the blade of a dagger? As for the laser rifle, there are still markings on its “skin” SVU-AS 62x54 mm, which it is advisable to replace with at least the simplest abbreviation LV-1. Finally, your avatar, the logo of your clan, your favorite magazine, or some other picture would be appropriate on the body of the atomic cannon. And these are just the simplest examples of how you can decorate new items.

* * *

Together with you, we have added three new murder weapons to the game: a deadly dagger, an accurate and lethal laser rifle, and an all-destructive atomic cannon. Moreover, the atomic cannon and rifle surprisingly give the game the feeling that you are in the distant future.

All weapons are perfectly balanced and allow you to use additional tactics in battle that simply do not work with the original weapons. The dagger allows you to shred enemies at close range, the laser rifle is good for mid-range combat (just don’t try to sit in the same place with it). The atomic cannon is the best way to help you deal with a large concentration of enemies.

If these three new products are not enough for you, then you can add any number of weapons to the game, creating them according to the algorithm described in the article. We will continue the autopsy of “Stalker” in one of the nearest rooms of “Igromania” , but we’ll tell you not about weapons, but about completely different, but no less interesting things.

Today we will look at how you can edit weapons in the game - from characteristics to descriptions. Weapon characteristics are stored here:

...\S.T.A.L.K.E.R\gamedata\config\weapons\w_[...].ltx

Parsing the config structure

Let's take, for example, the config w_g36.ltx. It is divided into sections:

First section

General information about weapons, spawn links, etc. are stored here. We are interested in the following lines:

  • description= enc1weapons1_wpn_g36 - link to string_id from which the game loads the description of this weapon.
  • ef_main_weapon_type= 2 - the main type to which the weapon belongs
  • ef_weapon_type= 6 - subtype to which the weapon belongs
  • default_to_ruck= false - this means that if there is an empty cell for the machine, select the machine, it will be placed in the cell; if true the machine will not be placed in the cell.
  • sprint_allowed= true - this line means that you can run with a weapon.

Second section

Contains modifiers that are given to the visual angle/distance of the NPC holding this weapon in his hands:

  • holder_range_modifier= 1.85 - how many times the eye_range of bots increases. It multiplies the viewing range of bots with this weapon in their hands.
  • holder_fov_modifier= 0.3 - how many times the eye_fov of bots increases. When editing this parameter, problems occur with the NPC's visibility - they may not be able to see the monster at point-blank range.

The following values ​​may be in another part of the file, but they are relevant to the review.

  • min_radius= 30 - the minimum distance from which bots start using this weapon. For all weapons except sniper rifles, grenades and grenade launchers, it is recommended to set 0. It is used to ensure that bots with grenade launchers and snipers switch to a second weapon when an enemy approaches, and also do not throw grenades at their feet.
  • max_radius= 100 - the maximum distance at which bots use this weapon. It is recommended to make it as large as possible, taking into account the accuracy of the weapon. You've probably often encountered situations when you shoot bots from a long distance; they aim at you, walk from side to side, but don't shoot. These bugs are associated with the insufficient size of this parameter. This parameter should be limited for pistols, shotguns and flamethrowers.

Third section

Contains data about the weapon itself and some of its characteristics:

  • cost= 2200000 - base price (traders multiply it by a certain coefficient)
  • weapon_class= assault_rifle - weapon class (here - assault rifle)
  • ammo_mag_size= 300 - magazine size
  • ammo_class= ammo_5.56x45_ss190, ammo_5.56x45_ap - types of cartridges used
  • grenade_class= ammo_m209 - type of grenades used
  • fire_modes= 1, -1 - firing modes (single and endless bursts, respectively)
  • hand_dependence= 1 - dependence on the hands (?) - perhaps we are talking about the swing of the barrel
  • single_handed= 0 - whether it is held in only one hand
  • slot= 2 - slot in inventory
  • animation_slot= 2 - type of animation (for pistol/for rifle)
  • inv_name= wpn-g36 - a link to the name displayed in the inventory is also taken from the string table, as is the description
  • inv_name_short= wpn-g36 - the name displayed when aiming the sight at an object, for example, lying on the ground; in this case the same thing is used
  • inv_weight= 3.6 - weight
  • inv_grid_width= 5 - icon length (number of cells x)
  • inv_grid_height= 2 - icon height (number of cells by y)
  • inv_grid_x= 0 - x coordinates of the first corner of the icon
  • inv_grid_y= 10 - y coordinates of the first corner of the icon

Fourth section

The fourth section stores information about weapon wear/recoil. Almost all parameters there are provided with comments, so I will give only the most interesting ones:

  • cam_relax_speed= 5.7 - speed of return to the starting position
  • cam_dispersion= 0.2 - increase in angle (in degrees) at the first shot
  • fire_dispersion_condition_factor= 5 - percentage increase in dispersion at maximum wear. Few people understand, but this parameter is not indicated in degrees - it is a multiplier. 5 is 5000% spread at maximum wear. Such a spread of IRL can only be obtained by drilling out the PM with a hammer drill. All guns in the original game have a multiplier of 5, and starting with CS, the insanity of the developers began to grow stronger and many guns received a value of 15. In CoP, this trend intensified and even more guns received a value of 15. Every normal modder will reduce this value. For pistols it is recommended 3 - 4, machine guns 2 - 2.5, snipers 1 - 1.5
  • misfire_probability= 0.003 - probability of misfire at maximum wear
  • misfire_condition_k= 0.05 - coefficient. It's easier not to touch, because... It’s much easier to configure two parameters for each barrel in a weapon pack than three. It may only be needed for weapons with a small shot of the BCC type.
  • condition_shot_dec= 0.0002 - increase in wear with each shot. If you enter -1, the weapon will be completely repaired after the first shot.

Fifth section

Many parameters are stored here, of which the most interesting are these: (PDM is the parameter for swinging the barrel in the GG’s hands when moving in aiming mode. added Uncle Sasha [email protected])

  • PDM_disp_base= 3.0 - multiplier by which the base variance of the weapon is multiplied when the GG (Main Character) stands still at full height;
  • PDDM_disp_vel_factor= 1.3 - multiplier by which the base variance of the weapon is multiplied when the player swings the weapon or runs;
  • PDM_disp_accel_factor= 1.3 - multiplier by which the base variance of the weapon is multiplied when the player is sprinting;
  • PDM_crouch= 1.0 - multiplier by which the base variance of the weapon is multiplied when the GG is crouched;
  • PDM_crouch_no_acc= 1.0 - multiplier by which the base variance of the weapon is multiplied when the GG is standing still, crouched;
  • hit_power= 0.50, 0.54, 0.57, 0.60 - shot strength, depends on the rank: beginner, experienced, veteran and master, respectively.
  • hit_impulse= 105 - bullet impulse (the force that a flying bullet transfers to the victim affects the behavior of the ragdoll body. The more you put, the further it will fly. If you make a large negative value, then the victims will fly to the GG)
  • hit_type= fire_wound - type of damage caused, in this case - bullet wounds (the parameter in single player does not affect anything)
  • fire_distance= 600 - the maximum flight distance of the bullet, then it falls to the ground and disappears. It is logical to set the value of effective fire (submachine guns 50-200m, pistols 50m, shotguns 30m and a knife half a meter), but it makes no sense to set a value greater than the alife radius: after all, there is no one outside it.)
  • bullet_speed= 925 - initial bullet speed
  • rpm= 600 - rate of fire shot/minute
  • hud= wpn_g36_hud - weapon appearance from 1st person

Sixth section

  • = x, y, z
  • position= -0.026, -0.132, 0.0 - position of the weapon on the back in relation to the NPC when viewed from the 3rd person
  • orientation= 0, 0, 0 - rotation of the weapon on the back of the NPC when viewed from the 3rd person

Note In CHN\ZP it will look like this:

  • position= -0.026, -0.132, 0.0 - position of the weapon in the hands of the NPC
  • orientation= 0, 0, 0 - rotation of the weapon in the hands of the NPC
  • strap_position= -0.26,-0.11,0.25 - position of the weapon on the back in relation to the NPC when viewed from the 3rd person
  • strap_orientation= -15,-9,110 - rotation of the weapon on the back of the NPC when viewed from the 3rd person

Seventh section

Contains descriptions of the visual side of the weapon and some other parameters:

  • startup_ammo= 90 - as you might guess, the starting number of cartridges (in single player does not affect anything)
  • visual= weapons\g36\wpn_g36.ogf - weapon model used by NPCs, as well as by the player in third-person view
  • ph_mass= 4 - physical mass used in calculations
  • scope_status= 2 - situation with a detachable sight
  • silencer_status= 1 - situation with a non-removable muffler
  • grenade_launcher_status= 0 - situation with a missing underbarrel grenade launcher
  • Options:
    • 0 - no, you cannot attach a new one
    • 1 - already there, non-removable
    • 2 - no, but you can install it
  • zoom_enabled= true - whether there is zoom (aiming)
  • scope_zoom_factor= 33.3 - what zoom does aiming give (here 60/33.3 = 1.8x)
  • scope_texture= wpn\wpn_crosshair_g36 - reticle texture
  • shell_point= 0.15, 0.0, -0.05 - point of departure of the sleeves
  • shell_dir= 0.0, 1.0, 0.0 - point of release of powder gases from the receiver
  • fire_point= -0.000000,0.062000,0.134000 - shot point
  • fire_point2= 0.30, 0.00, 0.05 - firing point from an under-barrel grenade launcher
  • fire_bone= wpn_body
  • orientation= 0, 0, 0 - orientation of the weapon barrel in the direction of the point of impact of the bullet (this is the center of the monitor). Some modders orient the weapon along the aiming line - this is not correct, because the bullet flies out of the barrel, and not from the sight.
  • position= 0, 0, 0 - position. The first coordinate is responsible for lateral movement (positive - right, negative - left), the second - vertical movement (positive - up, negative - down), the third - horizontal movement (positive - forward, negative - backward)
  • visual= weapons\g36\wpn_g36_hud.ogf - the model displayed in our hands
  • grenade_bone= grenade

Next are various animations for various actions of the player with weapons (shooting, reloading, etc.). But we don't really need them. But that’s not the point, the point is that for a long time, no one noticed several lines, namely, 3 lines that are responsible for the position of the weapon when aiming:

  • zoom_offset= -0.123900,0.012450,-0.1377700000 - everything here is exactly the same as with the position (which comes after fire_bone)
  • zoom_rotate_x = 0.024750
  • zoom_rotate_y = 0.001300

They also need to be adjusted if the position of the weapon itself has been changed, otherwise the GG will not aim at the center of the screen, but lower/higher and to the left/right. To configure this feature, hud_adjust_mode was made, but for some reason it was not left... Partially, something like this can help you:

  • zoom_hide_crosshair- whether to hide the crosshair when aiming

Changing descriptions

Weapon descriptions are stored in the file: ...\S.T.A.L.K.E.R\gamedata\config\text\rus\string_table_enc_weapons.xml

It stores strings with names and descriptions that are referenced by weapon configs. For example, the same G36 links here:

[...] A German-made assault rifle, which is a first-class example of a modern weapon - lightweight, reliable and ergonomic.\n Ammunition:\n regular 5.56x45 mm SS109,\n armor-piercing 5.56x45 mm AR. [...] GP37 [...]

By changing their contents, we change the descriptions/names of these weapons.

Innovations in the salary

HUD

The HUD model was divided into 2 parts - the hands and, in fact, the weapon itself. This was done in order to achieve a change in hand visuals when changing overalls. Because of this (and not only because of this), most of the config located under “:hud_base” has undergone some changes - I’ll tell you about them.

Added:

  • hands_position= 0.020500,-0.206999,0.261999 - position of hands and weapons
  • hands_orientation= 3.349998,2.599999,-0.050000 - direction (orientation) of hands and weapons
  • hands_position_16x9= 0.020500, -0.165999,0.209500 - position of hands and weapons for 16x9 monitors
  • hands_orientation_16x9= 3.649998,1.050001, -0.050000 - direction (orientation) of hands and weapons for 16x9 monitors
  • item_position= 0,0,0 - position of the weapon relative to the hands
  • item_orientation= 0,0,0 - orientation of the weapon relative to the hands
  • aim_hud_offset_pos= -0.129000,0.017000,-0.001500 - displacement of hands with weapons when aiming
  • aim_hud_offset_rot= -0.012500,0.040000,0.020000 - orientation of hands with weapons when aiming
  • aim_hud_offset_pos_16x9= -0.129000,0.017000,-0.001500 - displacement of hands with weapons when aiming for 16x9 monitors
  • aim_hud_offset_rot_16x9= -0.012500,0.040000,0.020000 - orientation of hands with weapons when aiming for 16x9 monitors
  • gl_hud_offset_pos= 0,0,0 - displacement of hands with weapons when aiming from a grenade launcher
  • gl_hud_offset_rot= 0,0,0 - orientation of hands with weapons when aiming from a grenade launcher
  • gl_hud_offset_pos_16x9= 0,0,0 - displacement of hands with weapons when aiming from a grenade launcher for 16x9 monitors
  • gl_hud_offset_rot_16x9= 0,0,0 - orientation of hands with weapons when aiming from a grenade launcher for 16x9 monitors

Upgrades and wear and tear

As you know, in the ZP there is the possibility of upgrading weapons. The following lines are responsible for selecting schemes when upgrading:

  • upgrades= up_gr_firstab_ak74, up_gr_seconab_ak74, up_gr_thirdab_ak74, up_gr_fourtab_ak74, up_gr_fifthab_ak74, * up_gr_fifthcd_ak74- parts of the upgrade circuit
  • installed_upgrades= - installed upgrades
  • upgrade_scheme= upgrade_scheme_ak74 - upgrade scheme

Also in the ZP a more thoughtful wear and tear scheme was created, here are the lines that are responsible for this:

  • misfire_start_condition= 0.6 - wear, at which there is a chance of misfire
  • misfire_end_condition= 0.1 - wear at which the chance of misfire becomes constant
  • misfire_start_prob= 0.003 - chance of misfire when worn is greater than misfireStartCondition
  • misfire_end_prob= 0.043 - chance of misfire when worn is greater than misfireEndCondition
  • condition_shot_dec= 0.001 - increase in wear with a single shot
  • condition_queue_shot_dec= 0.0012 - increase in wear when firing a burst

New barrel wear = 1.0

Main config

Not many changes here:

Icon used when upgrading. Coordinates are counted from the upper left corner in pixels. The icon file is on the path textures\ui\ui_actor_weapons.dds

  • upgr_icon_x= 304 - x coordinates (horizontal)
  • upgr_icon_y= 627 - y coordinates (vertical)
  • upgr_icon_width= 295 - icon width
  • upgr_icon_height= 110 - icon height
  • * scopes_sect= scope_ak74, scope_x2.7_ak74, scope_live_detector_ak74, scope_night_ak74 - links to the secondary scope config
  • - the secondary config itself
  • scope_name= wpn_addon_scope - link to the scope config
  • scope_x= 47 - location of the installed sight icon on the weapon icon by x (in pixels)
  • scope_y= 0 - according to y

Authors

Article created by:

The article is average, but it doesn’t say anything about the “explosive” ammo parameter. There are no grenade launchers and missiles, namely cartridges! Even in the original file "weapons.ltx" in the properties of 5.45x39 cartridges for AK there is always the line "explosive = off" at the end. It is enough to change it to “explosive = on” and when such a projectile is fired, we will see how an orange flame flares up and goes out at the point of impact. But this is just an animation, so if you make such cartridges, do not forget to increase their armor-piercing ability and stopping effect. By the way, this can be done not only for AK cartridges, but for any cartridges in just one line. Good luck!

Views