Jump to content

Changing object type while in-game


DrucidLeamer

Recommended Posts

Hey, everyone. Let me just preface this thread with a couple things. First of all, I am not experienced with making mods, by ANY stretch of the imagination. I've used mods for the Elder Scrolls series for years, and I certainly know how mods "work," so to speak, at least more so than a newcomer would. But when it comes to creating anything more complicated than a sound/texture/etc. replacer, I'm not of much use to anyone. Second of all, rather than posting a thread here, I could be posting a slightly different thread in the Mod Requests section that would specifically request the mod I'm wanting to see created, but it's been requested before, and I figure that if nothing else, I can try and make the mod myself, so I figured that this subforum would be a better place to start. So now that all that is out of the way, here we go.

 

I'm interested in a mod that essentially allows the player to kill an NPC, activate the corpse like a container (as corpses usually are) so as to loot it, but then be able to take the corpse and place it in said player's inventory as an item that can be manipulated just like any other item (e.g., dropping, putting in a container, etc.) but that, when dropped and thus released back into the worldspace, will resume its original state as a manipulatable/moveable/etc. corpse of the "container" type. I know that Vile Art of Necromancy lets you "dissect" a corpse and place non-unique "body parts" into your inventory, but ideally, I'd like to be able to place the full corpse into the player's inventory (and if possible, have it retain its identity if it's a unique NPC; that is, if you kill, say, Nazeem and place his corpse into your inventory, the "itemized" corpse will specifically retain any information necessary to make it uniquely "Nazeem," and will be, once dropped back into the worldspace, restored as closely as possible to the state it was in when the player added it to his/her inventory, having the same "remaining" loot that it had once the player took what he/she wanted and then placed the body into his/her inventory).

 

My first thought is that in order to accomplish this, the corpse's object type (container, actor, static, etc.) would, upon being put into the player's inventory, need to change on the fly from "container" to some item type (such as potion, armor, miscellaneous, or whatever), and then be able to change back to "container" when dropped back into the worldspace. I believe that this kind of feat is possible because I've seen other mods do it. For example, LtMattmoo's Camping here on the Nexus has items called "storage sacks" that are miscellaneous items when in the inventory, but that turn into moveable, physics-enabled containers when dropped into the world (and that can even be picked back up and converted back to the item type upon entering the player's inventory). JustinOther's Bag of Holding (as well as Vidani's attempt at the same concept) do the same thing, except rather than being misc. items that function by being dropped, they exist in the player's inventory as clothing/armor and grant access to their own container "inventory" upon being equipped (and can then be dropped into the world, moved around, and picked back up).

 

So, assuming that my reasoning is sound, and this approach to making this corpse-to-inventory mod would actually work, I'd like some guidance on how to make the object type switch actually (and smoothly) occur in-game when the player adds the corpse to their inventory. Of course, if this approach is a good one, I could consult the authors of the mods I linked as examples, but I thought I could get extra insight here, and more than that, if this approach to making the mod simply isn't a practical one, then perhaps you guys could guide me in the right direction.

 

Forgive me if I've said anything ignorant or negligent about the process of mod-making. As I stated initially, I'm no expert with this kind of thing. I just have an "apprentice" understanding of how TES mods work. In any case, any guidance you guys could offer would be great. Thanks a lot.

Link to comment
Share on other sites

First the bag of holding mods you linked (as well as my own) are armor pieces that when interacted with in a certain way activate a separate container. They do not switch at any point to a different object type. The same would have to be true of the NPC.

 

It would be theoretically possible to use the OnActivate event coupled with sneaking to place a corpse object in the player inventory while moving the NPC body to a holding cell. Then when the corpse object is dropped to the ground, the NPC body is moved to that position. Realistically you wouldn't be able to carry more than one body so limiting it to one at a time (which makes coding easier) would be a smart idea.

 

So...

 

  Reveal hidden contents

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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