Revamped outfit degradation and repair mechanics.
Motivation
Eliminate the panic and frustration when armor goes a long time without repair and drops below an arbitrary repair threshold, forcing the player to go out of their way to fix the outfit. It is annoying that the player can't simply make a shoddy repair to get them through until they get back to base. Let the player worry about other things than obsessively checking their armor condition every time they get hit. Make salvaged outfits usable without needing to wait forever. Indirect buff to anomaly based suits due to difficulty of repair of ballistic-heavy suits.
Keeping in theme with WPO "usable, but not good". Recommended to use full condition parts.
The latest can be found here: Github.com
Changelog
- 1.1.2 - RUS translation from Aonestr
- 1.1.1 - Mainlined armor crafter into OPO, now that the conflicts are gone.
- 1.1 - Miscellaneous outfit parts are now eligible to repair any outfit (appropriate to sewing/repair kit strength). Sewing kits and outfit repair kit max part restoration greatly reduced; this bonus can be restored with using outfit parts, and matching the outfit part to the outfit vastly increases effectiveness.
- 1.0.9 - Workshop no longer restores condition, only max condition. This is to balance out otherwise powerful and low-cost suit repairs. Max condition is displayed in workshop.
- 1.0.8 - Projected max condition is displayed in repair screen now.
- 1.0.7 - Parts damage modifier can now be changed in MCM. Fixed small issue where information on repair wasn't sent to user.
- 1.0.6.2 - Fixed the annoying issue where max condition didn't reset after workshop repair.
- 1.0.6.1 - Revised damage table so parts can't die faster than the suit. This should stop those annoying 'using a glue and getting your suit trashed' bugs. Nerfed sewing kits as compensation.
- 1.0.6 - Restricted usage of low quality repair items on more expensive armors. Removed redundant messages on repair. Added more information in descriptions for repair items.
- 1.0.5 - RUS translation from Oleg Beon
- 1.0.4 - Increased wear on outfits, hopefully advanced armor should get some dings in there now. Rebalanced pricing and restoration on outfit repair items. Quick fix for OP Tur glue. Another quick fix for monkey patch allowing repair to go past max condition. THIS MAKES THE ADDON HARDER, don't use if you are happy with the degradation rate now.
- 1.0.3 - Monkey patched out dependencies where possible. Removed extraneous files.
- 1.0.2 - Tweaks to script for efficiency and to not clog the console. Buffed armor repair for items that were disproportionately expensive with the new changes.
- 1.0.1 - Added some rounding up to the max condition. Changed sewing thread and field repair kit to replace no condition, requiring spare parts to be useful, but increased uses to 5.. This should make the grind for parts harder. Fixed patch file for speed. There is a known issue right now where after repair max condition may not update, but it is updated.
Features
Outfit max condition
- All outfit repair items work from 0% condition.
- Outfits have a max condition dependent on the conditions of the parts.
- The max condition is 20% + (average of all parts) * 80%.
- Attempting to repair past this threshold with repair items will result in being capped at the max condition.
Outfit damage
- Damage to the outfit will degrade parts conditions. This is based on outfit immunitites.
- Different damage types affect outfit parts differently. Getting mauled by a Pseudodog will shred your fabrics but your armor plates should be reasonably intact. Acid will melt through your armor plates but your retardant components should resist the damage well. Electricity won't do much structural damage but will absolutely destroy your exo frames.
- Outfit condition does not affect how much damage the parts take.
Outfit repair:
- Parts in the outfit can, in addition to being replaced, be repaired with certain repair items.
- How this works is, when a repair item is used, the amount of "total condition restored" (rightmost column) is restored to parts eligible under "can repair".
- For example, say you have leather jacket with fabric 1 at 50%, fabric 2 at 60%, fabric 3 at 100%. If you use advanced sewing kit to fix the jacket, fabric 1 will gain 50% condition and be set to 100%, fabric 2 will gain 25% condition and be set at 85%.
- Repair will always prioritize the parts it can repair first. If using a repair kit on an item with damaged fabrics, retardants and ballistics, it will repair the ballistics first, then retardants, then fabrics.
- With multiple components of the same type, the condition is applied on a first-come first-serve basis.
- Outfit parts can be used to support any repair, if the repair item supports it. This gives a huge bonus to max condition repair if the part matches the outfit.
- User will be prompted on what components were restored.
- To replace helmets, drag and drop new helmet to outfit with helmet repair kit in inventory. This will consume one charge of the helmet repair kit.
- Technician will restore all parts to full condition.
Repair UI - max condition display
Table of repair items and effectiveness
Workshop UI - max condition display
-- OPTIONAL SECTION
Armor crafter addon will let you craft ballistic and retardant components out of components you do not need.
To use:
Drag a disassembly tool (leatherman, grooming kit, swiss knife) over a component you want to disassemble. You will receive 1-4 of component base parts. Combine 15 and a Field Armor toolkit charge at a workbench with Advanced tools. Recipes are scattered between Mechanics manuals.
This mini-addon works standalone and conflicts with other craft overhauls.
-- END OPTIONAL
Changes to existing script files (For merge purposes)
items_repair.ltx - New values for outfit repair items
item_parts.script - Prevent part condition reset when parts exist (essentially make evaluate arg do nothing)
item_repair.script - Callback into main script file to adjust parts condition and round off outfit condition.
ui_inventory.script - Reset stored parts condition on technician repair (thanks Lucy)
ui_workshop.script - Callback into main script to compute correct repair values for parts replacement.
utils_ui.script - Add the max condition field to armor display.
Compatibility patches for WPO and outfit speed available.
I was really waiting for this addon, cool!
There was some problem in the earlier iteration, download the new one or make this change to arti_outfits.script
L92: if outfit and outfit:id() ~= current_outfit and has_parts(outfit) then
I am having some problems with Moddb, contents are fine but some images and crap are broken.
As if I knew, I postponed the adaptation :), tomorrow I will be able to do testing on bugs, if anything, I will write here.
Thank you for your help.
Awesome mod, I never realized just how bothersome the armor repair mechanics were before :O Also, could you consider making patch for Artifact Renovation? Thanks anyway
Artifact renovation's only conflict is how the artifact stats are displayed in the inventory. It's perfectly safe to overwrite the conflict with Artifact Renovation with this addon's files
This comment is currently awaiting admin approval, join now to view.
I love your work man :) Will test on free days :)
This works with More Outfits and Variations, right? At a glance, I don't see anything conflicting...?
This should not conflict with any outfits mod or parts mod. The only core files I have changed are repair to enable this feature and the various script files to support it.
I LOVE YOUR ADDONS! KEEP GOING BRO!
I have a weird bug, but I'm not sure it is a bug. The outfit I'm wearing has a max condition of 95% but all the parts show they're at 100% condition. By the formula this should result in a 100% max condition, right? What could be going on here?
The math is off sometimes, but I didn't realize it could be this off. What suit is this?
Also are you using full condition parts? If you don't, the condition you see can be anywhere from 76-100%.
For whatever reason, going into the light armor menu for the debug menu and then going to another and then back again (so, it'd go Light Armor > Medium Armor > Light Armor) crashes the game with this error:
gamedata\scripts\utils_ui.script:1206: attempt to index local 'a' (a nil value) (at line 191)
Don't know if this is on my part or the mods, but I don't have anything else that touches this, so I'm bringing it to your attention.
That's really weird. The only thing I did was add an extra row to stats. Let me see if I can reproduce it.
Edit: Unable to reproduce this error. What else are you using? Any custom outfits?
Custom outfits are a go with the EXO-SEVA mod, but that's not on Armor-Light or anything.
There's Trader Overhaul, but I picked the version without any outfits or anything as well.
Let me see if it's reproducible on any other "category"
EDIT: Alright, so it does crash on both "medium" and "heavy" (light armor seems to be the exception here; it mostly seems to be medium) but it seems like it's a problem of the script not having enough start-up time at the beginning or what have you.
A good solution that I've found is either "wait long enough for it to just get to everything on it's own" or "hover over something else textbox-wise so that it works out alright when you click on the armor category"
Still not entirely sure what the cause is, but if push comes to shove, I'll just take out the UI addition and just work along with it lol
Translation into Russian would.
Will there be problems with the Armor crafter add-on with this mod Moddb.com?
It's just that the files intersect there.
Yea there will be problems. It is easy to solve though, just merge craft.ltx
It's a pity, I don't know how to unite, can you create a better compatibility patch?
use WinMerge software - it is very easy. Extremelly easy.
Compare 2 file from 2 mods (in this case craft.ltx) and make changes when there is something to change. it is very easy. You can do it, man!
After updating the mod, the performance of the artifact is no longer shown in the inventory.
I installed OPO only and checked it in debug mode.
In my normal play environment with a lot of other mods installed, the artifact's performance was just not displayed, but in debug mode with only this mod installed, the game crashed the moment I spawned the artifact in my inventory that was not in a container.
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: ... files/anomaly-1.5.1.2/bin/..\gamedata\scripts\_g.script:1879: bad argument #1 to 'pairs' (table expected, got nil)
PS:Food and drinks also do not show calorie indications, etc.
Try now, I messed up with the utils_ui hot patching.
The newest version has fixed the CTD. Thanks
Yes, it's working fine. Thanks for the fix.
It was a bit of an accident, but for someone like me who has a lot of mods installed, it's very nice to have a little less conflicting files.
I have this problem too.
So I'm having an issue figuring out how to use the field repair kit to replace item parts. Are not able to repair suit parts without the total condition being under 100%? I can't get the mechanics to repair it and I can't repair it with main repair kits myself either, since it's at 100%. So I was trying to replace the part or find a way to repair the part within the suit though I'm betting you can't do that. The field repair kit now says it's able to replace and repair parts for suits, but i'm not seeing how to replace the parts. I looked at the workshop and even if I have a part in my inventory it doesn't want to show up in the workshop as available to be used for replacement.
So the two problems i'm having are I can't replace suit parts with the field repair kit, and when the suits main condition is 100% I cannot repair the parts that are damaged.
The Field armor repair kit? That hasn't been changed functionally, it is still only to repair outfit parts. There is some rounding up for max condition that happens (if max computed condition is 98 or 99, it's set to 100), are you seeing something where a part is heavily damaged but can't be replaced?
Ah okay for some reason the description of the field armor repair kit threw me off. I think I understand the addons changes more now. The main suit repair kits are for repairing the parts while most of the other stuff is for maintaining things until you get the main suit repair kits. Replacing the parts doesn't consume a charge of the main suit repair kits but still replaces the part.
The main problem is if your suits main condition is at 100% you can't repair the damaged parts without replacing them. Without a workbench.
Yes I believe that description is still in vanilla.
That is true, and I may patch that out later. I figure if your suit is at 100%, why worry?
My ballistic plates in my suit were around 50% so I was a bit worried :).
Oh hm, I didn't realize it could stretch that far and not affect max condition significantly..I'll take a look at it.
Can I continue to safely use version 1.0.3?
outfit_parts_overhaul. 6
Yea, older versions should fully be working. Newer version are just to increase compatibility.
So did you change it to were all the light outfits do not use the light outfit repair kit? They all want to use the field armor repair kit instead, or is it just for replacing fabrics?
It happened when I opened the item spawner in debug mode and then opened the "items (misc)" list, if I remember right. Then it instantly crashed, given the above message.
seems like "self.area" returns nil. So I've added a check to prevent the function from continuing in case a == nil, and return -1.
I'm not sure if this is one of these weird engine-related situations... I'm not very skilled with LUA, but it seemed to fix it. No more crashes now and the addon is working fine.
If you like to see what exactly I've added, just contact me. Thx
--
that issue is entirely vanilla. I had the idea to compare it to the vanilla script and saw that this Has nothing to do with this mod.
hello @manzmnl, could you please share the code you've used to fix the error? Im getting the same crash error message.
Hey!
I would like to inquire about the availability of Russian localization for your mod.
The description is intriguing. In my opinion, this is how the damage mechanic in Anomaly should have been, this is definitely a must-have mod in every build.
I don't know russian so I haven't localized it. I'll accept any crowdsourced translations, however.
Ok I re-read the description to look at the table for repair kit effectiveness. However I'm still confused on the smaller items such as glue tubes etc. Will those repair individual parts within the items, and do they only repair those parts up to a certain level?
Any chance of full armor degradation removal or slowing it down as an optional file? Would really appreciate that.
Hey
I have noticed that when wearing a kevlar plate, the outfit parts no longer lose condition. Is that intended?
Cheers
Interesting. The outfit degradation is based on how much damage the suit itself would take normally. I'll need to look into this, or disable checking with artifacts completely.
EDIT: Make sure you're using full condition parts.
I am.
Also I am playing with the first version of your Outfit Attachment Overhaul before you added conditions to the attachments. I liked the idea to craft better attachments with artifacts.
how does this mod work with ModOrganiser 2 ??
i ask cause when installing it dosnt ask anything so i have no clue if it somehow applied the patches or not (propably not)
could you make your mods MO2 compatible so it asks you what do you want to insteall etc ?
Thanks
EDIT
ok if instal it and click manual now i see the patches and can add stuff manualy but its weird that the manager did not show this manual windov automaticly ...
will have to check all mods installed just to be sure PepeHands
I used a "Tur" Glue on my rookie jacket and the tooltip, which said 91%, went to 77% after using it. I know there's mechanics related to outfit components but I'm not sure what purpose the Glue has since it just seemed to degrade the outfit. A heavy sewing kit brought it to 100% as well as the components to 99%
Nah this is a problem because part condition can degrade faster than the suit. I will rebalance those numbers.
Hey artifax, very rarely I still get this crash with your latest version: utils_ui.script:1207: attempt to index local 'a' (nil)
I re-added a condition check for "a == nil", which fixes it. As far as I can tell, there's no other mod that would affect this. But I could be wrong. Anyways, just wanted to let you know.
Thanks, I'll add that in
EDIT: Hold up, I don't even edit that file. What other addons are you using?
The OPO-EFT Medic Items Overhaul patch is outdated since OPO 1.0.3.
my parts degrade altogether the same amout every time, even when i get hit with a bullet or a mutant, all the parts degrade with the armor with the same amout (for example 92 92 92 92), dunno if it's normal because i used to repair from the mechanic very ofter or it's some other addon conflicting (no other addons replace your file tho only your wpo compatibility)
is this normal?
Shouldn't be normal unless you're using outfit with only fabric/retardant components, ballistic should take reduced damage from bullet and mutant