Open the workshop window with a simple key press and strip weapon parts with your bare hands. Just like in the field during the army days.
Features
- You can open the workshop by default with the "J" key (at least according to DIK). The keybind is configurable in MCM. This way you could have a mobile crafting station.
- Repairing weapons doesn't require repair kits. This is a modified version of Dusty9261's No Toolkit Requirement for Vices.
- You can strip weapon parts with your bare hands without even requiring a spare part. Only a weapon shell is left behind after you have taken all its mechanisms. This way you can repair the part and put it back in. You can also install weapon spare parts with your bare hands.
- Armors still require repair kits to do stuff by default. This can be turned off in MCM. Installing parts uses the repair kit. However, by default if you have the repair kit you can remove parts for free.
- There's an option to require disassembly tool (lowering its condition) when taking apart equipment.
- Option to not require tool kits, repair kits and/or upgrade kits when upgrading equipment. Each one is toggleable in MCM.
- Window is kept open on repair and on upgrade. Similar functionality to TheMrDemonized's Keep Crafting Windows Opened (update 12) but different (better?) implementation.
- Weapons are unusable if at least one part is missing (0 condition). You can't run around shooting your AK which has 80% condition but is missing the barrel. This can be turned off in MCM.
- It's best to play with full percentage parts but isn't strictly necessary. Otherwise the part shows as 25% but may be in fact 0%. To change that go to vanilla settings => gameplay => progression diff.
Contained mods
- Dusty9261's No Toolkit Requirement for Vices ( Moddb.com ) - possibility to repair equipment without the need for repair kits
Patches
- TheMrDemonized's Keep Crafting Windows Opened ( Moddb.com ) - Sneaky conflict that doesn't show in the files (robbed 1.5 days of my time). Apply my patch.
- Swergdach's Full upgrades for weapons and armor ( Moddb.com ) - in MCM enable "Patch for Swergdach's Full upgrades".
Conflicts
- In case you see that ui_workshop.script has a conflict then it's just an indication that my mod modifies something there. If both mods modify different functions in the script then it's not actually a conflict.
- Everything that alters ui_workshop.script's repair and/or upgrade part.
- TheMrDemonized's Crafting Parts With Returns ( Moddb.com ) - get the old part from the gun back. Conflict: having also this will give double parts on repair. Part of my inspiration.
- Artifax's Weapon Parts Overhaul for 1.5.1 ( Moddb.com ) - that mod changes weapon part system so it's incompatible with my mod that uses vanilla system.
Also see
- Grok's Craft and Repair Overhaul - toolkits as workbench ( Moddb.com ) - open workshop from the contextual menu of a toolkit in the inventory. Part of my inspiration.
Installation
- Install. Drop the gamedata folder form the latest version folder into Anomaly's main folder or enable the mod from the Mod Organizer 2.
- Apply patches. In case you have installed a conflicting mod and I have added a patch install the other mod, then my mod and then apply the patch from "patches" folder.
- Uninstall. Revert the file back to previous version or delete it to revert it back to vanilla. Or simply disable the mod in Mod Organizer 2.
How did I do it?
I added code to open the workshop window on a key press. Then added code to ui_workshop.script that gives you the part you click on and replaces it with 0 condition part. The code doesn't let you take 0 condition parts. I basically changed the whole repair and upgrade part of ui_workshop.script by trial and error and made the code dirtier. However, it works.
Known bugs
- Dropping a piece of equipment on the ground and damaging it will reevaluate the parts. This will respawn missing parts.
- Stripping a part from headgear, repairing armor with the headgear and then stripping the headgear from the armor reevaluates the parts of the headgear, respawning missing parts. This is so because old item is deleted with the missing parts info and a new one is created.
Final words
You can modify my changes or ideas in any way you want. However if your work is based largely on my ideas then please give credit! In case you find bugs please let me know!
Changelog
v1.0
- First upload
- MCM support
- Patch for TheMrDemonized's Keep Crafting Windows Opened (update 12)
v2.0
- Completely merged Dusty9261's No Toolkit Requirement for Vices and added MCM options for the features. That mod actually only touched repair kits and not tool kits.
- Added an option that upgrades don't require tool kits and that upgrades don't require upgrade kits. These are toggleable in MCM.
- Window is kept open on repair and on upgrade. Similar functionality to TheMrDemonized's Keep Crafting Windows Opened (update 12) but different (better?) implementation.
- Updated the patch for TheMrDemonized's Keep Crafting Windows Opened (update 12). That mod is still relevant for crafting, inventory repair (eg sharpening knives) and cooking.
- Added function injections (monkeypatch). In other words ui_workshop.script is now a vanilla file just to show that my mod changes something there and to indicate possible conflicts. If you see a conflict with ui_workshop.script then it might actually not be a conflict if other mods change different parts of the script.
- Removed Banjaji's Modular crafting directory for modders from this mod because now with function injections (monkeypatch) both mods can be simultaneously installed. This way there's more modularity and you have more options when installing mods.
v2.1
- Fixed a crash when repairing armors while "Repairing armors doesn't require repair kits" was disabled.
- Added a patch for Swergdach's Full upgrades for weapons and armor. Enable it in MCM. The patch enables an UI button to press (but nothing else) when an alternative upgrade is already installed.
v3.0
- Implemented proper/better missing parts system. Did it by bypassing part evaluation every time equipment is selected.
- Forced on precise part condition setting because simplified parts system caused annoying visual glitches. Fixing those would need patching other vanilla scripts which might in turn cause other bugs.
- Fixed headgear always being returned with 100% condition.
- Fixed Russian MCM headings showing variable name instead of text.
- Added an option to have vanilla armor repair system while weapons still have the features of this mod.
v3.1
- Fixed missing parts getting brought back as low condition parts.
- Fixed patch for TheMrDemonized's Keep Crafting Windows Opened. Previous one rendered MCM options unresponsive.
- Added an option to require disassembly tools to take apart equipment (like when disassembling).
v3.2
- Updated for Anomaly v1.5.2 (check for empty table).
- Fixed a bug when in specific conditions part was returned with 100% condition.
[Notice board]
I haven't modded the disassembly scripts/LTX files (a large undertaking) so don't disassemble equipment that has been stripped from parts. Otherwise you'll end up with the weapon parts plus any broken parts you get from disassembly.
V3.0 update: implemented the missing part system a bit differently. Now some bugs regarding part re-evaluation should be gone.
Known bugs:
* Occasionally missing parts get "brought back" by part evaluation script. In other words if the part was missing then at one point it might be 4% or so. Currently it happens in specific cases when you repair an armor that uses headgear as a part and when you damage a piece of equipment.
WOW! It's... it's one of the mod that i always dreamed! I always desired a mod that let me adjust/modify weapons, but without take with me thousand of items! I'll try asap!
mr. minotaur said this will break escape from pripyat
tbh i never know much until someone brought up the bad news, and i decided to just let this slide away from my excitement
Fine, I'll download EPF. There might be a conflict because EFP is a large modpack so there's probably something that modifies or at least uses ui_workshop.script. If it's something simple I can make a patch.
EFP doesn't really modify the ui_workshop.script, the issue is more related to condition calculation:
Your ui_workshop.script recalculates overall weapon condition when adding usable parts back in (as far as I can tell). That's because your mod follows the vanilla method of deriving overall condition from part conditions.
This interferes with EFP's usage of Arti's Weapon Parts Overhaul (WPO), which changes the connection between overall condition and part conditions. In WPO part conditions have no impact on overall condition; the overall condition is simply the cleanliness of your weapon and affects the rate at which your parts degrade.
Using both your mod and WPO together creates a feedback loop where part conditions can lower overall condition during repair by bypassing WPO's condition calculation, which then contributes to faster degradation of part conditions and so on.
For minimal WPO compatibility, you could just remove the portion of your script that reassigns overall condition when replacing a missing part with a usable part.
This next bit isn't necessary for minimal compatibility, but you could also remove the part duplication stuff for "stripping" all parts besides the barrel; this is because WPO already offers a field-strip feature that lets you remove parts by hand without needing to create duplicates, but it doesn't let you remove the barrel.
Good mod, very useful for my non-WPO gameplay. Thanks for your work.
Hmm.. Thanks for directing my attention to WPO and for the recommendations! I could manually define all the barrel parts assuming that there are only vanilla parts. After reading WPO features it seems that even if I make the patch weapons could be fired without barrels but I guess why not. Basically I could make a separate WPO patch that includes your recommendations but which I won't have time to test (WPO seems big). I might publish the patch with the next update of this mod but this isn't a promise.
If you'd like I could test and let you know before you commit your patch. I'll even be able to get some EFP testers on the case.
I'll also try to look into a workaround when I get a chance.
And why, when you take out a part from a weapon, the missing part shows 25%?
It's funny, in this way you can get parts from weapons 2 times, first pull them out, and then disassemble the weapon itself:)))
It shows 25% because you haven't enabled "Full percentage parts" in vanilla settings => gameplay => progression diff. That's why disassembly script also returns parts with 25% instead of 0%. I don't know why Anomaly devs (or some other mod's devs) implemented the simplified system where lowest condition is 25% instead of 0%. Anyways my code still calculates with full percentages but the game shows you 25% as the lowest value due to "Full percentage parts" being disabled.
I haven't touched weapon disassembly (yet) because that's a big thing to change so that everything else wouldn't suddenly crash/conflict. So basically yes if you disassemble the weapon you get a second set of (broken) parts right now.
Where you learned how to work with these codes?
Trial and error and studying other mods for the last 4 months.
Yeah, deleting comments? I just answered one question to one comrade, but no, someone playing with toys again.
This is the first time I'm here today so it's not me. It seems that your replies were deleted because the comment you replied to was deleted.
Aaaah, well, I'm sorry for that behavior, but sometimes I just don't understand why some illogical things are happening. Damn, probably I'll soon get nightmares.
Thank you for the mod, it is a nice addon
I think that in debugging mode you can also do this obviously it does not have so many advantages
Nice, as a non WPO user, this is art :D
Oh yeah this is awesome.
Big thanks man, really appreciate it
TheMrDemonized's Crafting Parts With Returns ( Moddb.com ) - get the old part from the gun back
Banjaji, i don't see what's the point of using that mod with your mod when your mod does pretty much the same thing, even with better mechanics. In any case, the weapon part is automatically extracted when you click on it. So using your mod, the "Crafting Parts With Returns" mod becomes irrelevant.
I put that mod into conflicts just so it's clear that they don't work too well together.
This mod was something I wanted to do for quite some time and TheMrDemonized's Crafting Parts With Returns was one of the mods that gave me inspiration and helped me to understand the original script better. At first my mod was just a byproduct "open workshop with a keypress" for my other projects but I put more and more stuff into it until I got this. It actually saddens me that TheMrDemonized might get less positive feedback because of my mod.
In the end I think the whole Moddb and Anomaly itself are built on previous works. So basically Anomaly with this Moddb repository is the result of 15 years of work.
Its alright. My mod is simple and does only one thing as advertised. If you aim for a total overhaul of sstem like this mod then of course feel free to use it and disable mine for less conflicts
I don’t know what the reason is, but for some reason TheMrDemonized’s Crafting Parts With Returns mod didn’t work for me.
i test your addon work great thx pro
Could you add an option to the MCM menu so that you can disable the use of large repair kits for upgrades and repairs? I have already turned it off, but it's a little clumsy, because. I don’t understand scripting, I want everything to be done more competently.
I guess I could completely merge Dusty9261's mod into mine.
Don't worry, if your code works without bugs then it's fine. I'd say my coding is also a bit clumsy.
Yes, please, give us the possibility to disable the need to use of repair kits for upgrades, and maybe let us use smaller ones.
See v2.0. Before first release I thought about adding an optional addon which makes all repair kits as basic sewing kit for armors. However, I decided against making the addon because finding the right LTX file, understanding it and then manually editing all the possible equipment and/or upgrade trees is too much work.
Updated to v2.0 but kept v1.0 in the files just in case. This update brings also options to not need different kits when upgrading (see options in MCM). Basically I merged Dusty9261's mod and added two new features from that angle.
I also updated the patch for TheMrDemonized's Keep Crafting Windows Opened. The previous patch isn't compatible with v2.0 of this mod.
Also this version brings function injections. In other words ui_workshop.script is the vanilla file just to indicate possible conflicts. If that file shows a conflict but the two mods change different parts of the code then they are still compatible.
I'll look into Weapon Parts Overhaul in the future.
Hey Banjaji, wanted to let you know that Arti's new WPO version on github now supports removing barrels. So there shouldn't be anyone trying to use both WPO and your mod together since they cover similar things, with the exception being your toolkit usage stuff. Instead of digging through WPO for compatibility purposes, you may just want to state that there will be a soft incompatibility and tell people not to use both together.
Thanks for letting me know!
Previous error was from not having the "no kits required" boxes ticked in the MCM menu.
Now I'm trying to figure out how to get full upgrades working with this. If you (or anyone else) knows how, let us know.
The previous post was deleted so I'll copy the relevant part here: "I got this error while I try to take parts out of the armor
[error]Arguments : LUA error: ...ly/bin/..\gamedata\scripts\banjaji_field_workshop.script:439: attempt to index field 'clr_list' (a nil value)".
There shouldn't (ideally) be an error no matter what MCM settings are selected so I'd like to know if and how someone can replicate the error. The how part might need very specific details from the version of this mod (currently v2.0), loading the game and changing MCM options to which clicks and where were done in the workshop GUI before the crash happened.
I found the mod ( Moddb.com ) and at one point I was trying to achieve the same thing for v2.0 but couldn't. Thanks for pointing me to it! So now that I have a guideline how to do it I'll work on it for v3.0.
Strangely, I managed to create a patch for a complete upgrade of weapons and armor on the previous version of the mod, I have not tried it on this version yet, because. I am not at the gaming computer yet.
In fact, patching is quite easy, just arm yourself with a text file comparison program and compare the changed files with the default ones.
There are a lot of changes in the "ui_workshop.script" file from Banjaji, and very few changes in the same file from the "FULL UPGRADES FOR WEAPONS AND ARMOR" mod. And of course, I just moved the changes from the "FULL UPGRADES FOR WEAPONS AND ARMOR" mod to the "1.5.1_Banjajis_Field_workshop" mod. For this, even no programming knowledge is needed.
EDIT: Looked at version 2.0. Banjaji, in the new version, the file "ui_workshop.script" is for some reason original from the game, i.e. not changed in any way. And now, how to make a patch for "FULL UPGRADES FOR WEAPONS AND ARMOR" - look for the line "flags[4] = (not (section_g and self.inst_upgr[section_g])) and true or false" and change "false" to "true ". That's all, these are all the changes in the "ui_workshop.script" file of the "FULL UPGRADES FOR WEAPONS AND ARMOR" mod.
Yup, patching is sometimes really easy. However, sometimes the original author coded the script the way that you really have to know which variable does what and where else it is used. I'd say this mod (and original ui_workshop.script) is the latter version because UI seems a bit delicate plus some variables for the UI classes are used as global variables between different class functions. However, I'm talking about the script overall and merging the Full upgrades mod might be straightforward.
v2.0 has vanilla ui_workshop.script just to indicate that this mod changes something there. The code itself is in Banjaji_field_workshop.script. I inject functions into ui_workshop.script so that for example another mod that modifies crafting UI could be used simultaneously with this one because both mods change different functions in the same script.
So basically if you modified eg. upgrading part in ui_workshop.script in v2.0 then Banjaji_field_workshop.script overwrites the changes. You need to find the same function in the latter script and make the changes there.
Does this mean that your mod is compatible with "Full upgrades" and I can install it on top of your mod?
Not yet to my knowledge. I'll look into it for the next features update (v3.0).
Now there's a patch in MCM for Swergdach's Full upgrades for weapons and armor. There wasn't a point to reinvent Swergdach's mod so the update brings v2.1 instead of v3.0.
Seems to be working, so far anyway. Thanks man.
Banjaji, you probably did not pay attention to what I wrote above, how to make your mod work with "Full upgrades". If you took the same functions from the "ui_workshop.script" file and put them in your script, then you need to make the same changes, only in your script. I did it myself and now "Full upgrades" works with version 2.0 of your mod. Now in the script "Banjaji_field_workshop.script" we change the following: line 810, at the end of the line we change "false" to "true" and everything works.
EDIT: I also noticed that this function works standalone without the "Full upgrades" mod itself, so you can enable it as an option in the MCM menu in the future.
Yup, got it. Thanks! I just haven't had time to even open the files. It is on my todo list.
I added a patch for the mod (enable from MCM). Yes, when you force "flags[4] = true" then the button is enabled in the UI (cosmetically) but the upgrade won't actually get installed and the resources are wasted. That's where I got stuck before v2.0. Basically in order for the alternative upgrade to get installed you need the LTX files from Full upgrades mod. I don't know the exact place/script where this happens but I think the game checks for upgrades separately from the workshop/mechanic dialogue UI. So when the LTX files don't list a possibility to have all the upgrades then the extra ones from the same group get erased.
By the way you probably tested the patch with buying the upgrade from a mechanic instead of doing it in the field. Since mechanic's dialogue uses another UI then it seemed like the upgrade was installed but in reality it wasn't. In the workshop UI the button gets undone without closing the UI as soon as you hit "upgrade".
If I understand correctly, the "flags[4] = true" option is not standalone and still requires "Full Updates" to work correctly?
Yes. Basically I put that into my code with an MCM option toggle. Install Full upgrades and turn on the patch from my mod's MCM menu.
[error]Arguments : LUA error: ...ly/bin/..\gamedata\scripts\banjaji_field_workshop.script:439: attempt to index field 'clr_list' (a nil value)".
This error actually occurs when clicking on armor in the repair tab with the "Repairing armors doesn't require repair kits" option disabled.
Thanks for the info. Fixed it in the new version. It was just a stupid mistake that I referenced a table from the original file without checking if it was global.
Updated to v2.1. Fixed a crash and added a patch for Swergdach's Full upgrades for weapons and armor.
Could you add an option to force "full percentage parts" (similar to how WPO does it)? Can't actually change it the normal way for Invictus run players, since modifying progression or gameplay difficulty settings breaks the achievement.
Hmm... I've been thinking whether to do it or not and actually like the idea since certain vanilla scripts give out weird results with simplified parts system (eg. lowest condition is 25% instead of 0%). I'll tinker with it for the next update.
It's certain that it's pointless to put that option into MCM since doing something in MCM menu also triggers the same on_options_change() function.
Great mod!
It works on weapons but it crashes my game when attemping to use it on any armor...
The log says:
LUA error: ...y-1.5.1.2\gamedata\scripts\banjaji_field_workshop.script:439: attempt to index field 'clr_list' (a nil value)
Mods I use are Death Animations and Anomaly HD Models. No MCM.
Any tip?
Update to v2.1 (uploaded yesterday). I fixed the bug in that version. The crash was my fault and has nothing to do with other mods.
Well...Installed the 2.1 and still have the same crash.
So I installed the Full Upgrade mod, then your (2.1) then the Full upgrade Workshop Patch and the crash is fixed :D
Just so we're clear, are we talking about the same crash that StronGV posted here on April 12? Meaning that you get the error when clicking on armor in the repair tab with the "Repairing armors doesn't require repair kits" option disabled in MCM? I'll comment about that fixed crash but if you got it somehow else then please provide specifics of what you did to get the crash.
I did a clean test. I downloaded the v2.1 mod from here, installed it (with MO2), disabled everything besides MCM and downloaded version of this mod and booted up the debug map. Nope, the error is gone (looking at the code confirms it).
So I can think of 2 explanations. One is that you somehow didn't install v2.1 properly so that previous files didn't get overwritten. Second is that my monkeypatch failed to run on game start and you had the previous code leftovers somehow. Both are unlikely unless you messed up bad. So yeah, I don't know how to help you besides "do a clean install and test v2.1 that way". You did install the "gamedata" folder in "v2.1" folder and not the "v2.1" folder itself, right?
Full upgrades modifies original ui_workshop.script upgrade part that I overwrite with my monkeypatch. Also toggling the patch for it in the MCM menu only changes one "if" check outcome. Neither Full upgrades nor the MCM-toggleable patch for it have nothing to do with the repair tab in the workshop so it couldn't have fixed the crash.
Really dunno.
I'm using JSGME to install mods and I removed the previous patch
completely before upgrading to 2.1.
Maybe was another mod and you was working properly :P
Anyway thanks to your creation the game is really fun now. Ty!