Prevent looting NPCs by player¶
Engine restrictions
It's only available for Gothic 2 Addon (G2A)!
This hook is triggered whenever the player tries to loot an NPCs while they are unconscious or dead. It extends the default looting system by allowing custom script conditions to determine whether looting is allowed.
To control looting behavior, define the following Daedalus function: zDExt_Npc_CanPlayerPlunder defined in Scripts/Content directory.
plunderer– NPC opening the plunder inventorytarget– NPC being lootedreturn–FALSE(zero) to block the action;TRUE(nonzero) to allow it. If the script call fails, the action is allowed and the failure is logged.
| Example usage | |
|---|---|