QoL addon with some companion tweaks, mainly on carryweight and looting
Conflicts : none, fully QoL
Risks : very low risk but needs further testing to be sure
The latest release can always be found on my github (link). If moddb links are down, you can download it here.
What this addon does :
1. Companion loot command now works as intended, it can be used to make them pick or not pick stuff lying around
2. Companions don't accept radioactive stuff you give to them unless it has suitable containers. Also if the artefact/attachment has a carryweight bonus it will be applied to them(there's a cap on how many based on the available artefact slot)
3. NPCs don't carry around raw radioactive artefacts anymore, they'll be automatically put inside lead container
4. Companions will get carryweight bonus from the backpacks you give them, and in case of multiple backpacks they choose only the best one. Exo/nosorog companions don't get the backpack bonus(it can be changed in the script, but why?)
5. Companions minimum carryweight will be your game difficulty setting, And they get extra carryweight based on their outfit/visual. And it works with(and highly recommended to use) DNPCAV(link)
6. Story NPCs works slightly different, they accept backpacks/artefact/attachment like the others but their outfit/visual bonus is dependant on an ltx instead. It can changed via gamedata\configs\misc\story_npc_carryweights.ltx. Story NPCs have a default outfit bonus set at 30 kg, but you can override that value by adding a corresponding value to the NPC's section name (example within the ltx, 50kg given to hip
Installation :
Simple, its a conflict free addon. So just merge with gamedata folder but its highly recommended to use Mod Organizer
Highly recommended to use alongside companion carryweight unlock(link) because the game has a bug that makes certain items in NPC inventory invisible, this fixes it and also gives you full access to their inventory
known bugs and further plans :
no known bugs by far, but let me know if you find any. Note if putting artefacts in containers could affect artefact fetch quests
Also I was trying to rework companion weapon selection based on target and also adding a method to tell your companion which gun to use. But there seems to be an engine bug so its put on halt
I am open to suggestions as I want to do more stuff on companion
Changelog :
1.1 - fixed two crashes on line 77 and 86 on nil values
Credits :
Ravenascendant (co-author )
Average
9.957 votes submitted.
If moddb links are down, use the github link to download
If you get either of
error]Arguments : LUA error: ....2\gamedata\scripts\dynamic_companion_carryweight.script:77: attempt to perform arithmetic on a nil value
Or
error]Arguments : LUA error: ....2\gamedata\scripts\dynamic_companion_carryweight.script:86: attempt to perform arithmetic on local 'attach_carry' (a nil value)
Make sure to update as they're both fixed
Man, i can't dl nothing here anymore omg, but thanks for ur QoL mod
Yeah I noticed. You can download from my github, link in description
Thank you sir
Nice
is it compatible with companion inventory unlock?
Yes, recommended (it's in the description)
How about also posting to Game Banana? Or hell even Nexus Mods?
What for 🤨
Cool mod)
if only they can stay alive long enough for me to see how this work
This is so terrific, thanks so much. Do you think it's possible to give followers extra ballistic protection via armor plates or artifacts? I've always wondered.
Might be doable
Crash when you try to loot your own body in Azazel
Send me the crash log in discord plz
Sounds like an unrelated issue to this addon
The companion system initially has a bug due to which the patrol mode does not work correctly. The companion goes through the specified points and stops at the last one (apparently, the cycle does not work or npc forgets his previous points after visiting them) Could you fix this?
I don't know what you mean by patrol mode because it doesn't exist. You probably meant the follow/stay command, try the addon 'companion anti AWOL'
If you will talk with companion, you could see "2.Patrol this place". Then you will show him walk points. I meant it, sorry.
Does this work with existing games?
Currently I have Hip as a follower (searching for artifacts) and although her max carry weight shows as being higher when viewing her inventory with this mod (in line with the overrides), she can never carry more that her default 30Kg. Adding a backpack also shows as raising her max weight. But, again, I cannot put more than 30Kg in her inventory.
Cheers.
Interesting, there could've been something I overlooked for story NPCs, and yes its supposed to work on any save
Also, if you're using the 'move all' command in the inventory, it doesn't work because that's hardcoded to 30, you have to move items one at a time
Thanks for the reply. Appreciated. Just to confirm though, this is adding items individually, not with 'Move All'...
Just as an addition (missed this first time), without this mod Hip has a max carry of 30Kg. With this mod it's 107Kg. Changing the override to '0' results in a max carry of 57Kg. Not sure where the extra 27Kg is coming from, but it makes no difference. Only 30Kg can be added to her inventory. Very odd.
Even tried emptying her inventory, saving, reloading, and then checking. No change.
EDIT: It's almost as if it's updating the text at the bottom of the screen, but not actually updating the NPC's carry weight.
EDIT: Issue Resolved...somehow. Started the PC up today and thought I'd give the mod another good and, to quote Todd Howard, 'It just works'.
Very bizarre. Can only assume that something was cached in memory that was interfering in some way. Not sure how. Never had that issue with any of the Stalker games.
Be that as it may. Sorry to bother you. Not your fault.
Great Mod! Thank you so much for making this!
Excellent mod, but for me looting by companions doesn't work...
My companions still doesn't loot corpses for some reason
Same here.
I think there's been a misunderstanding. This addon just gives a turn on/off button for companion looting. It doesn't add any other logic for AI looting. The purpose was simply put a stop to them picking up all the junk they come across. It doesn't tell them when to loot and not to
Theyre still not looting corpses for me.
how to add more carry weight
Does it work with GAMMA?
It should
Hi,
i found a bug in the description, it's conflicting with the paranthesized mod and causing OCD:
"Highly recommended to use alongside companion carryweight-inventory- unlock(link)" :)
Brother, I don't think that's what OCD means LMAO. It's CTD brutha
You probably didn't get the joke. If you read the description carefully you might :)
Might be something that changed from 1.5.1 to 1.5.2.
The mod in the link aims to fix a bug in companion inventory, which is probably fixed in 1.5.2 itself
no i mean you've written companion "carryweight" unlock, instead of companion "inventory" unlock. You've merged yours and raven's mod into a new wordgame patch :) (surreal coding)
Ah I see. Missed the pun entirely lol. And I appreciate the compliment
Hey sneakydud I'm having problems with the companion's inventory weight. Sometimes it seems that the weight limit resets to the default values and I can't give hip any more loot, even if the weight limit on the inventory is still far from full. Also I keep getting errors in debug when I talk to her related to weight.
Here is the log Drive.google.com
But once I take all the items and put them back(including the backpack) it seems to go back to normal. But the error is constant
Also, this one when I open her inventory Drive.google.com
Yeah i'm also having tons of errors like that in console when opening stashes/inventory etc...
Mod hasnt been updated since ages so thats probably the reason :(
Yeah, haven't even noticed the 2021 over there. Sad.
This is a must have, I really think it should be updated, or someone take it over idk.
I will look into it. However I can't find the same level of motivation I used to have when I made this
Thanks! but although I commented on the errors and stuff the mod is still working as intended, I just don't know if the errors are harming anything else.
So don't worry too much.
This comment is currently awaiting admin approval, join now to view.
Hey, this is a very useful addon, but I'm getting strange messages. This message is repeated in the log and it is always the same entry. Definitely over a hundred. I didn't count them. I don't know if it's just a simple message or an error.
! [LUA] CScriptGameObject::IterateInventory non-CInventoryOwner object !!!
! [LUA] 0 : [C ] iterate_inventory
! [LUA] 1 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(55) : sk_get_extra_carry_weight
! [LUA] 2 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(22) : axrbase
! [LUA] 3 : [Lua] ...edata\scripts\zz_companion_carry_weight_unlimiter.script(24) : is_overweight
! [LUA] 4 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(98) : inventory_update
! [LUA] 5 : [Lua] c:/games/anomaly\gamedata\scripts\stash_capacities.script(33) : UpdateWeight
! [LUA] 6 : [Lua] c:/games/anomaly\gamedata\scripts\ui_inventory.script(1318) : UpdateInfo
! [LUA] 7 : [Lua] .../anomaly\gamedata\scripts\zzz_rax_sortingplus_mcm.script(551) : LMode_Init
! [LUA] 8 : [Lua] c:/games/anomaly\gamedata\scripts\ui_inventory.script(3536) :
! [LUA] CScriptGameObject::IterateInventory non-CInventoryOwner object !!!
! [LUA] 0 : [C ] iterate_inventory
! [LUA] 1 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(55) : sk_get_extra_carry_weight
! [LUA] 2 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(22) : axrbase
! [LUA] 3 : [Lua] ...edata\scripts\zz_companion_carry_weight_unlimiter.script(24) : is_overweight
! [LUA] 4 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(98) : inventory_update
! [LUA] 5 : [Lua] c:/games/anomaly\gamedata\scripts\stash_capacities.script(33) : UpdateWeight
! [LUA] 6 : [Lua] c:/games/anomaly\gamedata\scripts\ui_inventory.script(1318) : UpdateInfo
! [LUA] 7 : [Lua] ...amedata\scripts\zz_ui_inventory_better_stats_bars.script(1309) : f
! [LUA] 8 : [Lua] c:/games/anomaly\gamedata\scripts\_g.script(374) : functor_a
! [LUA] 9 : [Lua] c:/games/anomaly\gamedata\scripts\_g.script(462) :
etc.
Oh I see what's wrong, I'll fix it. Meanwhile you can just ignore it because it's just a warning, its not gonna break anything
During a search of any stash or corpse, the following is written to the log:
! [LUA] CScriptGameObject::IterateInventory non-CInventoryOwner object !!!
! [LUA] 0 : [C ] iterate_inventory
! [LUA] 1 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(55) : sk_get_extra_carry_weight
! [LUA] 2 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(22) : is_overweight
! [LUA] 3 : [Lua] ...ly\gamedata\scripts\dynamic_companion_carryweight.script(98) : UpdateWeight
! [LUA] 4 : [Lua] i:/games 1/anomaly\gamedata\scripts\ui_inventory.script(1362) : UpdateInfo
! [LUA] 5 : [Lua] i:/games 1/anomaly\gamedata\scripts\ui_inventory.script(3689) :
Just spam in the log, without crashing, how safe is it?
It is safe, but I will have to fix this annoying warnings
With the mod installed, my companions won't pick up a weapon I drop at their feet for them to use. Even if I indicate through the dialog that they should pick up loot, they won't do it. I prefer for this weapon to go into their restricted inventory so that it is distinct from other weapons I give them to carry.
This comment is currently awaiting admin approval, join now to view.
I've found a truly bewildering bug that is seemingly related to your mod. Whenever I load a save, or transfer area with your mod installed, I start getting the following error with other mods:
_____________________________________________________________________________
! [SCRIPT ERROR]: ... nomad/nomad - game/bin/..\gamedata\scripts\xmark.script:42: attempt to perform arithmetic on upvalue 'increment' (a string value)
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : C:\anomaly_src\xray-monolith\src\xrServerEntities\script_engine.cpp
[error]Line : 257
[error]Description : fatal error
[error]Arguments :
1 : [Lua] ... nomad/nomad - game/bin/..\gamedata\scripts\xmark.script(42) : func_or_userdata
LUA error: ... nomad/nomad - game/bin/..\gamedata\scripts\xmark.script:42: attempt to perform arithmetic on upvalue 'increment' (a string value)
________________________________________________________________________
What is really weird about this though, once I've had this error generated, I need to fully revert my Mod Organiser 2 instance to a previous version manually. Simply disabling your mod and loading a previous save, or even starting a new game will not fix the issue, immediate CTD on game load.
At first I thought it was a coincidence, but I've replicated it twice now after first fixing the issue with the script error above (from Inarkin's Hitmark) and starting a fresh game. After re-enabling your mod, Anomaly immediately then began generating the same error for another 2 mods that had also been problem free and stable before. All of these mods are stable otherwise, and don't have any conflicts with yours.
Any ideas?
This comment is currently awaiting admin approval, join now to view.