yarddogg77 Posted August 30, 2019 Share Posted August 30, 2019 I'm working on a mod to create 6 objects. I want them to be craftable only 1 time each. I have posted this question before and somebody mentioned using global values, but I don't know where to begin with it. I see the global forms but have no idea what they do. I assume I would have to attach global values to the recipes, but am not sure how to do this. Or maybe I could attach global values to the forge itself? Anyone have any advice? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 31, 2019 Share Posted August 31, 2019 Create a Global record.Assign it a value of 0Each recipe is given a condition for its matching Global record to be equal to 0 in order for it to show.Once crafted (and here is the 'tricky' part) increment the Global value by 1. To increment the Global record value:Option 1: No SKSEUse a quest with a player aliasPut a script on the player alias that listens for the OnItemAdded eventWhen the desired item is added, we assume it has been crafted, and increment the Global record's value. Option 2: With SKSEUse a quest with a player aliasPut a script on the player alias that listens for the OnItemAdded eventThis script will do the same as the other option. However, it will also check for the crafting menu to be open when the item is added to the player inventory. Thus narrowing down the window to increment the Global record's value and more accurately catching the correct instance. Both options should have an inventory event filter applied so that the OnItemAdded event only triggers with the desired items. If your 6 items are intended to be sequential in creation, then use a single Global record and the recipes would have conditions for the value to be sequentially higher (i.e. 0,1,2,etc). For your information: Global records hold a numerical value that can then be accessed by scripts and conditions on a variety of records. Internally, they are all floats but they can be used with integers by using SetValueInt and GetValueInt. Link to comment Share on other sites More sharing options...
yarddogg77 Posted September 2, 2019 Author Share Posted September 2, 2019 (edited) I think I will just have the player quest for the items rather than making them craftable. Even as you described it, I still don't understand. LOL. I've never been any good at getting a quest to fire, I can't even seem to get a letter delivered bya courier, ever since I switched to SSE, I've had no luck at all. I'm starting to wonder if my creation kit needs bug fixes? I don't understand how all you mod authors are getting anything done. I was starting to learn on Old Skyrim...... Edited September 2, 2019 by yarddogg77 Link to comment Share on other sites More sharing options...
Recommended Posts