Jump to content

Add Keyword to Weapon via Console Command


abborre

Recommended Posts

I have a particular issue where I want an effect of a perk form one mod to NOT apply to certain weapons I use from other mods. Instead of creating a net of dependent mods and conditions, what I figured I'd do would be to attach a condition to this particular effect so that it does NOT apply when the weapon being used has a certain special keyword. The idea is that I could then use Console Commands in-game to simply add that keyword to weapons I don't want to have that effect. It's a crude solution, but I also think it could be quite satisfactory for my needs.

 

Problem is, I'm testing out the idea of adding keywords to a weapon in-game, and it doesn't seem to be working like I thought it should. I drop a weapon, grab and hold it in front of me, open console, select the weapon(which doesn't even work half the time unless I reload a save). With the weapon selected (I use Better Console - F4SE to make sure I selected the right item) I type:

"addkeyword <keywordID>"

I then type:

"haskeyword <keywordID>"

and the console returns "1", confirming that the item has received the keyword I put on it. But when I then equip the weapon and type:

"player.wornhaskeyword <keywordID>"

the console returns "0", meaning that the weapon is not actually registered as having the keyword I put on it whilst I wield it, meaning that this method won't work for my idea. I'm starting to think that weapons don't have the same ref ID when in your inventory as they do when they're loose in the world.

 

Does anyone know why this is, and how I could achieve the idea I'm going for? Do I have to get the "in-inventory" version of the weapon object, and if so how?

Edited by abborre
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...