nflkeeper Posted March 30, 2018 Share Posted March 30, 2018 Hey guys!! New to this modding business for games, i'm currently in progress of building a player home. Not sure where though yet so interior is first on my list. At the minute i'm nearly done for the alchemy room; this has an alchemy table (obviously), a shelf for each type of potion (health, magicka, stamina, poisons, resist potions and misc), and a knapsack against the wall for each and every ingredient you can get in the game incl dlc. All the knapsacks have been linked to each ingredient seperately however what i want is to make it so it will only accept said ingredient and the same for the potions/poisons..... There is a script on the website already however i'm not sure how to figure it out so it works ScriptName ExampleContainerScript Extends ObjectReference Actor Property PlayerREF AutoFormList Property AcceptedItemFLST Auto Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) If akSourceContainer == PlayerREF If !AcceptedItemFLST.HasForm(akBaseItem) RemoveItem(akBaseItem, aiItemCount, True, akSourceContainer) Debug.Trace("Invalid Item") EndIf EndifEndEvent Link to comment Share on other sites More sharing options...
ladyonthemoon Posted March 30, 2018 Share Posted March 30, 2018 (edited) Sorry, inadequate answer. Edited March 30, 2018 by ladyonthemoon Link to comment Share on other sites More sharing options...
Evangela Posted March 30, 2018 Share Posted March 30, 2018 You attach that script to the container and fill the formlist property with the base objects of items that you want the container to accept. Link to comment Share on other sites More sharing options...
nflkeeper Posted March 30, 2018 Author Share Posted March 30, 2018 Can you give me an example and fill it out for me with lets say this potion 'FortifyHealth02' (0003EAF4) - Draught Of Health Link to comment Share on other sites More sharing options...
NexBeth Posted March 30, 2018 Share Posted March 30, 2018 You have to create a form list (In the Object Window under Miscellaneous you'll FormList) for each ingredient. Also each napsack needs to have a unique ID. Right click in the formlist area to create a new one, then drag the ingredient reference from the Object Window in to the form list. Attach your script to each sack. (You will have to create and compile that script and if you don't know how then that's another lesson). Open up the properties window by clicking on the compiled script attached to knapsacks. Fill in the properties listed there. The properties you need to fill in are the IDs for each ingredient. Here is an example of how to do it, but I think a different (but similar) script is used: Link to comment Share on other sites More sharing options...
Recommended Posts