Original mod by Vintar.
Please let me know if you encounter any bugs.
This is a continued version of Vintar's NPC Loot Claim 1.0.5
Original : Moddb.com
Important!
If you want a version WITH inventory sorting addon compatibility (RavenAscendant's Addon)
You can download it from here: Github.com
Current Version Changelog
- Added compatibility for RavenAscendant's Sorting addon
- Fixed conflict with RavenAscendant's Sorting addon
- Fixed Sorting reverting back to being unsorted after opening any UI
- Trader UI is completely fixed.
- Removed Workaround for trader UI.
- Player Inventory UI still needs work, left workaround until fixed in future releases.
- Fixed CTD when attempting to loot claimed bodies then opening your inventory.
Updates
- v1.0.6.2 (Bugfix) - Fixed many CTD bugs / cleaned up code just a little.
- v1.0.6.1 (Bugfix) - Missed a few crashes and issues. Thanks MarqØ, for pointing it out.
- v1.0.6 (Release) - Patched trade exploit / Removed unnecessary callbacks / Removed unnecessary functions.
The mod description have all been taken from the original ModDB page.
Description
Note from continued author:
The goal of this continued version was to fix the exploit where if you attempt to loot a claimed body, then talk to a Trader, you could loot their shop items as if you were looting bodies. This continued version also fixes some of the rare crashes players get.
In vanilla Anomaly, NPCs don't claim bodies before they actually loot them, and are apparently okay with you stealing all of their loot right in front of them. Besides being unimmersive, this can break game balance by giving the player a ton of loot for free. This addon changes that by adding claims and preventing looting of other's kills under certain circumstances. You can freely loot your own kills, but trying to loot others' kills will be discouraged.
I also suggest setting the gameplay - general setting "corpse loot distance" to the max possible (25m), so that other NPCs are less likely to physically steal your loot.
How it works:
- When a STALKER dies, their body's loot is claimed by both the killer's squad and the victim's remaining squadmates. Only factions neutral to the player can make claims. If the actor killed the victim, no claims are made by any NPCs, and the body can be freely looted by the player
- If both the killer's squad dies, and the victim's squadmates die, then any allies of theirs within 50 meters will claim the body
- If no allies of the victim/killer exist within 50m, the body is unclaimed and the actor can loot it freely
- Attempting to loot a claimed body will prevent you from doing so, and you will be warned by one of the NPCs claiming it.
- Attempting to loot the same claimed body 3 times (not necessarily in a row!) will cause the NPC to issue a final warning
- Attempting to loot the same claimed body 4 times will cause the claiming squad to turn hostile to you. However, you will then be allowed to loot the body. You will lose some reputation and goodwill (-10) with the claiming faction for being a known thief/looter.
Compatibility:
- Can be safely installed/uninstalled mid-game without issue. Leaves no traces in savegame files.
- If the game crashes, this is only at the first run/rare occurrence. Just start the game again and it should work just fine.
To install :
- Install the 'gamedata' folder from 'NPC Loot Claim - Main'.
- (Or) Use Mod Organizer 2.
GitHub
The idea reads great, I like it, and I'm going to try it, for someone with "diogenes" syndrome like me is very interesting, let's see if it works, I'm very "friendly" to take the spoils of others, but only because it's "there".
The original was known to cause some crashes. Has there been any work done on that?
This version should be crash free. Let me know if it does. The only crash i know would trigger, is if you try and trigger the exploit from a body you killed with debug kill.
I like to see this as a rare punishment ;)
what are the changes in version 1.0.6??
Looking through the code, there are only some stability related changes. Should now be less prone to rare issues that could have taken place in 1.0.5.
Author's main goal was to fix bug where you could open trader's inventory like loot window and take all of the items, coz Vintar apparently left stalker modding. Should be added to description ;]
Has the issue of npcs falsely claiming kills been resolved?
Should be. Bodies only get claimed if their cause of death was anything but you.
This comment is currently awaiting admin approval, join now to view.
Hey man, thanks for your answer. But this means if they bleed out, I won't get the kill?
Time to get up close and personal.
Grant them a swift death, don't let them suffer.
What about companions? Do they also claim their kills or other fallen companions from your squad?
Dead companions are not claimed by other NPCS
And your companions wont claim kills and are treated as your kills.
Did you fix an issue with the inventory menu that original Loot Claim had?
To context, try looting a claimed body and press to open your inventory right after.
Thanks for pointing that out! should be easy to fix, pushing an update soon :)
are there any plans add this for mutants too?
It exists in the script, i just turned it off. Maybe in a future update an option will be available.
This looks like a much cleaner implementation of the original idea, nice job.
I don't have much time these days to mod or properly attend to all my addons. If you'd like to make this the official up-to-date version of NPC Loot Claim, I'm more than happy to redirect the original mod to this newer version you've made.
EDIT: I can also send you some code snippets from an unreleased version fixing claims on quest NPCS (like RF Receiver squads)
That would be great! Thanks! :)
Here's my Discord: Nullblank#0600
would it be possible to remove the claim from specifically technicians? It always bothered me they claim but never actually loot because they never move from their spots it isn't very immersive having xenotech being the only surviving loner and claim all of the bodies only to never loot them
I'll look into this for the next update.
Ok looking forward to it keep up the great work :)
todos los npc intentaran quitarte el botín? o solo algunos? y finalmente si los mato bajara mi reputación con la facción?
Lea la descripción: "También sugiero configurar el modo de juego - configuración general "distancia del botín del cadáver" al máximo posible (25 m), para que sea menos probable que otros NPC roben físicamente su botín".
yo usé el traductor de Google
hi, how is this different from the original mod?
I have read the description; is it just a clean up of code?
Am using and never had issues with the original mod, hence my question.
thanks
Apart from the code cleanup, the 1.0.5 version had a lot of exploits and triggered some random crashes (According to some users).
This one aimed to fix those exploits and possibly, add in features of my own in the future.
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: ...ly-1.5.1.2/bin/..\gamedata\scripts\npc_loot_claim.script:142: attempt to index global 'zzz_rax_sortingplus_mcm' (a nil value)
stack trace:
I do not have any of the sorting mods and I don't see them as requirements. The crash happens when opening the inventory. If i install the sorting mod then this mod works fine.
My apologies, I'll release a sorting mod free version.
Redownload the mod, tht should fix it now :)
having this crash after updating
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: ....r anomaly/bin/..\gamedata\scripts\npc_loot_claim.script:142: attempt to index global 'zzz_rax_sortingplus_mcm' (a nil value)
stack trace:
My apologies, I'll release a sorting mod free version.
Redownload the mod, that should fix it now :)
Thank you very much kind sir
I wonder if it would also be possible to remove the claimed tag if the npcs claiming don't loot then walk away as this often happens leaving bodies that are never looted
I believe the claim does go away after a short time but not 100% sure what the conditions are. I know I've returned to loot bodies that were claimed the first time I tried.
you probably reloaded this causes the tag to be removed I exploit this whenever a technician claims because they never move and would never take the loot
I'm almost positive it's happened without reloading, but would have to test it to be sure.
This is great, thanks! The only issue is that NPCs will steal my loot. I can kill them, of course, but sometimes I would rather avoid that if possible. Is there any way to fix it so I can warn them first?
Yeah this happens to me too and its quite frustrating.If i kill them theyd all turn hostile to me
I'm getting an occasional bug when I loot an enemy I press my inventory key afterwards and the inventory fails to open this then bugs my inventory so some of my other mods don't work like field stripping a weapon the only way to fix it is to reload this never happened before I started using this mod don't know if other people have this bug
Yep about the same.
Or this above or getting control locked (can't do anything except alt+f4), keep in mind that this can happen literally anytime.
Hey, thank you for picking up this mod. Any chance it could work in Vanilla COC or COTZ(https://www.moddb.com/mods/doctorx-call-of-the-zone) ?
The original unfortunately never worked in COC or COTZ.
Would this version work with them? Would it be hard to convert it?
Thank you!
I'm using it with EFP 3.0., they also recommended turning it off so I thought I try your version.
There is a bug, when you interact with any corpse that was marked, you press TAB for inventory and first, it doesn't open. Second time you open your inventory, it completely messes up the item order, and removes the "field strip" ability from Weapon Parts Overhaul, the option just simply disappears.
It is easily fixed by going to another area or reloading a save, but this bug disables the whole idea of the mod.
Is this mod compatible with the latest release of the game?
I am also encountering the bug where the inventory sometimes fails to appear when looting a corpse and then causes other things to bug out until reload. I hope this can be fixed because this mod is a fantastic idea that adds much immersion to your interactions with other stalkers.
The inventory failing to appear is intentional to avoid a possible exploit that can happen. The bugs caused by it happen because it resets the inventory GUI which undoes the injected patches other addons use to work, which utilize the inventory UI in a clever way to add their features without conflicting with other mods.
Does this prevent hired companions from looting outfits and upgrading from loot?
This mod unfortunately messes up the inventory sorting mod, making it not work after looting another body after being denied due to this mod.
you may already be aware of this, but the version with sortingplus compatibility has a memory leak. after you open 5 or 6 inventories, you can notice that performance gradually tanks worse and worse while you have any inventory UI open (backpack, trade UI, loot ui, etc). performance is normal with no inventory open, though.
it looks like this is related to you repeatedly calling "zzz_rax_sortingplus_mcm.actor_on_first_update()" in your npc_loot_claim.script. Presumably this function is only intended to be run once on game launch; calling it multiple times is likely stacking copies of sorted icons on top of each other or something of similar quality to this.
hope this helps
hey there, as the author does not seem to be answering, would you mind sharing your solution if you found one? thx