Adaptation of NPC Loot Claim v1.0.5 + Keep guns on bodies for Dead Air 0.98b
NPC Loot Claim description:
A dead NPC is first claimed by the killer's squad.
If the killer's squad is wiped, then the body is claimed by allies of the victim and killer simultaneously.
If none exist within range, then the body is unclaimed and the player can loot freely.
Player's kills are never claimed by NPCs.
If player tries to loot claimed NPC, a message from killer's squad will be shown.
After third attempt to loot claimed NPC, the player will be attacked.
It works only for NPCs, mutants can be looted freely.
For Keep guns on bodies there were added some exceptions to prevent spawning animation items to NPCs inventories.
NPC Loot Claim adaptation has a small bug: if player tries to loot dead NPC and this NPC wasn't killed by player, inventory will opens for a moment and then will be forced closed. It happens because Dead Air's engine doesn't have "GUI_on_show" event like Anomaly 1.5.1, so I can't catch exact moment of inventory opening and I had to use "actor_on_update" event instead.
If someone knows how to fix it, write in comments.
Описание NPC Loot Claim:
На погибшего NPC сначала претендует отряд который его убил.
Если этот отряд уничтожен, то на погибшего NPC претендуют союзники жертвы и союзники убийц одновременно.
Если в пределах досягаемости их нет, то тело считается невостребованным и игрок может свободно забрать добычу.
NPC не будут проявлять агрессию, если игрок обыскивает тела убитых им самим.
При попытке обыска не своей добычи, будет выводиться сообщение от претендующих на нее NPC.
После третьей попытки обыскать чужую добычу, NPC откроют огонь по игроку.
Работает только для NPC, монстров можно лутать всех подряд.
Для скрипта Keep guns on bodies были добавлены исключения для предотвращения попадания анимационных предметов в инвентарь НПС.
В адаптации NPC Loot Claim есть небольшой баг: если начать обыскивать НПС, который погиб не от игрока и на чью тушку претендуют другие НПС, то инвентарь откроется на долю секунды, а затем закроется.
Это происходит из-за того, что в движке Dead Air нет события "GUI_on_show" как в Anomaly 1.5.1, поэтому я не могу отловить точный момент открытия инвентаря и мне пришлось использовать событие "actor_on_update".
Если кто знает как это пофиксить, пишите в комментах.
Upadate 02.05.2022:
- readme fixes
Really immersive! No problems at the momento, thnks Bro.
Could you Port "loot takes Time" from Anomaly?
There are a lot of good mods for Anomaly, but I can't port all of them.
Can you make packs of dogs attack each other when they counter? I mean, that is how pack of dogs act in real life as well.