Jump to content

[LE] Convert Existing Ingredient Item into a Food Item?


ElioraArin

Recommended Posts

I know how to change an item that has been placed in the world into something else, but I need to change the actual form of an ingredient into a food so that any existing or future instances of it will be a food instead of an ingredient. I am not attempting to do this with a vanilla ingredient but with some ingredients added by a mod that I am updating, & as it's an update I don't want to simply delete them & create a new form.

Link to comment
Share on other sites

You can give it the VendorItemFood keyword and it will show up in merchants that sell food, but it will still technically be an alchemy ingredient. This is how Chicken's Egg is dealt with in the game. It is an ingredient that is also a food item.

 

But if you want the item to be an actual food instead of an ingredient, you'll have to replace it with a completely new item. This is because they use completely different record types.

 

You *might* be able to use xEdit to replace the ingredient item with your food item by assigning the food item the ingredient item's ID number (after having deleted the ingredient item). This *might* cause the game to change all instances into food rather than ingredient. But it might also cause the game to crash. I wouldn't know. I've never tried except with objects of the same type.

Link to comment
Share on other sites

Unfortunately TES5Edit didn't work for me.

 

Thanks NexusComa, but I need to change an existing ingredient into a food item - it's not because I need the mesh but because I am updating a mod & I want instances of previously added ingredients in already existing saves to become a food after the update. If I can't find a way I guess I will have to deactivate the ingredients from plants, recipes & levelled lists then replace them with new foods - but without actually deleting the ingredient so that there is no missing content. I really don't want new alchemy ingredients in the mod, only foods, so I want to get rid of the ones that it already adds without creating potential issues.

Link to comment
Share on other sites

When working with an old save you run into the problem that the old mod is now part of that save.

Changing anything will result in strange outcomes. For all you know you got it and it's just not gonna show

unless it's a fresh game. I'm afraid when it comes to old saves they are kinda locked in stone.

This is why you always mod coming back to save that never had the mod in it in the 1st place.

A master starting point if you will ... so your mod is being added for the 1st time every time you test.

Link to comment
Share on other sites

  • 2 weeks later...

well if you don't mind a little papyrus you could add a script to the old ingredient that you want to replace so that whenever the player picks it up it will be replaced by your new food iitem. the old item remains thereby untouched and you only have to create a duplicate item unter the food section.

 

this could look similar to this

 

Scriptname XXXenterscriptnameXXX extends ObjectReference

 

ingredient property ingredientname auto

food property foodname auto

Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
if (akNewContainer == Game.GetPlayer()) ; player picks up item
int i = Game.GetPlayer().GetItemCount(Ingredientname) ; get number of old items in inventory

Game.GetPlayer().RemoveItem(ingredientname, i, true)

Game.GetPlayer().Additem(foodname, i, true)

endif

EndEvent

 

Note: the wiki states that depending on wether you pick up stacks of items the event may or may not be called correctly. you will have to test this out a little ingame

Link to comment
Share on other sites

  • Recently Browsing   0 members

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