Separate gun condition and parts condition. Advanced jam mechanics. Please read the description carefully.
Introduction
Tired of finding shitty 5% guns on everyone you kill? Annoyed at getting price gouged by mechanics? Don't want to wait forever for repair kits to be stocked just to get a usable gun? Want more depth to weapon maintenance and jamming? Try this!
Substantially overhauls weapon parts and jamming. The goal of this addon is to create a layered weapon condition system that makes it feel like stalkers are using old, worn out weapons that are still serviceable and usable, while making 'factory new' weapons require more work and less bullshit to get. Weapon condition is overall better and easier to maintain, and weapon parts condition is a new system that is tracked separately and a whole other monster to control. Parts condition will cause different types of jams that have their own procedures to clear.
Strongly recommended to use with full-percentage parts. Full percentage parts is forced on by default now.
This addon does not make the game easier in any sense. A fair amount of complexity is introduced by this addon, aimed at addressing the unintuitive vanilla parts system. This addon is intended to overhaul the process of acquiring and maintaining good weaponry.
Note/Disclaimer
WPO is now open-source on github: Github.com
The latest can always be found here: Github.com
I won't be reading comments here because it's too much effort. Create issues to get my attention.
Contributions welcome!
Major Features
Weapon Condition Overhaul
Weapon condition is reimagined as overall cleanliness of the gun. What does this mean?
- Weapon condition is much easier to take care of.
- Mechanics will clean your guns for cheaper.
- Cleaning kits are more effective, last longer and work at lower values, but are more expensive.
- Weapons from stalkers drop in better condition. This does not mean they are more usable.
- Shooting in wet weather degrades your weapon faster (configurable by MCM).
Parts Maintenance
- Weapon parts condition is entirely separate from weapon condition and must be maintained separately.
- Poor-quality weapon parts will cause weapons to jam in variously infuriating ways (more on this later)
- Replacing parts is much easier. For most parts, click and drag the new part onto the weapon. However, this will reduce the cleanliness a little bit as some lubrication is lost (doesn't happen below 60%). Leatherman reduces this impact.
- Replacing parts removes some weapon condition above 60%. Overall weapon condition does not affect parts condition.
- The exception to field replacement is barrels, which must be replaced at the workbench with a repair kit. However, barrels do not affect jam chance.
- Replacing parts through the workshop does not consume either the repair kit or the parts.
- Parts are harder to repair. Ramrods. files and the multitool only work from 60% condition. Beyond that you need to replace them at a technician.
- Using a weapon repair kit will restore one part to full condition. Repair kits are rebalanced slightly.
- The net effect of the new system makes dropped guns from stalkers still pretty crappy to use as in vanilla Anomaly or Far Cry 2, but they are not completely worthless - you do not need to wait for weapon repair kits to go in stock before you can fix them up.
- Because weapons are easier to clean, I added a function that will blacklist weapons with broken parts for sale. Weapons with any part below 50% will be unable to be sold. Can be configured.
Technician changes (READ ME)
- Technicians will NOT restore parts condition. They will only restore base gun condition (they are only cleaning the weapon)
- Technicians have a number of parts in stock, increasing with toolkits turned in. This replaces the confusing repair/replace system previously used.
Field Stripping
- Weapons can be 'field stripped', removing all components except for the barrel.
- Missing parts will show up as "-1" in details window or 'missing' in the UI description.
- Field stripped weapons cannot be fired. Repair and replacement of parts will work as expected, and other systems are tweaked to work around it.
New Jam Mechanics
- Weapons with crappy parts are prone to malfunction in variously infuriating ways.
- Triggers with low condition have a chance to misfire.
- Jammed weapons can't be reloaded (unless you're using Magazines Redux)
- Crappy feeding mechanisms can cause failures to extract or even double feeds.
- To remedy this, there is a new unjam command. Double tap Use to clear your weapon.
- Optionally, unjam keybind can be used. Use the unjam button to clear your weapon. Bind it to something close to reload, like T or G.
- There are different procedures to clear malfunctioned weapons. Misfire and FTE can be fixed just by hitting unjam. Double feed requires you to unload your magazine and then unjam.
- Weapon parts failure chance follows a formula as described in the readme.
- The old jam is also subject to this system now.
Weapon Damage
- Weapons under 85% (configurable) condition will roll to damage their parts. Parts damage amount is controlled in arti_jamming.
- More reliable weapons have lower chance to damage their parts. This is based on condition_queue_dec, so your reliability upgrades are worth it!
Overheating:
- Weapons can overheat from sustained fire. This is most apparent if you try to replicate a GunBusters video in STALKER. The hotter a weapon is, the more condition damage it will take and the faster the barrel will wear out. Be sure to shoot in short controlled bursts!
- Suppressors vastly increase the rate at which the weapon overheats.
- Inspecting your weapon will give you an idea of how hot it is (press unjam).
(New) Alternate Parts Drop
- There is a new 'Enable alternate parts chance' option in MCM that changes how part drops are computed. This is disabled by default.
- Previously, part drops would take the condition the weapon dropped in to determine the condition of the parts. The result of this was that high-condition weapons (65 and above) would be absurdly easy to fix and essentially "free".
- The new parts drop formula gives a chance that parts drop in good condition (65 and above) or bad condition (below). This base chance is adjustable in MCM and is further modified by the weapon condition. At a reasonably high enough base drop chance, weapon parts should be easy to find. However, now you can adjust it lower if you feel you are finding good parts too easily.
- There is an extra layer to tweak part drops by part type. This is still being balanced.
Disclaimer: only weapons with parts get to play with these new mechanics. Armsel Protecta, Gauss Rifle and P90 will only use the old system (but I can give them parts if requested)
There is a VERBOSITY variable in arti_jamming that controls HUD messages sent. This is now handled through MCM.
You can use this addon for whatever pack you want, just credit me.
Please let me know if you encounter issues. Comment here or ping me on Discord (arti#3278)
Changelog
- 1.9.1- Circumvented old jams (as a fourth type of jam). Prevented reload on jam. RUS translation from Aonestr.
- 1.9- In-game PDA guide to WPO.
- 1.8.3
- Fixed bug with field stripped guns being able to shoot. Removed defines.ltx dependency - no more patch needed for mags!
- 1.8.2
- More verbose feedback for field stripping and parts replacement.
- 1.8.1
- Reduced base jam chance, now scaling with heat.
- 1.8
- Introduced overheating. Removed additional weapon degradation.
- 1.7.4
- Cleanups for unjam logic. Improved feedback on weapon jam. Added option to unjam from inventory. Changed default unjam to double-tap use. Added fun slider.
- 1.7.3
- Field stripping a weapon unjams it. Lowered good parts threshold by 5%. Added Dead Air styled readouts on part condition.
- 1.7.2
- Fixes for disassembly crash and TOZ crash
- 1.7.1
- Fixed the damage chance being disproportionately high
- 1.7
- No more parts repair at mechanics! That annoying cleaning/replacement system is gone
- Now mechanics stock a random selection of parts - at a markup. Giving them more toolkits increases the amount of parts they stock.
- Added an option to disable profanity spam.
- Weapon degradation in rain now only happens above 60%.
- Revised jam and damage formulas. Added slider for damage threshold.
- 1.6.1.2
- - Dynamic support for wuut_mags and Mags Redux.
- 1.6.1.1
- Hasty fix for wuut_mags patch to prevent condition scramble on scope detach.
- 1.6.1
- Fixed alt parts drop bug.
- Unjam is now Alt+Reload. No more keybind conflicts! You can revert back to the old one with optional.
- Made the parts kit useless.
- Firing weapon always has 0.1% chance to damage parts.
- Doubled wear is now an optional feature instead of being done via weapon_ammo.
- 1.6 - Overhauled parts condition assignment for weapons. Fixed ammo having fieldstrip option. Better RUS translation. Forced full percentage parts.
- 1.5.5 - Jam chance and double-feed chance is modifiable in MCM. You can replace parts without a Leatherman, but this will dirty the weapon way faster. Reduced max condition of drops.
- 1.5.4 - Reconciled RUS translation with TDLemon. Monkey patched out need for item_repair.script, and reduced cost of cleaning weapon parts at tech.
- 1.5.3 - RUS translation provided by mix73.
- Bugfix with clearing superjams on weapons w/o magazines with wuut_mags
- 1.5.1 - Fix bug with repair kit fixing weapon without part. Reduced prices of cleaning items.
- 1.5 - Major update:
- Implemented field stripping of weapons. NO LONGER BACKWARDS COMPATIBLE - This update will cause problems if used and removed, as it will set part conditions to negative values to represent missing parts. If you do plan on removing it, make sure your weapons have parts and none are field-stripped.
- Using a repair kit on a weapon will replace its lowest condition part.
- Prices for repair kits adjusted accordingly. Pistol toolkit cheaper and 3 uses, other kits more expensive but 5 uses.
- Shooting a weapon in the rain will drain condition faster.
- Workbenches no longer eat parts (hooray!).
- Drop conditions for guns are equalized across the board.
- Part cleaning and repair costs now take into account repair cost coefficient.
- Patch for wuut_mags.
- 1.4.7.1 - Fixed some serious bugs where having weapon with parts -> switching to weapon without parts would calculate damage based on previous weapon.
- 1.4.7 - Integrated Blindside's idle animations, now unjam button will work like inspect button if there is no problem. Handgun part cleaning at mechanic is cheaper. Replacing a damaged part at a mechanic now has a varied price, depending on rarity of the weapons it is found in, but overall cheaper. Threshold for cleaning is adjustable via MCM. 1.4.7.1 - Corrected some small non-issue values with part damage per shot
- 1.4.6 - MCM support, fixed issues with verbosity printing. English swearing now toggleable. Reduced trigger jam chance from 50% in worst case to only 30%.
- 1.4.5 - Previous unlisted fixes for crashes with missing animations or sounds. Fixed variants of guns playing the normal unjam animation. Fixed missing sounds for some unjams.
- 1.4.4 - Implicit compatibility with Blindside's weapon animations. Now if a weapon has a custom unjam animation, this mod will play it instead of the placeholder. Fix to cause weapon to stop firing if it jams during full auto (thanks Lucy), restored some strings I mistakenly removed. Crash fix for the above.
- 1.4.3 - Mostly cleanup and compatibility with 1.5.1 full version.
- 1.4.2 - Fix for crash with wuut_mags replacing parts in weapons without magazines. Removed weapon parts kit from trader stocks. Increased price of parts repair below 60% (part is too damaged to be repaired properly and is replaced)
- 1.4.1 Quick fix for technician repair CTD.
- 1.4 - Reworked parts replacement. Parts can be replaced arbitrarily, but doing so will reduce weapon condition a little bit above a certain threshold (you need to relube whenever you replace a part). Raised default damage threshold. Optional doubled wear (guns stay clean for too long imo). Implicit wuut mags compatibility - this addon should work regardless if you have wuut_mags installed or not.
- 1.3.5 - Text fixes to work with RC19.
- 1.3.4 - Barrels no longer suffer from random damage (suggested by Aquamarine). Instead they slowly wear out and have an expected lifetime of 5000 rounds before deteriorating to 0%, with damage effects kicking in at 1250 rounds fired. Old ammo increases this wear rate on the barrel and confers a flat 2% chance to jam, even in working guns.
- 1.3.3 - Fix for crash when using attachments on weapons without parts.
- 1.3.2 - Adjusted price of parts kit, added one use, and dropped multitool repair condition to match that of ramrod/file. Small fix to damage calc check.
- 1.3.1 - Replaced swearing sounds to be less cheesy (using AyyKyu's Tarkov voices). Optional English profanity.
- 1.3 Actor swears intermittently with jams (thanks andrejchudoba)
- 1.2 - Replacing parts unloads your current weapon. Barrel damage now reduces your gun damage by up to 50%. Adjusted ramrod and file for better compatibility with full-percentage parts. Fixed broken text again.
- 1.1.4 - Small patch to fix broken dots in eng descriptions. Fixed bug with replacing parts in current weapon not updating condition immediately. Prevent player from replacing parts if part is already good. RUS translations from TDLemon.
- 1.1.3 - Items with damaged parts can no longer be sold. Zombies now drop absolutely crappy weapons (and novices as well, as a side effect)
- 1.1.2 - Changed jam chance calculation to be configurable. Base rates start lower and ramp faster (now 6, 18, 54% chances)
- 1.1.1 - Moved unjam button to weapons section in keybinds
- 1.1 - Parts cannot be replaced under a configurable condition threshold (default is 0.2). Mechanics will repair parts for you...but it's not cheap.
Credits:
Arszi for help and ideas
Michiko for providing unjam sounds
TDLemon for rus translation
RavenAscendant for MCM
Grok - for making README easier to read.
looks interesting
Any chance for a slightly toned down weapon condition version ?
I mean in army warehouse i find most of the weapons from mercs, monolith to be 70%+ condition and most parts in the weapons are the same. It just makes it too easy to get fully functional weapons compared to vanilla.
yeah just realised that, mabye because it makes sense for these factions to not have rust dusty guns, as they are the most armed and most dangerous
sounds awesome! does it require a new game?
No new game needed, mechanic sells a new kit you might want though but on a current playthrough you'll probably be ok with your current gun.
also one more question, does your parts repair system work in parallel with the mechanics' workshop or is the workshop useless/different now?
Workbench is an optional now and easier to use. You will need the workbench to replace gun barrels - but workbench won't consume charges of toolkit when replacing parts now.
Maybe make it so you can repair weapon parts above 50% instead of 65%. Kinda makes some items pretty much useless or just not being able to use their full potential as Kerosene for example gives +25% condition and Ramrod and file give 25% but minimum part condition to use Ramrod/File is 65% .
Click and drag for weapon parts is a lot better, you shouldn't need a whole toolkit to replace the bolt carrier in an AR pattern rifle lol. Is this compatible with Boomsticks and Sharpsticks and Muh Mags?
Is this only for RC18? You mention compatibility patch with trader overhaul, but it does not work with RC18 AFAIK.
Anyway this addon sounds really cool!
Yeah this is RC18 only. Trader Overhaul is sort of compatible with RC18 so I included it in case anyone else is using it.
Sounds superb!
Nice thumbnail
can I ask what changes did you make in "w_abakan.ltx"? I'm trying to merge it with Position_And_View addon but I'm not sure how important are your settings for the overall functionality
Whoops, that shouldn't be there. I was testing some stuff with accuracy. Feel free to disregard, I'll remove it.
Interesting concept to start with, but my suggestion is to look further into the 'general condition' thing. Maybe turn it into some clean factor or something.
It literally makes no sense that i'm holding a 0% condition gun that has all components to 100%.
Another suggestion is to add some interface for swapping components, and maybe some time of repair. Its kinda weird that i can drag a trigger mechanism over my gun and its all cool..all while im running from a damn boar.
Also a much needed feature is to be able to see the condition of your components at all times. Maybe through a 'clean kit' screen.
Thanks for the feedback.
I think what I might do is consider guns under 25% condition to be 'rusted shut' and unable to replace parts until you get the condition back up, and replacing a part should add a tiny bit of condition.
Originally I planned to open only the first tab of the workshop interface (the parts replacement one) but I abandoned it for a much simpler solution. I can add animations to them if requested, but I feel like animations for things that aren't medicine or food to be wasting in-game time.
Seeing condition of parts on mouseover tooltip is possible. I might add that in later.
got a crash after dragging a trigger onto a multitool:
arti_jamming | 8595146 | Dragging prt_w_trigger_components_2 onto leatherman_tool
Evaluating parts for 29900 (leatherman_tool)
! [SCRIPT ERROR]: .../anomaly-1.5.0-rc15\gamedata\scripts\arti_jamming.script:270: bad argument #1 to 'pairs' (table expected, got nil)
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: .../anomaly-1.5.0-rc15\gamedata\scripts\arti_jamming.script:270: bad argument #1 to 'pairs' (table expected, got nil)
Whoops, had some extraneous debug print statements. Removed them, try it now
I installed too main directory but game won't start at all
Please provide a crash log (check appdata/logs/xray_computername.log). What other addons are you using?
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CInifile::r_section
[error]File : Xr_ini.cpp
[error]Line : 544
[error]Description : fatal error
[error]Arguments : Can't open section 'toolkits_h'. Please attach [*.ini_log] file to your bug report
stack trace:
Hello why this is happening?
When does this happen? Can you give me details?
Sure, it happens when i try to load a game or create a new one
I am not able to reproduce this crash so far - do you have other conflicting add-ons?
well im using Anomaly RC18 with
-Yet another winter mod
-HQ Items ammo update
-Knife work in inventory
-Weapon icon replacement
-item animations
-position a view by Cement
and this mod
Ah that is a section in trade_presets.ltx - did you modify that file? Try using the default one when you unpack configs.
File path is configs/items/trade/presets/trade_presets.ltx
The problem you're having is the mechanic trade file is looking for that section to buy things, but for some reason you are lacking it.
Great work, it's awesome.
Thx again
This is a very cool addon and I really like the concept, but there are a few issue imo. First, I had the double feed jam on a double barrel shotgun, small nit pick and not really a big deal. Second, if you find a cool gun with bad parts, you can buy a cheap variant with good parts and swap them with almost no hassle. I did this with a cz75 pistol, the parts were bad so I bough a cheap and available browning hi-power and swapped the parts (I don't think it's the addon but for some reason the cz 75 has a SA trigger instead of DA/SA). Lastly, it might be good to have some sort of patch for full percentage parts, because if you play with full percentage it becomes about 10x harder to find parts over 75%, as the game tends to drop lower condition parts and round them up to 75% when full percentage parts is turned off. A cool work around might be to repurpose some of the regular repair kits and have them work on slightly more worn parts, similarly to how they worked on guns before. Apart from the above, I think this addon is really good, being able to replace most parts without having to pay for a vice and repair kit is great. Thanks for your work.
Thanks for feedback.
Severe jams are not always double feeds - I made the jams universal to any gun with parts for simplicity, so 'severe' jams are anything bad enough where the weapon needs to be unloaded to fix it.
I'm open to ideas on how to diversify jams for certain weapon types.
Buying another weapon to replace is a valid strategy in my opinion - you are still paying the full price of a gun to be able to use another gun.
I have not tested much with all-or-nothing parts. There is a quite expensive toolkit available from mechanics (there should be...) that can be used to repair worn and damaged parts.
I started playing with full-percentage parts a while ago, previously I was unaware of what it did. I made some tweaks and strongly recommend people to use it.
Do you have a patch for it? Because I feel like without that your mod makes it too easy to obtain gg weapons in Cordon already.
Nvm. I'm retared. For anyone interested: it is in the progression difficulty settings, the third box from the bottom.
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: .../anomaly-1.5.0\gamedata\scripts\arti_jamming.script:270: bad argument #1 to 'pairs' (table expected, got nil)
stack trace:
Do you have the latest download?
I noticed that mechanics have become much cheaper, how can I increase the cost of repairs?
Cost of repair is cheaper but they won't replace parts. Check inventory_upgrades - there's code to slash the cost of repair if the item is a weapon.
The cost of repairing armor has also dropped, your mod does not affect it? Thanks
It should not be on the latest version...lemme check
I tried the latest version, this problem is there
I will reupload. In inventory_upgrades line 738, remove wpncoef from the calculation to set all prices back to their normal
extortionate cost. You can also hardcode the coefficient to massage it to something of your liking.
I remove wpncoef:
Expression : ai().script_engine().functor( functor_str, m_desc.functr )
Function : inventory::upgrade::Property::construct
File : inventory_upgrade_property.cpp
Line : 47
Description : Failed to get upgrade property functor in section[prop_3xfire], functor[inventory_upgrades.property_functor_b]
stack trace:
You removed the * as well, right? If Lua isn't syntactically correct funky things will happen when the script is loaded.
It should look like this:
return math.floor( cost * (1 - item_condition) * cof ) -- CoP formula, adjusted down further (arti)
Yes, I did and got this log
Well, I'll leave it as it is, just raise the price multiplier in the anomaly settings, thanks
Yeah it seems like replacing armor parts doesn't consume toolkit. Might not happen all the time not sure but it definetely does happen. I repaired 2 Ecologist suits replacing 3 parts on each without single medium armor toolkit consumed.
Too bad there's no custom animations, I assume even if you did find one you couldn't program that in without it being hardcoded into the mod?
There's a possibility for custom animations, but I'm not an animator - I'd need the help of Anomaly Weapons team to program it in, and they're planning on revamping the whole gun system anyway in 1.6. Once that comes out and I port it we can think about unjam animations.
For now though, it'd be a waste of effort for custom animations.
i might be stupid but, what leatherman?
Multi-tool. Leatherman is a brand for multi-tool.
When I insert part into the gun, it keep showing message "st_news_parts_success"
*im using the lastest update and it happen*
Okay I just fix it and it seem like you forget to add messages in inventory file
Yea someone else reported this too, I think I confused some files while trying to fix broken characters. Hopefully it's ok now