I'm having the fundamental issue of not understanding how to subscribe to events that have to do with the player character. I want to make a mod that causes a player to instantly eat certain food upon that food being put in the inventory. I've got what I think is a viable idea for a script to do that, and noticed in the wiki that there is a "Player Add Item" event you can catch. However, I fundamentally don't understand where I am supposed to put my script so that it receives that event notification. The tutorials I went through for scripting involved attaching a script to a specific object in the world, but I couldn't figure out how to attach a script to the user's player like that.
Frustrated that I couldn't figure out how to do that, I saw the alternative "on container changed" event from ObjectReference that I thought might be a way to catch and handle it on the food side instead of the player side, but I guess from the tutorials I've done, I also don't understand how I could get a large volume of objects to inherit that behavior. It seems like there's plenty of nice identifiers and such I can use to assign traits to the specific items I ultimately want affected by this script, but would I also have to add the script itself to every one of the food objects I want to be insta-eaten?
These are probably basic questions, I know... but the tutorials I've seen focus on attaching new behavior to specific objects in e.g. a new quest or dungeon, and I was looking to get some insight into more overall game changes that I'm more interested in modding for my own gaming experience personally. Thanks for any help offered
