Carabosse Posted January 3, 2016 Posted January 3, 2016 Is anyone aware of a way to suppress the "You cannot equip this item" notification when clicking on an item in your inventory which cannot be equipped. I just want to run some script on a referencealias attached to a MiscObject when it is clicked in the inventory (it has to be in the inventory screen). Everything works fine except for that annoying notification briefly popping up. Thanks,
Guest Posted January 3, 2016 Posted January 3, 2016 Any luck, you can provide the idem you wish to equip? If it is vanilla, just the ID, it is from a mod, the ID and the mod providing it. Thanks.
Carabosse Posted January 3, 2016 Author Posted January 3, 2016 It's a custom Miscellaneous item (Miscitem form). The papyrus property type is MiscObject. It's going to be a Mortar and Pestle for my Bestial Essence mod. It works! But you get that notification saying you cannot equip it, as your character proceeds to equip it (kind of). This annoys me greatly. See my profile pic. This is how annoyed it makes me.
Guest Posted January 3, 2016 Posted January 3, 2016 I see you profile pic. And I will to have your profile pic to be way more relaxed. Now, "equip" in skyrim works only on Armor objects. If you use a "MiscObject", you can run the scripts behind, but it will not really go to a bodyslot. (And so you will receive the message.)
Carabosse Posted January 3, 2016 Author Posted January 3, 2016 You can still catch the onequipped event for non equippable items, which is what I'm doing. Is there a better way to fire a script on an item that is clicked in your inventory? I would prefer if said item would display in the rightmost inventory tab (alongside things like ingots, gems etc)
Guest Posted January 3, 2016 Posted January 3, 2016 OnObjectEquipped is an Actor event and it is goo for any kind of object that can go in the inventory. But if you use a MiscObject then you have the problem of the message you are receiving. (Like trying to equip some "Gold") Now, what are you trying to do? Maybe you can change the type of your object to an Armor, or a Potion so you can avoid the message you are receiving.
Carabosse Posted January 3, 2016 Author Posted January 3, 2016 When the player clicks on the Mortar and Pestle (Miscobject) in their inventory, the character then begins the alchemy creation process. Except in Bestial Essence it's actually a modified kind of cooking. But the player sees their character grinding the mortar and pestle without the alchemy table and is able to craft from the Bestial Essence potion list. Ideally, I want the mortar and pestle tool to persist in the inventory (wouldn't a potion always be consumed, I know I could replace it straight away but that seems messy). I would also really like the tool to show up in the misc inventory tab. I know other mods have done it, like campfire and alchemy/cooking overhaul. I don't ever remember seeing the notification when using their items (bedrolls etc) which all appear in the misc tab. I guess I was hoping there was a quick fix for the notification, rather than having to rework what I've done as aside from the notification it is all working as intended. But it does look really silly, having that notification pop up.
Guest Posted January 3, 2016 Posted January 3, 2016 I am not aware of quick fix for notifications (but for sure I don't know 100% of things.) If you know a mod that does it, just grab it, edit it, and check how it is done.
Carabosse Posted January 3, 2016 Author Posted January 3, 2016 I had a quick look at CACO (cooking and alchemy overaul) and confirmed that it allows you to select a MiscItem in the inventory without firing that notification. There's a script called CACO_PlayerLoadGameAlias (I haven't looked at it in the Ck but it's pretty obvious from the name how it is being used) which includes the following snippet of code: Scriptname CACO_PlayerLoadGameAlias extends ReferenceAlias ... Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject.HasKeyword(ObjectMortarPestle) if PlayerActor.IsInCombat() || PlayerActor.IsSwimming() || PlayerActor.GetSitState() != 0 || PlayerActor.GetSleepState() != 0 || PlayerActor.IsOnMount() || PlayerActor.IsSneaking() debug.notification("You cannot use this item right now.") else Game.DisablePlayerControls() ;Kick them out of the menus Game.EnablePlayerControls() PlayerRef.PlaceAtMe(CACO_MortarAndPestle01Furn) endif endif endEvent So perhaps that is catching it before the event triggered by clicking it in the inventory? Except you are still clicking it in the inventory. I'm not sure how that would work, I guess it just wins the race? I will try that method tomorrow and report back. It's past 4am.
Guest Posted January 3, 2016 Posted January 3, 2016 I think this script (that for sure is related to a ReferenceAlias liked to the Player) is just overwriting the standard OnObjectEquipped for the Player. It works but makes a serious problem if some other mod will try to do the same (the last mod in the Mod List will win.)
Guest Posted January 3, 2016 Posted January 3, 2016 Well i just nuke the Opacity of the HuD in settings bc it ruins the sex & I feel like knowing which way is North is babying me. So yeah that will take that Notif away & then some
txzeenath Posted January 25, 2016 Posted January 25, 2016 Ideally, I want the mortar and pestle tool to persist in the inventory (wouldn't a potion always be consumed, I know I could replace it straight away but that seems messy). IMO, that's actually probably the cleanest way. Make the "tool" item consumable. Tie your script to the actual item, and then just give the player a new one in the event. The additem function can be silenced, so to the player it should be essentially seamless. Or keep the event on the actor and just make the item equippable to an odd slot like 60/61 and unequip it in the event.
Veladarius Posted January 25, 2016 Posted January 25, 2016 From looking at that bit of script it looks like the first if statement would keep it from working on anything other than items with the keyword objectmortarpestle. My suggestion is to place a custom keyword on your item which that if statement would look for then down at the placeatme command do whatever it is you want to do.
h38fh2mf Posted January 25, 2016 Posted January 25, 2016 I wonder if the message is displayed before or after OnEquip event. There is a game setting called "sCantEquipGeneric" where the message is stored. If you set that empty string maybe the message wouldn't be displayed.
Carabosse Posted February 4, 2016 Author Posted February 4, 2016 Oops, never reported back. From looking at that bit of script it looks like the first if statement would keep it from working on anything other than items with the keyword objectmortarpestle. My suggestion is to place a custom keyword on your item which that if statement would look for then down at the placeatme command do whatever it is you want to do. I did try this method but the notification stubbornly always appeared. I got a bit frustrated at spending two days on this one annoying issue and moved on to something else. I wonder if the message is displayed before or after OnEquip event. There is a game setting called "sCantEquipGeneric" where the message is stored. If you set that empty string maybe the message wouldn't be displayed. Thank you for this suggestion. I will look into it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.