reptileye Posted May 31, 2023 Share Posted May 31, 2023 Hello. I'm working on a mod that takes into account whenever the player loots the body of a guard and adds a crime bounty to him. This works so far but i want to add a keyword to the corpse of the guard so the option to loot appears only a first time when the player interacts with the corpse. I used a perk with an entry point replacing the regular looting for a little window that says "loot". Once the player clicks that button the body can be looted as usual and the bounty is added as expected but i need to add a keyword to the corpse so the entry option appears just once and doesn't appear again on that corpse. This is for Skyrim Special Edition by the way. Link to comment Share on other sites More sharing options...
dylbill Posted May 31, 2023 Share Posted May 31, 2023 Papyrus Extender has a few keyword functions, including AddKeywordToForm, ReplaceKeywordOnForm and RemoveKeywordOnForm. https://www.nexusmods.com/skyrimspecialedition/mods/22854 Link to comment Share on other sites More sharing options...
reptileye Posted May 31, 2023 Author Share Posted May 31, 2023 Papyrus Extender has a few keyword functions, including AddKeywordToForm, ReplaceKeywordOnForm and RemoveKeywordOnForm. https://www.nexusmods.com/skyrimspecialedition/mods/22854I ended up making a menu instead and it works perfectly, but still thanks, didn't know about papyrus extender and i'll give it a look to see what's new ;) Link to comment Share on other sites More sharing options...
dylbill Posted May 31, 2023 Share Posted May 31, 2023 No problem, happy modding! Link to comment Share on other sites More sharing options...
reptileye Posted June 8, 2023 Author Share Posted June 8, 2023 Little update: Forgot to show the result. Works great, if no one sees you guards won't arrest you. Here it is in case it might be useful for someone. Code: int aiButton = 0 aiButton = rep_LootingMessage.Show() Actor Corpse = akTargetRef as Actor If aiButton == 0 If (Corpse.IsInFaction(CrimeFactionPale)) CrimeFactionPale.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionFalkreath)) CrimeFactionFalkreath.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionHaafingar)) CrimeFactionHaafingar.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionReach)) CrimeFactionReach.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionRift)) CrimeFactionRift.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionWhiterun)) CrimeFactionWhiterun.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionEastmarch)) CrimeFactionEastmarch.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionSons)) CrimeFactionSons.modcrimegold(500) ElseIf (Corpse.IsInFaction(CrimeFactionImperial)) CrimeFactionImperial.modcrimegold(500) ElseIf (Corpse.IsInFaction(WIGenericCrimeFaction)) WIGenericCrimeFaction.modcrimegold(500) ElseIf (Corpse.IsInFaction(DLC1VampireCrimeFaction)) DLC1VampireCrimeFaction.modcrimegold(500) ElseIf (Corpse.IsInFaction(DLC2SV02ThalmorCrimeFaction)) DLC2SV02ThalmorCrimeFaction.modcrimegold(500) EndIf Corpse.Activate(PlayerRef as objectreference, true) ElseIf aiButton == 1 EndIf How it looks ingame: Link to comment Share on other sites More sharing options...
Recommended Posts