Best practice for adding items on the ground or in corpses?

Post » Fri Apr 03, 2015 11:57 pm

The next version of my mod is going to need to add a number of individual items scattered around the world, which I haven't had to do before so I'm not sure the best way to go about it. They're all BOOK items (journals) which will be found in exterior cells, but some of them should be directly on the ground, and others should go inside corpses which are already pre-placed in the CK.

The ones on the ground seem straightforward, just drag-n-drop in the cell view. But what happens if the player doesn't take it on their first visit to the area? If the cell resets, will it disappear? Or, if the player does take it and the cell resets, will a second copy respawn?

To add the ones to corpses, I was planning to follow the example of dunPOIChillwindJournal2, which is placed on the ground but has the script defaultAddItemNoteToLinkOnLoad, which causes it to go into the nearby corpse, which is a linked reference from the book reference. If I do this for my new books, what if the player installs the mod after already visiting that cell? Will the newly created book reference still go into the corpse? Or is it possible that the corpse will no longer exist at that point?

Finally, is there any good way to do a similar thing via scripts, rather than placing references directly in the CK? I'd like to be able to add a few journals in other worldspaces (Solstheim, Falskaar, Wyrmstooth), but those mods aren't required masters of my mod, and I'd rather not have to make separate plugin ESPs just to place the one journal in each addon worldspace. So I wonder, would it work to use something like GetFormFromFile() to get a specific reference from each mod close to where I want the journal, and then PlaceAtMe() to create a new book at a specific offset from that reference?

Thanks for any advice!

User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Return to V - Skyrim