reinaElise Posted September 4, 2022 Posted September 4, 2022 I want to dynamically attach a script/item to essential actors. What's the best way to do so? For context, I'm trying to make a mod that adds drops to essential npcs, (as well as non-essential, but I'm told I can just use a levelled list to do that.). All the item needs to do is store somewhere a reference to the actor that dropped it. I should add, I'm pretty new to modding with creation kit, but I'm very familiar with programming concepts and such.
traison Posted September 4, 2022 Posted September 4, 2022 A bit unclear on what you're doing here, essentials do not die so there's no "drops" as far as Skyrim is concerned. Maybe you'll make the items spawn in the world when an essential character goes down, sure. The "item" needs to hold a reference to the character that dropped it? This should be doable with either StorageUtil or by making it an enchanted item with a script attached to it. Challenges are going to arise from distributing these changes to all essential characters, as this is what it sounds like you want to do. Maybe SPID can already do that, I'd look into it, otherwise you'll have to write something similar yourself; a SPELL/MGEF that works like a cloak that constantly scans the surrounding area and casts a spell (MGEF) on all actors that match your criteria. Another challenge may be to get a reference to the actor in the dropped item(s). If there's no convenient event for this, you may have to use StorageUtil again. And finally there may be issues with cell changes (I hear spells/mgefs have a tendency to duplicate or disappear) and dead/removed actors. Generally though this sounds like it may need a rethink. While SPID sounds great as a concept, I hate to imagine what it might be doing to performance and the save file. Same with StorageUtil. Not saying these mods are bad, what I am saying is that to me they seem to do things the game was never intended to do. As an example, StorageUtil might be fine when you have a mod adding metadata to say 50 actors. What happens when you do that with a cloak to all actors? I realize that is not what you're doing here, but that was an extreme example.
v2099 Posted September 10, 2022 Posted September 10, 2022 On 9/4/2022 at 10:47 AM, traison said: What happens when you do that with a cloak to all actors? In this case the cloak would probably be what causes a performance hit, not SPID itself, right? Not sure about SPID, but the author of StorageUtil said this about setting lots of values: Quote Saved values take very little memory - expect to use less than 500 KB of physical memory even when setting thousands of values. Have you heard of people having issues with either of these? I mean, even SKSE does lots of things Skyrim was never "intended" to do, but that's practically a default requirement for mods these days. SPID/StorageUtil/etc. open up so much potential for mod authors that I'm willing to give them the benefit of the doubt, at least until there are documented issues with them.
yorpers Posted September 10, 2022 Posted September 10, 2022 Each npc has death drops unique to it(or its base npc). If you want to add additional death drops via a script then you will need to use SPID. Using a cloak will be a bad idea for this for various reasons, the main one being kills from a distance wont trigger the script because the enemies will be out of cloak range; another is potential performance loss simply from how cloaking spells work. SPID should be almost no performance loss, it applies perks on game load, so you may get a stutter or two right after you load a save, any performance loss after that though would be purely based of how you write your script. If you want to add death drops to specific npc's then people are correct that that you can make a new leveled list or alter the existing one. That is where my knowledge ends though.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now