sp0ckrates Posted October 18, 2017 Share Posted October 18, 2017 (edited) So I've released this mod HUNT NPC Skulls. Works great using dynamically added scripts to put the skulls in NPCs' inventories when they die and remove their heads when the player loots the skulls from them. Now, the skulls are bloody until cleaned in a cooking pot. (Sick! Right?) But I'd like to make it more immersive. I'd like to make it a minor crime to cook a skull in someone's cooking pot, like the one in the Bannered Mare. It would be sweet to have a script treat the skull washing like the trespassing crime, so people shout, "You need to leave!" and the guard arrests the player if she doesn't. Anyone have an idea how I might begin to figure out how to do this? (I'd be happy to share the skulls as a mod resource with someone who has the solution.) Edited October 18, 2017 by sp0ckrates Link to comment Share on other sites More sharing options...
JonathanOstrus Posted October 18, 2017 Share Posted October 18, 2017 You can add bounty via script but you need to determine the faction. The simplest way is to attach a script to the newly crafted item. So I presume this as follows. You have 2 misc items; one bloody skull and one cleaned skull. Then you have a crafting recipe for making a clean skull using a bloody skull as the cooking ingredient. You would edit the misc object for cleaned skull and add a new script. Something like this could be used as a base. Note: It is not ready to use as it uses a hardcoded faction for the crime. I don't know how to detect the crime faction for an arbitrary location the player may be standing in. Scriptname AddBountyOnPickup Extends ObjectReference ;This can be removed if the value is hardcoded instead int Property BountyValue auto {How much bounty to add when acquired} Faction Property BountyFaction auto {What faction to add bounty to} bool Property RunOnce = true auto {Only run one time} ;local script var to bool AlreadyRun = false Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if !AlreadyRun BountyFaction.ModCrimeGold(BountyValue, abViolent = False) endif if RunOnce AlreadyRun = true endif EndEvent Link to comment Share on other sites More sharing options...
sp0ckrates Posted October 20, 2017 Author Share Posted October 20, 2017 You can add bounty via script but you need to determine the faction. The simplest way is to attach a script to the newly crafted item. So I presume this as follows. You have 2 misc items; one bloody skull and one cleaned skull. Then you have a crafting recipe for making a clean skull using a bloody skull as the cooking ingredient. You would edit the misc object for cleaned skull and add a new script. Something like this could be used as a base. Note: It is not ready to use as it uses a hardcoded faction for the crime. I don't know how to detect the crime faction for an arbitrary location the player may be standing in. Scriptname AddBountyOnPickup Extends ObjectReference ;This can be removed if the value is hardcoded instead int Property BountyValue auto {How much bounty to add when acquired} Faction Property BountyFaction auto {What faction to add bounty to} bool Property RunOnce = true auto {Only run one time} ;local script var to bool AlreadyRun = false Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if !AlreadyRun BountyFaction.ModCrimeGold(BountyValue, abViolent = False) endif if RunOnce AlreadyRun = true endif EndEvent Thanks. That's a start. Still wondering if there's a way to have the NPCs residing in the building react as though the player is trespassing and the guards ask the player to leave. Link to comment Share on other sites More sharing options...
lofgren Posted October 20, 2017 Share Posted October 20, 2017 You can create a story manager event that will detect the nearest NPC and have them react as though the PC has committed a crime. Link to comment Share on other sites More sharing options...
Recommended Posts